From report at bugs.python.org Mon Jun 1 00:02:10 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Mon, 01 Jun 2020 04:02:10 +0000 Subject: [issue40759] Deprecate the symbol module In-Reply-To: <1590353506.35.0.123027767636.issue40759@roundup.psfhosted.org> Message-ID: <1590984130.01.0.687094717929.issue40759@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 00:34:27 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 01 Jun 2020 04:34:27 +0000 Subject: [issue40788] Build issue Solaris 10 Sparc In-Reply-To: <1590548322.5.0.995785667003.issue40788@roundup.psfhosted.org> Message-ID: <1590986067.83.0.739990510263.issue40788@roundup.psfhosted.org> Dong-hee Na added the comment: Please submit the compile error log you met :) It will be helpful to maintainers ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 00:41:28 2020 From: report at bugs.python.org (Warren Hardy) Date: Mon, 01 Jun 2020 04:41:28 +0000 Subject: [issue40788] Build issue Solaris 10 Sparc In-Reply-To: <1590548322.5.0.995785667003.issue40788@roundup.psfhosted.org> Message-ID: <1590986488.59.0.524797662866.issue40788@roundup.psfhosted.org> Warren Hardy added the comment: not to sound like an idiot, where do i find the compile log? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 00:47:59 2020 From: report at bugs.python.org (Warren Hardy) Date: Mon, 01 Jun 2020 04:47:59 +0000 Subject: [issue40788] Build issue Solaris 10 Sparc In-Reply-To: <1590548322.5.0.995785667003.issue40788@roundup.psfhosted.org> Message-ID: <1590986879.05.0.138765629534.issue40788@roundup.psfhosted.org> Warren Hardy added the comment: here is the config.log, had to gzip it to upload ---------- Added file: https://bugs.python.org/file49207/config.log.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 01:21:27 2020 From: report at bugs.python.org (Vikash Raja Samuel Selvin) Date: Mon, 01 Jun 2020 05:21:27 +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: <1590988887.07.0.536370964848.issue40832@roundup.psfhosted.org> Vikash Raja Samuel Selvin added the comment: Thanks for your comments. Just to make sure I understood correctly, even though something like bisect.bisect_right(l, 5.1, 0, -2) [This returns 0 which is wrong] is allowed, since it is not common / intended it is ok to not check for negative values for hi. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 02:20:20 2020 From: report at bugs.python.org (Warren Hardy) Date: Mon, 01 Jun 2020 06:20:20 +0000 Subject: [issue40788] Build issue Solaris 10 Sparc In-Reply-To: <1590548322.5.0.995785667003.issue40788@roundup.psfhosted.org> Message-ID: <1590992420.96.0.673785500843.issue40788@roundup.psfhosted.org> Warren Hardy added the comment: make log ---------- Added file: https://bugs.python.org/file49208/make.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 02:26:44 2020 From: report at bugs.python.org (Warren Hardy) Date: Mon, 01 Jun 2020 06:26:44 +0000 Subject: [issue40788] Build issue Solaris 10 Sparc In-Reply-To: <1590548322.5.0.995785667003.issue40788@roundup.psfhosted.org> Message-ID: <1590992804.2.0.592666759164.issue40788@roundup.psfhosted.org> Warren Hardy added the comment: this error log contains information not piped to the make.log ---------- Added file: https://bugs.python.org/file49209/make.error.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 02:58:20 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Jun 2020 06:58:20 +0000 Subject: [issue30008] OpenSSL 1.1.0 deprecated functions In-Reply-To: <1491496485.65.0.239768530197.issue30008@psf.upfronthosting.co.za> Message-ID: <1590994700.95.0.321205227757.issue30008@roundup.psfhosted.org> Christian Heimes added the comment: New changeset a871f692b4a2e6c7d45579693e787edc0af1a02c by Christian Heimes in branch 'master': bpo-30008: Fix OpenSSL no-deprecated compilation (GH-20397) https://github.com/python/cpython/commit/a871f692b4a2e6c7d45579693e787edc0af1a02c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 02:58:52 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jun 2020 06:58:52 +0000 Subject: [issue30008] OpenSSL 1.1.0 deprecated functions In-Reply-To: <1491496485.65.0.239768530197.issue30008@psf.upfronthosting.co.za> Message-ID: <1590994732.68.0.0110299728166.issue30008@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19808 pull_request: https://github.com/python/cpython/pull/20567 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 02:58:32 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jun 2020 06:58:32 +0000 Subject: [issue30008] OpenSSL 1.1.0 deprecated functions In-Reply-To: <1491496485.65.0.239768530197.issue30008@psf.upfronthosting.co.za> Message-ID: <1590994712.57.0.705001353681.issue30008@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +19806 pull_request: https://github.com/python/cpython/pull/20565 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 02:58:42 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jun 2020 06:58:42 +0000 Subject: [issue30008] OpenSSL 1.1.0 deprecated functions In-Reply-To: <1491496485.65.0.239768530197.issue30008@psf.upfronthosting.co.za> Message-ID: <1590994722.97.0.864311994088.issue30008@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19807 pull_request: https://github.com/python/cpython/pull/20566 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 03:11:59 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jun 2020 07:11:59 +0000 Subject: [issue30008] OpenSSL 1.1.0 deprecated functions In-Reply-To: <1491496485.65.0.239768530197.issue30008@psf.upfronthosting.co.za> Message-ID: <1590995519.66.0.985148115084.issue30008@roundup.psfhosted.org> miss-islington added the comment: New changeset 296db8cc2fd089d0d2f23b7dddafc029be9f1eb6 by Miss Islington (bot) in branch '3.7': bpo-30008: Fix OpenSSL no-deprecated compilation (GH-20397) https://github.com/python/cpython/commit/296db8cc2fd089d0d2f23b7dddafc029be9f1eb6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 03:17:22 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jun 2020 07:17:22 +0000 Subject: [issue30008] OpenSSL 1.1.0 deprecated functions In-Reply-To: <1491496485.65.0.239768530197.issue30008@psf.upfronthosting.co.za> Message-ID: <1590995842.5.0.863370856259.issue30008@roundup.psfhosted.org> miss-islington added the comment: New changeset 9c0ff178a5d5d0992c0be21a7f343a495338ad73 by Miss Islington (bot) in branch '3.8': bpo-30008: Fix OpenSSL no-deprecated compilation (GH-20397) https://github.com/python/cpython/commit/9c0ff178a5d5d0992c0be21a7f343a495338ad73 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 03:18:42 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jun 2020 07:18:42 +0000 Subject: [issue30008] OpenSSL 1.1.0 deprecated functions In-Reply-To: <1491496485.65.0.239768530197.issue30008@psf.upfronthosting.co.za> Message-ID: <1590995922.53.0.139606709821.issue30008@roundup.psfhosted.org> miss-islington added the comment: New changeset 24a88b008b075bca4494822cc7549c10868ab820 by Miss Islington (bot) in branch '3.9': bpo-30008: Fix OpenSSL no-deprecated compilation (GH-20397) https://github.com/python/cpython/commit/24a88b008b075bca4494822cc7549c10868ab820 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 03:29:53 2020 From: report at bugs.python.org (Bahram Aghaei) Date: Mon, 01 Jun 2020 07:29:53 +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: <1590996593.69.0.395710179529.issue39189@roundup.psfhosted.org> Bahram Aghaei added the comment: Well, I think because the io module provides Python?s main facilities for dealing with various types of I/O, so using io.DEFAULT_BUFFER_SIZE is a kind of standard buffer size. I don't see any scientific reason for choosing the 8 * 1024 inside the filecmp module. My guess is that guy wanted to use something that is fairly small and would be okay in different circumstances (OSs) and the idea of DEFAULT_BUFFER_SIZE is the same thing. I think, the chances are high that in the future as computers reinforce, we might change the buffer size as well. So using the io.DEFAULT_BUFFER_SIZE will guarantee that we only change io.DEFAULT_BUFFER_SIZE and every module would be okay automatically? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 03:35:10 2020 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 01 Jun 2020 07:35:10 +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: <1590996910.76.0.796379201707.issue40217@roundup.psfhosted.org> Change by Petr Viktorin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 03:43:52 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 01 Jun 2020 07:43:52 +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: <1590997432.68.0.462534076108.issue40836@roundup.psfhosted.org> R?mi Lapeyre added the comment: Thanks, I was wondering about that. I didn't know what is the status of the function exactly and found https://bugs.python.org/msg344080. While they are not documented, you can find them in dir() and in the help, maybe they should have a docstring? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 03:51:48 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 01 Jun 2020 07:51:48 +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: <1590997908.37.0.497939454181.issue40790@roundup.psfhosted.org> Ronald Oussoren added the comment: Looking at the source code at : computed gotos are enabled automatically when they are available. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 03:57:00 2020 From: report at bugs.python.org (laike9m) Date: Mon, 01 Jun 2020 07:57:00 +0000 Subject: [issue40790] Python should enable computed gotos on Mac by default In-Reply-To: <1590997908.37.0.497939454181.issue40790@roundup.psfhosted.org> Message-ID: laike9m added the comment: You're right. The part I don't understand is how `--without-computed-gotos` disabled the feature. Also I guess since this feature is meant to be transparent to users, it's ok to not have a way to inspect it. On Mon, Jun 1, 2020 at 12:51 AM Ronald Oussoren wrote: > > Ronald Oussoren added the comment: > > Looking at the source code at < > https://github.com/python/cpython/blob/a871f692b4a2e6c7d45579693e787edc0af1a02c/Python/ceval.c#L1024>: > computed gotos are enabled automatically when they are available. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 04:45:35 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Jun 2020 08:45:35 +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: <1591001135.53.0.275137344148.issue40831@roundup.psfhosted.org> Steve Dower added the comment: Python now decodes bytes back into a str when used as a path, so the behaviour is identical. Someone else might feel comfortable doing the patch, I didn't mean to imply that you had to. Only that it is a valid fix and won't be a waste of time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 05:16:04 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Jun 2020 09:16:04 +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: <1591002964.5.0.271256610779.issue22167@roundup.psfhosted.org> Serhiy Storchaka added the comment: Brilliant idea! I played with it yesterday, and it is easy to generalize it to work with a*/b*/c*/d/e/f and to "use not more than N simultaneously opened file descriptors per glob iterator". The only problem is if we want to use this idea with recursive "**" without losing performance. It is just a technical problem which can be solved by adding more code. Although I need to do some benchmarks. And I need to test how this idea will work with issue38144. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 05:23:07 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Jun 2020 09:23:07 +0000 Subject: [issue38144] Add the root_dir and dir_fd parameters in glob.glob() In-Reply-To: <1568313061.34.0.998675763501.issue38144@roundup.psfhosted.org> Message-ID: <1591003387.46.0.708550022047.issue38144@roundup.psfhosted.org> Serhiy Storchaka added the comment: After adding this feature to iglob I am going to add it to other functions which work recursively with a directory tree. The only question: should we add two parameters root_dir and dir_fd or combine them in a single rood_dir (which can be either path or file descriptor or a special object combining a file descriptor and a relative path)? Or maybe merge one variant, test it and change it before feature freeze if needed? ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 05:45:33 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jun 2020 09:45:33 +0000 Subject: [issue40830] Certain uses of dictionary unpacking raise TypeError In-Reply-To: <1590869229.29.0.66661660878.issue40830@roundup.psfhosted.org> Message-ID: <1591004733.46.0.633016462821.issue40830@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19809 pull_request: https://github.com/python/cpython/pull/20569 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 06:42:49 2020 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 01 Jun 2020 10:42:49 +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: <1591008169.7.0.463079674377.issue40831@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 5.0 -> 6.0 pull_requests: +19810 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20570 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 06:44:41 2020 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 01 Jun 2020 10:44:41 +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: <1591008281.55.0.119181504535.issue40831@roundup.psfhosted.org> Zackery Spytz added the comment: I have created a fix for this issue. Please consider taking a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 07:41:44 2020 From: report at bugs.python.org (=?utf-8?q?Pekka_Kl=C3=A4rck?=) Date: Mon, 01 Jun 2020 11:41:44 +0000 Subject: [issue40838] inspect.getsourcefile documentation doesn't mention it can return None Message-ID: <1591011704.27.0.0385051429778.issue40838@roundup.psfhosted.org> New submission from Pekka Kl?rck : The docs of inspect.getsourcefile [1] mention the function can raise TypeError, but there's nothing about the function possibly returning None. This caused a bug in our project [2]. If I understand the code [3] correctly, None is returned if getsourcefile cannot determine the original source file of the file returned by getfile. That's understandable but should definitely be documented. Raising TypeError that getfile itself may raise might be even better, but such a backwards incompatible API change is probably not worth the effort. While looking at the code, I also noticed there's getabsfile [4] that uses getfile if getsourcefile returns None. That looks handy but since the function isn't included in the inspect module documentation [5] using it feels pretty risky. [1] https://docs.python.org/3/library/inspect.html#inspect.getsourcefile [2] https://github.com/robotframework/robotframework/issues/3587 [3] https://github.com/python/cpython/blob/3.8/Lib/inspect.py#L692 [4] https://github.com/python/cpython/blob/3.8/Lib/inspect.py#L714 [5] https://bugs.python.org/issue12317 ---------- messages: 370547 nosy: pekka.klarck priority: normal severity: normal status: open title: inspect.getsourcefile documentation doesn't mention it can return None _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 08:47:06 2020 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Mon, 01 Jun 2020 12:47:06 +0000 Subject: [issue40838] inspect.getsourcefile documentation doesn't mention it can return None In-Reply-To: <1591011704.27.0.0385051429778.issue40838@roundup.psfhosted.org> Message-ID: <1591015626.65.0.544701392276.issue40838@roundup.psfhosted.org> Jim Fasarakis-Hilliard added the comment: For a more comprehensive list, we currently have for `get*` functions in `inspect`: `inspect.getdoc`: Returns `None` if the documentation string isn't present, either directly on the object or through it mro. This *isn't* documented. `inspect.getfile`: Explicitly seems to handle None cases. After peeking a bit in the `PyCode_*` interface, it doesn't seem to be possible to assign `None` to the `co_filename` so the returning the `object.co_filename` in the function appears to not be able to return `None`. `inspect.getmodule`: Returns None in a number of cases. This *isn't* documented. `inspect.getsourcefile`: Returns None if the filename indicates an extension module or when none of the ifs are matched. This *isn't* documented. Some (getmodulename, getcomments) do document this. Agreed that the rest of the cases where `None`s might be returned should be documented. ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 08:53:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 12:53:37 +0000 Subject: [issue40826] Segfaults when close file descriptor 0 In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591016017.05.0.331355757994.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: The following change modified PyOS_InterruptOccurred() to require the hold the GIL: commit d83168854e19d0381fa57db25fca6c622917624f Author: Victor Stinner Date: Fri Mar 20 14:50:35 2020 +0100 bpo-40010: Optimize pending calls in multithreaded applications (GH-19091) If a thread different than the main thread schedules a pending call (Py_AddPendingCall()), the bytecode evaluation loop is no longer interrupted at each bytecode instruction to check for pending calls which cannot be executed. Only the main thread can execute pending calls. Previously, the bytecode evaluation loop was interrupted at each instruction until the main thread executes pending calls. * Add _Py_ThreadCanHandlePendingCalls() function. * SIGNAL_PENDING_CALLS() now only sets eval_breaker to 1 if the current thread can execute pending calls. Only the main thread can execute pending calls. -- PyOS_InterruptOccurred() is part of the limited C API, but it's not even documented :-( So it's not easy to say if it's a backward incompatible change. At least, as the author of the change, I can say that the change was deliberate. bpo-40010 rationale is that only the main thread of the main interpreter must call Python signal handlers. So when another thread or another interpreter (running the main thread) asks "should the Python signal handlers be executed", the answer is always "no", even if yes, Python got a signal (which requires to execute at least one Python signal handler). The change is that PyOS_InterruptOccurred() now requires to hold the GIL to get current Python thread state: _PyThreadState_GET() returns NULL when the GIL is released. Modifying PyOS_InterruptOccurred() to always return 0 if the GIL is released (if _PyThreadState_GET() returns NULL) is wrong: if the function is called by the main thread of the main interpreter, it must return 1. -- By the way, I rewrote the C signal handler in Python 3.9 to not require to get the current Python thread state. In Python 3.8, it was modified and started to require the current Python thread if writing into the wakeup file descriptor failed to schedule a "pending call". commit b54a99d6432de93de85be2b42a63774f8b4581a0 Author: Victor Stinner Date: Wed Apr 8 23:35:05 2020 +0200 bpo-40082: trip_signal() uses the main interpreter (GH-19441) Fix the signal handler: it now always uses the main interpreter, rather than trying to get the current Python thread state. The following function now accepts an interpreter, instead of a Python thread state: * _PyEval_SignalReceived() * _Py_ThreadCanHandleSignals() * _PyEval_AddPendingCall() * COMPUTE_EVAL_BREAKER() * SET_GIL_DROP_REQUEST(), RESET_GIL_DROP_REQUEST() * SIGNAL_PENDING_CALLS(), UNSIGNAL_PENDING_CALLS() * SIGNAL_PENDING_SIGNALS(), UNSIGNAL_PENDING_SIGNALS() * SIGNAL_ASYNC_EXC(), UNSIGNAL_ASYNC_EXC() Py_AddPendingCall() now uses the main interpreter if it fails to the current Python thread state. Convert _PyThreadState_GET() and PyInterpreterState_GET_UNSAFE() macros to static inline functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 08:55:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 12:55:31 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591016131.59.0.945656282648.issue40826@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Segfaults when close file descriptor 0 -> PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 09:00:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 13:00:20 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591016420.82.0.0802777162338.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: > PyOS_InterruptOccurred() now requires to hold the GIL This change impacted gdb: * https://sourceware.org/pipermail/gdb-patches/2020-May/169110.html * https://bugzilla.redhat.com/show_bug.cgi?id=1829702 gdbpy_check_quit_flag() called PyOS_InterruptOccurred() without holding the GIL. It worked in Python 3.8, but started to crash in Python 3.9 beta1. gdb had another issue, it started by always releasing the GIL and always called the Python C API with the GIL released (if I understood correctly). gdb was fixed by calling PyGILState_Ensure()/PyGILState_Release() when calling the Python C API, especially PyOS_InterruptOccurred(). Maybe the minimum would be to *document* that the GIL must be held to call PyOS_InterruptOccurred(), and that it's not a new requirements. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 09:29:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 13:29:12 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591018152.55.0.392519809488.issue40826@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19811 pull_request: https://github.com/python/cpython/pull/20571 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 09:51:08 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 01 Jun 2020 13:51:08 +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: <1591019468.69.0.73494839658.issue40686@roundup.psfhosted.org> Dong-hee Na added the comment: Two things. 1. GH-20342 solved this issue? 2. If not what's left for this issue? :) Sorry, Normally I should check the current status. But I don't have Windows machine so I can not test it. However the update will help contributors who want to deal with :) Thanks Pablo ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 10:02:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 14:02:47 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591020167.39.0.808634905638.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3026cad59b87751a9215111776cac8e819458fce by Victor Stinner in branch 'master': bpo-40826: Add _Py_EnsureTstateNotNULL() macro (GH-20571) https://github.com/python/cpython/commit/3026cad59b87751a9215111776cac8e819458fce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 11:03:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 15:03:02 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591023782.28.0.804513208825.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: I can reproduce PyOS_InterruptOccurred() crash in Python 3.8 if I remove readline.cpython-38d-x86_64-linux-gnu.so and I disable EINTR error checking in my_fgets(): diff --git a/Parser/myreadline.c b/Parser/myreadline.c index 43e5583b8b..2712dedacd 100644 --- a/Parser/myreadline.c +++ b/Parser/myreadline.c @@ -73,7 +73,7 @@ my_fgets(char *buf, int len, FILE *fp) clearerr(fp); return -1; /* EOF */ } -#ifdef EINTR +#if 0 if (err == EINTR) { int s; PyEval_RestoreThread(_PyOS_ReadlineTState); vstinner at apu$ ./python Python 3.8.3+ (heads/3.8-dirty:00a240bf7f, Jun 1 2020, 17:00:22) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> ^C Erreur de segmentation (core dumped) I cannot reproduce the issue in Python 3.7. --- Python 3.7: --- int PyOS_InterruptOccurred(void) { if (_Py_atomic_load_relaxed(&Handlers[SIGINT].tripped)) { if (PyThread_get_thread_ident() != main_thread) return 0; _Py_atomic_store_relaxed(&Handlers[SIGINT].tripped, 0); return 1; } return 0; } --- Python 3.8: --- static int is_main(_PyRuntimeState *runtime) { unsigned long thread = PyThread_get_thread_ident(); PyInterpreterState *interp = _PyRuntimeState_GetThreadState(runtime)->interp; return (thread == runtime->main_thread && interp == runtime->interpreters.main); } int PyOS_InterruptOccurred(void) { if (_Py_atomic_load_relaxed(&Handlers[SIGINT].tripped)) { _PyRuntimeState *runtime = &_PyRuntime; if (!is_main(runtime)) { return 0; } _Py_atomic_store_relaxed(&Handlers[SIGINT].tripped, 0); return 1; } return 0; } --- is_main() function was added in Python 3.8 by: commit 64d6cc826dacebc2493b1bb5e8cb97828eb76f81 Author: Eric Snow Date: Sat Feb 23 15:40:43 2019 -0700 bpo-35724: Explicitly require the main interpreter for signal-handling. (GH-11530) Ensure that the main interpreter is active (in the main thread) for signal-handling operations. This is increasingly relevant as people use subinterpreters more. https://bugs.python.org/issue35724 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 11:23:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 15:23:52 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591025032.31.0.535584139018.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: It seems like this issue was introduced by this change: commit 728189884e0e128c4ffc57b785b04584d57a90c0 Author: Victor Stinner Date: Thu Mar 26 22:28:11 2020 +0100 bpo-38644: Pass tstate explicitly in signalmodule.c (GH-19184) PyOS_InterruptOccurred() now checks _Py_ThreadCanHandleSignals() before checking if SIGINT is tripped. Include/internal/pycore_pyerrors.h | 2 + Modules/signalmodule.c | 152 ++++++++++++++++++++++--------------- Python/ceval.c | 4 +- 3 files changed, 93 insertions(+), 65 deletions(-) Before: --- static inline int _Py_IsMainInterpreter(PyThreadState* tstate) { /* Use directly _PyRuntime rather than tstate->interp->runtime, since this function is used in performance critical code path (ceval) */ return (tstate->interp == _PyRuntime.interpreters.main); } static inline int _Py_ThreadCanHandleSignals(PyThreadState *tstate) { return (_Py_IsMainThread() && _Py_IsMainInterpreter(tstate)); } static int thread_can_handle_signals(void) { PyThreadState *tstate = _PyThreadState_GET(); return _Py_ThreadCanHandleSignals(tstate); } int PyOS_InterruptOccurred(void) { if (_Py_atomic_load_relaxed(&Handlers[SIGINT].tripped)) { if (!thread_can_handle_signals()) { return 0; } _Py_atomic_store_relaxed(&Handlers[SIGINT].tripped, 0); return 1; } return 0; } --- After: --- static inline int _Py_IsMainInterpreter(PyThreadState* tstate) { /* Use directly _PyRuntime rather than tstate->interp->runtime, since this function is used in performance critical code path (ceval) */ return (tstate->interp == _PyRuntime.interpreters.main); } static inline int _Py_ThreadCanHandleSignals(PyThreadState *tstate) { return (_Py_IsMainThread() && _Py_IsMainInterpreter(tstate)); } int PyOS_InterruptOccurred(void) { PyThreadState *tstate = _PyThreadState_GET(); if (!_Py_ThreadCanHandleSignals(tstate)) { return 0; } if (!_Py_atomic_load_relaxed(&Handlers[SIGINT].tripped)) { return 0; } _Py_atomic_store_relaxed(&Handlers[SIGINT].tripped, 0); return 1; } --- The difference is that tstate->interp is now checked *before* checking if SIGINT signal is tripped. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 11:36:04 2020 From: report at bugs.python.org (Ama Aje My Fren) Date: Mon, 01 Jun 2020 15:36:04 +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: <1591025764.01.0.871649639963.issue24921@roundup.psfhosted.org> Change by Ama Aje My Fren : ---------- keywords: +patch nosy: +amaajemyfren nosy_count: 5.0 -> 6.0 pull_requests: +19812 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20572 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 11:36:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 15:36:27 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591025787.65.0.719628555886.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: So PyOS_InterruptOccurred() must be called with the GIL held since 3.8, it's just that the nobody noticed the bug before. If SIGGINT is tripped and the GIL is released, PyOS_InterruptOccurred() does also crash in Python 3.8. -- One way to see the bug in Python 3.8 without having to trip SIGINT. Apply this patch: diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index 0c9a2671fe..b850af3163 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -1729,11 +1729,12 @@ PyOS_FiniInterrupts(void) int PyOS_InterruptOccurred(void) { + _PyRuntimeState *runtime = &_PyRuntime; + if (!is_main(runtime)) { + return 0; + } + if (_Py_atomic_load_relaxed(&Handlers[SIGINT].tripped)) { - _PyRuntimeState *runtime = &_PyRuntime; - if (!is_main(runtime)) { - return 0; - } _Py_atomic_store_relaxed(&Handlers[SIGINT].tripped, 0); return 1; } $ make $ find -name "*readline*so" -delete $ ./python Python 3.8.3+ (heads/3.8-dirty:00a240bf7f, Jun 1 2020, 17:24:09) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import os; os.close(0) >>> Erreur de segmentation (core dumped) --- Reproduce the bug in Python 3.8 without modifying the code, using gdb to trigger events SIGINT at the right place: $ gdb ./python (gdb) b my_fgets Breakpoint 1 at 0x68b941: file Parser/myreadline.c, line 39. (gdb) run Python 3.8.3+ (heads/3.8:00a240bf7f, Jun 1 2020, 17:27:24) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> Breakpoint 1, my_fgets (...) (gdb) p (void)close(0) (gdb) delete 1 (gdb) signal SIGINT Continuing with signal SIGINT. Program received signal SIGSEGV, Segmentation fault. is_main (runtime=0x7ff6c0 <_PyRuntime>) at ./Modules/signalmodule.c:193 193 PyInterpreterState *interp = _PyRuntimeState_GetThreadState(runtime)->interp; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 11:38:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 15:38:55 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591025935.78.0.929259656153.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: I add "Python 3.8" version: it's also affected. ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 11:44:07 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Jun 2020 15:44:07 +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: <1591026247.01.0.787912338339.issue40831@roundup.psfhosted.org> Steve Dower added the comment: New changeset c8966667bbdb284c3780ef6cec8a3870935a6bb7 by Zackery Spytz in branch 'master': bpo-40831: Remove an incorrect statement in the Windows docs (GH-20570) https://github.com/python/cpython/commit/c8966667bbdb284c3780ef6cec8a3870935a6bb7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 11:44:16 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jun 2020 15:44:16 +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: <1591026256.66.0.751520189245.issue40831@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +19813 pull_request: https://github.com/python/cpython/pull/20573 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 11:44:24 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jun 2020 15:44:24 +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: <1591026264.1.0.904037515602.issue40831@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19814 pull_request: https://github.com/python/cpython/pull/20574 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 11:44:34 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jun 2020 15:44:34 +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: <1591026274.45.0.952493908479.issue40831@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19815 pull_request: https://github.com/python/cpython/pull/20575 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 11:53:35 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jun 2020 15:53:35 +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: <1591026814.99.0.753195653079.issue40831@roundup.psfhosted.org> miss-islington added the comment: New changeset a169961dfc777eb467a2b1027391285a7706329a by Miss Islington (bot) in branch '3.9': bpo-40831: Remove an incorrect statement in the Windows docs (GH-20570) https://github.com/python/cpython/commit/a169961dfc777eb467a2b1027391285a7706329a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 11:53:42 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jun 2020 15:53:42 +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: <1591026822.62.0.100843606278.issue40831@roundup.psfhosted.org> miss-islington added the comment: New changeset d7f2fd2ae54161362c7f3d28bd7a1840a796e63d by Miss Islington (bot) in branch '3.7': bpo-40831: Remove an incorrect statement in the Windows docs (GH-20570) https://github.com/python/cpython/commit/d7f2fd2ae54161362c7f3d28bd7a1840a796e63d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 11:53:36 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jun 2020 15:53:36 +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: <1591026816.84.0.173679850703.issue40831@roundup.psfhosted.org> miss-islington added the comment: New changeset d0dc369a90e356bf2eba651816feb7ad736ce28a by Miss Islington (bot) in branch '3.8': bpo-40831: Remove an incorrect statement in the Windows docs (GH-20570) https://github.com/python/cpython/commit/d0dc369a90e356bf2eba651816feb7ad736ce28a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 11:53:54 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Jun 2020 15:53:54 +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: <1591026834.89.0.648513484272.issue40831@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 12:12:31 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 01 Jun 2020 16:12:31 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1591027951.26.0.0706773718041.issue1635741@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset e9684fac5a158be9806304a676e619857520a4dc by Dong-hee Na in branch 'master': bpo-1635741: Port fcntl module to multiphase initialization (GH-20540) https://github.com/python/cpython/commit/e9684fac5a158be9806304a676e619857520a4dc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 12:33:05 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 01 Jun 2020 16:33:05 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591029185.29.0.954065099609.issue39791@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +19816 pull_request: https://github.com/python/cpython/pull/20576 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 12:54:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 16:54:27 +0000 Subject: [issue39593] ctypes s_set() uses strlen() and so truncates string at null character In-Reply-To: <1581265045.65.0.359928840546.issue39593@roundup.psfhosted.org> Message-ID: <1591030467.47.0.135271006662.issue39593@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a97011b9b8c8111f42e1e7594081956136d848da by Hai Shi in branch 'master': bpo-39593: Add test on ctypes cfield.c s_set() (GH-18424) https://github.com/python/cpython/commit/a97011b9b8c8111f42e1e7594081956136d848da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 12:55:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 16:55:09 +0000 Subject: [issue39593] ctypes s_set() uses strlen() and so truncates string at null character In-Reply-To: <1581265045.65.0.359928840546.issue39593@roundup.psfhosted.org> Message-ID: <1591030509.54.0.0872483490114.issue39593@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Hai Shi. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 13:21:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 17:21:48 +0000 Subject: [issue39943] Meta: Clean up various issues in C internals In-Reply-To: <1583983387.49.0.277830283994.issue39943@roundup.psfhosted.org> Message-ID: <1591032108.72.0.248519723703.issue39943@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 06e3a27a3c863495390a07c695171a8e62a6e0d2 by Ammar Askar in branch 'master': bpo-39943: Fix MSVC warnings in sre extension (GH-20508) https://github.com/python/cpython/commit/06e3a27a3c863495390a07c695171a8e62a6e0d2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 13:24:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 17:24:49 +0000 Subject: [issue39943] Meta: Clean up various issues in C internals In-Reply-To: <1583983387.49.0.277830283994.issue39943@roundup.psfhosted.org> Message-ID: <1591032289.1.0.27607487777.issue39943@roundup.psfhosted.org> STINNER Victor added the comment: If someone is interested, there is a one remaining compiler warning in frameobject.c which is likely easy to fix: 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] See https://bugs.python.org/issue40228#msg368383 --- Moreover, the following change introduced a warning in pythonrun.c: D:\a\cpython\cpython\Python\pythonrun.c(579,21): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj] commit 15bc9ab301d73f20bff47a12ef05326feb40f797 Author: Guido van Rossum Date: Thu May 14 19:22:48 2020 -0700 bpo-40612: Fix SyntaxError edge cases in traceback formatting (GH-20072) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 13:26:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 17:26:29 +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: <1591032389.08.0.528118725936.issue40630@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3c7609a23cf6e011f2cd411e28d9dcb1b087929c by Huon Wilson in branch '3.9': [3.9] bpo-40630: Add tracemalloc.reset_peak (GH-20102) (GH-20545) https://github.com/python/cpython/commit/3c7609a23cf6e011f2cd411e28d9dcb1b087929c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 13:26:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 17:26:37 +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: <1591032397.56.0.400548160119.issue40630@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 39de8e4b6f139f8d8284732bd7bb6e5ccced29fa by Huon Wilson in branch 'master': bpo-40630: adjust tracemalloc.reset_peak docs for backport to 3.9 (GH-20546) https://github.com/python/cpython/commit/39de8e4b6f139f8d8284732bd7bb6e5ccced29fa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 13:27:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 17:27:29 +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: <1591032449.45.0.295253828669.issue40630@roundup.psfhosted.org> STINNER Victor added the comment: Feature added to Python 3.9. Lukasz allowed to add the feature to Python 3.9 beta2: https://github.com/python/cpython/pull/20102#issuecomment-632728791 ---------- versions: +Python 3.9 -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 14:13:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 18:13:34 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591035214.93.0.52247890385.issue40826@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19817 pull_request: https://github.com/python/cpython/pull/20578 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 14:32:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 18:32:13 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591036333.06.0.529302601646.issue40826@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19818 pull_request: https://github.com/python/cpython/pull/20579 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 14:34:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 18:34:23 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591036463.06.0.742014399891.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: New changeset cbe129692293251e7fbcea9ff0d822824d90c140 by Victor Stinner in branch 'master': bpo-40826: PyOS_InterruptOccurred() requires GIL (GH-20578) https://github.com/python/cpython/commit/cbe129692293251e7fbcea9ff0d822824d90c140 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 14:34:50 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 01 Jun 2020 18:34:50 +0000 Subject: [issue40403] pdb does not drop into debugger upon SyntaxError caused by ast.literal_eval In-Reply-To: <1587956856.04.0.83965486478.issue40403@roundup.psfhosted.org> Message-ID: <1591036490.66.0.55644475132.issue40403@roundup.psfhosted.org> R?mi Lapeyre added the comment: I've looked into this, in Bdb both the part where the code is compiled and the one where the code is run are in the run() method (https://github.com/python/cpython/blob/master/Lib/bdb.py#L565-L585): def run(self, cmd, globals=None, locals=None): """Debug a statement executed via the exec() function. globals defaults to __main__.dict; locals defaults to globals. """ if globals is None: import __main__ globals = __main__.__dict__ if locals is None: locals = globals self.reset() if isinstance(cmd, str): cmd = compile(cmd, "", "exec") sys.settrace(self.trace_dispatch) try: exec(cmd, globals, locals) except BdbQuit: pass finally: self.quitting = True sys.settrace(None) This is an issue as SyntaxError may come from two lines - the call to compile() which means the code being run is not valid Python, in this case the current behaviour of PDB to exit is correct as there is nothing to debug - the call to exec() in which case a SyntaxError can happen like in the report, and PDB should go in post mortem debug mode. One way to fix the issue would be to catch the error in compile() and wrap it in a BdbSyntaxError so that PDB can differentiate between the two, another to keep BDB as it is and change PDB so that it compiles the code first, and call run() in a second step. I think the last one is better and will start writing a PR for this. ---------- nosy: +remi.lapeyre versions: +Python 3.10, Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 14:36:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 18:36:04 +0000 Subject: [issue39583] Remove superfluous "extern C" bits from Include/cpython/*.h In-Reply-To: <1581169805.61.0.60673163843.issue39583@roundup.psfhosted.org> Message-ID: <1591036564.01.0.798743386285.issue39583@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b4d5a5cca29426a282e8f1e64b2271fdd1f0a23e by Skip Montanaro in branch 'master': bpo-39583: Remove superfluous "extern C" bits from Include/cpython/*.h (GH-18413) https://github.com/python/cpython/commit/b4d5a5cca29426a282e8f1e64b2271fdd1f0a23e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 14:46:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 18:46:37 +0000 Subject: [issue40839] Disallow calling PyDict_GetItem() with the GIL released Message-ID: <1591037197.66.0.735914267677.issue40839@roundup.psfhosted.org> New submission from STINNER Victor : For historical reasons, it was allowed to call the PyDict_GetItem() function with the GIL released. I propose to change PyDict_GetItem() to fail with a fatal error if it's called with the GIL released. To help C extension modules authors, I propose to keep a check at the runtime even in release build. Later, we may drop this check in release mode and only keep it in debug mode. In Python 3.8 and then 3.9, some functions started to crash when called without holding the GIL. It caused some bad surprises to C extension modules authors. Example: gdb developers with bpo-40826. In my opinion, holding the GIL was always required even if it is not very explicit in the documentation of the C API (only the documentation of few functions are explicit about the GIL). ---------- components: C API messages: 370572 nosy: vstinner priority: normal severity: normal status: open title: Disallow calling PyDict_GetItem() with the GIL released versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 14:53:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 18:53:23 +0000 Subject: [issue40839] Disallow calling PyDict_GetItem() with the GIL released In-Reply-To: <1591037197.66.0.735914267677.issue40839@roundup.psfhosted.org> Message-ID: <1591037603.04.0.229451891423.issue40839@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19819 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20580 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 14:56:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 18:56:17 +0000 Subject: [issue40839] Disallow calling PyDict_GetItem() with the GIL released In-Reply-To: <1591037197.66.0.735914267677.issue40839@roundup.psfhosted.org> Message-ID: <1591037777.84.0.630558734724.issue40839@roundup.psfhosted.org> STINNER Victor added the comment: Current comment in Objects/dictobject.c: /* We can arrive here with a NULL tstate during initialization: try running "python -Wi" for an example related to string interning. Let's just hope that no exception occurs then... This must be _PyThreadState_GET() and not PyThreadState_Get() because the latter abort Python if tstate is NULL. */ PyDict_GetItem() is no longer called before Py_Initialize(). I reworked the Python startup to no longer use Python objects before Py_Initialize(): see PEP 587 (PyConfig). > To help C extension modules authors, I propose to keep a check at the runtime even in release build. Later, we may drop this check in release mode and only keep it in debug mode. Hum, since the whole test pass with the change and it was not documented that it was possible to call the function with the GIL released, I changed my mind and only kept the runtime check in debug mode. ---------- nosy: +eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 14:56:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 18:56:58 +0000 Subject: [issue40839] Disallow calling PyDict_GetItem() with the GIL released In-Reply-To: <1591037197.66.0.735914267677.issue40839@roundup.psfhosted.org> Message-ID: <1591037818.15.0.395475238735.issue40839@roundup.psfhosted.org> STINNER Victor added the comment: Note: I created this issue while working on bpo-40826 "PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 14:57:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 18:57:09 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591037829.28.0.465594556838.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-40839: Disallow calling PyDict_GetItem() with the GIL released. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 14:59:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 18:59:43 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591037983.61.0.6454289886.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c353764fd564e401cf47a5d9efab18c72c60014e by Victor Stinner in branch 'master': bpo-40826: Fix GIL usage in PyOS_Readline() (GH-20579) https://github.com/python/cpython/commit/c353764fd564e401cf47a5d9efab18c72c60014e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 15:06:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 19:06:41 +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: <1591038401.64.0.0128111449167.issue19915@roundup.psfhosted.org> STINNER Victor added the comment: > Any update on this? Since nobody proposed a PEP, no, there is no progress on this issue. I suggest to close it because of the lack of interest to move on on this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 15:08:07 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 19:08:07 +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: <1591038487.0.0.853189076847.issue39343@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 15:09:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 19:09:12 +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: <1591038552.29.0.449816533002.issue40741@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 15:10:01 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jun 2020 19:10:01 +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: <1591038601.16.0.816896598722.issue25782@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 16:58:34 2020 From: report at bugs.python.org (Warren Hardy) Date: Mon, 01 Jun 2020 20:58:34 +0000 Subject: [issue40788] Build issue Solaris 10 Sparc In-Reply-To: <1590548322.5.0.995785667003.issue40788@roundup.psfhosted.org> Message-ID: <1591045114.05.0.787006561253.issue40788@roundup.psfhosted.org> Warren Hardy added the comment: I found another bug Issue14527 https://bugs.python.org/issue14527 In bug 14527 was a reference to some changes, these worked to fix ctypes https://github.com/python/cpython/pull/20451/files ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 17:00:05 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 01 Jun 2020 21:00:05 +0000 Subject: [issue40403] pdb does not drop into debugger upon SyntaxError caused by ast.literal_eval In-Reply-To: <1587956856.04.0.83965486478.issue40403@roundup.psfhosted.org> Message-ID: <1591045205.86.0.523577876494.issue40403@roundup.psfhosted.org> R?mi Lapeyre added the comment: This is related to issue 16180, it may be possible to improve the situation by trying to determine whether the SyntaxError is in the file or came during its execution by looking at the filename but it's probably very brittle: # In most cases SystemExit does not warrant a post-mortem session. print("The program exited via sys.exit(). Exit status:", end=' ') print(sys.exc_info()[1]) - except SyntaxError: - traceback.print_exc() - sys.exit(1) - except: + except Exception as e: + if (type(e) is SyntaxError and + e.filename == os.path.abspath(mainpyfile)): + traceback.print_exc() + sys.exit(1) traceback.print_exc() print("Uncaught exception. Entering post mortem debugging") print("Running 'cont' or 'step' will restart the program") ---------- nosy: +terry.reedy, xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 17:04:44 2020 From: report at bugs.python.org (Warren Hardy) Date: Mon, 01 Jun 2020 21:04:44 +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: <1591045484.73.0.684455319057.issue14527@roundup.psfhosted.org> Warren Hardy added the comment: I tried Rupert Nash?s changes to Makefile.pre.in, configure, configure.ac and setup.py. I can confirm this changes worked for me. I had to edit the Makefile and enter the LIBFFI_INCLUDEDIR and LIBFFI_LIBDIR this might be due to me being a newb about this stuff, and having some configuration setting wrong. ---------- nosy: +munocat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 17:16:41 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Jun 2020 21:16:41 +0000 Subject: [issue35228] Index search in CHM help crashes viewer In-Reply-To: <1542107217.87.0.788709270274.issue35228@psf.upfronthosting.co.za> Message-ID: <1591046201.71.0.300739667967.issue35228@roundup.psfhosted.org> Steve Dower added the comment: Can anyone confirm that you've got an active code page of something other than 1252 ("standard" US English)? I'm not able to reproduce this easily, and I wonder if it's because of that setting. Easiest way to check is in Python: >>> import locale >>> locale.getpreferredencoding() 'cp1252' ---------- versions: +Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 20:28:11 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 02 Jun 2020 00:28:11 +0000 Subject: [issue40840] lzma.h file not found building on macOS Message-ID: <1591057691.57.0.0922898078512.issue40840@roundup.psfhosted.org> New submission from Jason R. Coombs : Attempting to build Python on macOS following [the instructions](https://devguide.python.org/setup/#macos-and-os-x) (for Homebrew). xz is installed: ``` $ brew --prefix xz /Users/jaraco/.local/homebrew/opt/xz ``` Yet, after running `./configure`, which makes no mention of "xz" or "lzma", "make" fails with: ``` gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I./Include -I. -I/Users/jaraco/code/public/cpython/Include -I/Users/jaraco/code/public/cpython -c /Users/jaraco/code/public/cpython/Modules/_lzmamodule.c -o build/temp.macosx-10.15-x86_64-3.9/Users/jaraco/code/public/cpython/Modules/_lzmamodule.o /Users/jaraco/code/public/cpython/Modules/_lzmamodule.c:16:10: fatal error: 'lzma.h' file not found #include ^~~~~~~~ 1 error generated. ``` Yet the file is there: ``` $ ls ~/.local/homebrew/opt/xz/include lzma lzma.h ``` What's missing from the instructions that I should be doing? ---------- messages: 370582 nosy: jaraco priority: normal severity: normal status: open title: lzma.h file not found building on macOS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 20:28:35 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 02 Jun 2020 00:28:35 +0000 Subject: [issue40840] lzma.h file not found building on macOS In-Reply-To: <1591057691.57.0.0922898078512.issue40840@roundup.psfhosted.org> Message-ID: <1591057715.11.0.543803298603.issue40840@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- components: +macOS nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 20:31:01 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 02 Jun 2020 00:31:01 +0000 Subject: [issue40840] lzma.h file not found building on macOS In-Reply-To: <1591057691.57.0.0922898078512.issue40840@roundup.psfhosted.org> Message-ID: <1591057861.83.0.10613792249.issue40840@roundup.psfhosted.org> Jason R. Coombs added the comment: This issue doesn't happen on my mac that installs homebrew globally. Do the build instructions assume Homebrew is installed system-wide? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 20:50:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 00:50:52 +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: <1591059052.88.0.79285880444.issue40799@roundup.psfhosted.org> STINNER Victor added the comment: About _strptime, I see that the time.strptime() imports internally the _strptime module. If we move _strptime inside datetime: does it mean that calling time.strptime() would have to import the datetime module? It doesn't sound right to me. I see the time as the low-level interface: it should not rely on the high-level interface. I prefer to separate _strptime module from the datetime module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 20:59:10 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 02 Jun 2020 00:59:10 +0000 Subject: [issue40840] lzma.h file not found building on macOS In-Reply-To: <1591057691.57.0.0922898078512.issue40840@roundup.psfhosted.org> Message-ID: <1591059550.08.0.161917221445.issue40840@roundup.psfhosted.org> Jason R. Coombs added the comment: In [this commit](https://github.com/jaraco/jaraco.develop/commit/e3e5f66ca6693d8ec3abd31d99d491f6dfa1f67d), I include "xz" in the routine. Should Python's developer docs include something like that to ensure compatibility? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 21:14:00 2020 From: report at bugs.python.org (Inada Naoki) Date: Tue, 02 Jun 2020 01:14:00 +0000 Subject: [issue35228] Index search in CHM help crashes viewer In-Reply-To: <1542107217.87.0.788709270274.issue35228@psf.upfronthosting.co.za> Message-ID: <1591060440.31.0.305133725799.issue35228@roundup.psfhosted.org> Inada Naoki added the comment: I think it's time to abandon chm file. It is too old. MS doesn't maintain it anymore. Let's promote ePub and PDF instead. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 21:17:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 01:17:52 +0000 Subject: [issue26543] [EASY] imaplib noop Debug: bytes vs Unicode bug in debug mode In-Reply-To: <1457738623.54.0.0867122071018.issue26543@psf.upfronthosting.co.za> Message-ID: <1591060672.95.0.724706150785.issue26543@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8a3d2af997e3702eac4c5b012537be39ada36888 by Sanyam Khurana in branch 'master': bpo-26543: Fix IMAP4.noop when debug mode is enabled (GH-15206) https://github.com/python/cpython/commit/8a3d2af997e3702eac4c5b012537be39ada36888 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 21:18:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 01:18:34 +0000 Subject: [issue26543] [EASY] imaplib noop Debug: bytes vs Unicode bug in debug mode In-Reply-To: <1457738623.54.0.0867122071018.issue26543@psf.upfronthosting.co.za> Message-ID: <1591060714.44.0.902100674475.issue26543@roundup.psfhosted.org> STINNER Victor added the comment: Merged, thanks for the fix. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 21:20:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 01:20:12 +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: <1591060812.28.0.938076778425.issue23557@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 21:21:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 01:21:03 +0000 Subject: [issue39583] Remove superfluous "extern C" bits from Include/cpython/*.h In-Reply-To: <1581169805.61.0.60673163843.issue39583@roundup.psfhosted.org> Message-ID: <1591060863.4.0.624649648149.issue39583@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 21:27:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 01:27:49 +0000 Subject: [issue40241] [C API] Make PyGC_Head structure opaque, or even move it to the internal C API In-Reply-To: <1586445596.83.0.583225080007.issue40241@roundup.psfhosted.org> Message-ID: <1591061269.42.0.785923118146.issue40241@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19820 pull_request: https://github.com/python/cpython/pull/20586 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 22:04:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 02:04:06 +0000 Subject: [issue39947] [C API] Make the PyThreadState structure opaque (move it to the internal C API) In-Reply-To: <1584035214.47.0.672795796186.issue39947@roundup.psfhosted.org> Message-ID: <1591063446.86.0.411824669066.issue39947@roundup.psfhosted.org> STINNER Victor added the comment: Cython still access multiple PyThreadState members which have no getter or setter yet. __Pyx_PyErr_ExceptionMatchesInState(): PyObject *exc_type = tstate->curexc_type; ... => internal _PyErr_Occurred(tstate) could solve this issue: move it the public/private API? Or expose internal _PyErr_ExceptionMatches(tstate, exc)? __Pyx_ErrRestoreInState() is a reimplementation of internal _PyErr_Restore(): get/set curexc_type, curexc_value and curexc_traceback members. __Pyx_PyFunction_FastCallNoKw: static PyObject* __Pyx_PyFunction_FastCallNoKw(...) { ... ++tstate->recursion_depth; Py_DECREF(f); --tstate->recursion_depth; return result; } Why not calling Py_EnterRecursiveCall/Py_LeaveRecursiveCall? There are likely others. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 1 22:07:30 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jun 2020 02:07:30 +0000 Subject: [issue40840] lzma.h file not found building on macOS In-Reply-To: <1591057691.57.0.0922898078512.issue40840@roundup.psfhosted.org> Message-ID: <1591063650.15.0.801419077321.issue40840@roundup.psfhosted.org> Ned Deily added the comment: For Homebrew users, the Devguide currently recommends: $ brew install openssl xz gdbm ./configure --with-pydebug --with-openssl=$(brew --prefix openssl) I don't use Homebrew myself so I may be missing something obvious but, after a bit of experimentation, I think the following might be the simplest version of the above that works with Homebrew installed in a non-default location: $ CPPFLAGS="-I$(brew --prefix)/include" \ LDFLAGS="-L$(brew --prefix)/lib" \ ./configure --with-pydebug \ --with-openssl=$(brew --prefix openssl) Could you try it on your systems, please? BTW, I notice that you are also installing zlib. There was a longstanding bug in the 2.7 setup.py that caused the system zlib to not be found in some cases. That was fixed some time back. So there is no normally no need to install a third-party zlib; current Python builds will automatically use the Apple-supplied system zlib. Since, like openssl, Homebrew installs zlib "keg-only", you would need to explicitly reference its locations: $ CPPFLAGS="-I$(brew --prefix)/include -I$(brew --prefix zlib)/include" \ LDFLAGS="-L$(brew --prefix)/lib -L$(brew --prefix zlib)/lib" \ ./configure --with-pydebug \ --with-openssl=$(brew --prefix openssl) But, at the moment, both the 10.15 system zlib and the Homebrew zlib are the same version, 1.2.11, so it doesn't seem necessary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 02:42:45 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 02 Jun 2020 06:42:45 +0000 Subject: [issue40841] Implement mimetypes.sniff Message-ID: <1591080165.24.0.514984320107.issue40841@roundup.psfhosted.org> New submission from Dong-hee Na : The current mimetypes.guess_type API guesses file types based on file extensions. However, there is a more accurate method which is calling sniffing. Some languages like Go(https://golang.org/pkg/net/http/#DetectContentType) provides mimesniff API and the method is implemented based on a standard way which is published on https://mimesniff.spec.whatwg.org/ I have a sample code implementation this https://github.com/corona10/mimesniff/blob/master/mimesniff/mimesniff.py But the API interface will be changed to mimetypes API. So I would like to provide mimetypes.sniff API rather than a new stdlib package like mimesniff. ---------- components: Library (Lib) messages: 370591 nosy: corona10, vstinner priority: normal severity: normal status: open title: Implement mimetypes.sniff type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 02:42:50 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 02 Jun 2020 06:42:50 +0000 Subject: [issue40841] Implement mimetypes.sniff In-Reply-To: <1591080165.24.0.514984320107.issue40841@roundup.psfhosted.org> Message-ID: <1591080170.66.0.520619807478.issue40841@roundup.psfhosted.org> Change by Dong-hee Na : ---------- assignee: -> corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 02:43:44 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 02 Jun 2020 06:43:44 +0000 Subject: [issue40841] Provide mimetypes.sniff API In-Reply-To: <1591080165.24.0.514984320107.issue40841@roundup.psfhosted.org> Message-ID: <1591080224.85.0.162780554987.issue40841@roundup.psfhosted.org> Change by Dong-hee Na : ---------- title: Implement mimetypes.sniff -> Provide mimetypes.sniff API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 02:43:52 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 02 Jun 2020 06:43:52 +0000 Subject: [issue40841] Provide mimetypes.sniff API as stdlib In-Reply-To: <1591080165.24.0.514984320107.issue40841@roundup.psfhosted.org> Message-ID: <1591080232.06.0.182503872865.issue40841@roundup.psfhosted.org> Change by Dong-hee Na : ---------- title: Provide mimetypes.sniff API -> Provide mimetypes.sniff API as stdlib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 03:28:38 2020 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 02 Jun 2020 07:28:38 +0000 Subject: [issue40403] pdb does not drop into debugger upon SyntaxError caused by ast.literal_eval In-Reply-To: <1587956856.04.0.83965486478.issue40403@roundup.psfhosted.org> Message-ID: <1591082918.26.0.751757421496.issue40403@roundup.psfhosted.org> Xavier de Gaye added the comment: In Kerrick's example ast.literal_eval('') could be ast.literal_eval(some_code) instead where some_code is a string containing dynamically generated Python code. pdb post-mortem debugging must allow finding the syntax error in this code. The patch proposed in issue 16180 by Terry may fix this problem (and issue 16180). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 03:41:26 2020 From: report at bugs.python.org (Michael Felt) Date: Tue, 02 Jun 2020 07:41:26 +0000 Subject: [issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure In-Reply-To: <1586507316.69.0.786578254213.issue40244@roundup.psfhosted.org> Message-ID: <1591083686.12.0.00408311606235.issue40244@roundup.psfhosted.org> Michael Felt added the comment: I think this is showing up again. Ot seemed to be away when using xlcv13 (and is away with xlcv11). I switched my bot off of xlc (v13) because compile fails again - and I'll investigate manually using xlc again. If you could prep a PR where the change is reverted - I would appreciate it. If no time, I'll get to it as soon as I can. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 03:42:52 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 02 Jun 2020 07:42:52 +0000 Subject: [issue40403] pdb does not drop into debugger upon SyntaxError caused by ast.literal_eval In-Reply-To: <1587956856.04.0.83965486478.issue40403@roundup.psfhosted.org> Message-ID: <1591083772.59.0.356120153538.issue40403@roundup.psfhosted.org> R?mi Lapeyre added the comment: Yes, the patch by Terry Reedy fixes this issue while still breaking the loop from `def f: pass`. It will start the debugger once for `def f: pass` which may be weird as in this case no user code has been executed and it will be in bdb which may confuse users: Traceback (most recent call last): File "/Users/remi/src/cpython/Lib/pdb.py", line 1703, in main pdb._runscript(mainpyfile) File "/Users/remi/src/cpython/Lib/pdb.py", line 1572, in _runscript self.run(statement) File "/Users/remi/src/cpython/Lib/bdb.py", line 580, in run exec(cmd, globals, locals) File "", line 1, in File "/Users/remi/src/cpython/tests.py", line 1 def f: pass ^ SyntaxError: invalid syntax Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program > (1)() (Pdb) bt /Users/remi/src/cpython/Lib/pdb.py(1703)main() -> pdb._runscript(mainpyfile) /Users/remi/src/cpython/Lib/pdb.py(1572)_runscript() -> self.run(statement) /Users/remi/src/cpython/Lib/bdb.py(580)run() -> exec(cmd, globals, locals) > (1)() Perhaps we should should test whether the exception happened there and not drop in the debugger in that case? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 03:50:23 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 02 Jun 2020 07:50:23 +0000 Subject: [issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure In-Reply-To: <1586507316.69.0.786578254213.issue40244@roundup.psfhosted.org> Message-ID: <1591084223.84.0.0790101568993.issue40244@roundup.psfhosted.org> Batuhan Taskaya added the comment: > If you could prep a PR where the change is reverted - I would appreciate it. If no time, I'll get to it as soon as I can. I see. I'll try to get a patch to deactivate it and add a comment (for future about this issue). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 03:58:26 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 02 Jun 2020 07:58:26 +0000 Subject: [issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure In-Reply-To: <1586507316.69.0.786578254213.issue40244@roundup.psfhosted.org> Message-ID: <1591084706.55.0.30919100737.issue40244@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +19821 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20588 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 04:19:56 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jun 2020 08:19:56 +0000 Subject: [issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure In-Reply-To: <1586507316.69.0.786578254213.issue40244@roundup.psfhosted.org> Message-ID: <1591085996.38.0.169684547758.issue40244@roundup.psfhosted.org> miss-islington added the comment: New changeset 033d10bd21d962a59c6c4fc503092046baa451a1 by Batuhan Taskaya in branch 'master': bpo-40244: Remove XLC's support from the noreturn flag (GH-20588) https://github.com/python/cpython/commit/033d10bd21d962a59c6c4fc503092046baa451a1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 04:20:07 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jun 2020 08:20:07 +0000 Subject: [issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure In-Reply-To: <1586507316.69.0.786578254213.issue40244@roundup.psfhosted.org> Message-ID: <1591086007.21.0.121250374004.issue40244@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19822 pull_request: https://github.com/python/cpython/pull/20591 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 04:21:05 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 02 Jun 2020 08:21:05 +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: <1591086065.71.0.21510756823.issue40686@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > 1. GH-20342 solved this issue? As far as I understand, yes. Although I did not check if all the warnings here are solved in that PR, as the PR eliminates all the ones that we found, it should be resolved. I think we can close this issue > Thanks Pablo Thanks to you for all the help :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 04:23:32 2020 From: report at bugs.python.org (Ammar Askar) Date: Tue, 02 Jun 2020 08:23:32 +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: <1591086212.92.0.552524966956.issue40686@roundup.psfhosted.org> Ammar Askar added the comment: There's still the "unknown pragma" warnings left, I pinged p-ganssle about it in the zoneinfo commit but it should probably be guarded like the ones in the ssl module: https://github.com/python/cpython/blob/a871f692b4a2e6c7d45579693e787edc0af1a02c/Modules/_ssl.c#L46 ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 04:40:08 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jun 2020 08:40:08 +0000 Subject: [issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure In-Reply-To: <1586507316.69.0.786578254213.issue40244@roundup.psfhosted.org> Message-ID: <1591087208.62.0.948716345944.issue40244@roundup.psfhosted.org> miss-islington added the comment: New changeset 50e847a9eb03f59e1d9268e46f3f98c2679caebd by Miss Islington (bot) in branch '3.9': bpo-40244: Remove XLC's support from the noreturn flag (GH-20588) https://github.com/python/cpython/commit/50e847a9eb03f59e1d9268e46f3f98c2679caebd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 04:42:14 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 02 Jun 2020 08:42:14 +0000 Subject: [issue40403] pdb does not drop into debugger upon SyntaxError caused by ast.literal_eval In-Reply-To: <1587956856.04.0.83965486478.issue40403@roundup.psfhosted.org> Message-ID: <1591087334.42.0.75365455821.issue40403@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 06:03:01 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 10:03:01 +0000 Subject: [issue40241] [C API] Make PyGC_Head structure opaque, or even move it to the internal C API In-Reply-To: <1586445596.83.0.583225080007.issue40241@roundup.psfhosted.org> Message-ID: <1591092181.84.0.932949527647.issue40241@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 337d3103a2344e1fec75985e85fabcbdedac7d26 by Victor Stinner in branch 'master': bpo-40241: What's New in Python 3.9: opaque PyGC_Head (GH-20586) https://github.com/python/cpython/commit/337d3103a2344e1fec75985e85fabcbdedac7d26 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 06:03:14 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jun 2020 10:03:14 +0000 Subject: [issue40241] [C API] Make PyGC_Head structure opaque, or even move it to the internal C API In-Reply-To: <1586445596.83.0.583225080007.issue40241@roundup.psfhosted.org> Message-ID: <1591092194.13.0.593956963032.issue40241@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +19823 pull_request: https://github.com/python/cpython/pull/20593 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 06:05:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 10:05:19 +0000 Subject: [issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure In-Reply-To: <1586507316.69.0.786578254213.issue40244@roundup.psfhosted.org> Message-ID: <1591092319.53.0.817718338413.issue40244@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 06:05:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 10:05:55 +0000 Subject: [issue40841] Provide mimetypes.sniff API as stdlib In-Reply-To: <1591080165.24.0.514984320107.issue40841@roundup.psfhosted.org> Message-ID: <1591092355.75.0.878227104784.issue40841@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 06:09:35 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jun 2020 10:09:35 +0000 Subject: [issue40241] [C API] Make PyGC_Head structure opaque, or even move it to the internal C API In-Reply-To: <1586445596.83.0.583225080007.issue40241@roundup.psfhosted.org> Message-ID: <1591092575.49.0.561153752513.issue40241@roundup.psfhosted.org> miss-islington added the comment: New changeset ff442f36b91810c8b8a6346e39f1dbf2c6d85764 by Miss Islington (bot) in branch '3.9': bpo-40241: What's New in Python 3.9: opaque PyGC_Head (GH-20586) https://github.com/python/cpython/commit/ff442f36b91810c8b8a6346e39f1dbf2c6d85764 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 06:20:26 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 02 Jun 2020 10:20:26 +0000 Subject: [issue11105] Compiling evil ast crashes interpreter In-Reply-To: <1296709360.51.0.0254918555785.issue11105@psf.upfronthosting.co.za> Message-ID: <1591093226.52.0.677011583951.issue11105@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +19824 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/20594 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 06:41:15 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 02 Jun 2020 10:41:15 +0000 Subject: [issue40841] Provide mimetypes.sniff API as stdlib In-Reply-To: <1591080165.24.0.514984320107.issue40841@roundup.psfhosted.org> Message-ID: <1591094475.31.0.220812464635.issue40841@roundup.psfhosted.org> Dong-hee Na added the comment: I ping some of the core developers who recently work on this module. Sorry if this topic is not interesting to you :( I want to listen to how about provide this API as the stdlib API. Three things I'd like to appeal through this proposal. 1. It will provide based on a more precise way. 2. There is a good standard(whatwg) in which format will be supported. 3. I am eager to maintain this module as the active core developer. ---------- nosy: +berker.peksag, serhiy.storchaka, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 07:05:03 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 02 Jun 2020 11:05:03 +0000 Subject: [issue40842] _Pickler_CommitFrame() always returns 0 but it's return code is checked Message-ID: <1591095903.49.0.200421685869.issue40842@roundup.psfhosted.org> New submission from R?mi Lapeyre : I'm currently investigating a SystemError one of our workers returned: returned NULL without setting an error While doing so I came across the _Pickler_CommitFrame() function: static int _Pickler_CommitFrame(PicklerObject *self) { size_t frame_len; char *qdata; if (!self->framing || self->frame_start == -1) return 0; frame_len = self->output_len - self->frame_start - FRAME_HEADER_SIZE; qdata = PyBytes_AS_STRING(self->output_buffer) + self->frame_start; if (frame_len >= FRAME_SIZE_MIN) { qdata[0] = FRAME; _write_size64(qdata + 1, frame_len); } else { memmove(qdata, qdata + FRAME_HEADER_SIZE, frame_len); self->output_len -= FRAME_HEADER_SIZE; } self->frame_start = -1; return 0; } Is there a reason for this function to return an int if it is always 0? I checked all call sites (_Pickler_GetString(), _Pickler_OpcodeBoundary(), _Pickler_write_bytes() and dump()) and they all check the return code but it seems useless. ---------- components: Library (Lib) messages: 370603 nosy: remi.lapeyre priority: normal severity: normal status: open title: _Pickler_CommitFrame() always returns 0 but it's return code is checked type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 07:05:38 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 02 Jun 2020 11:05:38 +0000 Subject: [issue40842] _Pickler_CommitFrame() always returns 0 and its return code is checked needlessly In-Reply-To: <1591095903.49.0.200421685869.issue40842@roundup.psfhosted.org> Message-ID: <1591095938.43.0.494990582466.issue40842@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- title: _Pickler_CommitFrame() always returns 0 but it's return code is checked -> _Pickler_CommitFrame() always returns 0 and its return code is checked needlessly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 07:33:18 2020 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Tue, 02 Jun 2020 11:33:18 +0000 Subject: [issue35078] Allow customization of CSS class name of a month in calendar module In-Reply-To: <1540652698.56.0.788709270274.issue35078@psf.upfronthosting.co.za> Message-ID: <1591097598.28.0.791502229134.issue35078@roundup.psfhosted.org> Walter D?rwald added the comment: New changeset 85339f5c220a5e79c47c3a33c93f1dca5c59c52e by Srinivas Reddy Thatiparthy (?????????? ?????? ?????????) in branch 'master': bpo-35078: Allow customization of CSS class name of a month in calendar module (gh-10137) https://github.com/python/cpython/commit/85339f5c220a5e79c47c3a33c93f1dca5c59c52e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 08:02:06 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 02 Jun 2020 12:02:06 +0000 Subject: [issue35228] Index search in CHM help crashes viewer In-Reply-To: <1542107217.87.0.788709270274.issue35228@psf.upfronthosting.co.za> Message-ID: <1591099326.14.0.913451383831.issue35228@roundup.psfhosted.org> Steve Dower added the comment: > Let's promote ePub and PDF instead. Find a good viewer we can bundle with the installer with equivalent search/index functionality and we can consider it. More realistically, including the docs as unbundled HTML files and relying on the default browser is probably an all-around better idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 08:03:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 12:03:33 +0000 Subject: [issue40839] Disallow calling PyDict_GetItem() with the GIL released In-Reply-To: <1591037197.66.0.735914267677.issue40839@roundup.psfhosted.org> Message-ID: <1591099413.8.0.140251140582.issue40839@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 59d3dce69b0a4f6ee17578ae68037cc7ae90936f by Victor Stinner in branch 'master': bpo-40839: PyDict_GetItem() requires the GIL (GH-20580) https://github.com/python/cpython/commit/59d3dce69b0a4f6ee17578ae68037cc7ae90936f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 08:04:10 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 12:04:10 +0000 Subject: [issue40839] Disallow calling PyDict_GetItem() with the GIL released In-Reply-To: <1591037197.66.0.735914267677.issue40839@roundup.psfhosted.org> Message-ID: <1591099450.48.0.721748146124.issue40839@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 08:14:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 12:14:45 +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: <1591100085.54.0.198480448929.issue39465@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19825 pull_request: https://github.com/python/cpython/pull/20595 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 08:40:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 12:40: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: <1591101600.21.0.656917956356.issue39465@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 297257f7bc198e2dc8e0866b539c73ff1a5cc588 by Victor Stinner in branch 'master': bpo-39465: Cleanup _PyUnicode_FromId() code (GH-20595) https://github.com/python/cpython/commit/297257f7bc198e2dc8e0866b539c73ff1a5cc588 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 08:46:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 12:46:45 +0000 Subject: [issue40512] [subinterpreters] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1591102005.35.0.623075518852.issue40512@roundup.psfhosted.org> STINNER Victor added the comment: Currently, the import lock is shared by all interpreters. It would also help for performance to make it per-interpreter to parallelize imports. ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 09:42:37 2020 From: report at bugs.python.org (U.W.) Date: Tue, 02 Jun 2020 13:42:37 +0000 Subject: [issue40793] print() performance problem with very large numbers In-Reply-To: <1590581039.49.0.292614137466.issue40793@roundup.psfhosted.org> Message-ID: <1591105357.84.0.211317228318.issue40793@roundup.psfhosted.org> U.W. added the comment: Well, the number in itself is not so useful, but... - I encountered a performance problem in Python where I did not expect one - Other people will encounter that, too, and now they easily find the reason behind it (I would not have opened this bug if I had found an explanation) - Hopefully someone is bored enough to fix it and that will make Python an even better tool than it is already. This number can then be used as an example to recretew the problem and verify the solution. - Hopefully no bad guy exploits this weakness by sending large numbers like this one to servers just to see if it triggers a denial of service... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 09:54:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 13:54:03 +0000 Subject: [issue40232] PyOS_AfterFork_Child() should use _PyThread_at_fork_reinit() In-Reply-To: <1586382203.52.0.537965691861.issue40232@roundup.psfhosted.org> Message-ID: <1591106043.25.0.154657027023.issue40232@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19826 pull_request: https://github.com/python/cpython/pull/20597 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 10:02:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 14:02:25 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591106545.29.0.297295495477.issue40826@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19827 pull_request: https://github.com/python/cpython/pull/20599 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 11:02:50 2020 From: report at bugs.python.org (Yonatan Goldschmidt) Date: Tue, 02 Jun 2020 15:02:50 +0000 Subject: [issue40222] "Zero cost" exception handling In-Reply-To: <1586338863.3.0.393749013734.issue40222@roundup.psfhosted.org> Message-ID: <1591110170.39.0.779873964476.issue40222@roundup.psfhosted.org> Change by Yonatan Goldschmidt : ---------- nosy: +Yonatan Goldschmidt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 11:14:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 15:14:00 +0000 Subject: [issue40232] PyOS_AfterFork_Child() should use _PyThread_at_fork_reinit() In-Reply-To: <1586382203.52.0.537965691861.issue40232@roundup.psfhosted.org> Message-ID: <1591110840.08.0.73608024833.issue40232@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 45b34a04a577aa49fa4825421758c3e8eaa1625d by Victor Stinner in branch 'master': bpo-40232: _PyImport_ReInitLock() can now safely use its lock (GH-20597) https://github.com/python/cpython/commit/45b34a04a577aa49fa4825421758c3e8eaa1625d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 11:18:22 2020 From: report at bugs.python.org (mxmlnkn) Date: Tue, 02 Jun 2020 15:18:22 +0000 Subject: [issue40843] tarfile: ignore_zeros = True exceedingly slow on a sparse tar file Message-ID: <1591111102.48.0.378396019382.issue40843@roundup.psfhosted.org> New submission from mxmlnkn : Consider this example replicating a real use case where I was downloading the 1.191TiB ImageNet in sequential order for ~1GiB in order to preview it: echo "foo" > bar tar cf sparse.tar bar #!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import tarfile import time t0 = time.time() for tarInfo in tarfile.open( 'sparse.tar', 'r:', ignore_zeros = True ): pass t1 = time.time() print( f"Small TAR took {t1 - t0}s to iterate over" ) f = open( 'sparse.tar', 'wb' ) f.truncate( 2*1024*1024*1024 ) f.close() t0 = time.time() for tarInfo in tarfile.open( 'sparse.tar', 'r:', ignore_zeros = True ): pass t1 = time.time() print( f"Small TAR with sparse tail took {t1 - t0}s to iterate over" ) Output: Small TAR took 0.00020813941955566406s to iterate over Small TAR with sparse tail took 6.999570846557617s to iterate over So, iterating over sparse holes takes tarfile ~300MiB/s. Which sounds fast but is really slow for 1.2TiB and when thinking about it as tarfile doing basically >nothing<. There should be better options like using os.lseek with os.SEEK_DATA if available to skip those empty holes. An alternative would be an option to tell tarfile how many zeros it should at maximum skip. Personally, I only use the ignore_zeros option to be able to work with concatenated TARs, which in my case only have up to 19*512 byte empty tar blocks to be skipped. Anything longer would indicate an invalid file. I'm aware that these maximum runs of zeros vary depending on the tar blocking factor, so it should be adjustable. ---------- messages: 370611 nosy: mxmlnkn priority: normal severity: normal status: open title: tarfile: ignore_zeros = True exceedingly slow on a sparse tar file versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 11:28:04 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 02 Jun 2020 15:28:04 +0000 Subject: [issue40222] "Zero cost" exception handling In-Reply-To: <1586338863.3.0.393749013734.issue40222@roundup.psfhosted.org> Message-ID: <1591111684.99.0.543315390692.issue40222@roundup.psfhosted.org> Dong-hee Na added the comment: +1 ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 13:01:51 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 02 Jun 2020 17:01: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: <1591117311.06.0.681811069022.issue40825@roundup.psfhosted.org> Eric V. Smith added the comment: I wouldn't have a problem with isinstance(obj, str) for a string check in strict mode. If you want to write something like a Path, convert it to a string yourself. That's exactly the behavior I'd like enforced by strict: only accept numbers and actual strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 13:19:33 2020 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Tue, 02 Jun 2020 17:19:33 +0000 Subject: [issue35078] Allow customization of CSS class name of a month in calendar module In-Reply-To: <1540652698.56.0.788709270274.issue35078@psf.upfronthosting.co.za> Message-ID: <1591118373.86.0.35625581308.issue35078@roundup.psfhosted.org> Change by Walter D?rwald : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 13:20:12 2020 From: report at bugs.python.org (Matthew Francis) Date: Tue, 02 Jun 2020 17:20:12 +0000 Subject: [issue40844] Alternate ways of running coroutines Message-ID: <1591118412.36.0.0833494361234.issue40844@roundup.psfhosted.org> New submission from Matthew Francis <4576francis at gmail.com>: Currently, using await inside a coroutine will block inside the coroutine. This behavior would usually be fine, but for some usecases a way to nonblockingly run coroutines without creating a Task could be useful, because tasks don't allow for a callback. I'm suggesting a method on coroutines that runs them without blocking, and will run a callback when it's complete. ---------- components: asyncio messages: 370614 nosy: asvetlov, matthewfrancis, yselivanov priority: normal severity: normal status: open title: Alternate ways of running coroutines type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 13:53:00 2020 From: report at bugs.python.org (Roman Akopov) Date: Tue, 02 Jun 2020 17:53:00 +0000 Subject: [issue40845] idna encoding fails for Cherokee symbols Message-ID: <1591120380.37.0.839523789408.issue40845@roundup.psfhosted.org> New submission from Roman Akopov : For a specific Cherokee string of three symbols b'\\u13e3\\u13b3\\u13a9' generating punycode representation fails. What steps will reproduce the problem? Execute '???'.encode('idna') of even more reliable Execute '\u13e3\u13b3\u13a9'.encode('idna') What is the expected result? 'xn--f9dt7l' What happens instead? 'xn--tz9ata7l' Version affected. Tested on Python 3.8.3 Windows and Python 3.6.8 CentOS. Other information. I was testing if our product supports internationalized domain names. So I had written a Python script which generated DNS zone file with punycode encoded names and JavaScript file for a browser to send requests to URLs containing internationalized domain names. Strings were taken from Common Locale Data Repository. 193 various URL, one per language. When executed in Google Chrome, Mozilla Firefox and Microsoft EDGE, domain name '???.myhost.local' is converted to 'xn--f9dt7l.myhost.local', but we have 'xn--tz9ata7l.myhost.local' in DNS zone file and this is how I had found the bug. For 192 other languages I have tested everything works just fine. hese are Afrikaans, Aghem, Akan, Amharic, Arabic, Assamese, Asu, Asturian, Azerbaijani, Basaa, Belarusian, Bemba, Bena, Bulgarian, Bambara, Bangla, Tibetan, Breton, Bodo, Bosnian, Catalan, Chakma, Chechen, Cebuano, Chiga, Czech, Church Slavic, Welsh, Danish, Taita, German, Zarma, Lower Sorbian, Duala, Jola-Fonyi, Dzongkha, Embu, Ewe, Greek, English, Esperanto, Spanish, Estonian, Basque, Ewondo, Persian, Fulah, Finnish, Filipino, Faroese, French, Friulian, Western Frisian, Irish, Scottish Gaelic, Galician, Swiss German, Gujarati, Gusii, Manx, Hausa, Hebrew, Hindi, Croatian, Upper Sorbian, Hungarian, Armenian, Interlingua, Indonesian, Sichuan Yi, Icelandic, Italian, Japanese, Ngomba, Machame, Javanese, Georgian, Kabyle, Kamba, Makonde, Kabuverdianu, Kikuyu, Kako, Kalaallisut, Kalenjin, Khmer, Kannada, Korean, Konkani, Kashmiri, Shambala, Bafia, Colognian, Kurdish, Cornish, Kyrgyz, Langi, Luxembourgish, Ganda, Lakota, Lingala, Lao, Lithuanian, Luba-Katanga, Luo, Luyia, Latvian, Maithili, Masai, Meru, Malagasy, Makhuwa-Meetto, Meta?, Maori, Macedonian, Malayalam, Mongolian, Manipuri, Marathi, Malay, Maltese, Mundang, Burmese, Mazanderani, Nama, North Ndebele, Low German, Nepali, Dutch, Kwasio, Norwegian Nynorsk, Nyankole, Oromo, Odia, Ossetic, Punjabi, Polish, Prussian, Pashto, Portuguese, Quechua, Romansh, Rundi, Romanian, Rombo, Russian, Kinyarwanda, Rwa, Samburu, Santali, Sangu, Sindhi, Northern Sami, Sena, Sango, Tachelhit, Sinhala, Slovak, Slovenian, Inari Sami, Shona, Somali, Albanian, Serbian, Swedish, Swahili, Tamil, Telugu, Teso, Tajik, Thai, Tigrinya, Turkish, Tatar, Uyghur, Ukrainian, Urdu, Uzbek, Vai, Volap?k, Vunjo, Walser, Wolof, Xhosa, Soga, Yangben, Yiddish, Cantonese, Standard Moroccan Tamazight, Chinese, Traditional Chinese, Zulu. Somehow specifically Cherokee code points trigger the bug. On top of that, https://www.punycoder.com/ converts '???' into 'xn--f9dt7l' and back. However 'xn--tz9ata7l' is reported as an invalid punycode. ---------- components: Unicode messages: 370615 nosy: Roman Akopov, ezio.melotti, vstinner priority: normal severity: normal status: open title: idna encoding fails for Cherokee symbols type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 14:23:10 2020 From: report at bugs.python.org (J Arun Mani) Date: Tue, 02 Jun 2020 18:23:10 +0000 Subject: [issue40846] Misleading line in documentation Message-ID: <1591122189.99.0.387318782653.issue40846@roundup.psfhosted.org> New submission from J Arun Mani : Hi. In docs : https://docs.python.org/3/faq/programming.html#faq-argument-vs-parameter it says "Parameters define what types of arguments a function can accept." This is not true. Python's functions do not impose any type checking or raise error when the argument's type is not matching it's type hint. Please change the line to a better one. Maybe "Parameters define the names that will hold the supplied arguments." Thanks ^^ ---------- assignee: docs at python components: Documentation messages: 370616 nosy: J Arun Mani, docs at python priority: normal severity: normal status: open title: Misleading line in documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 14:40:11 2020 From: report at bugs.python.org (SilentGhost) Date: Tue, 02 Jun 2020 18:40:11 +0000 Subject: [issue40845] idna encoding fails for Cherokee symbols In-Reply-To: <1591120380.37.0.839523789408.issue40845@roundup.psfhosted.org> Message-ID: <1591123211.69.0.301935237854.issue40845@roundup.psfhosted.org> SilentGhost added the comment: For the record: >>> '???'.encode('punycode') b'tz9ata7l' >>> '\u13e3\u13b3\u13a9'.encode('punycode') b'f9dt7l' Also, your unicode-escaped string is an upper-cased version of the first string. ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 15:03:34 2020 From: report at bugs.python.org (Adam Williamson) Date: Tue, 02 Jun 2020 19:03:34 +0000 Subject: [issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't Message-ID: <1591124614.71.0.196427498662.issue40847@roundup.psfhosted.org> New submission from Adam Williamson : While debugging issues with the black test suite in Python 3.9, I found one which black upstream says is a Cpython issue, so I'm filing it here. Reproduction is very easy. Just use this four-line tester: print("hello, world") \ print("hello, world 2") with that saved as `test.py`, check the results: sh-5.0# PYTHONOLDPARSER=1 python3 test.py hello, world hello, world 2 sh-5.0# python3 test.py File "/builddir/build/BUILD/black-19.10b0/test.py", line 3 ^ SyntaxError: invalid syntax The reason black has this test (well, a similar test - in black's test, the file *starts* with the backslash then the empty line, but the result is the same) is covered in https://github.com/psf/black/issues/922 and https://github.com/psf/black/pull/948 . ---------- components: Interpreter Core messages: 370618 nosy: adamwill priority: normal severity: normal status: open title: New parser considers empty line following a backslash to be a syntax error, old parser didn't type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 15:05:48 2020 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 02 Jun 2020 19:05:48 +0000 Subject: [issue10631] ZipFile and current directory change In-Reply-To: <1291567761.41.0.659026181219.issue10631@psf.upfronthosting.co.za> Message-ID: <1591124748.38.0.509867606124.issue10631@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 Tue Jun 2 15:08:16 2020 From: report at bugs.python.org (Adam Williamson) Date: Tue, 02 Jun 2020 19:08:16 +0000 Subject: [issue40848] compile() can compile a bare starred expression with `PyCF_ONLY_AST` flag with the old parser, but not the new one Message-ID: <1591124896.73.0.969808465521.issue40848@roundup.psfhosted.org> New submission from Adam Williamson : Not 100% sure this would be considered a bug, but it seems at least worth filing to check. This is a behaviour difference between the new parser and the old one. It's very easy to reproduce: sh-5.0# PYTHONOLDPARSER=1 python3 Python 3.9.0b1 (default, May 29 2020, 00:00:00) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from _ast import * >>> compile("(*starred)", "", "exec", flags=PyCF_ONLY_AST) >>> sh-5.0# python3 Python 3.9.0b1 (default, May 29 2020, 00:00:00) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from _ast import * >>> compile("(*starred)", "", "exec", flags=PyCF_ONLY_AST) Traceback (most recent call last): File "", line 1, in File "", line 1 (*starred) ^ SyntaxError: invalid syntax That is, you can compile() the expression "(*starred)" with PyCF_ONLY_AST flag set with the old parser, but not with the new one. Without PyCF_ONLY_AST you get a SyntaxError with both parsers, though a with the old parser, the error message is "can't use starred expression here", not "invalid syntax". ---------- components: Interpreter Core messages: 370620 nosy: adamwill priority: normal severity: normal status: open title: compile() can compile a bare starred expression with `PyCF_ONLY_AST` flag with the old parser, but not the new one versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 15:08:35 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 02 Jun 2020 19:08:35 +0000 Subject: [issue40848] compile() can compile a bare starred expression with `PyCF_ONLY_AST` flag with the old parser, but not the new one In-Reply-To: <1591124896.73.0.969808465521.issue40848@roundup.psfhosted.org> Message-ID: <1591124915.63.0.302945884931.issue40848@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 15:20:28 2020 From: report at bugs.python.org (l0x) Date: Tue, 02 Jun 2020 19:20:28 +0000 Subject: [issue40849] Expose X509_V_FLAG_PARTIAL_CHAIN ssl flag Message-ID: <1591125628.93.0.87420657479.issue40849@roundup.psfhosted.org> New submission from l0x : This simple patch exposes OpenSSL's X509_V_FLAG_PARTIAL_CHAIN if it is defined. This lets us trust a certificate if it is signed by a certificate in the trust store, even if that CA is not a root CA. It makes it possible to trust an intermediate CA without trusting the root and all the other intermediate CAs it has signed. ---------- assignee: christian.heimes components: SSL messages: 370621 nosy: christian.heimes, l0x priority: normal pull_requests: 19828 severity: normal status: open title: Expose X509_V_FLAG_PARTIAL_CHAIN ssl flag type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 15:28:09 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 02 Jun 2020 19:28:09 +0000 Subject: [issue40846] Misleading line in documentation In-Reply-To: <1591122189.99.0.387318782653.issue40846@roundup.psfhosted.org> Message-ID: <1591126089.95.0.775747739098.issue40846@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi, thanks for pointing this out. I think "type" here is not about the type of the object but whether it is: - positional-only - positional or keyword - variadic positional - keyword-only - variadic keyword The wording could certainly be improved as it is currently unclear. Could you make a suggestion and open a PR? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 15:58:09 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Jun 2020 19:58:09 +0000 Subject: [issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't In-Reply-To: <1591124614.71.0.196427498662.issue40847@roundup.psfhosted.org> Message-ID: <1591127889.7.0.212022885157.issue40847@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +benjamin.peterson, brett.cannon, pablogsal, yselivanov versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 15:58:30 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Jun 2020 19:58:30 +0000 Subject: [issue40848] compile() can compile a bare starred expression with `PyCF_ONLY_AST` flag with the old parser, but not the new one In-Reply-To: <1591124896.73.0.969808465521.issue40848@roundup.psfhosted.org> Message-ID: <1591127910.4.0.478198663211.issue40848@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +benjamin.peterson, brett.cannon, pablogsal, yselivanov type: -> behavior versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 15:59:22 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Jun 2020 19:59:22 +0000 Subject: [issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't In-Reply-To: <1591124614.71.0.196427498662.issue40847@roundup.psfhosted.org> Message-ID: <1591127962.7.0.829489521079.issue40847@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 15:59:40 2020 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 02 Jun 2020 19:59:40 +0000 Subject: [issue40844] Alternate ways of running coroutines In-Reply-To: <1591118412.36.0.0833494361234.issue40844@roundup.psfhosted.org> Message-ID: <1591127980.37.0.245534055935.issue40844@roundup.psfhosted.org> Yury Selivanov added the comment: > I'm suggesting a method on coroutines that runs them without blocking, and will run a callback when it's complete. And how would that method be implemented? Presumably the event loop would execute the coroutine, but that API is already there, and it's called create_task. We will not be adding a builtin method for this. You can use Task.add_done_callback() to add a callback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 15:59:26 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Jun 2020 19:59:26 +0000 Subject: [issue40848] compile() can compile a bare starred expression with `PyCF_ONLY_AST` flag with the old parser, but not the new one In-Reply-To: <1591124896.73.0.969808465521.issue40848@roundup.psfhosted.org> Message-ID: <1591127966.85.0.0449307085099.issue40848@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 15:59:50 2020 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 02 Jun 2020 19:59:50 +0000 Subject: [issue40844] Alternate ways of running coroutines In-Reply-To: <1591118412.36.0.0833494361234.issue40844@roundup.psfhosted.org> Message-ID: <1591127990.77.0.634281599716.issue40844@roundup.psfhosted.org> Change by Yury Selivanov : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 16:11:43 2020 From: report at bugs.python.org (Sam Bull) Date: Tue, 02 Jun 2020 20:11:43 +0000 Subject: [issue40563] Support pathlike objects on dbm/shelve In-Reply-To: <1588949755.54.0.0616905460961.issue40563@roundup.psfhosted.org> Message-ID: <1591128703.99.0.806113950051.issue40563@roundup.psfhosted.org> Change by Sam Bull : ---------- nosy: +dreamsorcerer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 16:12:39 2020 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 02 Jun 2020 20:12:39 +0000 Subject: [issue40846] Misleading line in documentation In-Reply-To: <1591122189.99.0.387318782653.issue40846@roundup.psfhosted.org> Message-ID: <1591128759.82.0.799145413221.issue40846@roundup.psfhosted.org> Jim Fasarakis-Hilliard added the comment: A simple substitution of 'types' with 'kind' should do it. This aligns with the terminology [1] used in the glossary. [1] https://docs.python.org/3/glossary.html#term-parameter ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 16:16:34 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Jun 2020 20:16:34 +0000 Subject: [issue40848] compile() can compile a bare starred expression with `PyCF_ONLY_AST` flag with the old parser, but not the new one In-Reply-To: <1591124896.73.0.969808465521.issue40848@roundup.psfhosted.org> Message-ID: <1591128994.12.0.303232249441.issue40848@roundup.psfhosted.org> Serhiy Storchaka added the comment: There is no promise that the parser can parse invalid Python code. I think there is no a bug here. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 16:17:13 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Jun 2020 20:17:13 +0000 Subject: [issue10631] ZipFile and current directory change In-Reply-To: <1291567761.41.0.659026181219.issue10631@psf.upfronthosting.co.za> Message-ID: <1591129033.89.0.264322157864.issue10631@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 16:28:11 2020 From: report at bugs.python.org (Adam Williamson) Date: Tue, 02 Jun 2020 20:28:11 +0000 Subject: [issue40848] compile() can compile a bare starred expression with `PyCF_ONLY_AST` flag with the old parser, but not the new one In-Reply-To: <1591124896.73.0.969808465521.issue40848@roundup.psfhosted.org> Message-ID: <1591129691.92.0.364101842835.issue40848@roundup.psfhosted.org> Adam Williamson added the comment: Realized I forgot to give it, so in case it's important, the context here is the black test suite: https://github.com/psf/black/issues/1441 that test suite has a file full of expressions that it expects to be able to parse this way (it uses `ast.parse()`, which in turn calls `compile()` with this flag). A bare (*starred) line is part of that file: https://github.com/psf/black/blob/master/tests/data/expression.py#L149 and has been for as long as black has existed. Presumably if this isn't going to be fixed we'll need to adapt this black test file to test a starred expression in a 'valid' way, somehow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 16:34:36 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Jun 2020 20:34:36 +0000 Subject: [issue40849] Expose X509_V_FLAG_PARTIAL_CHAIN ssl flag In-Reply-To: <1591125628.93.0.87420657479.issue40849@roundup.psfhosted.org> Message-ID: <1591130076.77.0.0385948991727.issue40849@roundup.psfhosted.org> Christian Heimes added the comment: Thanks for the patch! I'm still pondering if I prefer VERIFY_PARTIAL_CHAIN over VERIFY_X509_PARTIAL_CHAIN. The string X509 is not meaningful here but fits with the other, much older flags. ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 16:38:26 2020 From: report at bugs.python.org (Roman Akopov) Date: Tue, 02 Jun 2020 20:38:26 +0000 Subject: [issue40845] idna encoding fails for Cherokee symbols In-Reply-To: <1591120380.37.0.839523789408.issue40845@roundup.psfhosted.org> Message-ID: <1591130306.47.0.245958346607.issue40845@roundup.psfhosted.org> Roman Akopov added the comment: This is how I extract data from Common Locale Data Repository v37 script assumes common\main working directory from os import walk from xml.etree import ElementTree en_root = ElementTree.parse('en.xml') for (dirpath, dirnames, filenames) in walk('.'): for filename in filenames: if filename.endswith('.xml'): code = filename[:-4] xx_root = ElementTree.parse(filename) xx_lang = xx_root.find('localeDisplayNames/languages/language[@type=\'' + code + '\']') en_lang = en_root.find('localeDisplayNames/languages/language[@type=\'' + code + '\']') if en_lang.text == 'Cherokee': print(en_lang.text) print(xx_lang.text) print(xx_lang.text.encode("unicode_escape")) print(xx_lang.text.encode('idna')) print(ord(xx_lang.text[0])) print(ord(xx_lang.text[1])) print(ord(xx_lang.text[2])) script outputs Cherokee ??? b'\\u13e3\\u13b3\\u13a9' b'xn--tz9ata7l' 5091 5043 5033 If I change text to lower case print(en_lang.text.lower()) print(xx_lang.text.lower()) print(xx_lang.text.lower().encode("unicode_escape")) print(xx_lang.text.lower().encode('idna')) print(ord(xx_lang.text.lower()[0])) print(ord(xx_lang.text.lower()[1])) print(ord(xx_lang.text.lower()[2])) then script outputs cherokee ??? b'\\uabb3\\uab83\\uab79' b'xn--tz9ata7l' 43955 43907 43897 I am not sure where do you get '\u13e3\u13b3\u13a9' string. '\u13e3\u13b3\u13a9'.lower().encode('unicode_escape') gives b'\\uabb3\\uab83\\uab79' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 17:04:06 2020 From: report at bugs.python.org (SilentGhost) Date: Tue, 02 Jun 2020 21:04:06 +0000 Subject: [issue40845] idna encoding fails for Cherokee symbols In-Reply-To: <1591120380.37.0.839523789408.issue40845@roundup.psfhosted.org> Message-ID: <1591131846.24.0.35875308773.issue40845@roundup.psfhosted.org> SilentGhost added the comment: I took it from your msg370615: > of even more reliable > Execute '\u13e3\u13b3\u13a9'.encode('idna') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 17:10:52 2020 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 02 Jun 2020 21:10:52 +0000 Subject: [issue40816] Add missed AsyncContextDecorator to contextlib In-Reply-To: <1590763993.17.0.319482222949.issue40816@roundup.psfhosted.org> Message-ID: <1591132252.9.0.302664313635.issue40816@roundup.psfhosted.org> Yury Selivanov added the comment: This has long been implemented: https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 17:12:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 21:12:06 +0000 Subject: [issue32604] [subinterpreters] PEP 554 implementation: add interpreters module In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1591132326.64.0.806562496142.issue32604@roundup.psfhosted.org> STINNER Victor added the comment: The following test is enough to reproduce the leak: --- import unittest import _xxsubinterpreters as _interpreters class TestInterpreterDestroy(unittest.TestCase): def tearDown(self): for interp_id in _interpreters.list_all(): if interp_id == 0: # main continue _interpreters.destroy(interp_id) def test_from_current(self): interp_id = _interpreters.create(isolated=True) _interpreters.run_string(interp_id, "import select") --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 17:44:57 2020 From: report at bugs.python.org (Trey Hunner) Date: Tue, 02 Jun 2020 21:44:57 +0000 Subject: [issue19217] Calling assertEquals for moderately long list takes too long In-Reply-To: <1381410286.72.0.514206486634.issue19217@psf.upfronthosting.co.za> Message-ID: <1591134297.96.0.955890799571.issue19217@roundup.psfhosted.org> Trey Hunner added the comment: This is a bug for string comparisons as well. I just had to manually reimplement assertMultiLineEqual (which doesn't call assertSequenceEqual) on one of my test classes to workaround this issue. ---------- nosy: +trey versions: +Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 17:49:50 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Jun 2020 21:49:50 +0000 Subject: [issue40845] idna encoding fails for Cherokee symbols In-Reply-To: <1591120380.37.0.839523789408.issue40845@roundup.psfhosted.org> Message-ID: <1591134590.38.0.722075390837.issue40845@roundup.psfhosted.org> Christian Heimes added the comment: There are two IDNA standard. Python's standard library only provides IDNA 2003 and does not support IDNA 2008. # IDNA 2003 >>> '\u13e3\u13b3\u13a9'.encode('idna') b'xn--tz9ata7l' # idna package with IDNA 2008 >>> idna.encode('\u13e3\u13b3\u13a9') b'xn--f9dt7l' The bug report is a duplicate of #17305. ---------- nosy: +christian.heimes resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 17:51:48 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Jun 2020 21:51:48 +0000 Subject: [issue17305] IDNA2008 encoding is missing In-Reply-To: <1361928766.42.0.728949411958.issue17305@psf.upfronthosting.co.za> Message-ID: <1591134708.67.0.061304517205.issue17305@roundup.psfhosted.org> Christian Heimes added the comment: BPO #40845 is another case of IDNA 2003 / 2008 bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 17:55:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 21:55:34 +0000 Subject: [issue32604] [subinterpreters] PEP 554 implementation: add interpreters module In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1591134934.25.0.214860643146.issue32604@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19829 pull_request: https://github.com/python/cpython/pull/20600 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 18:05:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 22:05:58 +0000 Subject: [issue19217] Calling assertEquals for moderately long list takes too long In-Reply-To: <1381410286.72.0.514206486634.issue19217@psf.upfronthosting.co.za> Message-ID: <1591135558.81.0.885070519244.issue19217@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 18:43:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 22:43:24 +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: <1591137804.34.0.101232427376.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: Microbenchmark for tuple free list to measure PR 20247 overhead: microbench_tuple.py. It requires to apply bench_tuple.patch. ---------- Added file: https://bugs.python.org/file49210/microbench_tuple.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 18:43:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 22:43:43 +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: <1591137823.22.0.887828833899.issue40521@roundup.psfhosted.org> Change by STINNER Victor : Added file: https://bugs.python.org/file49211/bench_tuple.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 19:11:05 2020 From: report at bugs.python.org (Rainald Koch) Date: Tue, 02 Jun 2020 23:11:05 +0000 Subject: [issue40850] Programming FAQ - variables local to the lambdas Message-ID: <1591139465.93.0.232349952448.issue40850@roundup.psfhosted.org> New submission from Rainald Koch : In section [10] of the FAQ, I whould add "(a function parameter with different default values)" after "variables local to the lambdas". Besides, I had to look up "memoizing" [2] and suspect that "memorizing" would be correct. [10] https://docs.python.org/3/faq/programming.html#why-do-lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result [2] https://en.wikipedia.org/wiki/Memoization ---------- assignee: docs at python components: Documentation messages: 370637 nosy: Rainald Koch, docs at python priority: normal severity: normal status: open title: Programming FAQ - variables local to the lambdas type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 19:19:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 23:19:48 +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: <1591139988.45.0.867105449237.issue40521@roundup.psfhosted.org> Change by STINNER Victor : Removed file: https://bugs.python.org/file49211/bench_tuple.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 19:19:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 23:19:47 +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: <1591139987.24.0.595710150839.issue40521@roundup.psfhosted.org> Change by STINNER Victor : Removed file: https://bugs.python.org/file49210/microbench_tuple.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 19:20:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 23:20:17 +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: <1591140017.47.0.3271173876.issue40521@roundup.psfhosted.org> Change by STINNER Victor : Added file: https://bugs.python.org/file49212/bench_tuple.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 19:20:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jun 2020 23:20:25 +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: <1591140025.33.0.00856418162864.issue40521@roundup.psfhosted.org> Change by STINNER Victor : Added file: https://bugs.python.org/file49213/microbench_tuple.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 2 20:18:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 00:18:04 +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: <1591143484.33.0.711729672583.issue39573@roundup.psfhosted.org> STINNER Victor added the comment: > bpo-39573: Convert Py_TYPE() to a static inline function (GH-20290) This change broke pycurl: https://github.com/pycurl/pycurl/pull/636 Extract of its current code: """ /* Initialize the type of the new type objects here; doing it here * is required for portability to Windows without requiring C++. */ p_Curl_Type = &Curl_Type; p_CurlMulti_Type = &CurlMulti_Type; p_CurlShare_Type = &CurlShare_Type; Py_TYPE(&Curl_Type) = &PyType_Type; Py_TYPE(&CurlMulti_Type) = &PyType_Type; Py_TYPE(&CurlShare_Type) = &PyType_Type; """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 00:54:30 2020 From: report at bugs.python.org (akdor1154) Date: Wed, 03 Jun 2020 04:54:30 +0000 Subject: [issue40851] subprocess.Popen: impossible to show console window when shell=True Message-ID: <1591160070.69.0.321919779989.issue40851@roundup.psfhosted.org> New submission from akdor1154 : Hi all, It seems impossible to show a new console window with calling subprocess.Popen on windows with shell=True. Attempt: si = subprocess.STARTUPINFO() si.dwFlags = subprocess.STARTF_USESHOWWINDOW si.wShowWindow = 5 proc = Popen( cmd, cwd=runFolder, creationflags=subprocess.CREATE_NEW_CONSOLE, shell=True, startupinfo=si ) In the current source, it looks like this is due to the block in https://github.com/python/cpython/blob/master/Lib/subprocess.py#L1405 , which unreservedly wipes wShowWindow even if I have provided it. Testing on Python 3.6 but I am assuming this affects all versions. ---------- components: Windows messages: 370639 nosy: akdor1154, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: subprocess.Popen: impossible to show console window when shell=True 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 Jun 3 01:24:02 2020 From: report at bugs.python.org (SilentGhost) Date: Wed, 03 Jun 2020 05:24:02 +0000 Subject: [issue40850] Programming FAQ - variables local to the lambdas In-Reply-To: <1591139465.93.0.232349952448.issue40850@roundup.psfhosted.org> Message-ID: <1591161842.37.0.118862488494.issue40850@roundup.psfhosted.org> SilentGhost added the comment: I don't think your suggestion improve readability there. I think explanation following the code example does a decent job without being overly verbose. Regarding, memoization, it is mentioned in [0], right after describing the technique. So, I'm not sure why you had to specifically look it up or why you still suspect that memorisation would be correct [0]: https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 01:33:48 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 03 Jun 2020 05:33:48 +0000 Subject: [issue40851] subprocess.Popen: impossible to show console window when shell=True In-Reply-To: <1591160070.69.0.321919779989.issue40851@roundup.psfhosted.org> Message-ID: <1591162428.06.0.0110719011566.issue40851@roundup.psfhosted.org> Eryk Sun added the comment: I think you have the right idea for improving the behavior here. It should skip setting wShowWindow if startupinfo already has the flag STARTF_USESHOWWINDOW. For example: if shell: comspec = os.environ.get("COMSPEC", "cmd.exe") args = '{} /c "{}"'.format (comspec, args) if not startupinfo.dwFlags & _winapi.STARTF_USESHOWWINDOW: startupinfo.dwFlags |= _winapi.STARTF_USESHOWWINDOW startupinfo.wShowWindow = _winapi.SW_HIDE ---------- components: +Library (Lib) nosy: +eryksun stage: -> needs patch type: -> enhancement versions: -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 02:07:08 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 03 Jun 2020 06:07:08 +0000 Subject: [issue40222] "Zero cost" exception handling In-Reply-To: <1586338863.3.0.393749013734.issue40222@roundup.psfhosted.org> Message-ID: <1591164428.58.0.383691210365.issue40222@roundup.psfhosted.org> Chris Jerdonek added the comment: To clarify, would there be any observable difference in behavior aside from speed? And would there be any limitations in when the speedup can be applied? ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 02:22:40 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 03 Jun 2020 06:22:40 +0000 Subject: [issue40848] compile() can compile a bare starred expression with `PyCF_ONLY_AST` flag with the old parser, but not the new one In-Reply-To: <1591124896.73.0.969808465521.issue40848@roundup.psfhosted.org> Message-ID: <1591165360.65.0.683053807174.issue40848@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Yeah, this is not a bug as Serhiy points out. Regarding the error message, we are currently working on trying to unify the error messages in the the parser as much as we can but there is also no promise that they will match 100%. Many grammar checks currently are done outside the parser (we mention it on PEP617) so I am not surprised that the old parser is ok with some invalid expressions and PyCF_ONLY_AST. This is one of the things we are trying to change with the new parser precisely. I will close for now as "not a bug". Feel free to reopen if you think we missed something or if something was left to discuss. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 02:23:54 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 03 Jun 2020 06:23:54 +0000 Subject: [issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't In-Reply-To: <1591124614.71.0.196427498662.issue40847@roundup.psfhosted.org> Message-ID: <1591165434.22.0.580745466855.issue40847@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +gvanrossum, lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 04:14:48 2020 From: report at bugs.python.org (hung son luong) Date: Wed, 03 Jun 2020 08:14:48 +0000 Subject: [issue40852] Dictionary created with dict.fromkeys have issues (all explained in the file) Message-ID: <1591172088.76.0.193777337738.issue40852@roundup.psfhosted.org> Change by hung son luong : ---------- components: ctypes files: issue_of_python_dict.py nosy: hung son luong priority: normal severity: normal status: open title: Dictionary created with dict.fromkeys have issues (all explained in the file) type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file49214/issue_of_python_dict.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 04:20:08 2020 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Jun 2020 08:20:08 +0000 Subject: [issue40846] Misleading line in documentation In-Reply-To: <1591122189.99.0.387318782653.issue40846@roundup.psfhosted.org> Message-ID: <1591172408.87.0.733477090177.issue40846@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 4.0 -> 5.0 pull_requests: +19830 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20602 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 04:39:20 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Jun 2020 08:39:20 +0000 Subject: [issue40222] "Zero cost" exception handling In-Reply-To: <1586338863.3.0.393749013734.issue40222@roundup.psfhosted.org> Message-ID: <1591173560.8.0.328882347719.issue40222@roundup.psfhosted.org> Serhiy Storchaka added the comment: The only observable changes will be changes in the code object: new attributes and constructor parameters, changed .pyc format, dis output, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 04:39:26 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 03 Jun 2020 08:39:26 +0000 Subject: [issue40852] Dictionary created with dict.fromkeys have issues (all explained in the file) In-Reply-To: <1591173313.57.0.73202670869.issue40852@roundup.psfhosted.org> Message-ID: <1591173566.38.0.664166104529.issue40852@roundup.psfhosted.org> Christian Heimes added the comment: Yes, this is intended behavior. Thanks Jim! ---------- nosy: +christian.heimes resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 04:39:39 2020 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Jun 2020 08:39:39 +0000 Subject: [issue40846] Misleading line in documentation In-Reply-To: <1591122189.99.0.387318782653.issue40846@roundup.psfhosted.org> Message-ID: <1591173579.19.0.46704499501.issue40846@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +19831 pull_request: https://github.com/python/cpython/pull/20603 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 04:43:18 2020 From: report at bugs.python.org (J Arun Mani) Date: Wed, 03 Jun 2020 08:43:18 +0000 Subject: [issue40846] Misleading line in documentation In-Reply-To: <1591122189.99.0.387318782653.issue40846@roundup.psfhosted.org> Message-ID: <1591173798.19.0.234085080461.issue40846@roundup.psfhosted.org> J Arun Mani added the comment: Hi. Thanks for your follow-up. I created a PR, since I signed CLA today, the PR has some labels indicating it. :p Thanks ---------- nosy: -python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 04:35:13 2020 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Wed, 03 Jun 2020 08:35:13 +0000 Subject: [issue40852] Dictionary created with dict.fromkeys have issues (all explained in the file) Message-ID: <1591173313.57.0.73202670869.issue40852@roundup.psfhosted.org> New submission from Jim Fasarakis-Hilliard : This isn't an issue, `value` (that is, `{}` here) is shared among all keys. Since you've added a mutable value, when you mutate it this change is seen for all keys holding the value. This is documented in dict.fromkeys https://docs.python.org/3/library/stdtypes.html#dict.fromkeys ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 04:48:13 2020 From: report at bugs.python.org (Eric Wieser) Date: Wed, 03 Jun 2020 08:48:13 +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: <1591174093.42.0.153178301951.issue31861@roundup.psfhosted.org> Change by Eric Wieser : ---------- nosy: +Eric Wieser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 04:48:28 2020 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 03 Jun 2020 08:48:28 +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: <1591174108.09.0.430770356171.issue40836@roundup.psfhosted.org> Vinay Sajip added the comment: Yes, they could have a docstring indicating that it is better to use critical(). Feel free to update the PR along that line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 05:03:33 2020 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 03 Jun 2020 09:03:33 +0000 Subject: [issue40403] pdb does not drop into debugger upon SyntaxError caused by ast.literal_eval In-Reply-To: <1587956856.04.0.83965486478.issue40403@roundup.psfhosted.org> Message-ID: <1591175013.26.0.573557134268.issue40403@roundup.psfhosted.org> Xavier de Gaye added the comment: > Perhaps we should should test whether the exception happened there and not drop in the debugger in that case? The same kind of problem occurs for any post-mortem debugging raised by an uncaught exception in the user code: the backtrace displayed by the 'bt' command shows frames that are owned by the pdb and bdb modules; and worse, the 'up' command allows to move to these frames. See for example below what happens when debugging foo.py that contains only the line "1/0". IMO this problem should be handled in another issue and in that case, in your example, 'bt' output would be empty. $ python -m pdb foo.py > /tmp/foo.py(1)() -> 1/0 (Pdb) c Traceback (most recent call last): File "/usr/lib/python3.8/pdb.py", line 1703, in main pdb._runscript(mainpyfile) File "/usr/lib/python3.8/pdb.py", line 1572, in _runscript self.run(statement) File "/usr/lib/python3.8/bdb.py", line 580, in run exec(cmd, globals, locals) File "", line 1, in File "/tmp/foo.py", line 1, in 1/0 ZeroDivisionError: division by zero Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program > /tmp/foo.py(1)() -> 1/0 (Pdb) bt /usr/lib/python3.8/pdb.py(1703)main() -> pdb._runscript(mainpyfile) /usr/lib/python3.8/pdb.py(1572)_runscript() -> self.run(statement) /usr/lib/python3.8/bdb.py(580)run() -> exec(cmd, globals, locals) (1)() > /tmp/foo.py(1)() -> 1/0 (Pdb) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 06:09:23 2020 From: report at bugs.python.org (Chris Withers) Date: Wed, 03 Jun 2020 10:09:23 +0000 Subject: [issue40805] Can no longer patch flask.g In-Reply-To: <1590668397.14.0.891806096405.issue40805@roundup.psfhosted.org> Message-ID: <1591178963.28.0.198110128828.issue40805@roundup.psfhosted.org> Chris Withers added the comment: Terry, mock is now a rolling backport of unittest.mock with all development taking place in cpython's repo. If issues are reported there, they need to be triaged here first, as it's most likely a bug in unittest.mock that needs fixing here. Rob, please can you see if this is reproducible on Python 3.8 or 3.9, replacing `from mock import` with `from unittest.mock` import? ---------- nosy: +cjw296 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 06:09:29 2020 From: report at bugs.python.org (Chris Withers) Date: Wed, 03 Jun 2020 10:09:29 +0000 Subject: [issue40805] Can no longer patch flask.g In-Reply-To: <1590668397.14.0.891806096405.issue40805@roundup.psfhosted.org> Message-ID: <1591178969.72.0.550046181118.issue40805@roundup.psfhosted.org> Change by Chris Withers : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 06:14:10 2020 From: report at bugs.python.org (Chris Withers) Date: Wed, 03 Jun 2020 10:14:10 +0000 Subject: [issue40805] Can no longer patch flask.g In-Reply-To: <1590668397.14.0.891806096405.issue40805@roundup.psfhosted.org> Message-ID: <1591179250.58.0.701981812785.issue40805@roundup.psfhosted.org> Chris Withers added the comment: Rob, you're welcome to dump `mock` and use `unittest.mock`, and that might be best for now, but this will then likely come back to bite you when you end up on the version of Python, probably 3.9, where it is present ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 06:26:55 2020 From: report at bugs.python.org (yesheng) Date: Wed, 03 Jun 2020 10:26:55 +0000 Subject: [issue40853] "set() in set()" should raise TypeError: unhashable type: 'set' Message-ID: <1591180015.28.0.813613755365.issue40853@roundup.psfhosted.org> New submission from yesheng : >>> set() in set() False # should raise TypeError >>> dict() in set() Traceback (most recent call last): File "", line 1, in TypeError: unhashable type: 'dict' >>> set() in dict() Traceback (most recent call last): File "", line 1, in TypeError: unhashable type: 'set' >>> dict() in dict() Traceback (most recent call last): File "", line 1, in TypeError: unhashable type: 'dict' >>> frozenset({1,2}) in {frozenset({1,2}), 3} True >>> {1,2} in {frozenset({1,2}), 3} True # should raise TypeError ---------- messages: 370652 nosy: yesheng priority: normal severity: normal status: open title: "set() in set()" should raise TypeError: unhashable type: 'set' type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 06:38:38 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 03 Jun 2020 10:38:38 +0000 Subject: [issue40853] "set() in set()" should raise TypeError: unhashable type: 'set' In-Reply-To: <1591180015.28.0.813613755365.issue40853@roundup.psfhosted.org> Message-ID: <1591180718.16.0.837628492646.issue40853@roundup.psfhosted.org> R?mi Lapeyre added the comment: The set is converted to a frozenset before the comparison so >>> {1,2} in {frozenset({1,2}), 3} is equivalent to >>> frozenset({1,2}) in {frozenset({1,2}), 3} This was introduced on purpose 17 years ago in 19c2d778 so it's unlikely to change. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 06:39:17 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 03 Jun 2020 10:39:17 +0000 Subject: [issue40853] "set() in set()" should raise TypeError: unhashable type: 'set' In-Reply-To: <1591180015.28.0.813613755365.issue40853@roundup.psfhosted.org> Message-ID: <1591180757.97.0.462977178692.issue40853@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- components: +Interpreter Core nosy: +rhettinger versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 06:59:51 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 03 Jun 2020 10:59:51 +0000 Subject: [issue40853] "set() in set()" should raise TypeError: unhashable type: 'set' In-Reply-To: <1591180015.28.0.813613755365.issue40853@roundup.psfhosted.org> Message-ID: <1591181991.53.0.0564572535311.issue40853@roundup.psfhosted.org> R?mi Lapeyre added the comment: This is documented in https://docs.python.org/3.8/library/stdtypes.html#set-types-set-frozenset: Instances of set are compared to instances of frozenset based on their members. For example, set('abc') == frozenset('abc') returns True and so does set('abc') in set([frozenset('abc')]). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 07:00:25 2020 From: report at bugs.python.org (Sandro Mani) Date: Wed, 03 Jun 2020 11:00:25 +0000 Subject: [issue40854] [Patch] Allow overriding sys.platlibdir Message-ID: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> New submission from Sandro Mani : You can currently point the python interpreter to a different install say via export PYTHONHOME= export PYTHONPATH=/lib/python3.9 python3 With the newly added platlibdir [1], if python was configured with platlibdir=lib64, this will break because i.e. the site-packages dir as returned by `sysconfig.get_paths()` will use lib64 and not lib as the other install may be using. This PR adds the possibility to override the platlibdir via environment variable. Full rationale: [2]. [1] https://github.com/python/cpython/pull/8068 [2] https://src.fedoraproject.org/rpms/python3.9/pull-request/10 ---------- components: Interpreter Core messages: 370655 nosy: smani priority: normal severity: normal status: open title: [Patch] Allow overriding sys.platlibdir versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 07:00:36 2020 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Jun 2020 11:00:36 +0000 Subject: [issue40854] [Patch] Allow overriding sys.platlibdir In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591182036.45.0.924577198747.issue40854@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +19832 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20605 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 07:09:05 2020 From: report at bugs.python.org (=?utf-8?q?Jurko_Gospodneti=C4=87?=) Date: Wed, 03 Jun 2020 11:09:05 +0000 Subject: [issue38905] venv python reports wrong sys.executable in a subprocess on Windows In-Reply-To: <1574583460.3.0.94905817038.issue38905@roundup.psfhosted.org> Message-ID: <1591182545.72.0.515971791941.issue38905@roundup.psfhosted.org> Jurko Gospodneti? added the comment: encountered what I believe is the same problem, so here are some more details I noticed, after checking what exactly that process name lookup does using ProcessMonitor: - when running my external process in a `venv` generated virtual environment, POpen() started subprocess executables are first looked up in the base Python executable's folder (the one used to create our virtual environment) as opposed to the one running the external Python process, if POpen() is called with `shell=False` - when doing the same and passing `shell=True` to the POpen() call, there is no such initial folder in the lookup - when doing the same on a `virtualenv` generated virtual environment, the file lookup is done in the correct folder first - the one containing the current Python executable and not in the base one ---------- nosy: +Jurko.Gospodneti? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 07:13:17 2020 From: report at bugs.python.org (yesheng) Date: Wed, 03 Jun 2020 11:13:17 +0000 Subject: [issue40853] "set() in set()" should raise TypeError: unhashable type: 'set' In-Reply-To: <1591180015.28.0.813613755365.issue40853@roundup.psfhosted.org> Message-ID: <1591182797.41.0.618252332333.issue40853@roundup.psfhosted.org> yesheng added the comment: thanks, it sounds reasonable. is it possible to make dict give consistent result? {1,2} in {frozenset({1,2}):3} # to return True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 08:20:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 12:20:50 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1591186850.58.0.529146359536.issue40679@roundup.psfhosted.org> STINNER Victor added the comment: > bpo-40679: Use the function's qualname in certain TypeErrors (GH-20236) This change introduced a regression. See this bug in Cython: https://github.com/cython/cython/issues/3641#issuecomment-638102096 I wrote a PR to use co->co_name if qualname is NULL (ex: when PyEval_EvalCodeEx() is called). I will post the PR once I finish to run the test suite locally ;-) ---------- nosy: +vstinner resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 08:27:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 12:27:55 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1591187275.52.0.56575520171.issue40679@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19834 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/20606 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 08:31:21 2020 From: report at bugs.python.org (Matti) Date: Wed, 03 Jun 2020 12:31:21 +0000 Subject: [issue40855] statistics.stdev ignore xbar argument Message-ID: <1591187481.58.0.119061539675.issue40855@roundup.psfhosted.org> New submission from Matti : statistics.variance also has the same problem. >>> import statistics >>> statistics.stdev([1,2]) 0.7071067811865476 >>> statistics.stdev([1,2], 3) 0.7071067811865476 >>> statistics.stdev([1,2], 1.5) 0.7071067811865476 should be 0.7071067811865476 2.23606797749979 0.5 ---------- messages: 370659 nosy: Folket priority: normal severity: normal status: open title: statistics.stdev ignore xbar argument type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 08:36:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 12:36:55 +0000 Subject: [issue32604] [subinterpreters] PEP 554 implementation: add interpreters module In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1591187815.36.0.969414701072.issue32604@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 18a90248fdd92b27098cc4db773686a2d10a4d24 by Victor Stinner in branch 'master': bpo-32604: Fix reference leak in select module (GH-20600) https://github.com/python/cpython/commit/18a90248fdd92b27098cc4db773686a2d10a4d24 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 08:40:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 12:40:03 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591188003.82.0.876371885038.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: New changeset fa7ab6aa0f9a4f695e5525db5a113cd21fa93787 by Victor Stinner in branch 'master': bpo-40826: Add _PyOS_InterruptOccurred(tstate) function (GH-20599) https://github.com/python/cpython/commit/fa7ab6aa0f9a4f695e5525db5a113cd21fa93787 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 08:42:37 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jun 2020 12:42:37 +0000 Subject: [issue40767] Allow pure Wayland to get default XDG webbrowser In-Reply-To: <1590406688.74.0.158171351248.issue40767@roundup.psfhosted.org> Message-ID: <1591188157.44.0.998289432353.issue40767@roundup.psfhosted.org> miss-islington added the comment: New changeset c822efeda9a0afe87cf3429724732fc8e19a01fb by Jeremy Attali in branch 'master': bpo-40767: Allow pure Wayland to get default XDG web browser (GH-20382) https://github.com/python/cpython/commit/c822efeda9a0afe87cf3429724732fc8e19a01fb ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 08:42:56 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jun 2020 12:42:56 +0000 Subject: [issue40767] Allow pure Wayland to get default XDG webbrowser In-Reply-To: <1590406688.74.0.158171351248.issue40767@roundup.psfhosted.org> Message-ID: <1591188176.35.0.21645222319.issue40767@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19835 pull_request: https://github.com/python/cpython/pull/20607 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 08:43:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 12:43:04 +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: <1591188184.24.0.470385637622.issue39573@roundup.psfhosted.org> STINNER Victor added the comment: To port code to Python 3.10, the following macro can be copied/pasted in your code. It defines Py_SET_SIZE() if it's not defined. #if PY_VERSION_HEX < 0x030900A4 # define Py_SET_SIZE(obj, size) do { Py_SIZE(obj) = (size); } while (0) #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 08:43:11 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jun 2020 12:43:11 +0000 Subject: [issue40767] Allow pure Wayland to get default XDG webbrowser In-Reply-To: <1590406688.74.0.158171351248.issue40767@roundup.psfhosted.org> Message-ID: <1591188191.14.0.45552761019.issue40767@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19837 pull_request: https://github.com/python/cpython/pull/20609 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 08:43:04 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jun 2020 12:43:04 +0000 Subject: [issue40767] Allow pure Wayland to get default XDG webbrowser In-Reply-To: <1590406688.74.0.158171351248.issue40767@roundup.psfhosted.org> Message-ID: <1591188184.83.0.906928303948.issue40767@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19836 pull_request: https://github.com/python/cpython/pull/20608 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 08:44:06 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 03 Jun 2020 12:44:06 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1591188246.46.0.820046651417.issue40679@roundup.psfhosted.org> Chris Jerdonek added the comment: Thanks a lot, Victor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 08:44:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 12:44:23 +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: <1591188263.05.0.384937691199.issue39573@roundup.psfhosted.org> STINNER Victor added the comment: Similar macro for Py_SET_TYPE: #if PY_VERSION_HEX < 0x030900A4 # define Py_SET_TYPE(obj, size) do { Py_TYPE(obj) = (size); } while (0) #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 08:46:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 12:46:39 +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: <1591188399.13.0.88630740758.issue39573@roundup.psfhosted.org> STINNER Victor added the comment: numpy fix defines Py_SET_TYPE() and Py_SET_SIZE() on old Python versions: * https://github.com/numpy/numpy/commit/a96b18e3d4d11be31a321999cda4b795ea9eccaa * https://github.com/numpy/numpy/pull/16417 In the whole numpy code base, only 5 lines have to be modified! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 09:00:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 13:00:52 +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: <1591189252.57.0.881257215028.issue39573@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19838 pull_request: https://github.com/python/cpython/pull/20610 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 09:01:28 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jun 2020 13:01:28 +0000 Subject: [issue40767] Allow pure Wayland to get default XDG webbrowser In-Reply-To: <1590406688.74.0.158171351248.issue40767@roundup.psfhosted.org> Message-ID: <1591189288.7.0.0348471978838.issue40767@roundup.psfhosted.org> miss-islington added the comment: New changeset 911c35d5d334b8c148202f2a7a32b511958032fc by Miss Islington (bot) in branch '3.7': bpo-40767: Allow pure Wayland to get default XDG web browser (GH-20382) https://github.com/python/cpython/commit/911c35d5d334b8c148202f2a7a32b511958032fc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 09:02:36 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jun 2020 13:02:36 +0000 Subject: [issue40767] Allow pure Wayland to get default XDG webbrowser In-Reply-To: <1590406688.74.0.158171351248.issue40767@roundup.psfhosted.org> Message-ID: <1591189356.91.0.26410064884.issue40767@roundup.psfhosted.org> miss-islington added the comment: New changeset 5b8787ef191864cd2313015959bcc3e10711aaff by Miss Islington (bot) in branch '3.8': bpo-40767: Allow pure Wayland to get default XDG web browser (GH-20382) https://github.com/python/cpython/commit/5b8787ef191864cd2313015959bcc3e10711aaff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 09:04:32 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jun 2020 13:04:32 +0000 Subject: [issue40767] Allow pure Wayland to get default XDG webbrowser In-Reply-To: <1590406688.74.0.158171351248.issue40767@roundup.psfhosted.org> Message-ID: <1591189472.68.0.221265127048.issue40767@roundup.psfhosted.org> miss-islington added the comment: New changeset 74a1fceeb61212a24608eab8266f64c6b22679a6 by Miss Islington (bot) in branch '3.9': bpo-40767: Allow pure Wayland to get default XDG web browser (GH-20382) https://github.com/python/cpython/commit/74a1fceeb61212a24608eab8266f64c6b22679a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 09:06:44 2020 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 03 Jun 2020 13:06:44 +0000 Subject: [issue40837] email.utils.encode_rfc2231(string, None, None) returns broken value In-Reply-To: <1590977826.25.0.0895335032044.issue40837@roundup.psfhosted.org> Message-ID: <1591189604.39.0.997859583888.issue40837@roundup.psfhosted.org> Change by Senthil Kumaran : ---------- versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 09:08:04 2020 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 03 Jun 2020 13:08:04 +0000 Subject: [issue40837] email.utils.encode_rfc2231(string, None, None) returns broken value In-Reply-To: <1590977826.25.0.0895335032044.issue40837@roundup.psfhosted.org> Message-ID: <1591189684.29.0.308011822813.issue40837@roundup.psfhosted.org> Senthil Kumaran added the comment: This will be a breaking change to the clients relying on current broken behavior, setting the fix version to 3.10 (current active). ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 09:11:06 2020 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 03 Jun 2020 13:11:06 +0000 Subject: [issue40767] Allow pure Wayland to get default XDG webbrowser In-Reply-To: <1590406688.74.0.158171351248.issue40767@roundup.psfhosted.org> Message-ID: <1591189866.12.0.559955990656.issue40767@roundup.psfhosted.org> Change by Senthil Kumaran : ---------- assignee: -> orsenthil nosy: +orsenthil resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 09:17:01 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 13:17: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: <1591190221.58.0.686232272833.issue39573@roundup.psfhosted.org> STINNER Victor added the comment: I proposed PR 20610 to enhance the documentation explaining how to port existing to code to Py_SET_SIZE() & cie. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 09:19:24 2020 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 03 Jun 2020 13:19:24 +0000 Subject: [issue40471] Grammar typo in issubclass docstring In-Reply-To: <1588357714.64.0.482700195727.issue40471@roundup.psfhosted.org> Message-ID: <1591190364.46.0.0662576966026.issue40471@roundup.psfhosted.org> Change by Senthil Kumaran : ---------- versions: +Python 3.10, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 09:19:48 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jun 2020 13:19:48 +0000 Subject: [issue40471] Grammar typo in issubclass docstring In-Reply-To: <1588357714.64.0.482700195727.issue40471@roundup.psfhosted.org> Message-ID: <1591190388.85.0.147409014998.issue40471@roundup.psfhosted.org> miss-islington added the comment: New changeset df773f8c5454acebe08c31e7308597fa5a8bf5df by Alex Povel in branch 'master': bpo-40471: Fix grammar typo in 'issubclass' docstring (GH-19847) https://github.com/python/cpython/commit/df773f8c5454acebe08c31e7308597fa5a8bf5df ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 09:33:01 2020 From: report at bugs.python.org (Rob Taft) Date: Wed, 03 Jun 2020 13:33:01 +0000 Subject: [issue40805] Can no longer patch flask.g In-Reply-To: <1590668397.14.0.891806096405.issue40805@roundup.psfhosted.org> Message-ID: <1591191181.76.0.338725211824.issue40805@roundup.psfhosted.org> Rob Taft added the comment: I have confirmed that using unittest.mock instead of the 3rd party mock library in python 3.8.3 and 3.9-dev fails to patch flask.g. 3.7.7 works correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 09:41:43 2020 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 03 Jun 2020 13:41:43 +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: <1591191703.04.0.50731088935.issue39314@roundup.psfhosted.org> Change by Senthil Kumaran : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 09:52:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 13:52:31 +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: <1591192351.75.0.369355045062.issue40692@roundup.psfhosted.org> STINNER Victor added the comment: > 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. Can't you tune an unit test to prevent multiprocessing.synchronize to be imported? For example, sys.modules['multiprocessing.synchronize'] = None ensures that "import multiprocessing.synchronize" fails, even if the module exists and works. $ python3 Python 3.8.3 (default, May 15 2020, 00:00:00) >>> import sys >>> sys.modules['multiprocessing.synchronize'] = None >>> import multiprocessing.synchronize Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: import of multiprocessing.synchronize halted; None in sys.modules A whole buildbot sounds like an overkill solution to this problem. On the other hand, multiprocessing tests are already ones of the slowest tests of the test suite *because* they try to test all possible combinations. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 10:16:12 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Wed, 03 Jun 2020 14:16:12 +0000 Subject: [issue32604] [subinterpreters] PEP 554 implementation: add interpreters module In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1591193772.83.0.131697967562.issue32604@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- pull_requests: +19839 pull_request: https://github.com/python/cpython/pull/20611 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 10:36:24 2020 From: report at bugs.python.org (Rob Taft) Date: Wed, 03 Jun 2020 14:36:24 +0000 Subject: [issue40805] Can no longer patch flask.g In-Reply-To: <1590668397.14.0.891806096405.issue40805@roundup.psfhosted.org> Message-ID: <1591194984.93.0.827991309454.issue40805@roundup.psfhosted.org> Change by Rob Taft : ---------- versions: +Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 11:08:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 15:08:28 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591196908.08.0.44505515123.issue40826@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19840 pull_request: https://github.com/python/cpython/pull/20613 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 11:23:32 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 03 Jun 2020 15:23:32 +0000 Subject: [issue40805] Can no longer patch flask.g In-Reply-To: <1590668397.14.0.891806096405.issue40805@roundup.psfhosted.org> Message-ID: <1591197812.16.0.120949979035.issue40805@roundup.psfhosted.org> Terry J. Reedy added the comment: Chris, I see no evidence in the *incomplete* traceback not posted here that there is a bug in mock. Mock calls "hasattr(obj, '__func__') and apparently flask, called via werkzeug, answers 'RuntimeError'. The overt bug is that calling werkzeug.local.(type(obj)?).__getattr__ fails by doing something other than "return the (computed) attribute value or raise an AttributeError exception". https://docs.python.org/3/reference/datamodel.html#object.__getattr__ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 11:47:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 15:47:39 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1591199259.32.0.729083740473.issue40679@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19841 pull_request: https://github.com/python/cpython/pull/20615 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 11:49:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 15:49:29 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591199369.22.0.54967977604.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 5d2396c8cf68fba0a949c6ce474a505e3aba9c1f by Victor Stinner in branch '3.9': [3.9] bpo-40826: Fix GIL usage in PyOS_Readline() (GH-20613) https://github.com/python/cpython/commit/5d2396c8cf68fba0a949c6ce474a505e3aba9c1f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 11:55:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 15:55:20 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591199720.94.0.669381997662.issue40826@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19842 pull_request: https://github.com/python/cpython/pull/20616 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 11:57:23 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 Jun 2020 15:57:23 +0000 Subject: [issue40853] "set() in set()" should raise TypeError: unhashable type: 'set' In-Reply-To: <1591180015.28.0.813613755365.issue40853@roundup.psfhosted.org> Message-ID: <1591199843.55.0.735649808873.issue40853@roundup.psfhosted.org> Raymond Hettinger added the comment: > is it possible to make dict give consistent result? That is unlikely (there isn't much need, it would introduce a cross-type dependency, it would be awkward dicts which use keys in many more ways than sets do). For the time being, a user should explicitly convert to a frozenset: frozenset(s) in d ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 12:07:27 2020 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 03 Jun 2020 16:07:27 +0000 Subject: [issue37746] Provide Windows predefined access type constants In-Reply-To: <1564766597.45.0.90249654152.issue37746@roundup.psfhosted.org> Message-ID: <1591200447.6.0.232731745273.issue37746@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 5.0 -> 6.0 pull_requests: +19843 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20617 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 12:23:15 2020 From: report at bugs.python.org (Rob Taft) Date: Wed, 03 Jun 2020 16:23:15 +0000 Subject: [issue40805] Can no longer patch flask.g In-Reply-To: <1590668397.14.0.891806096405.issue40805@roundup.psfhosted.org> Message-ID: <1591201395.86.0.0618622718303.issue40805@roundup.psfhosted.org> Rob Taft added the comment: I updated the test with 2 cases and the traceback is different for each when I expected them to be the same if this was purely a mock issue, the line throwing the error is the same. I can post this over with flask and see what they think. from unittest.mock import patch import flask def some_function(): flask.g.somevariable = True return flask.g.somevariable @patch('flask.g') def test_patch(mock_flask_global): assert some_function() def test_no_patch(): assert some_function() $ pytest -vv temp_test.py ============================================================================================================ test session starts ============================================================================================================= platform linux -- Python 3.8.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- collected 2 items temp_test.py::test_patch FAILED [ 50%] temp_test.py::test_no_patch FAILED [100%] ================================================================================================================== FAILURES ================================================================================================================== _________________________________________________________________________________________________________________ test_patch _________________________________________________________________________________________________________________ args = (), keywargs = {} @wraps(func) def patched(*args, **keywargs): > with self.decoration_helper(patched, args, keywargs) as (newargs, newkeywargs): ../../../.pyenv/versions/3.8.3/lib/python3.8/unittest/mock.py:1322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../../.pyenv/versions/3.8.3/lib/python3.8/contextlib.py:113: in __enter__ return next(self.gen) ../../../.pyenv/versions/3.8.3/lib/python3.8/unittest/mock.py:1304: in decoration_helper arg = exit_stack.enter_context(patching) ../../../.pyenv/versions/3.8.3/lib/python3.8/contextlib.py:425: in enter_context result = _cm_type.__enter__(cm) ../../../.pyenv/versions/3.8.3/lib/python3.8/unittest/mock.py:1416: in __enter__ if spec is None and _is_async_obj(original): ../../../.pyenv/versions/3.8.3/lib/python3.8/unittest/mock.py:51: in _is_async_obj if hasattr(obj, '__func__'): pyvenv/lib/python3.8/site-packages/werkzeug/local.py:347: in __getattr__ return getattr(self._get_current_object(), name) pyvenv/lib/python3.8/site-packages/werkzeug/local.py:306: in _get_current_object return self.__local() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'g' def _lookup_app_object(name): top = _app_ctx_stack.top if top is None: > raise RuntimeError(_app_ctx_err_msg) E RuntimeError: Working outside of application context. E E This typically means that you attempted to use functionality that needed E to interface with the current application object in some way. To solve E this, set up an application context with app.app_context(). See the E documentation for more information. pyvenv/lib/python3.8/site-packages/flask/globals.py:45: RuntimeError _______________________________________________________________________________________________________________ test_no_patch ________________________________________________________________________________________________________________ def test_no_patch(): > assert some_function() temp_test.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ temp_test.py:6: in some_function flask.g.somevariable = True pyvenv/lib/python3.8/site-packages/werkzeug/local.py:364: in __setattr__ = lambda x, n, v: setattr(x._get_current_object(), n, v) pyvenv/lib/python3.8/site-packages/werkzeug/local.py:306: in _get_current_object return self.__local() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'g' def _lookup_app_object(name): top = _app_ctx_stack.top if top is None: > raise RuntimeError(_app_ctx_err_msg) E RuntimeError: Working outside of application context. E E This typically means that you attempted to use functionality that needed E to interface with the current application object in some way. To solve E this, set up an application context with app.app_context(). See the E documentation for more information. pyvenv/lib/python3.8/site-packages/flask/globals.py:45: RuntimeError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 12:26:38 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 Jun 2020 16:26:38 +0000 Subject: [issue40855] statistics.stdev ignore xbar argument In-Reply-To: <1591187481.58.0.119061539675.issue40855@roundup.psfhosted.org> Message-ID: <1591201598.34.0.87850407628.issue40855@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 12:28:26 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 16:28:26 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591201706.44.0.0681302194585.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 6f7346bb3983cd7a6aa97eeeafffb3cecd5292b8 by Victor Stinner in branch '3.8': [3.9] bpo-40826: Fix GIL usage in PyOS_Readline() (GH-20613) (GH-20616) https://github.com/python/cpython/commit/6f7346bb3983cd7a6aa97eeeafffb3cecd5292b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 12:36:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 16:36:53 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591202213.7.0.929763459804.issue40826@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19844 pull_request: https://github.com/python/cpython/pull/20618 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 12:41:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 16:41:14 +0000 Subject: [issue36724] Clear _PyRuntime at exit In-Reply-To: <1556223229.48.0.664845556761.issue36724@roundup.psfhosted.org> Message-ID: <1591202474.69.0.401229261581.issue36724@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 12:42:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 16:42:03 +0000 Subject: [issue36476] Runtime finalization assumes all other threads have exited. In-Reply-To: <1553891906.3.0.987802696833.issue36476@roundup.psfhosted.org> Message-ID: <1591202523.7.0.588363991476.issue36476@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 12:42:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 16:42:40 +0000 Subject: [issue14073] allow per-thread atexit() In-Reply-To: <1329833528.5.0.177059033602.issue14073@psf.upfronthosting.co.za> Message-ID: <1591202560.64.0.125495540213.issue14073@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 12:42:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 16:42:33 +0000 Subject: [issue31517] MainThread association logic is fragile In-Reply-To: <1505826011.26.0.999867844657.issue31517@psf.upfronthosting.co.za> Message-ID: <1591202553.47.0.244245092221.issue31517@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 12:43:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 16:43:06 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1591202586.61.0.168913245679.issue33608@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 12:45:19 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 Jun 2020 16:45:19 +0000 Subject: [issue40855] statistics.stdev ignore xbar argument In-Reply-To: <1591187481.58.0.119061539675.issue40855@roundup.psfhosted.org> Message-ID: <1591202719.5.0.748119098476.issue40855@roundup.psfhosted.org> Raymond Hettinger added the comment: The relevant code is in the _ss() helper function: # The following sum should mathematically equal zero, but due to rounding # error may not. U, total2, count2 = _sum((x-c) for x in data) assert T == U and count == count2 total -= total2**2/len(data) The intent was to correct for small rounding errors, but the effect is to undo any xbar value that differs from the true mean. >From a user point-of-view the xbar parameter should have two effects, saving the computation time for the mean and also giving the ability to recenter the stdev/variance around a different point. It does save a call to mean; however, that effort is mostly throw-away by the rounding adjustment code which does even more work than computing the mean. Likely, the fix for this is skip the rounding adjustment code if the user supplies an xbar value. ---------- assignee: -> steven.daprano nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 12:48:43 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 03 Jun 2020 16:48:43 +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: <1591202923.72.0.325501111627.issue40686@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +19845 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20619 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 12:50:00 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 Jun 2020 16:50:00 +0000 Subject: [issue40850] Programming FAQ - variables local to the lambdas In-Reply-To: <1591139465.93.0.232349952448.issue40850@roundup.psfhosted.org> Message-ID: <1591203000.23.0.681554295306.issue40850@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 13:10:44 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 Jun 2020 17:10:44 +0000 Subject: [issue40856] IDLE line numbering should be light gray Message-ID: <1591204244.03.0.0281870328766.issue40856@roundup.psfhosted.org> New submission from Raymond Hettinger : In live code demos, the visual weight of the line numbers is heavier than the code next to it. Instead, is should be light gray, just dark enough to easily locate a line of interest, and light enough to tune out while reading the line and surrounding code. The current weight impairs readability. ---------- assignee: terry.reedy components: IDLE messages: 370681 nosy: rhettinger, terry.reedy priority: normal severity: normal status: open title: IDLE line numbering should be light gray type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 14:17:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 18:17:13 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591208233.59.0.993998766019.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 6d62dc1ea4e191b8486e80a85ca0694215375424 by Victor Stinner in branch '3.9': [3.9] bpo-40826: PyOS_InterruptOccurred() requires GIL (GH-20578) (GH-20618) https://github.com/python/cpython/commit/6d62dc1ea4e191b8486e80a85ca0694215375424 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 14:18:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 18:18:16 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591208296.97.0.671012059991.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: Ok, I fixed bugs in the REPL on Linux and Windows in 3.8, 3.9 and master branches. I also modified PyOS_InterruptOccurred() to fail with a fatal error and a nice error message, rather than crashing with a core dump, if it's called with the GIL released. I changed in 3.9 and master branches. Thanks Jelle Zijlstra for the bug report! I'm now closing the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 16:17:43 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 Jun 2020 20:17:43 +0000 Subject: [issue40855] statistics.stdev ignore xbar argument In-Reply-To: <1591187481.58.0.119061539675.issue40855@roundup.psfhosted.org> Message-ID: <1591215463.05.0.111872612812.issue40855@roundup.psfhosted.org> Raymond Hettinger added the comment: Perhaps this would work: diff --git a/Lib/statistics.py b/Lib/statistics.py index c76a6ca519..93a4633464 100644 --- a/Lib/statistics.py +++ b/Lib/statistics.py @@ -682,8 +682,10 @@ def _ss(data, c=None): calculated from ``c`` as given. Use the second case with care, as it can lead to garbage results. """ - if c is None: - c = mean(data) + if c is not None: + T, total, count = _sum((x-c)**2 for x in data) + return (T, total) + c = mean(data) T, total, count = _sum((x-c)**2 for x in data) # The following sum should mathematically equal zero, but due to rounding # error may not. Matti, where do you get 0.5 as the expected outcome for the third example? The actual mean is 1.5, so I would expect the third case to give sqrt(2)/2 or 0.707. ---------- components: +Library (Lib) versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 16:25:15 2020 From: report at bugs.python.org (Ama Aje My Fren) Date: Wed, 03 Jun 2020 20:25:15 +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: <1591215915.86.0.182517814308.issue25377@roundup.psfhosted.org> Change by Ama Aje My Fren : ---------- keywords: +patch nosy: +amaajemyfren nosy_count: 4.0 -> 5.0 pull_requests: +19846 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20621 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 16:58:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jun 2020 20:58:08 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1591217888.83.0.375711236734.issue37483@roundup.psfhosted.org> STINNER Victor added the comment: Oh, PyObject_CallOneArg() is missing in the What's New in Python 3.9: https://docs.python.org/dev/whatsnew/3.9.html#id1 Can someone please propose a PR to add it? I reopen the issue. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 17:05:34 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 03 Jun 2020 21:05:34 +0000 Subject: [issue39457] Add an autocommit property to sqlite3.Connection with a PEP 249 compliant manual commit mode and migrate In-Reply-To: <1580066229.26.0.0229158792904.issue39457@roundup.psfhosted.org> Message-ID: <1591218334.95.0.164274549639.issue39457@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 17:30:29 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 03 Jun 2020 21:30:29 +0000 Subject: [issue40856] IDLE line numbering should be light gray In-Reply-To: <1591204244.03.0.0281870328766.issue40856@roundup.psfhosted.org> Message-ID: <1591219829.32.0.734371947756.issue40856@roundup.psfhosted.org> Terry J. Reedy added the comment: The line number sidebar colors are already user configurable. We expected preferences for this to be as diverse as for anything else. I changed them on my custom dark theme to dark blue on light blue, but I don't expect anyone else to like that. Notepad++ black on white uses a slightly lighter gray on a very light gray (RBG about 233 versus 255 for white). I think a background different from the text is a good idea. In retrospect, I might have suggested a default something more like N++, but I am not currently willing to change the existing default. ---------- nosy: +taleinat resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 17:55:09 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 03 Jun 2020 21:55:09 +0000 Subject: [issue40855] statistics.stdev ignore xbar argument In-Reply-To: <1591202719.5.0.748119098476.issue40855@roundup.psfhosted.org> Message-ID: <20200603214847.GD2351@ando.pearwood.info> Steven D'Aprano added the comment: Thanks Raymond, that is the intended effect, and your analysis seems plausible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 18:01:31 2020 From: report at bugs.python.org (Tal Einat) Date: Wed, 03 Jun 2020 22:01:31 +0000 Subject: [issue40856] IDLE line numbering should be light gray In-Reply-To: <1591204244.03.0.0281870328766.issue40856@roundup.psfhosted.org> Message-ID: <1591221691.96.0.248916676848.issue40856@roundup.psfhosted.org> Tal Einat added the comment: I agree that the line numbers should be less prominent. Terry, why not change the the default? ISTM we should strive to have good default colors, they are what most users use and see. I also think we should improve the dark theme, but that's a separate issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 18:08:19 2020 From: report at bugs.python.org (Tim Reid) Date: Wed, 03 Jun 2020 22:08:19 +0000 Subject: [issue40857] tempfile.TemporaryDirectory() context manager can fail to propagate exceptions generated within its context Message-ID: <1591222099.53.0.802921276051.issue40857@roundup.psfhosted.org> New submission from Tim Reid : When an exception occurs within a tempfile.TemporaryDirectory() context and the directory cleanup fails, the _cleanup exception_ is propagated, not the original one. This effectively 'masks' the original exception, and makes it impossible to catch using a simple 'try'/'except' construct. ---------------------------------------------------------------------------- Code like this: import tempfile import os import sys try: with tempfile.TemporaryDirectory() as tempdir: print(tempdir) # some code happens here except ArithmeticError as exc: print('An arithmetic error occurred: {}'.format(exc)) print('Continuing...') is effective at catching any ArithmeticError which occurs in the code fragment but is not otherwise handled. However if, in addition, an error occues in cleaning up the temporary directory, the exception which occurred in the code is replaced by the cleanup exception, and is not be propagated to be caught by the 'except' clause. For example: import tempfile import os import sys try: with tempfile.TemporaryDirectory() as tempdir: print(tempdir) n = 1 / 0 except ArithmeticError as exc: print('An arithmetic error occurred: {}'.format(exc)) print('Continuing...') produces this: /tmp/tmp_r2sxqgb An arithmetic error occurred: division by zero Continuing... but this: import tempfile import os import sys try: with tempfile.TemporaryDirectory() as tempdir: print(tempdir) os.rmdir(tempdir) # this new line is the only difference n = 1 / 0 except ArithmeticError as exc: print('An arithmetic error occurred: {}'.format(exc)) print('Continuing...') produces this: /tmp/tmp_yz6zyfs Traceback (most recent call last): File "tempfilebug.py", line 9, in n = 1 / 0 ZeroDivisionError: division by zero During handling of the above exception, another exception occurred: Traceback (most recent call last): File "tempfilebug.py", line 9, in n = 1 / 0 File "/usr/lib/python3.6/tempfile.py", line 948, in __exit__ self.cleanup() File "/usr/lib/python3.6/tempfile.py", line 952, in cleanup _rmtree(self.name) File "/usr/lib/python3.6/shutil.py", line 477, in rmtree onerror(os.lstat, path, sys.exc_info()) File "/usr/lib/python3.6/shutil.py", line 475, in rmtree orig_st = os.lstat(path) FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp_yz6zyfs' and the program exits with the top-level code having no chance to catch the ZeroDivisionError and continue execution. (To catch this exception, the top-level code would need to know to catch FileNotFoundError.) My view is that if an exception happens within a TemporaryDirectory context, *and* there is an exception generated as a result of the cleanup process, the original exception is likely to be more significant, and should be the exception which is propagated, not the one generated by the cleanup. ---------------------------------------------------------------------------- System info: $ python3 --version Python 3.6.9 $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.4 LTS Release: 18.04 Codename: bionic ---------- components: Extension Modules messages: 370689 nosy: granchester priority: normal severity: normal status: open title: tempfile.TemporaryDirectory() context manager can fail to propagate exceptions generated within its context type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 19:24:39 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 03 Jun 2020 23:24:39 +0000 Subject: [issue40858] ntpath.realpath fails for broken symlinks with rooted target paths Message-ID: <1591226679.06.0.123805076951.issue40858@roundup.psfhosted.org> New submission from Eryk Sun : ntpath.realpath fails to resolve the non-strict path of a broken relative symlink if the target is a rooted path. For example: >>> os.readlink('symlink') '\\broken\\link' >>> os.path.realpath('symlink') '\\broken\\link' >>> os.path.abspath('symlink') 'C:\\Temp\\symlink' The problem is that relative paths have to be specially handled by ntpath._readlink_deep, but ntpath.isabs incorrectly classifies r"\broken\link" as an absolute path. It's actually relative to the current device or drive in the access context. Other path libraries get this right, such as pathlib.Path.is_absolute and C++ path::is_absolute [1]. The documented behavior of ntpath.isabs (i.e. "begins with a (back)slash after chopping off a potential drive letter") isn't something that we can change. So ntpath._readlink_deep needs a private implementation of isabs. For example: def _isabs(s): s = os.fspath(s) seps = _get_bothseps(s) s = s[1:2] if (s and s[0] in seps) else splitdrive(s)[1] return bool(s) and s[0] in seps This classifies UNC paths as absolute; rooted paths without a drive as relative; and otherwise depends on splitdrive() to get the root path, if any. [1]: https://docs.microsoft.com/en-us/cpp/standard-library/path-class?view=vs-2019#is_absolute ---- Background The target of a relative symlink gets evaluated against the hard path that's used to access the link. A hard path contains directories and mountpoints, but no symlinks. In particular, a rooted symlink target such as r"\spam\eggs" is relative to the root device of the hard path that's used to access the link. This may or may not be the device on which the link resides. It depends on how it's accessed. For example, if the volume that contains the r"\spam\eggs" link is accessed via its DOS device name "V:", then it resolves to r"V:\spam\eggs". Similarly, if the r"\spam\eggs" link is accessed via r"C:\Mount\VolumeSymlink", where "VolumeSymlink" is a directory symlink to "V:\\", then it also resolves to r"V:\spam\eggs". On the other hand, if the r"\spam\eggs" link is accessed via the mountpoint r"C:\Mount\VolumeMountpoint", then it resolves to r"C:\spam\eggs". ---------- components: Library (Lib), Windows messages: 370690 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: ntpath.realpath fails for broken symlinks with rooted target paths type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 21:03:21 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 04 Jun 2020 01:03:21 +0000 Subject: [issue40840] lzma.h file not found building on macOS In-Reply-To: <1591057691.57.0.0922898078512.issue40840@roundup.psfhosted.org> Message-ID: <1591232601.93.0.627451634535.issue40840@roundup.psfhosted.org> Jason R. Coombs added the comment: In [this latest routine](https://github.com/jaraco/jaraco.develop/blob/6469c7a61e7349b93f191df38eed6cd020dd79be/jaraco/develop/macos-build-python.py), on my macOS workstation with Homebrew installed locally, Python builds successfully with just a few outliers: ``` Python build finished successfully! The necessary bits to build these optional modules were not found: _gdbm ossaudiodev spwd To find the necessary bits, look in setup.py in detect_modules() for the module's name. The following modules found by detect_modules() in setup.py, have been built by the Makefile instead, as configured by the Setup files: _abc atexit pwd time ``` The output is the same as on the system with Homebrew system-installed, except for `_gdbm`, which seems only to work on system-installed Homebrew. That's much cleaner and addresses the reported issue. I guess I should have been more careful to execute exactly what the dev docs said rather than my routine which must have accumulated some cruft as you recognized. Thanks for the help. If you have any other hints as to how to ensure _gdbm builds, I'm open to suggestions. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 21:34:32 2020 From: report at bugs.python.org (David Bolen) Date: Thu, 04 Jun 2020 01:34:32 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591234472.63.0.11946308032.issue40826@roundup.psfhosted.org> David Bolen added the comment: I haven't had a chance to look too deeply, but the final set of commits (starting with fa7ab6aa) appear to be the common thread with all branches now failing with timeout exceptions in test_repl on the Windows 10 buildbot. The first instance was in the 3.x branch (https://buildbot.python.org/all/#/builders/129/builds/1191) but they all seem similar. -- David ---------- nosy: +db3l _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 22:41:03 2020 From: report at bugs.python.org (Ma Lin) Date: Thu, 04 Jun 2020 02:41:03 +0000 Subject: [issue40859] Update Windows build to use xz-5.2.5 Message-ID: <1591238463.96.0.281158098158.issue40859@roundup.psfhosted.org> New submission from Ma Lin : The Windows build is using xz-5.2.2, it was released on 2015-09-29. xz-5.2.5 was released recently, maybe we can update this library. When preparing cpython-source-deps, don't forget to copy `xz-5.2.5\windows\vs2019\config.h` to `xz-5.2.5\windows\` folder. `\vs2019\config.h` and `\vs2017\config.h` are the same, except for the comment on the first line. I tested xz-5.2.5 on my local machine, it passed test_lzma.py. XZ Utils Release Notes: https://git.tukaani.org/?p=xz.git;a=blob;f=NEWS;hb=HEAD ---------- components: Windows messages: 370693 nosy: Ma Lin, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Update Windows build to use xz-5.2.5 versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 22:44:37 2020 From: report at bugs.python.org (Ma Lin) Date: Thu, 04 Jun 2020 02:44:37 +0000 Subject: [issue40859] Update Windows build to use xz-5.2.5 In-Reply-To: <1591238463.96.0.281158098158.issue40859@roundup.psfhosted.org> Message-ID: <1591238677.38.0.0851055422299.issue40859@roundup.psfhosted.org> Change by Ma Lin : ---------- keywords: +patch pull_requests: +19847 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20622 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 22:53:35 2020 From: report at bugs.python.org (David Bolen) Date: Thu, 04 Jun 2020 02:53:35 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591239215.22.0.940115633971.issue40826@roundup.psfhosted.org> David Bolen added the comment: It appears the recent commit is causing a CRT exception dialog in test_close_stdin (test_repl.TestInteractiveInterpreter). The dialog can't get answered, which is what leads to the eventual timeout. The assertion is "_osfile(fh) & FOPEN" from osfinfo.cpp on line 258. It actually appears twice (if the first is ignored). If both are ignored the test passes. I was somewhat surprised to see the dialog, as I believe CRT exception dialogs are disabled during test runs (others are present in test logs). Perhaps the child interpreter used by test_repl doesn't inherit that behavior. If so, this was probably always a risk, there just weren't any assertions occurring before this in the child interpreter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 3 23:06:13 2020 From: report at bugs.python.org (Arkady M) Date: Thu, 04 Jun 2020 03:06:13 +0000 Subject: [issue40860] Exception in multiprocessing/context.py under load Message-ID: <1591239973.04.0.347860195364.issue40860@roundup.psfhosted.org> New submission from Arkady M : I am running an HTTP server (socketserver.ThreadingMixIn, http.server.HTTPServer) in a Docker container (FROM ubuntu:19.10) Occasionally I get an exception: Exception happened during processing of request from ('172.17.0.1', 35756) Traceback (most recent call last): File "/usr/lib/python3.7/socketserver.py", line 650, in process_request_thread self.finish_request(request, client_address) File "/usr/lib/python3.7/socketserver.py", line 360, in finish_request self.RequestHandlerClass(request, client_address, self) File "service.py", line 221, in __init__ super(UrlExtractorServer, self).__init__(*args, **kwargs) File "/usr/lib/python3.7/socketserver.py", line 720, in __init__ self.handle() File "/usr/lib/python3.7/http/server.py", line 426, in handle self.handle_one_request() File "/usr/lib/python3.7/http/server.py", line 414, in handle_one_request method() File "service.py", line 488, in do_POST self._post_extract(url) File "service.py", line 459, in _post_extract extracted_links, err_msg = self._extract_links(transaction_id, attachment_id, zip_password, data) File "service.py", line 403, in _extract_links error, results = call_timeout(process_deadline, extractor.extract_links_binary_multiprocess, args=data) File "service.py", line 175, in call_timeout manager = multiprocessing.Manager() File "/usr/lib/python3.7/multiprocessing/context.py", line 56, in Manager m.start() File "/usr/lib/python3.7/multiprocessing/managers.py", line 563, in start self._process.start() File "/usr/lib/python3.7/multiprocessing/process.py", line 111, in start _cleanup() File "/usr/lib/python3.7/multiprocessing/process.py", line 56, in _cleanup if p._popen.poll() is not None: AttributeError: 'NoneType' object has no attribute 'poll' I am in the process of preparingof of a reasonably simple piece of code demonstrating the problem. Meanwhile the following can be important. In the code below I ma getting the elapse < timeout (20 times from 70K). In all case psutil.Process() returned psutil.NoSuchProcess time_start = time.time() job = multiprocessing.Process(target=func, args=(args, results), kwargs=kwargs) job.start() job.join(timeout) elapsed = time.time()-time_start if job.is_alive(): try: process = psutil.Process(job.pid) process_error = f"pid {job.pid} status {process.status} {process}" except Exception as e: process_error = f"psutil.Process() failed {e}" if elapsed < timeout: print("elapsed < timeout") ---------- messages: 370695 nosy: Arkady M priority: normal severity: normal status: open title: Exception in multiprocessing/context.py under load type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 03:08:46 2020 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Jun 2020 07:08:46 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591254526.92.0.63229542297.issue40826@roundup.psfhosted.org> Eryk Sun added the comment: > Perhaps the child interpreter used by test_repl doesn't inherit > that behavior. The OS error mode is inherited, unless the child is created with CREATE_DEFAULT_ERROR_MODE flag. But the CRT error mode isn't inherited. (For the spawn* family, in principle the CRT could pass its error modes in reserved STARTUPINFO fields, like it does for file descriptors, but it doesn't do that, and subprocess wouldn't be privy to that protocol anyway.) For example: >>> import sys, subprocess >>> from msvcrt import * >>> SEM_FAILCRITICALERRORS, CRTDBG_MODE_FILE, CRTDBG_MODE_WNDW (1, 1, 4) >>> SetErrorMode(SEM_FAILCRITICALERRORS) 0 >>> CrtSetReportMode(CRT_ERROR, CRTDBG_MODE_FILE) 4 The return values are the previous values, which are respectively 0 (default) for the OS and CRTDBG_MODE_WNDW (message box) for the CRT. Now check the initial values in a child process: >>> subprocess.call(f'{sys.executable} -q') >>> from msvcrt import * >>> SetErrorMode(SEM_FAILCRITICALERRORS) 1 >>> CrtSetReportMode(CRT_ERROR, CRTDBG_MODE_FILE) 4 The OS error mode of the parent was inherited, but the parent's CRT error mode was not. libregrtest has a convenient function to suppress error reporting in the child. For example: >>> import sys, subprocess >>> subprocess.call(f'{sys.executable} -q') >>> import os >>> from test.libregrtest import setup >>> setup.suppress_msvcrt_asserts(0) >>> os.close(0) >>> 0 ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 03:34:48 2020 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 04 Jun 2020 07:34:48 +0000 Subject: [issue31254] WeakKeyDictionary/Mapping doesn't call __missing__ In-Reply-To: <1503387072.25.0.0553627508053.issue31254@psf.upfronthosting.co.za> Message-ID: <1591256088.01.0.761303685596.issue31254@roundup.psfhosted.org> Nathaniel Smith added the comment: Just found this while searching to see if we had an existing way to combine WeakValueDictionary + defaultdict. The use case I've run into a few times is where you need a keyed collection of mutexes, like e.g. asyncio.Lock objects. You want to make sure that if there are multiple tasks trying to access the same key/resource, they all acquire the same lock, but you don't want to use a regular defaultdict, because that will end up growing endlessly as different keys/resources are encountered. It'd be very handy to do something like: lock_dict = WeakValueDictionary(default=asyncio.Lock) async with lock_dict[key]: ... and have everything magically work. The alternative is to open-code the default handling at the call site, either: # Wasteful: creates a new Lock object on every usage, # regardless of whether it's actually needed. async with lock_dict.setdefault(key, asyncio.Lock()): ... Or else the verbose: lock = lock_dict.get(key) if lock is None: lock = lock_dict[key] = asyncio.Lock() async with lock: ... ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 04:08:25 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 Jun 2020 08:08:25 +0000 Subject: [issue40856] IDLE line numbering should be light gray In-Reply-To: <1591204244.03.0.0281870328766.issue40856@roundup.psfhosted.org> Message-ID: <1591258105.11.0.51945165637.issue40856@roundup.psfhosted.org> Terry J. Reedy added the comment: When the question of changing default-x.def has come up before (and there are things I would like to change) the answer has generally been that we should not, a) because it would be too disruptive, including affecting exiting customizations, and b) because users already have the option of customizing. Most of the behaviors we change are not customizable, so we have to change the current behavior to give most people a better behavior, even if some people (including Raymond) object. However, I will reconsider here since a) Tal, who I believe choose the current default, not only agrees with changing it by also the direction, b) line-numbers are only a year old, and, importantly, c) themes are saved as a whole, rather than as individual pairs, so that existing customizations will not be affected. Even so, I expect that there will be people using IDLE Classic that prefer the current default. If we are to change, we need specific foreground and background RGB numbers to replace the Current ones. Raymond, Tal, and Cheryl if you want, please play with the line number (and future Shell sidebar) colors and propose something specific for general use. (Raymond, I can imagine that you might prefer for projection with a particular system something different than you think is best for default screen use.) I intend to post to idledev and maybe elsewhere to get other opinions (including for IDLE Dark). Since I will not use whatever is chosen, my main concern is that we not choose something so light as to be unreadable by people like me with less than 'perfect' vision. Related issue: the IDLE New theme was added years ago as a copy of IDLE Classic. I presume the intent was to provide an alternative (light) default, but it was never modified, making it currently useless. We should either delete it, while recognizing the name, or actually change it. I have some ideas for the latter, but I presume Raymond intends this issue to be about changing IDLE Classic. ---------- nosy: +cheryl.sabella resolution: not a bug -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 04:17:55 2020 From: report at bugs.python.org (larytet) Date: Thu, 04 Jun 2020 08:17:55 +0000 Subject: [issue40860] Exception in multiprocessing/context.py under load In-Reply-To: <1591239973.04.0.347860195364.issue40860@roundup.psfhosted.org> Message-ID: <1591258675.15.0.136985557119.issue40860@roundup.psfhosted.org> larytet added the comment: This code reproduces the problem https://github.com/larytet-py/multiprocess I assume that my use of join() is not correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 04:59:42 2020 From: report at bugs.python.org (Matti) Date: Thu, 04 Jun 2020 08:59:42 +0000 Subject: [issue40855] statistics.stdev ignore xbar argument In-Reply-To: <1591187481.58.0.119061539675.issue40855@roundup.psfhosted.org> Message-ID: <1591261182.03.0.0286376992725.issue40855@roundup.psfhosted.org> Matti added the comment: If we estimate the mean using a sample we loose one degree of freedom so it will be divided by N-1, while if we have the mean independent of the sample it should be divided by N to be unbiased. i.e. example 1 sqrt(((1-1.5)?+(2-1.5)?)/(2-1)) = 0.7... example 3 sqrt(((1-1.5)?+(2-1.5)?)/(2)) = 0.5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 05:38:48 2020 From: report at bugs.python.org (Nikita Nemkin) Date: Thu, 04 Jun 2020 09:38:48 +0000 Subject: [issue40861] On Windows, liblzma is always built without optimization Message-ID: <1591263528.02.0.798205890082.issue40861@roundup.psfhosted.org> New submission from Nikita Nemkin : Windows build system always builds liblzma with optimizations disabled (/Od), even in Release configuration. Compared to optimized build (/O2), compression speed is 2-2.5x slower and module size is 30% larger. ---------- components: Build messages: 370702 nosy: nnemkin priority: normal severity: normal status: open title: On Windows, liblzma is always built without optimization type: performance versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 07:59:48 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 04 Jun 2020 11:59:48 +0000 Subject: [issue40862] argparse.BooleanOptionalAction accept and silently its the const argument Message-ID: <1591271988.48.0.105166319.issue40862@roundup.psfhosted.org> New submission from R?mi Lapeyre : The action is used to store None, True or False when an argument like --foo or --no-foo is given to the cli so it has no used for this action, but it is accepted without warning: Python 3.10.0a0 (heads/bpo-wip:6e23a9c82b, Jun 4 2020, 13:41:35) [Clang 11.0.3 (clang-1103.0.32.62)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import argparse >>> parser = argparse.ArgumentParser() >>> parser.add_argument('--foo', const='this_is_not_used', action=argparse.BooleanOptionalAction) BooleanOptionalAction(option_strings=['--foo', '--no-foo'], dest='foo', nargs=0, const=None, default=None, type=None, choices=None, help=None, metavar=None) >>> args = parser.parse_args() >>> args Namespace(foo=None) We could either always refuse this argument, or accepted and raise ValueError if it is different than None. The attached PR does the first. ---------- components: Library (Lib) messages: 370703 nosy: remi.lapeyre priority: normal severity: normal status: open title: argparse.BooleanOptionalAction accept and silently its the const argument versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 08:06:08 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 04 Jun 2020 12:06:08 +0000 Subject: [issue40862] argparse.BooleanOptionalAction accept and silently its the const argument In-Reply-To: <1591271988.48.0.105166319.issue40862@roundup.psfhosted.org> Message-ID: <1591272368.74.0.401212777177.issue40862@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +19848 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20623 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 08:17:37 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Thu, 04 Jun 2020 12:17:37 +0000 Subject: [issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1591273057.23.0.819004998091.issue1294959@roundup.psfhosted.org> Miro Hron?ok added the comment: Note: https://docs.python.org/3.9/install/index.html probably needs some update wrt this change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 08:24:58 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 04 Jun 2020 12:24:58 +0000 Subject: [issue40862] argparse.BooleanOptionalAction accept and silently discard its the const argument In-Reply-To: <1591271988.48.0.105166319.issue40862@roundup.psfhosted.org> Message-ID: <1591273498.78.0.225006025283.issue40862@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- title: argparse.BooleanOptionalAction accept and silently its the const argument -> argparse.BooleanOptionalAction accept and silently discard its the const argument _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 08:48:24 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Jun 2020 12:48:24 +0000 Subject: [issue17258] multiprocessing.connection challenge implicitly uses MD5 In-Reply-To: <1361391096.59.0.84157337171.issue17258@psf.upfronthosting.co.za> Message-ID: <1591274904.33.0.731463105508.issue17258@roundup.psfhosted.org> miss-islington added the comment: New changeset b022e5cffbd3ff51ae361cf80f2a3b660be8b1ee by Christian Heimes in branch 'master': bpo-17258: Add requires_hashdigest to multiprocessing tests (GH-20412) https://github.com/python/cpython/commit/b022e5cffbd3ff51ae361cf80f2a3b660be8b1ee ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 09:19:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jun 2020 13:19:08 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1591276748.62.0.471950840128.issue40679@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 232dda6cbc10860328a83517a6e3ea238ff4147f by Victor Stinner in branch 'master': bpo-40679: Fix _PyEval_EvalCode() crash if qualname is NULL (GH-20615) https://github.com/python/cpython/commit/232dda6cbc10860328a83517a6e3ea238ff4147f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 09:20:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jun 2020 13:20:24 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1591276824.0.0.336163387859.issue40679@roundup.psfhosted.org> STINNER Victor added the comment: > Thanks a lot, Victor. You're welcome. Using the qualified name instead of the "short" name in error messages is nice enhancement! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 09:27:42 2020 From: report at bugs.python.org (Arkady) Date: Thu, 04 Jun 2020 13:27:42 +0000 Subject: [issue40860] Exception in multiprocessing/context.py under load In-Reply-To: <1591239973.04.0.347860195364.issue40860@roundup.psfhosted.org> Message-ID: <1591277262.39.0.474213358409.issue40860@roundup.psfhosted.org> Arkady added the comment: The problem is likely in the call to multiprocessing.Process.join() with timeout. If I use timeout=None the code works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 09:48:19 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 04 Jun 2020 13:48:19 +0000 Subject: [issue40857] tempfile.TemporaryDirectory() context manager can fail to propagate exceptions generated within its context In-Reply-To: <1591222099.53.0.802921276051.issue40857@roundup.psfhosted.org> Message-ID: <1591278499.27.0.460942261842.issue40857@roundup.psfhosted.org> R?mi Lapeyre added the comment: This was fixed in e9b51c0ad81da1da11ae65840ac8b50a8521373c so it's fixed in Python 3.8 and 3.9. Maybe it should have been backported to 3.7. Python 3.6 only receives security fixes now. See also bpo-26660 and bpo-35144. ---------- components: +Library (Lib) -Extension Modules nosy: +remi.lapeyre, serhiy.storchaka versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 09:48:57 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 04 Jun 2020 13:48:57 +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: <1591278537.31.0.607969023281.issue40836@roundup.psfhosted.org> R?mi Lapeyre added the comment: Thanks for the feedback, I updated the PR accordingly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 10:07:03 2020 From: report at bugs.python.org (Matthias Naegler) Date: Thu, 04 Jun 2020 14:07:03 +0000 Subject: [issue40863] bytes.decode changes/destroys line endings on windows Message-ID: <1591279623.17.0.0260015854078.issue40863@roundup.psfhosted.org> New submission from Matthias Naegler : ``` # 0x0D, 13 = /r # 0x0A, 10 = /n print('test "\\r\\n"') print('-------------') b = bytes([0x41, 0x0D, 0x0A]) print("bytes: %s" % b) print("string: %s" % b.decode('utf8'), end='') # expected string: "A\r\n" # ressult string: "A\r\r\n" print('test "\\n"') print('----------') b = bytes([0x41, 0x0A]) print("bytes: %s" % b) print("string: %s" % b.decode('utf8'), end='') # expected string: "A\n" # ressult string: "A\r\n" ``` It seems like bytes.decode always replaces "\n" with "\r\n". Tested with Windows 10 with Python: - 3.6.0 - 3.7.7 - 3.8.3-rc1 - 3.8.3 - 2.7.18 (works as expected) ---------- components: Unicode, Windows messages: 370711 nosy: Matthias Naegler, ezio.melotti, paul.moore, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: bytes.decode changes/destroys line endings on windows type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 10:12:58 2020 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 04 Jun 2020 14:12:58 +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: <1591279978.63.0.21565315712.issue40686@roundup.psfhosted.org> Change by Paul Ganssle : ---------- pull_requests: +19849 pull_request: https://github.com/python/cpython/pull/20624 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 10:28:47 2020 From: report at bugs.python.org (Evan Fagerberg) Date: Thu, 04 Jun 2020 14:28:47 +0000 Subject: [issue40864] spec_set/autospec/spec seems to not be reading attributes defined in class body Message-ID: <1591280927.55.0.854829069355.issue40864@roundup.psfhosted.org> New submission from Evan Fagerberg : Hello, I really like that this library allows for really strict mocking however one thing I have noticed is that it seems like using spec on a mock does not properly read the class body for attributes like some of the documentation claims. For example this is a snippet of the Logger class in python 3.6's `logging` module ```python class Logger(Filterer): name: str level: int parent: Union[Logger, PlaceHolder] propagate: bool handlers: List[Handler] disabled: int ``` Now I want to mock that class ensuring that propagate gets set to False for example ```python from unittest import mock from logging import Logger logger = mock.Mock(spec_set=Logger) logger.propagate = False assert logger.propagate is False *** AttributeError: Mock object has no attribute 'propagate' ``` I have noticed this does work when the value is initialized in the class body so for example ```python class Logger(Filterer): name: str level: int parent: Union[Logger, PlaceHolder] propagate: bool = False handlers: List[Handler] disabled: int ``` This would not fail with the test in question. Wondering if this is intended behavior or not or if I am misunderstanding something. I have tested this with Python 3.6.10, 3.8.2, all with the same result. ---------- components: Tests messages: 370712 nosy: efagerberg priority: normal severity: normal status: open title: spec_set/autospec/spec seems to not be reading attributes defined in class body type: behavior versions: Python 3.6, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 10:30:28 2020 From: report at bugs.python.org (hai shi) Date: Thu, 04 Jun 2020 14:30:28 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1591281028.74.0.888367453399.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19850 pull_request: https://github.com/python/cpython/pull/20625 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 10:31:25 2020 From: report at bugs.python.org (Evan Fagerberg) Date: Thu, 04 Jun 2020 14:31:25 +0000 Subject: [issue40864] spec_set/autospec/spec seems to not be reading attributes defined in class body In-Reply-To: <1591280927.55.0.854829069355.issue40864@roundup.psfhosted.org> Message-ID: <1591281085.68.0.363276860552.issue40864@roundup.psfhosted.org> Evan Fagerberg added the comment: Sorry one small note, the error in the example happens on ```python logger.propagate = False ``` and not ```python assert logger.propagate is False ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 11:35:05 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 04 Jun 2020 15:35:05 +0000 Subject: [issue40863] bytes.decode changes/destroys line endings on windows In-Reply-To: <1591279623.17.0.0260015854078.issue40863@roundup.psfhosted.org> Message-ID: <1591284905.84.0.49799738169.issue40863@roundup.psfhosted.org> Steven D'Aprano added the comment: You don't need `b = bytes([0x41, 0x0D, 0x0A])`, this will work just as well: b = b'\x41\x0D\x0A' and this is even better: b = b'A\r\n' > It seems like bytes.decode always replaces "\n" with "\r\n". What makes you say that? You are passing the output through print, which does things with newlines and carriage returns. Try this, for example: py> print('ABCD\rZ\n', end='') ZBCD The best way to see what your string actually contains is the print the repr: print(repr(b.decode('utf-8'))) which I'm pretty sure will print A\r\n as you expect. But I don't have a Windows box to test it on. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 12:08:41 2020 From: report at bugs.python.org (Ama Aje My Fren) Date: Thu, 04 Jun 2020 16:08:41 +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: <1591286921.92.0.741906917664.issue25377@roundup.psfhosted.org> Ama Aje My Fren added the comment: I think I was finally able to do a PR for this on 3.10. Requesting a triager to please check because it does not appear as a Documentation change on Github. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 12:14:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jun 2020 16:14:48 +0000 Subject: [issue40863] bytes.decode changes/destroys line endings on windows In-Reply-To: <1591279623.17.0.0260015854078.issue40863@roundup.psfhosted.org> Message-ID: <1591287288.78.0.957529803945.issue40863@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 12:31:56 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jun 2020 16:31:56 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591288316.65.0.0370092184014.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: I am confused. Code which uses the closed file descriptor 0 uses "_Py_BEGIN_SUPPRESS_IPH": _Py_BEGIN_SUPPRESS_IPH hStdIn = (HANDLE)_get_osfhandle(fileno(sys_stdin)); hStdErr = (HANDLE)_get_osfhandle(fileno(stderr)); _Py_END_SUPPRESS_IPH and _Py_BEGIN_SUPPRESS_IPH handle = (HANDLE)_get_osfhandle(fileno(fp)); _Py_END_SUPPRESS_IPH Macros defined as: extern _invalid_parameter_handler _Py_silent_invalid_parameter_handler; #define _Py_BEGIN_SUPPRESS_IPH { _invalid_parameter_handler _Py_old_handler = \ _set_thread_local_invalid_parameter_handler(_Py_silent_invalid_parameter_handler); #define _Py_END_SUPPRESS_IPH _set_thread_local_invalid_parameter_handler(_Py_old_handler); } with PC/invalid_parameter_handler.c: static void __cdecl _silent_invalid_parameter_handler( wchar_t const* expression, wchar_t const* function, wchar_t const* file, unsigned int line, uintptr_t pReserved) { } _invalid_parameter_handler _Py_silent_invalid_parameter_handler = _silent_invalid_parameter_handler; The purpose of _Py_BEGIN_SUPPRESS_IPH is to suppress such popup, no? ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 13:00:21 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Jun 2020 17:00:21 +0000 Subject: [issue17258] multiprocessing.connection challenge implicitly uses MD5 In-Reply-To: <1361391096.59.0.84157337171.issue17258@psf.upfronthosting.co.za> Message-ID: <1591290021.08.0.834369137258.issue17258@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19851 pull_request: https://github.com/python/cpython/pull/20626 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 13:22:43 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Jun 2020 17:22:43 +0000 Subject: [issue17258] multiprocessing.connection challenge implicitly uses MD5 In-Reply-To: <1361391096.59.0.84157337171.issue17258@psf.upfronthosting.co.za> Message-ID: <1591291363.53.0.207385733666.issue17258@roundup.psfhosted.org> miss-islington added the comment: New changeset 196810a98ab07714df3d329c325575ac36e61318 by Miss Islington (bot) in branch '3.9': bpo-17258: Add requires_hashdigest to multiprocessing tests (GH-20412) https://github.com/python/cpython/commit/196810a98ab07714df3d329c325575ac36e61318 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 13:59:45 2020 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Jun 2020 17:59:45 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591293585.72.0.692593090332.issue40826@roundup.psfhosted.org> Eryk Sun added the comment: > The purpose of _Py_BEGIN_SUPPRESS_IPH is to suppress such popup, no? That macro suppresses the CRT's invalid parameter handler, which by default terminates abnormally with a fastfail (status code 0xC0000409), even in a release build. In a debug build, we still have message boxes from failed asserts that call _CrtDbgReportW. For example, the following stack trace shows _CrtDbgReportW called from _get_osfhandle: Call Site win32u!NtUserWaitMessage user32!DialogBox2 user32!InternalDialogBox user32!SoftModalMessageBox user32!MessageBoxWorker user32!MessageBoxTimeoutW user32!MessageBoxW ucrtbased!__acrt_MessageBoxW ucrtbased!__crt_char_traits::message_box ucrtbased!common_show_message_box ucrtbased!__acrt_show_wide_message_box ucrtbased!common_message_window ucrtbased!__acrt_MessageWindowW ucrtbased!_VCrtDbgReportW ucrtbased!_CrtDbgReportW ucrtbased!_get_osfhandle python310_d!PyOS_StdioReadline _get_osfhandle validates that the fd is open via _VALIDATE_CLEAR_OSSERR_RETURN(_osfile(fh) & FOPEN, EBADF, -1); which uses the following macro: #define _VALIDATE_CLEAR_OSSERR_RETURN(expr, errorcode, retexpr) \ { \ int _Expr_val=!!(expr); \ _ASSERT_EXPR((_Expr_val), _CRT_WIDE(#expr)); \ if (!(_Expr_val)) \ { \ _doserrno = 0L; \ errno = errorcode; \ _INVALID_PARAMETER(_CRT_WIDE(#expr)); \ return retexpr; \ } \ } In a debug build, _ASSERT_EXPR expands as: #define _ASSERT_EXPR(expr, msg) \ (void)( \ (!!(expr)) || \ (1 != _CrtDbgReportW(_CRT_ASSERT, _CRT_WIDE(__FILE__), __LINE__, NULL, L"%ls", msg)) || \ (_CrtDbgBreak(), 0) \ ) which is where _CrtDbgReportW gets called. By default it reports the assertion failure with a message box. The suppression of this in libregrtest either ignores this report or sends it to stderr: for m in [msvcrt.CRT_WARN, msvcrt.CRT_ERROR, msvcrt.CRT_ASSERT]: if verbose: msvcrt.CrtSetReportMode(m, msvcrt.CRTDBG_MODE_FILE) msvcrt.CrtSetReportFile(m, msvcrt.CRTDBG_FILE_STDERR) else: msvcrt.CrtSetReportMode(m, 0) msvcrt.CrtSetReportMode and msvcrt.CrtSetReportFile only exist in a debug build. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 14:01:00 2020 From: report at bugs.python.org (Matthias Naegler) Date: Thu, 04 Jun 2020 18:01:00 +0000 Subject: [issue40863] bytes.decode changes/destroys line endings on windows In-Reply-To: <1591279623.17.0.0260015854078.issue40863@roundup.psfhosted.org> Message-ID: <1591293660.99.0.571923534277.issue40863@roundup.psfhosted.org> Matthias Naegler added the comment: Thanks Steven for your fast response. > The best way to see what your string actually contains is the print the repr: You are right. bytes.decode is correct. Im not a python expert, so thanks for the note about "repr". With repr(...) everything looks fine. Nevertheless, I get an additional \r in my output. Not sure if it is a problem of python, windows or just me. I get the following output with the python interpretor: Python 3.8.3rc1 (tags/v3.8.3rc1:802eb67, Apr 29 2020, 21:39:14) [MSC v.1924 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.stdout.encoding 'utf-8' >>> b = b'A\r\nA' >>> s = b.decode('utf-8') >>> print(b) b'A\r\nA' >>> print(repr(s)) 'A\r\nA' >>> print(s) A A >>> sys.stdout.write(s) A A4 >>> with open("./test.txt", "a") as myfile: ... myfile.write(s) This all looks right. But the file doesn't (see attached screenshot). I also get an additional \r in the output file if i run the script throught "python test.py > piped.txt" ---------- Added file: https://bugs.python.org/file49215/test.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 14:10:38 2020 From: report at bugs.python.org (Matthias Naegler) Date: Thu, 04 Jun 2020 18:10:38 +0000 Subject: [issue40863] bytes.decode changes/destroys line endings on windows In-Reply-To: <1591279623.17.0.0260015854078.issue40863@roundup.psfhosted.org> Message-ID: <1591294238.12.0.683480334059.issue40863@roundup.psfhosted.org> Matthias Naegler added the comment: I forgot something important. Using open with 'ab' works. >>> ...above code... with open("./test_binary.txt", "ab") as myfile: ... myfile.write(s.encode('utf-8')) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 14:18:23 2020 From: report at bugs.python.org (Paul Moore) Date: Thu, 04 Jun 2020 18:18:23 +0000 Subject: [issue40863] bytes.decode changes/destroys line endings on windows In-Reply-To: <1591279623.17.0.0260015854078.issue40863@roundup.psfhosted.org> Message-ID: <1591294703.58.0.821148855617.issue40863@roundup.psfhosted.org> Paul Moore added the comment: Because if you open a file in text mode (without "b" in the mode), Python writes \n (newline) characters as \r\n (carriage return, line feed) which are the Windows textfile representation of "Newline". >From the documentation of the built in open() function, "When writing output to the stream, if newline is None, any '\n' characters written are translated to the system default line separator, os.linesep." ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 14:29:46 2020 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Jun 2020 18:29:46 +0000 Subject: [issue40863] bytes.decode changes/destroys line endings on windows In-Reply-To: <1591279623.17.0.0260015854078.issue40863@roundup.psfhosted.org> Message-ID: <1591295386.4.0.592631297569.issue40863@roundup.psfhosted.org> Change by Eryk Sun : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 15:05:12 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 Jun 2020 19:05:12 +0000 Subject: [issue40807] Codeop: Show warnings once during _maybe_compile In-Reply-To: <1590674108.19.0.341062869134.issue40807@roundup.psfhosted.org> Message-ID: <1591297512.44.0.221888165683.issue40807@roundup.psfhosted.org> Terry J. Reedy added the comment: The purpose of code and codeop is to imitate interactive python in python. Calling compile() thrice is an implementation detail. Exposing that is a bug. On #37824, Serhiy reported 3 'IDLE' bugs for 3.7 to 3.9: tripled DeprecationWarning (now joined by SyntaxWarning), printing to console (if available) instead of Shell, and an exit exception. This issue is continuation of the triplicate issue, given that the bug is not in IDLE. As a bug, I think it should still be backported. I looked more carefully at the behavior of the standard REPL with different statement inputs. Before executing, if the statement is complete, it may raise a compile exception, usually SyntaxError, or emit one or more a warnings, once for each instance. For multiline statements, DeprecationWarnings are emitted immediately after the line with the deprecated code while SyntaxWarnings are emitted, if there is no syntax error, just before execution. SyntaxWarnings for a given slice of code are not repeated. However, at least some of these details have to be enforced in the UI code that repeatedly calls compile or _maybe_compile as lines are added, not in compile, and should not be in _maybe_compile. Both have no memory or previous calls. (I don't think that IDLE necessarily *must* do the same either.) Looking at compile itself, it appears that warnings are not emitted if there is an exception. But I am puzzled at this in 3.9 and master. >>> if '\e' is 1: :1: DeprecationWarning: invalid escape sequence \e ... versus >>> compile('if '\e' is 1:\n', '', 'single') File "", line 1 SyntaxError: unexpected character after line continuation character Something must cause "'\e'" to be a warning instead of an error. This is enough to experiment with your patch applied. ---------- nosy: +serhiy.storchaka, terry.reedy title: CODEOP: Show warnings once during _maybe_compile -> Codeop: Show warnings once during _maybe_compile type: enhancement -> behavior versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 15:11:01 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 04 Jun 2020 19:11:01 +0000 Subject: [issue40865] Remove unused insint() macro in SHA512 module Message-ID: <1591297861.37.0.139238219668.issue40865@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : The insint() macro in line 741 is unused and can be removed. ---------- components: Library (Lib) messages: 370723 nosy: erlendaasland priority: normal severity: normal status: open title: Remove unused insint() macro in SHA512 module versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 15:12:31 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 04 Jun 2020 19:12:31 +0000 Subject: [issue40865] Remove unused insint() macro in SHA512 module In-Reply-To: <1591297861.37.0.139238219668.issue40865@roundup.psfhosted.org> Message-ID: <1591297951.57.0.973934768785.issue40865@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +19852 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20627 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 15:14:19 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 Jun 2020 19:14:19 +0000 Subject: [issue40807] Codeop: Show warnings once during _maybe_compile In-Reply-To: <1590674108.19.0.341062869134.issue40807@roundup.psfhosted.org> Message-ID: <1591298059.79.0.648420273768.issue40807@roundup.psfhosted.org> Terry J. Reedy added the comment: I am not sure if 3 compiles are always needed. At one time, compile required a final '\n' to not raise, but that is no longer true. And as near as I can tell, 'code without final newline\n' and 'code without final newline\n\n' always compile the same. Certainly, Shell does not need to compile without a final newline. But we can look at this in a separate issue. If IDLE's requirement is different from code.II's, I believe it could pass its own compile function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 15:23:24 2020 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Jun 2020 19:23:24 +0000 Subject: [issue40865] Remove unused insint() macro in SHA512 module In-Reply-To: <1591297861.37.0.139238219668.issue40865@roundup.psfhosted.org> Message-ID: <1591298604.91.0.0993000417714.issue40865@roundup.psfhosted.org> Christian Heimes added the comment: The other builtin hashes have the same unused macro. $ grep -R insint Modules/*.c Modules/md5module.c:#define insint(n,v) { PyModule_AddIntConstant(m,n,v); } Modules/sha1module.c:#define insint(n,v) { PyModule_AddIntConstant(m,n,v); } Modules/sha256module.c:#define insint(n,v) { PyModule_AddIntConstant(m,n,v); } Modules/sha512module.c:#define insint(n,v) { PyModule_AddIntConstant(m,n,v); } ---------- components: +Extension Modules -Library (Lib) nosy: +christian.heimes type: -> behavior versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 15:26:59 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 04 Jun 2020 19:26:59 +0000 Subject: [issue40865] Remove unused insint() macro in SHA512 module In-Reply-To: <1591297861.37.0.139238219668.issue40865@roundup.psfhosted.org> Message-ID: <1591298819.26.0.678732154326.issue40865@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Indeed. I'll update the PR and the title of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 15:27:19 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 04 Jun 2020 19:27:19 +0000 Subject: [issue40865] Remove unused insint() macro from the hash modules In-Reply-To: <1591297861.37.0.139238219668.issue40865@roundup.psfhosted.org> Message-ID: <1591298839.75.0.578305034575.issue40865@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- title: Remove unused insint() macro in SHA512 module -> Remove unused insint() macro from the hash modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 16:08:47 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Jun 2020 20:08:47 +0000 Subject: [issue40865] Remove unused insint() macro from the hash modules In-Reply-To: <1591297861.37.0.139238219668.issue40865@roundup.psfhosted.org> Message-ID: <1591301327.75.0.549093205331.issue40865@roundup.psfhosted.org> miss-islington added the comment: New changeset 6ed578f6dbffdec94f62cc2e36d626fc195678d7 by Erlend Egeberg Aasland in branch 'master': bpo-40865: Remove unused insint() macro from hash modules (GH-20627) https://github.com/python/cpython/commit/6ed578f6dbffdec94f62cc2e36d626fc195678d7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 16:08:57 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Jun 2020 20:08:57 +0000 Subject: [issue40865] Remove unused insint() macro from the hash modules In-Reply-To: <1591297861.37.0.139238219668.issue40865@roundup.psfhosted.org> Message-ID: <1591301337.27.0.603398006099.issue40865@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19853 pull_request: https://github.com/python/cpython/pull/20633 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 16:09:52 2020 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Jun 2020 20:09:52 +0000 Subject: [issue40865] Remove unused insint() macro from the hash modules In-Reply-To: <1591297861.37.0.139238219668.issue40865@roundup.psfhosted.org> Message-ID: <1591301392.55.0.423412877361.issue40865@roundup.psfhosted.org> Christian Heimes added the comment: Thanks for the cleanup! The 3.9 backport will land any minute. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 16:10:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jun 2020 20:10:47 +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: <1591301447.11.0.557856619659.issue39573@roundup.psfhosted.org> STINNER Victor added the comment: New changeset dc24b8a2ac32114313bae519db3ccc21fe45c982 by Victor Stinner in branch 'master': bpo-39573: Porting to Python 3.10: Py_SET_SIZE() macro (GH-20610) https://github.com/python/cpython/commit/dc24b8a2ac32114313bae519db3ccc21fe45c982 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 16:27:27 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Jun 2020 20:27:27 +0000 Subject: [issue40865] Remove unused insint() macro from the hash modules In-Reply-To: <1591297861.37.0.139238219668.issue40865@roundup.psfhosted.org> Message-ID: <1591302447.17.0.784170404582.issue40865@roundup.psfhosted.org> miss-islington added the comment: New changeset e4e5ec18e2f79f9bba439b531ebf89ac148deda0 by Miss Islington (bot) in branch '3.9': bpo-40865: Remove unused insint() macro from hash modules (GH-20627) https://github.com/python/cpython/commit/e4e5ec18e2f79f9bba439b531ebf89ac148deda0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 16:30:32 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 04 Jun 2020 20:30:32 +0000 Subject: [issue40866] Use PyModule_AddType() in posix module initialisation Message-ID: <1591302632.33.0.545094297594.issue40866@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : Use PyModule_AddType() iso. PyModule_AddObject() in posix module initialisation, and use PyTypeObject iso. PyObject for type objects. ---------- components: Library (Lib) messages: 370731 nosy: erlendaasland priority: normal severity: normal status: open title: Use PyModule_AddType() in posix module initialisation type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 16:38:22 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 04 Jun 2020 20:38:22 +0000 Subject: [issue40866] Use PyModule_AddType() in posix module initialisation In-Reply-To: <1591302632.33.0.545094297594.issue40866@roundup.psfhosted.org> Message-ID: <1591303102.23.0.472809851873.issue40866@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +19854 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20634 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 16:56:57 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 04 Jun 2020 20:56:57 +0000 Subject: [issue40867] Remove unused include in Module/_randommodule.c Message-ID: <1591304217.78.0.0159593220617.issue40867@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : _Py_bswap32() is no longer used in _randommodule.c (removed in commit 2d87577), so including pycore_byteswap.h is not necessary. ---------- components: Library (Lib) messages: 370732 nosy: erlendaasland priority: normal severity: normal status: open title: Remove unused include in Module/_randommodule.c type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 16:59:26 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 04 Jun 2020 20:59:26 +0000 Subject: [issue40867] Remove unused include in Module/_randommodule.c In-Reply-To: <1591304217.78.0.0159593220617.issue40867@roundup.psfhosted.org> Message-ID: <1591304366.18.0.129501284824.issue40867@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +19855 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20635 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 17:38:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jun 2020 21:38:44 +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: <1591306724.17.0.545820426173.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 69ac6e58fd98de339c013fe64cd1cf763e4f9bca by Victor Stinner in branch 'master': bpo-40521: Make tuple free list per-interpreter (GH-20247) https://github.com/python/cpython/commit/69ac6e58fd98de339c013fe64cd1cf763e4f9bca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 18:01:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jun 2020 22:01:04 +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: <1591308064.28.0.493197413167.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19856 pull_request: https://github.com/python/cpython/pull/20636 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 18:50:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jun 2020 22:50:19 +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: <1591311019.68.0.694900089414.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 2ba59370c3dda2ac229c14510e53a05074b133d1 by Victor Stinner in branch 'master': bpo-40521: Make float free list per-interpreter (GH-20636) https://github.com/python/cpython/commit/2ba59370c3dda2ac229c14510e53a05074b133d1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 18:53:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jun 2020 22:53:58 +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: <1591311238.89.0.757529395822.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19857 pull_request: https://github.com/python/cpython/pull/20637 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 19:14:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jun 2020 23:14:47 +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: <1591312487.42.0.1421882474.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 7daba6f221e713f7f60c613b246459b07d179f91 by Victor Stinner in branch 'master': bpo-40521: Make slice cache per-interpreter (GH-20637) https://github.com/python/cpython/commit/7daba6f221e713f7f60c613b246459b07d179f91 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 19:20:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jun 2020 23:20:04 +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: <1591312804.75.0.418757718774.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19858 pull_request: https://github.com/python/cpython/pull/20638 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 19:36:04 2020 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 04 Jun 2020 23:36:04 +0000 Subject: [issue40802] AbstractEventLoop.shutdown_default_executor breaks backwards compatibility In-Reply-To: <1590658311.02.0.725664008315.issue40802@roundup.psfhosted.org> Message-ID: <1591313764.27.0.932240187796.issue40802@roundup.psfhosted.org> Kyle Stanley added the comment: The main issue is that shutdown_default_executor() (or something that does the same thing) is necessary to ensure the resources of the event loop's ThreadPoolExecutor are finalized in a safe manner. Otherwise, it frequently results in dangling threads when run_in_executor() is used with the default executor, and was regularly doing so in the buildbots. So, I think this is a case where we ultimately have to break backwards compatibility in an upcoming version to fix a bug. Also, the implementation of shutdown_default_executor() is fairly straightforward, and as far as I'm aware it's not incompatible with any of the listed projects that would need to implement it for 3.9. While inconvenient, I don't think the burden to address the compatibility break is at all high in this case. > Since asyncio is no longer provisional, should it break backwards compatibility with just a What's New entry? Do you have an alternative suggestion? Personally, I don't think a deprecation warning (or other) would make much sense here since it would be effectively leaving a resource leak bug as long as it isn't implemented. ---------- nosy: +aeros _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 19:39:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jun 2020 23:39:28 +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: <1591313968.54.0.924523104195.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3744ed2c9c0b3905947602fc375de49533790cb9 by Victor Stinner in branch 'master': bpo-40521: Make frame free list per-interpreter (GH-20638) https://github.com/python/cpython/commit/3744ed2c9c0b3905947602fc375de49533790cb9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 19:40:28 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 Jun 2020 23:40:28 +0000 Subject: [issue40807] Codeop: Show warnings once during _maybe_compile In-Reply-To: <1590674108.19.0.341062869134.issue40807@roundup.psfhosted.org> Message-ID: <1591314028.47.0.116204753482.issue40807@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 052d3fc0907be253cfd64b2c737a0b0aca586011 by Cheryl Sabella in branch 'master': bpo-40807: Show warnings once from codeop._maybe_compile (#20486) https://github.com/python/cpython/commit/052d3fc0907be253cfd64b2c737a0b0aca586011 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 19:40:51 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Jun 2020 23:40:51 +0000 Subject: [issue40807] Codeop: Show warnings once during _maybe_compile In-Reply-To: <1590674108.19.0.341062869134.issue40807@roundup.psfhosted.org> Message-ID: <1591314051.84.0.527797506927.issue40807@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19860 pull_request: https://github.com/python/cpython/pull/20640 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 19:40:44 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Jun 2020 23:40:44 +0000 Subject: [issue40807] Codeop: Show warnings once during _maybe_compile In-Reply-To: <1590674108.19.0.341062869134.issue40807@roundup.psfhosted.org> Message-ID: <1591314044.0.0.261859610634.issue40807@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19859 pull_request: https://github.com/python/cpython/pull/20639 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 19:41:00 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Jun 2020 23:41:00 +0000 Subject: [issue40807] Codeop: Show warnings once during _maybe_compile In-Reply-To: <1590674108.19.0.341062869134.issue40807@roundup.psfhosted.org> Message-ID: <1591314060.09.0.320768421042.issue40807@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19861 pull_request: https://github.com/python/cpython/pull/20641 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 19:44:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jun 2020 23: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: <1591314282.45.0.443292123422.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19862 pull_request: https://github.com/python/cpython/pull/20642 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 19:59:51 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Jun 2020 23:59:51 +0000 Subject: [issue40807] Codeop: Show warnings once during _maybe_compile In-Reply-To: <1590674108.19.0.341062869134.issue40807@roundup.psfhosted.org> Message-ID: <1591315191.3.0.046945722157.issue40807@roundup.psfhosted.org> miss-islington added the comment: New changeset 3dfe549bfa08a099b88efd030669359199f31064 by Miss Islington (bot) in branch '3.9': bpo-40807: Show warnings once from codeop._maybe_compile (GH-20486) https://github.com/python/cpython/commit/3dfe549bfa08a099b88efd030669359199f31064 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 20:05:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jun 2020 00:05:49 +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: <1591315549.18.0.111344376769.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 88ec9190105c9b03f49aaef601ce02b242a75273 by Victor Stinner in branch 'master': bpo-40521: Make list free list per-interpreter (GH-20642) https://github.com/python/cpython/commit/88ec9190105c9b03f49aaef601ce02b242a75273 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 20:10:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jun 2020 00:10:02 +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: <1591315802.65.0.11857516042.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19863 pull_request: https://github.com/python/cpython/pull/20643 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 20:34:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jun 2020 00:34: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: <1591317262.25.0.667304142208.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 78a02c2568714562e23e885b6dc5730601f35226 by Victor Stinner in branch 'master': bpo-40521: Make async gen free lists per-interpreter (GH-20643) https://github.com/python/cpython/commit/78a02c2568714562e23e885b6dc5730601f35226 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 20:36:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jun 2020 00:36:00 +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: <1591317360.24.0.841068922923.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19864 pull_request: https://github.com/python/cpython/pull/20644 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 20:56:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jun 2020 00:56:43 +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: <1591318603.97.0.846135290155.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e005ead49b1ee2b1507ceea94e6f89c28ecf1f81 by Victor Stinner in branch 'master': bpo-40521: Make context free list per-interpreter (GH-20644) https://github.com/python/cpython/commit/e005ead49b1ee2b1507ceea94e6f89c28ecf1f81 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 21:02:15 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jun 2020 01:02:15 +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: <1591318935.24.0.879344392612.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19865 pull_request: https://github.com/python/cpython/pull/20645 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 21:13:10 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jun 2020 01:13:10 +0000 Subject: [issue36724] Clear _PyRuntime at exit In-Reply-To: <1556223229.48.0.664845556761.issue36724@roundup.psfhosted.org> Message-ID: <1591319590.09.0.665425191179.issue36724@roundup.psfhosted.org> STINNER Victor added the comment: > _PyRuntime.warnings is not cleared at Python exit: 3 objects are kept alive even after Py_Finalize(). This issue has been fixed. Moreover, the GC state is now per-interpreter. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 21:15:31 2020 From: report at bugs.python.org (Manuel Jacob) Date: Fri, 05 Jun 2020 01:15:31 +0000 Subject: [issue40868] io.TextIOBase.buffer is not necessarily a buffer Message-ID: <1591319731.34.0.581555363883.issue40868@roundup.psfhosted.org> New submission from Manuel Jacob : https://docs.python.org/dev/library/io.html#io.TextIOBase.buffer says: "The underlying binary buffer (a BufferedIOBase instance) that TextIOBase deals with. This is not part of the TextIOBase API and may not exist in some implementations." It is not necessarily a buffer (a BufferedIOBase instance), e.g. when the stdout and stderr streams are set to be unbuffered. Example: % python -u Python 3.8.3 (default, May 17 2020, 18:15:42) [GCC 10.1.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import io, sys >>> sys.stdout <_io.TextIOWrapper name='' mode='w' encoding='utf-8'> >>> isinstance(sys.stdout, io.TextIOBase) True >>> sys.stdout.buffer <_io.FileIO name='' mode='wb' closefd=False> >>> isinstance(sys.stdout.buffer, io.BufferedIOBase) False Therefore the name and the documentation are incorrect. I suggest to deprecate the attribute "buffer", introduce a new attribute with a correct name, and forward the old attribute to the new attribute and vice versa in the io.TextIOBase class. I think that "binary" would be a good attribute name for the underlying binary stream, as it would be consistent with io.BufferedIOBase.raw (for "the underlying raw stream"). ---------- assignee: docs at python components: Documentation, IO messages: 370744 nosy: docs at python, mjacob priority: normal severity: normal status: open title: io.TextIOBase.buffer is not necessarily a buffer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 21:16:01 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jun 2020 01:16:01 +0000 Subject: [issue40514] [subinterpreters] Add --experimental-isolated-subinterpreters build option In-Reply-To: <1588684431.91.0.693668036583.issue40514@roundup.psfhosted.org> Message-ID: <1591319761.22.0.948186080752.issue40514@roundup.psfhosted.org> STINNER Victor added the comment: I started to *remove* a few"#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS": * commit 88ec9190105c9b03f49aaef601ce02b242a75273: Make list free list per-interpreter * commit 3744ed2c9c0b3905947602fc375de49533790cb9: Make frame free list per-interpreter * PR 20645 (under review): Make dict free lists per-interpreter ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 21:16:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jun 2020 01:16:12 +0000 Subject: [issue40514] [subinterpreters] Add --experimental-isolated-subinterpreters build option In-Reply-To: <1588684431.91.0.693668036583.issue40514@roundup.psfhosted.org> Message-ID: <1591319772.6.0.613629062037.issue40514@roundup.psfhosted.org> Change by STINNER Victor : ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 21:21:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jun 2020 01:21:48 +0000 Subject: [issue38160] [subinterpreters] Add a "PyInterpreterState *" field to PyTypeObject. In-Reply-To: <1568381609.99.0.399978002813.issue38160@roundup.psfhosted.org> Message-ID: <1591320108.02.0.305710404687.issue38160@roundup.psfhosted.org> STINNER Victor added the comment: Which kind of code pattern is supposed to be more efficient if it would be possible to get a "PyInterpreterState *" from a "PyTypeObject*"? I don't understand which problem this issue is supposed to solve. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 21:58:29 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jun 2020 01:58:29 +0000 Subject: [issue40807] Codeop: Show warnings once during _maybe_compile In-Reply-To: <1590674108.19.0.341062869134.issue40807@roundup.psfhosted.org> Message-ID: <1591322309.87.0.380809683477.issue40807@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +19866 pull_request: https://github.com/python/cpython/pull/20646 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 22:37:17 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jun 2020 02:37:17 +0000 Subject: [issue39325] Original window focus when opening IDLE by double clicking Python file Mac In-Reply-To: <1578965041.32.0.467720102462.issue39325@roundup.psfhosted.org> Message-ID: <1591324637.45.0.879587955322.issue39325@roundup.psfhosted.org> Terry J. Reedy added the comment: Irv also posted to idledev, where he explained his particular need: He teaches a class with assignment to write a .py file with certain behavior. Submissions are in 1 directory. He would like to double-click to load a file and F5 to run it. Currently, he has to move the mouse and click the loaded editor before running and move it back. In reply to my post yesterday, he explained how to make double-click in finder open in IDLE: """I did change the default for how my Mac opens ".py" files. To do that I selected any ".py" and did a Get Info on it. A tall window opens, and allows me to change the default application for opening the file. I selected IDLE.app and chose "Change all".""" More testing with my Macbook: both 'python3.9 -m idlelib -i file.py' in terminal *and* double-clicking in Finder open an editor, with 'Format' in the IDLE menu, open Shell (shifted right), with 'Shell' in the IDLE menu, and then lift the editor window, without giving it focus and changing the IDLE menu back. Rereview of the video (which omits the IDLE menu) suggests the same because Shell is to the right of the editor. The video is not as clear because the IDLE menu is omitted, the editor has only one line, and Irv's machine is much faster. I consider the inconsistency to be a bug. The cause is this code after the creation of Shell. if macosx.isAquaTk() and flist.dict: # On OSX: when the user has double-clicked on a file that causes # IDLE to be launched the shell window will open just in front of # the file she wants to see. Lower the interpreter window when # there are open files. shell.top.lower() Widgit.raise() and .lower() do not change focus. Since there is no way to shed focus, we need to save the focus window, if there is one (and make sure it is not the withdrawn root), before creating Shell and restore it after. There might be situations in which Shell should be left on top with the focus. ---------- components: +macOS nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 22:42:51 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jun 2020 02:42:51 +0000 Subject: [issue40807] Codeop: Show warnings once during _maybe_compile In-Reply-To: <1590674108.19.0.341062869134.issue40807@roundup.psfhosted.org> Message-ID: <1591324971.12.0.132155076776.issue40807@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset a5d6aba318ead9cc756ba750a70da41f5def3f8f by Terry Jan Reedy in branch '3.8': [3.8] bpo-40807: Backport test_codeop change [GH-19670] https://github.com/python/cpython/commit/a5d6aba318ead9cc756ba750a70da41f5def3f8f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 22:43:05 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Jun 2020 02:43:05 +0000 Subject: [issue40807] Codeop: Show warnings once during _maybe_compile In-Reply-To: <1590674108.19.0.341062869134.issue40807@roundup.psfhosted.org> Message-ID: <1591324985.98.0.556426334685.issue40807@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19867 pull_request: https://github.com/python/cpython/pull/20647 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 22:52:37 2020 From: report at bugs.python.org (YoSTEALTH) Date: Fri, 05 Jun 2020 02:52:37 +0000 Subject: [issue40869] errno missing descriptions Message-ID: <1591325557.2.0.303009626884.issue40869@roundup.psfhosted.org> New submission from YoSTEALTH : `errno` https://docs.python.org/3/library/errno.html is missing description for symbols like `ECANCELED` https://www.gnu.org/software/libc/manual/html_node/Error-Codes.html There might be others missing description as well, i haven't investigated further, figure i start the bug report process. ---------- assignee: docs at python components: Documentation messages: 370749 nosy: YoSTEALTH, docs at python priority: normal severity: normal status: open title: errno missing descriptions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 23:00:58 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jun 2020 03:00:58 +0000 Subject: [issue40807] Codeop: Show warnings once during _maybe_compile In-Reply-To: <1590674108.19.0.341062869134.issue40807@roundup.psfhosted.org> Message-ID: <1591326058.06.0.351670077507.issue40807@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 12d3061c7819a73d891dcce44327410eaf0e1bc2 by Miss Islington (bot) in branch '3.7': [3.8] bpo-40807: Backport test_codeop change [GH-19670] https://github.com/python/cpython/commit/12d3061c7819a73d891dcce44327410eaf0e1bc2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 4 23:01:17 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jun 2020 03:01:17 +0000 Subject: [issue40807] Codeop: Show warnings once during _maybe_compile In-Reply-To: <1590674108.19.0.341062869134.issue40807@roundup.psfhosted.org> Message-ID: <1591326077.08.0.52516771146.issue40807@roundup.psfhosted.org> Terry J. Reedy added the comment: This is a spinoff of #37824. My above comments about compile are wrong. The example nests '' within ''. And, with freshly compiled master, I found an example where Deprecation warning, but not SyntaxWarning, accompanies SyntaxError, and which requires trailing \n. >>> compile("if'\e' is 1: 1", '', 'single') DeprecationWarning... SyntaxError: unexpected EOF while parsing >>> compile("if'\e' is 1: 1\n", '', 'single') DeprecationWarning... SyntaxWarning... Interactively, >>> if'\e' is 1: 1 :1: DeprecationWarning: invalid escape sequence \e ... :1: SyntaxWarning: "is" with a literal. Did you mean "=="? >>> In IDLE, DeprecationWarning is repeated, but that is another issue. The secondary prompts seems like a bug, The statement is complete and entering anything but a comment is a SyntaxError. (A comment results in another ... prompt.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 00:06:35 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Jun 2020 04:06:35 +0000 Subject: [issue40864] spec_set/autospec/spec seems to not be reading attributes defined in class body In-Reply-To: <1591280927.55.0.854829069355.issue40864@roundup.psfhosted.org> Message-ID: <1591329995.37.0.98026148298.issue40864@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: mock uses dir to iterate through the attributes that needs to be specced [0]. Unless the variable is initialized it's not listed in dir. Below is an example where age is initialized and name is not. name is not present in dir(Person) and hence spec will not be able to detect this. This is similar to https://bugs.python.org/issue36580. cat /tmp/baz.py class Person: name: str age: int = 10 print(dir(Person)) print(Person.name) python /tmp/baz.py ['__annotations__', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'age'] Traceback (most recent call last): File "/tmp/baz.py", line 6, in print(Person.name) AttributeError: type object 'Person' has no attribute 'name' [0] https://github.com/python/cpython/blob/e005ead49b1ee2b1507ceea94e6f89c28ecf1f81/Lib/unittest/mock.py#L2647 ---------- components: +Library (Lib) -Tests nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 00:08:13 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Jun 2020 04:08:13 +0000 Subject: [issue40837] email.utils.encode_rfc2231(string, None, None) returns broken value In-Reply-To: <1590977826.25.0.0895335032044.issue40837@roundup.psfhosted.org> Message-ID: <1591330093.88.0.89987572222.issue40837@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +email nosy: +barry, maxking, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 03:45:18 2020 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 05 Jun 2020 07:45:18 +0000 Subject: [issue40724] Support buffer protocol with type specs In-Reply-To: <1590133862.04.0.206694262407.issue40724@roundup.psfhosted.org> Message-ID: <1591343118.05.0.968963141828.issue40724@roundup.psfhosted.org> Change by Stefan Behnel : ---------- keywords: +patch pull_requests: +19868 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 05:32:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jun 2020 09:32:54 +0000 Subject: [issue40077] Convert static types to PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1591349574.67.0.112570397528.issue40077@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 05:46:27 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 05 Jun 2020 09:46:27 +0000 Subject: [issue40870] Custom AST can crash Python (debug build) Message-ID: <1591350387.83.0.288817090794.issue40870@roundup.psfhosted.org> New submission from Batuhan Taskaya : import ast t = ast.fix_missing_locations(ast.Expression(ast.Name("True", ast.Load()))) compile(t, "", "eval") compilation of this AST can crash the interpreter for 3.8+ test_constant_as_name (test.test_ast.AST_Tests) ... python: Python/compile.c:3559: compiler_nameop: Assertion `!_PyUnicode_EqualToASCIIString(name, "None") && !_PyUnicode_EqualToASCIIString(name, "True") && !_PyUnicode_EqualToASCIIString(name, "False")' failed. Fatal Python error: Aborted I've encountered this while running test suite of 'pytest' with the current master, so I guess there are some usages related this out there. IMHO we should validate this on the PyAST_Validate step to prevent this kind of crashes. ---------- messages: 370753 nosy: BTaskaya priority: normal severity: normal status: open title: Custom AST can crash Python (debug build) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 05:47:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jun 2020 09:47:04 +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: <1591350424.0.0.931294505895.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: > bpo-40521: Make list free list per-interpreter (GH-20642) > https://github.com/python/cpython/commit/88ec9190105c9b03f49aaef601ce02b242a75273 This change contains an interesting fix: * _PyGC_Fini() clears gcstate->garbage list which can be stored in the list free list. Call _PyGC_Fini() before _PyList_Fini() to prevent leaking this list. Maybe "Fini" functions should disable free lists to prevent following code to add something to a free list, during Python finalization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 05:50:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jun 2020 09:50:14 +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: <1591350614.59.0.830644353212.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: bench_dict.patch: Microbenchmark on the C function PyDict_New() to measure the overhead of PR 20645. ---------- Added file: https://bugs.python.org/file49216/bench_dict.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 05:50:26 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 05 Jun 2020 09:50:26 +0000 Subject: [issue40870] Custom AST can crash Python (debug build) In-Reply-To: <1591350387.83.0.288817090794.issue40870@roundup.psfhosted.org> Message-ID: <1591350626.77.0.564465431385.issue40870@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- components: +Interpreter Core nosy: +pablogsal, serhiy.storchaka type: -> behavior versions: +Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 05:50:55 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 05 Jun 2020 09:50:55 +0000 Subject: [issue40870] Custom AST can crash Python (debug build) In-Reply-To: <1591350387.83.0.288817090794.issue40870@roundup.psfhosted.org> Message-ID: <1591350655.33.0.660224794294.issue40870@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +19869 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20649 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 05:57:23 2020 From: report at bugs.python.org (Mark Shannon) Date: Fri, 05 Jun 2020 09:57:23 +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: <1591351043.17.0.238170780213.issue40521@roundup.psfhosted.org> Mark Shannon added the comment: I'm worried about the performance impact of these changes, especially as many of the changes haven't been reviewed. Have you done any performance analysis or tests of the cumulative effect of all these changes? ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 05:59:07 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jun 2020 09:59:07 +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: <1591351147.36.0.895959287706.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: > Have you done any performance analysis or tests of the cumulative effect of all these changes? No. It would be interesting to measure that using pyperformance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 06:19:07 2020 From: report at bugs.python.org (Dries Schaumont) Date: Fri, 05 Jun 2020 10:19:07 +0000 Subject: [issue36457] functools.singledispatchmethod interacts poorly with subclasses In-Reply-To: <1553744559.32.0.207343635807.issue36457@roundup.psfhosted.org> Message-ID: <1591352347.19.0.860920207324.issue36457@roundup.psfhosted.org> Dries Schaumont added the comment: I am interested in the fix, added myself to nosy list. ---------- nosy: +dschaumont _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 06:23:26 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 05 Jun 2020 10:23:26 +0000 Subject: [issue40870] Custom AST can crash Python (debug build) In-Reply-To: <1591350387.83.0.288817090794.issue40870@roundup.psfhosted.org> Message-ID: <1591352606.55.0.754066523451.issue40870@roundup.psfhosted.org> Batuhan Taskaya added the comment: cross-linking pytest issue: https://github.com/pytest-dev/pytest/issues/7322 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 06:29:48 2020 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Jun 2020 10:29:48 +0000 Subject: [issue36783] No documentation for _FromXandFold C API functions In-Reply-To: <1556891515.33.0.269336043459.issue36783@roundup.psfhosted.org> Message-ID: <1591352988.02.0.304714341862.issue36783@roundup.psfhosted.org> Change by Roundup Robot : ---------- nosy: +python-dev nosy_count: 7.0 -> 8.0 pull_requests: +19870 pull_request: https://github.com/python/cpython/pull/20650 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 08:58:28 2020 From: report at bugs.python.org (Ido Michael) Date: Fri, 05 Jun 2020 12:58:28 +0000 Subject: [issue19670] SimpleCookie Generates Non-RFC6265-Compliant Cookies In-Reply-To: <1384979004.61.0.0353093814459.issue19670@psf.upfronthosting.co.za> Message-ID: <1591361908.93.0.00956207584307.issue19670@roundup.psfhosted.org> Ido Michael added the comment: I think it can be closed? ---------- nosy: +Ido Michael _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 08:58:45 2020 From: report at bugs.python.org (Ido Michael) Date: Fri, 05 Jun 2020 12:58:45 +0000 Subject: [issue19670] SimpleCookie Generates Non-RFC6265-Compliant Cookies In-Reply-To: <1384979004.61.0.0353093814459.issue19670@psf.upfronthosting.co.za> Message-ID: <1591361925.51.0.424308691749.issue19670@roundup.psfhosted.org> Change by Ido Michael : ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 09:42:51 2020 From: report at bugs.python.org (Jacob Kunnappally) Date: Fri, 05 Jun 2020 13:42:51 +0000 Subject: [issue40871] threading.Event.wait_unset() Message-ID: <1591364571.85.0.30119550937.issue40871@roundup.psfhosted.org> New submission from Jacob Kunnappally : Just requesting a threading.Event.wait_unset(timeout=None) function. I would request the same for multiprocessing. My use case: I've made my own class that adds a little bit of IPC plumbing to the base Process class (ChildProcess). Each ChildProcess has a status that it can update to let other threads/processes know what it's doing at the moment. There is a configurable period when that updated status can be considered "fresh". In some cases, I would like a listening process to be able to ignore the "freshness" and only trigger some action only if the status updates while the listening process is waiting for it to update. To do this, I need to be able to know when the status goes unfresh so that waiting for the status to update can begin in earnest. Right now I am polling manually, and that can't be the right answer. Happy to clarify the above paragraphs. That's as best as I could think to describe it in text. ---------- components: Library (Lib) messages: 370761 nosy: Jacob Kunnappally priority: normal severity: normal status: open title: threading.Event.wait_unset() type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 09:46:27 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 05 Jun 2020 13:46:27 +0000 Subject: [issue40872] multiprocess.Lock is missing the locked() method Message-ID: <1591364787.91.0.202130651791.issue40872@roundup.psfhosted.org> New submission from R?mi Lapeyre : multiprocessing is supposed to be a drop-in replacement for the threading module and multiprocessing.Lock() is advertised as a "a close analog of threading.Lock." but it is missing the locked() method that returns whether the current status of the lock. ---------- components: Library (Lib) messages: 370762 nosy: remi.lapeyre priority: normal severity: normal status: open title: multiprocess.Lock is missing the locked() method versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 09:50:59 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 05 Jun 2020 13:50:59 +0000 Subject: [issue40872] multiprocess.Lock is missing the locked() method In-Reply-To: <1591364787.91.0.202130651791.issue40872@roundup.psfhosted.org> Message-ID: <1591365059.43.0.245257735426.issue40872@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +19871 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20651 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 11:01:09 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 05 Jun 2020 15:01:09 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1591369269.37.0.486872863432.issue1635741@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 3ad52e366fea37b02a3f619e6b7cffa7dfbdfa2e by Dong-hee Na in branch 'master': bpo-1635741: Port mmap module to multiphase initialization (GH-19459) https://github.com/python/cpython/commit/3ad52e366fea37b02a3f619e6b7cffa7dfbdfa2e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 11:21:51 2020 From: report at bugs.python.org (Vinay Sharma) Date: Fri, 05 Jun 2020 15:21:51 +0000 Subject: [issue38035] shared_semaphores cannot be shared across unrelated processes In-Reply-To: <1567659668.43.0.186142682202.issue38035@roundup.psfhosted.org> Message-ID: <1591370511.44.0.554504821515.issue38035@roundup.psfhosted.org> Vinay Sharma added the comment: As suggested I have sent a mail to Python Ideas regarding this issue. Link to Python Ideas Archive: https://mail.python.org/archives/list/python-ideas at python.org/thread/X4AKFFMYEKW6GFOUMXMOJ2OBINNY2Q6L/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 12:07:08 2020 From: report at bugs.python.org (=?utf-8?b?0JLQsNC70LXQvdGC0LjQvSBEcmV5aw==?=) Date: Fri, 05 Jun 2020 16:07:08 +0000 Subject: [issue40873] Something wrong with html.unescape() Message-ID: <1591373228.55.0.770453836865.issue40873@roundup.psfhosted.org> New submission from ???????? Dreyk : import html import xml.sax.saxutils as saxutils print(saxutils.unescape("®hard")) # ®hard print(html.unescape("®hard")) # ?hard html.unescape() replace "®" to "?" even without ";" at the end. ---------- components: Library (Lib) messages: 370765 nosy: ???????? Dreyk priority: normal severity: normal status: open title: Something wrong with html.unescape() type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 12:29:23 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 05 Jun 2020 16:29:23 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 Message-ID: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> New submission from Stefan Krah : Synopsis: There are no relevant new features for _decimal, but it would be too much work/error prone to have divergent code in libmpdec-2.5.0 and Python 3.9, especially for the Linux distributions. I'll release libmpdec-2.5.0/libmpdec++-2.5.0 in a month or so. The standalone lib needs the new versions of mpd_qsqrt() and mpd_qdiv(), because it allows identical result/input args. This is not needed for _decimal, but the distributions should have the correct version. In detail ========= - Use Google style guide for header guards and includes. - Update mpdecimal.h for C++11. - Use minimum set of includes. - Whitespace fixes. - Add annotations to suppress false positives from static analyzers. - Small rewrite in base conversion functions to suppress false positives from static analyzers. - MSVC: make libmpdec /W4 warning free and replace UNUSED with void casts. - MSVC: C++ fixes in vccompat.h. - Make a couple of quiet functions safe for being called with a dirty status (irrelevant for _decimal and not recommended anyway -- always set the status to 0 before calling a quiet function). - Add the sqrt/div versions that are already in the Python libmpdec but not in the upstream libmpdec. Also make them safe for identical result/operand arguments (irrelevant for _decimal, since Decimals are immutable). New functions for the upcoming libmpdec++ (unused in _decimal) ============================================================== - mpd_qset_string_exact() - mpd_qset_i64_exact() - mpd_qset_u64_exact() - mpd_qcopy_cxx() ---------- assignee: skrah messages: 370766 nosy: doko, lukasz.langa, skrah priority: normal severity: normal status: open title: Update to libmpdec-2.5.0 versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 12:32:01 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 05 Jun 2020 16:32:01 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1591374721.87.0.436598222587.issue40874@roundup.psfhosted.org> Change by Stefan Krah : ---------- keywords: +patch pull_requests: +19872 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20652 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 12:33:50 2020 From: report at bugs.python.org (jakirkham) Date: Fri, 05 Jun 2020 16:33:50 +0000 Subject: [issue35845] Can't read a F-contiguous memoryview in physical order In-Reply-To: <1548708697.36.0.695790780311.issue35845@roundup.psfhosted.org> Message-ID: <1591374830.85.0.67112113025.issue35845@roundup.psfhosted.org> jakirkham added the comment: Sorry if I'm just misunderstanding the discussion here. Would it make sense to have an `order` keyword argument to `cast` as well? This seems useful when interpreting a flatten F-order `bytes` object (say on the receiving end of a transmission). ---------- nosy: +jakirkham _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 12:54:02 2020 From: report at bugs.python.org (Ram Rachum) Date: Fri, 05 Jun 2020 16:54:02 +0000 Subject: [issue40875] Implement __repr__ for classes in csv module Message-ID: <1591376042.94.0.47875557002.issue40875@roundup.psfhosted.org> New submission from Ram Rachum : Why see this: When you can see this: It could show columns=? if they weren't read yet. Any other info would be good too. This applies to all classes in the csv module. ---------- components: Library (Lib) messages: 370768 nosy: cool-RR priority: normal severity: normal status: open title: Implement __repr__ for classes in csv module type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 13:00:03 2020 From: report at bugs.python.org (Ram Rachum) Date: Fri, 05 Jun 2020 17:00:03 +0000 Subject: [issue40876] Clarify error message in csv module Message-ID: <1591376403.94.0.4038301694.issue40876@roundup.psfhosted.org> New submission from Ram Rachum : I was working with the csv module, and I vaguely remembered that you should open files in binary mode. So I did. Then I saw this error message: _csv.Error: iterator should return strings, not bytes (did you open the file in text mode?) I read the end and thought "I didn't open it in text mode, what does it want from me?!" It took a careful reading to figure out that I was *supposed to* open it in text mode. I'm going to open a PR to slightly change the text to: _csv.Error: iterator should return strings, not bytes (the file should be opened in text mode) ---------- components: Library (Lib) messages: 370769 nosy: cool-RR priority: normal severity: normal status: open title: Clarify error message in csv module type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 13:06:02 2020 From: report at bugs.python.org (Ram Rachum) Date: Fri, 05 Jun 2020 17:06:02 +0000 Subject: [issue40876] Clarify error message in csv module In-Reply-To: <1591376403.94.0.4038301694.issue40876@roundup.psfhosted.org> Message-ID: <1591376762.62.0.388075994512.issue40876@roundup.psfhosted.org> Change by Ram Rachum : ---------- keywords: +patch pull_requests: +19873 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20653 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 13:10:11 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 05 Jun 2020 17:10:11 +0000 Subject: [issue40877] Code coverage is blocking a merge again Message-ID: <1591377011.07.0.156762797802.issue40877@roundup.psfhosted.org> New submission from Stefan Krah : Again code coverage prevents the merge button from going green: https://travis-ci.org/github/python/cpython/jobs/695095365 "The job exceeded the maximum time limit for jobs, and has been terminated." Why can this not run on buildbot.python.org? ---------- messages: 370770 nosy: skrah priority: normal severity: normal status: open title: Code coverage is blocking a merge again _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 13:32:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jun 2020 17:32:33 +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: <1591378353.08.0.640052481625.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: pyperformance comparaison between: * commit dc24b8a2ac32114313bae519db3ccc21fe45c982 (before "Make tuple free list per-interpreter" change) * PR 20645 (dict free lists) which cumulates all free lists changes (already commited + the PR) Extract of the tested patch, new PyInterpreterState members: -------------------- diff --git a/Include/internal/pycore_interp.h b/Include/internal/pycore_interp.h index f04ea330d0..b1a25e0ed4 100644 --- a/Include/internal/pycore_interp.h +++ b/Include/internal/pycore_interp.h (...) @@ -157,6 +233,18 @@ struct _is { */ PyLongObject* small_ints[_PY_NSMALLNEGINTS + _PY_NSMALLPOSINTS]; #endif + struct _Py_unicode_state unicode; + struct _Py_float_state float_state; + /* Using a cache is very effective since typically only a single slice is + created and then deleted again. */ + PySliceObject *slice_cache; + + struct _Py_tuple_state tuple; + struct _Py_list_state list; + struct _Py_dict_state dict_state; + struct _Py_frame_state frame; + struct _Py_async_gen_state async_gen; + struct _Py_context_state context; }; -------------------- Results: -------------------- $ python3 -m pyperf compare_to 2020-06-04_20-10-master-dc24b8a2ac32.json.gz 2020-06-04_20-10-master-dc24b8a2ac32-patch-free_lists.json.gz -G Slower (10): - chameleon: 20.1 ms +- 0.4 ms -> 23.1 ms +- 4.0 ms: 1.15x slower (+15%) - logging_silent: 334 ns +- 51 ns -> 371 ns +- 70 ns: 1.11x slower (+11%) - spectral_norm: 274 ms +- 37 ms -> 302 ms +- 55 ms: 1.10x slower (+10%) - logging_format: 22.5 us +- 0.4 us -> 24.5 us +- 2.7 us: 1.09x slower (+9%) - json_dumps: 26.6 ms +- 4.0 ms -> 28.7 ms +- 5.5 ms: 1.08x slower (+8%) - sympy_sum: 390 ms +- 3 ms -> 415 ms +- 45 ms: 1.06x slower (+6%) - float: 217 ms +- 3 ms -> 231 ms +- 30 ms: 1.06x slower (+6%) - pidigits: 306 ms +- 32 ms -> 323 ms +- 47 ms: 1.06x slower (+6%) - python_startup_no_site: 8.71 ms +- 0.77 ms -> 8.94 ms +- 0.91 ms: 1.03x slower (+3%) - xml_etree_process: 130 ms +- 1 ms -> 133 ms +- 2 ms: 1.02x slower (+2%) Faster (9): - pickle_pure_python: 1.05 ms +- 0.16 ms -> 964 us +- 19 us: 1.09x faster (-9%) - scimark_sparse_mat_mult: 11.4 ms +- 2.1 ms -> 10.5 ms +- 1.7 ms: 1.09x faster (-8%) - hexiom: 19.5 ms +- 4.1 ms -> 18.0 ms +- 3.0 ms: 1.08x faster (-7%) - telco: 15.7 ms +- 3.1 ms -> 14.5 ms +- 0.4 ms: 1.08x faster (-7%) - unpickle: 31.8 us +- 5.7 us -> 29.5 us +- 4.9 us: 1.08x faster (-7%) - scimark_lu: 292 ms +- 60 ms -> 274 ms +- 34 ms: 1.07x faster (-6%) - django_template: 123 ms +- 16 ms -> 119 ms +- 2 ms: 1.04x faster (-3%) - xml_etree_generate: 160 ms +- 4 ms -> 156 ms +- 3 ms: 1.02x faster (-2%) - xml_etree_iterparse: 178 ms +- 3 ms -> 177 ms +- 2 ms: 1.01x faster (-1%) Benchmark hidden because not significant (41): (...) -------------------- If we ignore differences smaller than 5%: -------------------- $ python3 -m pyperf compare_to 2020-06-04_20-10-master-dc24b8a2ac32.json.gz 2020-06-04_20-10-master-dc24b8a2ac32-patch-free_lists.json.gz -G --min-speed=5 Slower (8): - chameleon: 20.1 ms +- 0.4 ms -> 23.1 ms +- 4.0 ms: 1.15x slower (+15%) - logging_silent: 334 ns +- 51 ns -> 371 ns +- 70 ns: 1.11x slower (+11%) - spectral_norm: 274 ms +- 37 ms -> 302 ms +- 55 ms: 1.10x slower (+10%) - logging_format: 22.5 us +- 0.4 us -> 24.5 us +- 2.7 us: 1.09x slower (+9%) - json_dumps: 26.6 ms +- 4.0 ms -> 28.7 ms +- 5.5 ms: 1.08x slower (+8%) - sympy_sum: 390 ms +- 3 ms -> 415 ms +- 45 ms: 1.06x slower (+6%) - float: 217 ms +- 3 ms -> 231 ms +- 30 ms: 1.06x slower (+6%) - pidigits: 306 ms +- 32 ms -> 323 ms +- 47 ms: 1.06x slower (+6%) Faster (6): - pickle_pure_python: 1.05 ms +- 0.16 ms -> 964 us +- 19 us: 1.09x faster (-9%) - scimark_sparse_mat_mult: 11.4 ms +- 2.1 ms -> 10.5 ms +- 1.7 ms: 1.09x faster (-8%) - hexiom: 19.5 ms +- 4.1 ms -> 18.0 ms +- 3.0 ms: 1.08x faster (-7%) - telco: 15.7 ms +- 3.1 ms -> 14.5 ms +- 0.4 ms: 1.08x faster (-7%) - unpickle: 31.8 us +- 5.7 us -> 29.5 us +- 4.9 us: 1.08x faster (-7%) - scimark_lu: 292 ms +- 60 ms -> 274 ms +- 34 ms: 1.07x faster (-6%) Benchmark hidden because not significant (46): (...) -------------------- Honestly, I'm surprised by these results. I don't see how these free lists change can make between 6 and 9 benchamrks faster (ex: 1.08x faster for telco!?). For me, it sounds like speed.python.org runner has some troubles. You can notice it if you look at the 3 last runs at https://speed.python.org/ : they are some spikes (in both directions, faster or slower) which are very surprising. Pablo recently upgrade Ubuntu on the benchmark runner server. I don't know if it's related. I plan to recompute all benchmarks run on the benchmark runner server since over the last years, pyperf and pyperformance were upgraded multiple times (old data were computed with old versions) and the system (Ubuntu) was upgraded (again, old data were computed with older Ubiuntu packages). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 13:36:40 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 05 Jun 2020 17:36:40 +0000 Subject: [issue40862] argparse.BooleanOptionalAction accept and silently discard its the const argument In-Reply-To: <1591271988.48.0.105166319.issue40862@roundup.psfhosted.org> Message-ID: <1591378600.77.0.411436714857.issue40862@roundup.psfhosted.org> Raymond Hettinger added the comment: ISTM this should be addressed through documentation rather than by breaking currently deployed code that may have specified a default that already matches what the action does. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 13:39:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jun 2020 17:39:47 +0000 Subject: [issue40854] [Patch] Allow overriding sys.platlibdir In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591378787.9.0.628774459868.issue40854@roundup.psfhosted.org> STINNER Victor added the comment: Fedora and OpenSUSE Linux distributions were using a downstream patch which replaced /lib/ with /lib64/ for like 15 years. Is this issue a new issue? Or did Fedora always had the issue for example? Which Linux distribution are you using? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 13:43:08 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 05 Jun 2020 17:43:08 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1591378988.1.0.453767397173.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: New changeset 087d612efebe7c64e5f079b07e0454111859830e by Stefan Krah in branch 'master': bpo-40874: Update to libmpdec-2.5.0 (GH-20652) https://github.com/python/cpython/commit/087d612efebe7c64e5f079b07e0454111859830e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 13:43:52 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Jun 2020 17:43:52 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1591379032.68.0.869118518571.issue40874@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19874 pull_request: https://github.com/python/cpython/pull/20654 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 13:44:58 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 05 Jun 2020 17:44:58 +0000 Subject: [issue40877] Code coverage is blocking a merge again In-Reply-To: <1591377011.07.0.156762797802.issue40877@roundup.psfhosted.org> Message-ID: <1591379098.7.0.565340206912.issue40877@roundup.psfhosted.org> Stefan Krah added the comment: It finally went through after Travis-CI hanging for about an hour. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 13:47:25 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 05 Jun 2020 17:47:25 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1591379245.63.0.168173256095.issue40874@roundup.psfhosted.org> Change by Stefan Krah : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 13:47:55 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 05 Jun 2020 17:47:55 +0000 Subject: [issue40862] argparse.BooleanOptionalAction accept and silently discard its the const argument In-Reply-To: <1591271988.48.0.105166319.issue40862@roundup.psfhosted.org> Message-ID: <1591379275.04.0.779933176773.issue40862@roundup.psfhosted.org> R?mi Lapeyre added the comment: argparse.BooleanOptionalAction was introduced in Python3.9 so there is no code there should be no code that already rely on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 14:00:43 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 05 Jun 2020 18:00:43 +0000 Subject: [issue40862] argparse.BooleanOptionalAction accept and silently discard its the const argument In-Reply-To: <1591271988.48.0.105166319.issue40862@roundup.psfhosted.org> Message-ID: <1591380043.6.0.203115063648.issue40862@roundup.psfhosted.org> Raymond Hettinger added the comment: Right. Go ahead :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 14:31:23 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Jun 2020 18:31:23 +0000 Subject: [issue25268] Support pointing frozen modules to the corresponding source files, if available. In-Reply-To: <1443530732.6.0.47195880813.issue25268@psf.upfronthosting.co.za> Message-ID: <1591381883.09.0.605617122835.issue25268@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 14:36:26 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Jun 2020 18:36:26 +0000 Subject: [issue25160] Stop using deprecated imp module; imp should now emit a real DeprecationWarning In-Reply-To: <1442559979.71.0.954965412351.issue25160@psf.upfronthosting.co.za> Message-ID: <1591382186.05.0.714755934744.issue25160@roundup.psfhosted.org> Brett Cannon added the comment: imp has been moved to DeprecationWarning and I think its usage in the stdlib has been dealt with at this point. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 14:36:59 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Jun 2020 18:36:59 +0000 Subject: [issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party module fails on Python 3.5) In-Reply-To: <1442494739.31.0.584117765088.issue25150@psf.upfronthosting.co.za> Message-ID: <1591382219.16.0.66943208799.issue25150@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 14:38:36 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Jun 2020 18:38:36 +0000 Subject: [issue24929] _strptime.TimeRE should not enforce range in regex In-Reply-To: <1440452349.29.0.876134082373.issue24929@psf.upfronthosting.co.za> Message-ID: <1591382316.54.0.602282127944.issue24929@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 14:39:31 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Jun 2020 18:39:31 +0000 Subject: [issue24914] Python: Not just OO style but this is not mentioned on python.org or in FAQ In-Reply-To: <1440225910.92.0.539487452884.issue24914@psf.upfronthosting.co.za> Message-ID: <1591382371.49.0.55257212502.issue24914@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 15:08:14 2020 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 05 Jun 2020 19:08:14 +0000 Subject: [issue34003] csv.DictReader can return basic dict instead of OrderedDict In-Reply-To: <1530301659.14.0.56676864532.issue34003@psf.upfronthosting.co.za> Message-ID: <1591384094.18.0.269557242795.issue34003@roundup.psfhosted.org> Change by ?ric Araujo : ---------- nosy: +eric.araujo nosy_count: 3.0 -> 4.0 pull_requests: +19876 pull_request: https://github.com/python/cpython/pull/20657 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 15:08:05 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 05 Jun 2020 19:08:05 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591384085.7.0.573343345312.issue39791@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +19875 pull_request: https://github.com/python/cpython/pull/20656 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 15:24:57 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Jun 2020 19:24:57 +0000 Subject: [issue24914] Python: Not just OO style but this is not mentioned on python.org or in FAQ In-Reply-To: <1440225910.92.0.539487452884.issue24914@psf.upfronthosting.co.za> Message-ID: <1591385097.47.0.422997864925.issue24914@roundup.psfhosted.org> Change by Brett Cannon : ---------- keywords: +patch nosy: +brett.cannon nosy_count: 3.0 -> 4.0 pull_requests: +19877 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20658 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 15:25:33 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Jun 2020 19:25:33 +0000 Subject: [issue24914] Python: Not just OO style but this is not mentioned on python.org or in FAQ In-Reply-To: <1440225910.92.0.539487452884.issue24914@psf.upfronthosting.co.za> Message-ID: <1591385133.95.0.0996520693216.issue24914@roundup.psfhosted.org> Change by Brett Cannon : ---------- assignee: docs at python -> brett.cannon versions: +Python 3.10 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 15:26:30 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Jun 2020 19:26:30 +0000 Subject: [issue24792] zipimporter masks import errors In-Reply-To: <1438764662.95.0.423222705195.issue24792@psf.upfronthosting.co.za> Message-ID: <1591385190.88.0.12788425992.issue24792@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 15:26:42 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Jun 2020 19:26:42 +0000 Subject: [issue24725] test_socket testFDPassEmpty fails on OS X 10.11+ with "Cannot allocate memory" In-Reply-To: <1437896131.77.0.341264720465.issue24725@psf.upfronthosting.co.za> Message-ID: <1591385202.04.0.537964127885.issue24725@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 15:27:10 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Jun 2020 19:27:10 +0000 Subject: [issue24670] os.chdir breaks result of os.path.abspath(__file__) and os.path.realpath(__file__) In-Reply-To: <1437315993.36.0.280874267638.issue24670@psf.upfronthosting.co.za> Message-ID: <1591385230.8.0.138129992534.issue24670@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 15:28:23 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 05 Jun 2020 19:28:23 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591385303.58.0.491397517642.issue39791@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +19878 pull_request: https://github.com/python/cpython/pull/20659 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 15:34:15 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 05 Jun 2020 19:34:15 +0000 Subject: [issue40878] Use c99 on the aixtools bot Message-ID: <1591385655.5.0.64244490428.issue40878@roundup.psfhosted.org> New submission from Stefan Krah : There appears to be an xlc buildbot with libmpdec failures. libmpdec uses C99 extern inline semantics. From the brief period that I had access to xlc I remember that xlc was quite picky about C99. Actually all of Python uses C99. So I think xlc_r needs to be invoked as c99_r. ---------- messages: 370779 nosy: Michael.Felt, skrah priority: normal severity: normal status: open title: Use c99 on the aixtools bot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 15:41:25 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 05 Jun 2020 19:41:25 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1591386085.01.0.46883250361.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: New changeset 83bff88b4b16fb30491faa9263bbd6f3df4bab56 by Miss Islington (bot) in branch '3.9': bpo-40874: Update to libmpdec-2.5.0 (GH-20652) https://github.com/python/cpython/commit/83bff88b4b16fb30491faa9263bbd6f3df4bab56 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 15:56:39 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Jun 2020 19:56:39 +0000 Subject: [issue19468] Relax the type restriction on reloaded modules In-Reply-To: <1383275813.81.0.924128062775.issue19468@psf.upfronthosting.co.za> Message-ID: <1591386999.68.0.570830391766.issue19468@roundup.psfhosted.org> miss-islington added the comment: New changeset fef1fae9df3b03510f9defb25bd0388135b4c591 by Furkan ?nder in branch 'master': bpo-19468: delete unnecessary instance check in importlib.reload() (GH-19424) https://github.com/python/cpython/commit/fef1fae9df3b03510f9defb25bd0388135b4c591 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 16:34:31 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 05 Jun 2020 20:34:31 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591389271.0.0.856900974306.issue39791@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 161541ab45278df6603dd870113b10f13e4d9e16 by Jason R. Coombs in branch 'master': bpo-39791: Refresh importlib.metadata from importlib_metadata 1.6.1. (GH-20659) https://github.com/python/cpython/commit/161541ab45278df6603dd870113b10f13e4d9e16 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 16:34:38 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Jun 2020 20:34:38 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591389278.06.0.859281913085.issue39791@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19879 pull_request: https://github.com/python/cpython/pull/20661 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 16:34:44 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Jun 2020 20:34:44 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591389284.98.0.531616383854.issue39791@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19880 pull_request: https://github.com/python/cpython/pull/20662 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 16:42:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jun 2020 20:42:45 +0000 Subject: [issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party module fails on Python 3.5) In-Reply-To: <1442494739.31.0.584117765088.issue25150@psf.upfronthosting.co.za> Message-ID: <1591389765.71.0.189911281796.issue25150@roundup.psfhosted.org> STINNER Victor added the comment: Python.h does not include pyatomic.h in Python 3.8: the header file moved to the internal C API. The initial issue is fixed, so I close again the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 16:49:23 2020 From: report at bugs.python.org (Matt Miller) Date: Fri, 05 Jun 2020 20:49:23 +0000 Subject: [issue40879] Strange regex cycle Message-ID: <1591390163.66.0.486591765961.issue40879@roundup.psfhosted.org> New submission from Matt Miller : I was evaluating a few regular expressions for parsing URL. One such expression (https://daringfireball.net/2010/07/improved_regex_for_matching_urls) causes the `re.Pattern` to exhibit some strange behavior (notice the stripped characters in the `repr`): ``` >>> STR_RE_URL = r"""(?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>???????]))""" >>> print(re.compile(STR_RE_URL)) re.compile('(?i)\\b((?:[a-z][\\w-]+:(?:/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\, re.IGNORECASE) ``` The reason I started looking at this was because the following string causes the same `re.Pattern` object's `.search()` method to loop forever for some reason: ``` >>> weird_str = """AY:OhQOhQNhQLdLAX78N'7M&6K%4K#4K#7N&9P(JcHOiQE^=8P'F_DJdLC\@9P&D\;IdKHbJ at Z8AY7@Y7AY7B[9E_Jc at Jc:F_1PjRRlSOiLKeAKeAGa=D^:F`=Ga=Fa>> url_pat.search(weird_str) ``` The `.search(weird_str)` will never exit. I assume the `.search()` taking forever is is an error in the expression but the fact that it causes the `repr` to strip some characters was something I thought should be looked into. I have not tested this on any other versions of Python. ---------- components: Library (Lib) messages: 370784 nosy: Matt Miller priority: normal severity: normal status: open title: Strange regex cycle versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 16:56:13 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 05 Jun 2020 20:56:13 +0000 Subject: [issue40876] Clarify error message in csv module In-Reply-To: <1591376403.94.0.4038301694.issue40876@roundup.psfhosted.org> Message-ID: <1591390573.62.0.295269199826.issue40876@roundup.psfhosted.org> Joannah Nanjekye added the comment: New changeset 235f918f44bb89e27190db2f1823d191dbd4ad28 by Ram Rachum in branch 'master': bpo-40876: Clarify error message in the csv module (GH-20653) https://github.com/python/cpython/commit/235f918f44bb89e27190db2f1823d191dbd4ad28 ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 16:58:08 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 05 Jun 2020 20:58:08 +0000 Subject: [issue40876] Clarify error message in csv module In-Reply-To: <1591376403.94.0.4038301694.issue40876@roundup.psfhosted.org> Message-ID: <1591390688.01.0.476803043019.issue40876@roundup.psfhosted.org> Joannah Nanjekye added the comment: PR merged. We can close this. Thanks Ram. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 17:01:25 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Jun 2020 21:01:25 +0000 Subject: [issue19468] Relax the type restriction on reloaded modules In-Reply-To: <1383275813.81.0.924128062775.issue19468@psf.upfronthosting.co.za> Message-ID: <1591390885.18.0.170653245206.issue19468@roundup.psfhosted.org> Brett Cannon added the comment: Thanks for the PR, Furkan ! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 17:32:16 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 05 Jun 2020 21:32:16 +0000 Subject: [issue40867] Remove unused include in Module/_randommodule.c In-Reply-To: <1591304217.78.0.0159593220617.issue40867@roundup.psfhosted.org> Message-ID: <1591392736.74.0.286901537791.issue40867@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 45af786e111aed5f687e1f0d8b45b6a5e678a6bc by Erlend Egeberg Aasland in branch 'master': bpo-40867: Remove unused include from Module/_randommodule.c (GH-20635) https://github.com/python/cpython/commit/45af786e111aed5f687e1f0d8b45b6a5e678a6bc ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 17:32:29 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 05 Jun 2020 21:32:29 +0000 Subject: [issue40867] Remove unused include in Module/_randommodule.c In-Reply-To: <1591304217.78.0.0159593220617.issue40867@roundup.psfhosted.org> Message-ID: <1591392749.37.0.00871096758404.issue40867@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 Fri Jun 5 17:46:31 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 05 Jun 2020 21:46:31 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591393591.16.0.349678037441.issue39791@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset a4fa9a95153a3800dea60b3029b2dcaf8a4f6acb by Miss Islington (bot) in branch '3.9': bpo-39791: Refresh importlib.metadata from importlib_metadata 1.6.1. (GH-20659) (GH-20661) https://github.com/python/cpython/commit/a4fa9a95153a3800dea60b3029b2dcaf8a4f6acb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 18:00:14 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 05 Jun 2020 22:00:14 +0000 Subject: [issue40880] Invalid read in pegen.c Message-ID: <1591394414.92.0.125857803863.issue40880@roundup.psfhosted.org> New submission from Stefan Krah : >From test_decimal: test_xor (test.test_decimal.PyIBMTestCases) ... ==17597== Invalid read of size 1 ==17597== at 0x64A7E2: newline_in_string (pegen.c:940) ==17597== by 0x64A84E: bad_single_statement (pegen.c:958) ==17597== by 0x64AD59: _PyPegen_run_parser (pegen.c:1101) ==17597== by 0x64B044: _PyPegen_run_parser_from_string (pegen.c:1194) ==17597== by 0x5C6D56: PyPegen_ASTFromStringObject (peg_api.c:27) ==17597== by 0x52A2A9: Py_CompileStringObject (pythonrun.c:1259) ==17597== by 0x63CBF6: builtin_compile_impl (bltinmodule.c:819) ==17597== by 0x63AF08: builtin_compile (bltinmodule.c.h:249) ==17597== by 0x5F9446: cfunction_vectorcall_FASTCALL_KEYWORDS (methodobject.c:440) ==17597== by 0x4D2642: _PyObject_VectorcallTstate (abstract.h:114) ==17597== by 0x4D26A1: PyObject_Vectorcall (abstract.h:123) ==17597== by 0x4E3F26: call_function (ceval.c:5111) ==17597== Address 0xadc82bf is 1 bytes before a block of size 22 alloc'd ==17597== at 0x4C3016F: realloc (vg_replace_malloc.c:826) ==17597== by 0x46A983: _PyMem_RawRealloc (obmalloc.c:121) ==17597== by 0x46B49E: PyMem_Realloc (obmalloc.c:623) ==17597== by 0x5C9565: translate_newlines (tokenizer.c:654) ==17597== by 0x5C98FE: PyTokenizer_FromUTF8 (tokenizer.c:751) ==17597== by 0x64AF7F: _PyPegen_run_parser_from_string (pegen.c:1169) ==17597== by 0x5C6D56: PyPegen_ASTFromStringObject (peg_api.c:27) ==17597== by 0x52A2A9: Py_CompileStringObject (pythonrun.c:1259) ==17597== by 0x63CBF6: builtin_compile_impl (bltinmodule.c:819) ==17597== by 0x63AF08: builtin_compile (bltinmodule.c.h:249) ==17597== by 0x5F9446: cfunction_vectorcall_FASTCALL_KEYWORDS (methodobject.c:440) ==17597== by 0x4D2642: _PyObject_VectorcallTstate (abstract.h:114) ==17597== *--cur dereferences one below p->tok->buf in the last iteration. ---------- components: Interpreter Core messages: 370791 nosy: lys.nikolaou, skrah priority: normal severity: normal stage: needs patch status: open title: Invalid read in pegen.c type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 18:00:48 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 05 Jun 2020 22:00:48 +0000 Subject: [issue40862] argparse.BooleanOptionalAction accept and silently discard its the const argument In-Reply-To: <1591271988.48.0.105166319.issue40862@roundup.psfhosted.org> Message-ID: <1591394448.78.0.575701447996.issue40862@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset b084d1b97e369293d2d2bc0791e2135822c923a8 by R?mi Lapeyre in branch 'master': bpo-40862: Raise TypeError when const is given to argparse.BooleanOptionalAction (GH-20623) https://github.com/python/cpython/commit/b084d1b97e369293d2d2bc0791e2135822c923a8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 18:01:01 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Jun 2020 22:01:01 +0000 Subject: [issue40862] argparse.BooleanOptionalAction accept and silently discard its the const argument In-Reply-To: <1591271988.48.0.105166319.issue40862@roundup.psfhosted.org> Message-ID: <1591394461.51.0.876371836142.issue40862@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +19881 pull_request: https://github.com/python/cpython/pull/20664 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 18:36:50 2020 From: report at bugs.python.org (YoSTEALTH) Date: Fri, 05 Jun 2020 22:36:50 +0000 Subject: [issue40869] errno missing descriptions In-Reply-To: <1591325557.2.0.303009626884.issue40869@roundup.psfhosted.org> Message-ID: <1591396610.04.0.869501345427.issue40869@roundup.psfhosted.org> Change by YoSTEALTH : ---------- keywords: +patch pull_requests: +19882 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20665 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 18:38:33 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 05 Jun 2020 22:38:33 +0000 Subject: [issue40880] Invalid read in pegen.c In-Reply-To: <1591394414.92.0.125857803863.issue40880@roundup.psfhosted.org> Message-ID: <1591396713.89.0.924647136202.issue40880@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- nosy: +gvanrossum, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 18:38:42 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 05 Jun 2020 22:38:42 +0000 Subject: [issue40881] --with-valgrind broken Message-ID: <1591396722.67.0.757074834651.issue40881@roundup.psfhosted.org> New submission from Stefan Krah : ./configure --with-valgrind: Objects/unicodeobject.c: In function ?unicode_release_interned?: Objects/unicodeobject.c:15672:26: error: lvalue required as left operand of assignment Py_REFCNT(s) += 1; ^ Objects/unicodeobject.c:15678:26: error: lvalue required as left operand of assignment Py_REFCNT(s) += 2; Well, Py_REFCNT(s) is no longer an lvalue. :-) ---------- messages: 370793 nosy: skrah, vstinner priority: normal severity: normal status: open title: --with-valgrind broken _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 18:47:05 2020 From: report at bugs.python.org (Eryk Sun) Date: Fri, 05 Jun 2020 22:47:05 +0000 Subject: [issue40882] memory leak in multiprocessing.shared_memory.SharedMemory in Windows Message-ID: <1591397225.82.0.932982465865.issue40882@roundup.psfhosted.org> New submission from Eryk Sun : mmap.mmap in Windows doesn't support an exist_ok parameter and doesn't correctly handle the combination fileno=-1, length=0, and tagname with an existing file mapping. SharedMemory has to work around these limitations. Part of the workaround for the create=False case requires mapping a view via MapViewOfFile in order to get the size from VirtualQuerySize, since mmap.mmap requires it (needlessly if implemented right) when fileno=-1. This mapped view never gets unmapped, which means the shared memory will never be freed until the termination of all processes that have opened it with create=False. Also, at least in a 32-bit process, this wastes precious address space. _winapi.UnmapViewOfFile needs to be implemented. Then the temporary view can be unmapped as follows: self._name = name h_map = _winapi.OpenFileMapping(_winapi.FILE_MAP_READ, False, name) try: p_buf = _winapi.MapViewOfFile(h_map, _winapi.FILE_MAP_READ, 0, 0, 0) finally: _winapi.CloseHandle(h_map) try: size = _winapi.VirtualQuerySize(p_buf) finally: _winapi.UnmapViewOfFile(p_buf) self._mmap = mmap.mmap(-1, size, tagname=name) [1]: https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-unmapviewoffile ---------- components: Library (Lib), Windows messages: 370794 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: memory leak in multiprocessing.shared_memory.SharedMemory in Windows type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 18:54:09 2020 From: report at bugs.python.org (YoSTEALTH) Date: Fri, 05 Jun 2020 22:54:09 +0000 Subject: [issue40869] errno missing descriptions In-Reply-To: <1591325557.2.0.303009626884.issue40869@roundup.psfhosted.org> Message-ID: <1591397649.75.0.514198284705.issue40869@roundup.psfhosted.org> Change by YoSTEALTH : ---------- type: -> enhancement versions: +Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 18:56:57 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 05 Jun 2020 22:56:57 +0000 Subject: [issue40883] parse_string.c: free "str" Message-ID: <1591397817.32.0.494425935201.issue40883@roundup.psfhosted.org> New submission from Stefan Krah : Also in test_decimal, there's a small leak here: ==10040== 24 bytes in 1 blocks are definitely lost in loss record 549 of 5,095 ==10040== at 0x4C2DE56: malloc (vg_replace_malloc.c:299) ==10040== by 0x643B33: fstring_compile_expr (parse_string.c:594) ==10040== by 0x643B33: fstring_find_expr (parse_string.c:924) ==10040== by 0x643B33: fstring_find_literal_and_expr (parse_string.c:1076) ==10040== by 0x643B33: _PyPegen_FstringParser_ConcatFstring (parse_string.c:1293) ==10040== by 0x644569: fstring_parse (parse_string.c:1409) ==10040== by 0x644569: fstring_find_expr (parse_string.c:980) ==10040== by 0x644569: fstring_find_literal_and_expr (parse_string.c:1076) ==10040== by 0x644569: _PyPegen_FstringParser_ConcatFstring (parse_string.c:1293) ==10040== by 0x62CE94: _PyPegen_concatenate_strings (pegen.c:2003) ==10040== by 0x62EF52: strings_rule (parse.c:10834) ==10040== by 0x62EF52: atom_rule (parse.c:10674) ==10040== by 0x6389A2: t_primary_raw (parse.c:14042) ==10040== by 0x6389A2: t_primary_rule (parse.c:13839) ==10040== by 0x638D67: star_target_rule (parse.c:12684) ==10040== by 0x6392FC: star_targets_rule (parse.c:12501) ==10040== by 0x63BD7B: _tmp_135_rule (parse.c:23255) ==10040== by 0x63BD7B: _loop1_22_rule (parse.c:16468) ==10040== by 0x63BD7B: assignment_rule (parse.c:2116) ==10040== by 0x63BD7B: small_stmt_rule (parse.c:1508) ==10040== by 0x63DB44: simple_stmt_rule (parse.c:1406) ==10040== by 0x63F995: statement_rule (parse.c:1240) ==10040== by 0x63F995: _loop1_11_rule (parse.c:15835) ==10040== by 0x63F995: statements_rule (parse.c:1175) ==10040== by 0x63FB49: block_rule (parse.c:6127) ---------- messages: 370795 nosy: lys.nikolaou, pablogsal, skrah priority: normal severity: normal status: open title: parse_string.c: free "str" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 19:14:36 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jun 2020 23:14:36 +0000 Subject: [issue40880] Invalid read in pegen.c In-Reply-To: <1591394414.92.0.125857803863.issue40880@roundup.psfhosted.org> Message-ID: <1591398876.03.0.928921862248.issue40880@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +19883 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20666 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 19:15:57 2020 From: report at bugs.python.org (YoSTEALTH) Date: Fri, 05 Jun 2020 23:15:57 +0000 Subject: [issue40869] errno missing descriptions In-Reply-To: <1591325557.2.0.303009626884.issue40869@roundup.psfhosted.org> Message-ID: <1591398957.65.0.880485223434.issue40869@roundup.psfhosted.org> Change by YoSTEALTH : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 19:18:53 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jun 2020 23:18:53 +0000 Subject: [issue40883] parse_string.c: free "str" In-Reply-To: <1591397817.32.0.494425935201.issue40883@roundup.psfhosted.org> Message-ID: <1591399133.58.0.454270595184.issue40883@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +19884 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20667 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 19:29:51 2020 From: report at bugs.python.org (Bar Harel) Date: Fri, 05 Jun 2020 23:29:51 +0000 Subject: [issue40884] Added defaults parameter for logging.Formatter Message-ID: <1591399791.89.0.0887642700869.issue40884@roundup.psfhosted.org> New submission from Bar Harel : TLDR; `logging.Formatter('%(ip)s %(message)s', defaults={"ip": None})` Python's logging.Formatter allows the placement of custom fields, e.g. `logging.Formatter("%(ip)s %(message)")`. If a handler has a formatter with a custom field, all log records that go through the handler must have the custom field set using `extra={}`. Failure to do so will result in exceptions thrown inside the logging library. Custom fields are common, and are even suggested by the Python logging cookbook, where they are attached to the root logger. There is, however, no way to specify default values for the custom fields. Quite a few issues arise from it. For example, if I've set a formatter on the root logger with the custom field "%(ip)s", all logging messages sent by the asyncio library, will cause exceptions to raise. Adding default values is possible using LoggerAdapter but will causes other issues as well as not solve the aforementioned problem. Adding default values is possible using Filters, but cause confusion, isn't simple, and permanently modify the record object itself, which can cause issues if more handlers or formatters are attached. >From a quick search, this feature was asked for many times in stackoverflow, and even spawned up a few libraries such as "logaugment" in order to solve it. I believe the solution offered, by using `defaults={}` is simple enough to not need discussion over python-ideas, yet common enough to justify the addition to the standard library. I've provided a reference PR. It does not cause backwards compatibility issues, complies with all formatter styles (%, {}, $), passes all tests and is simple enough to both use and understand. Not sure if 3.9 is feature-closed for small additions like this. ---------- components: Library (Lib) messages: 370796 nosy: bar.harel priority: normal severity: normal status: open title: Added defaults parameter for logging.Formatter type: enhancement versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 19:38:24 2020 From: report at bugs.python.org (Bar Harel) Date: Fri, 05 Jun 2020 23:38:24 +0000 Subject: [issue40884] Added defaults parameter for logging.Formatter In-Reply-To: <1591399791.89.0.0887642700869.issue40884@roundup.psfhosted.org> Message-ID: <1591400304.86.0.972472858312.issue40884@roundup.psfhosted.org> Change by Bar Harel : ---------- keywords: +patch pull_requests: +19885 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20668 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 19:52:19 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jun 2020 23:52:19 +0000 Subject: [issue40883] parse_string.c: free "str" In-Reply-To: <1591397817.32.0.494425935201.issue40883@roundup.psfhosted.org> Message-ID: <1591401139.24.0.985375814409.issue40883@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset a54096e30523534e8eebb8dc1011b4536ed237a8 by Pablo Galindo in branch 'master': bpo-40883: Fix memory leak in fstring_compile_expr in parse_string.c (GH-20667) https://github.com/python/cpython/commit/a54096e30523534e8eebb8dc1011b4536ed237a8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 19:52:30 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Jun 2020 23:52:30 +0000 Subject: [issue40883] parse_string.c: free "str" In-Reply-To: <1591397817.32.0.494425935201.issue40883@roundup.psfhosted.org> Message-ID: <1591401150.39.0.976214971238.issue40883@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19886 pull_request: https://github.com/python/cpython/pull/20669 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 19:52:31 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jun 2020 23:52:31 +0000 Subject: [issue40880] Invalid read in pegen.c In-Reply-To: <1591394414.92.0.125857803863.issue40880@roundup.psfhosted.org> Message-ID: <1591401151.46.0.181037993406.issue40880@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 2e6593db0086004a1ca7f7049218ff9573d473c2 by Pablo Galindo in branch 'master': bpo-40880: Fix invalid read in newline_in_string in pegen.c (#20666) https://github.com/python/cpython/commit/2e6593db0086004a1ca7f7049218ff9573d473c2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 19:52:40 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Jun 2020 23:52:40 +0000 Subject: [issue40880] Invalid read in pegen.c In-Reply-To: <1591394414.92.0.125857803863.issue40880@roundup.psfhosted.org> Message-ID: <1591401160.02.0.00463907592567.issue40880@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +19887 pull_request: https://github.com/python/cpython/pull/20670 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 20:11:03 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jun 2020 00:11:03 +0000 Subject: [issue40883] parse_string.c: free "str" In-Reply-To: <1591397817.32.0.494425935201.issue40883@roundup.psfhosted.org> Message-ID: <1591402263.96.0.769125984781.issue40883@roundup.psfhosted.org> miss-islington added the comment: New changeset 79e6c15aed9b4b50efd39ddaf1dc40c374b51213 by Miss Islington (bot) in branch '3.9': bpo-40883: Fix memory leak in fstring_compile_expr in parse_string.c (GH-20667) https://github.com/python/cpython/commit/79e6c15aed9b4b50efd39ddaf1dc40c374b51213 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 20:12:11 2020 From: report at bugs.python.org (Sandro Mani) Date: Sat, 06 Jun 2020 00:12:11 +0000 Subject: [issue40854] [Patch] Allow overriding sys.platlibdir In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591402331.31.0.517785047935.issue40854@roundup.psfhosted.org> Sandro Mani added the comment: I'm on Fedora. My use case is for the mingw-python package I maintain there, see [1] for the full details. I believe (though I haven't investigated) that the previous downstream lib64 patch behaved slightly differently, or that something else between python-3.8 and earlier and python-3.9 changed, in that I didn't have lib64 appear in the site packages path previously when invoking python as detailed in [1], whereas it now does. [1] https://src.fedoraproject.org/rpms/python3.9/pull-request/10#comment-0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 20:13:20 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jun 2020 00:13:20 +0000 Subject: [issue40880] Invalid read in pegen.c In-Reply-To: <1591394414.92.0.125857803863.issue40880@roundup.psfhosted.org> Message-ID: <1591402400.56.0.558366869794.issue40880@roundup.psfhosted.org> miss-islington added the comment: New changeset 15fec5627ac343afd0bfa1e847746071982d5172 by Miss Islington (bot) in branch '3.9': bpo-40880: Fix invalid read in newline_in_string in pegen.c (GH-20666) https://github.com/python/cpython/commit/15fec5627ac343afd0bfa1e847746071982d5172 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 20:37:53 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 06 Jun 2020 00:37:53 +0000 Subject: [issue40884] Added defaults parameter for logging.Formatter In-Reply-To: <1591399791.89.0.0887642700869.issue40884@roundup.psfhosted.org> Message-ID: <1591403873.61.0.533652753086.issue40884@roundup.psfhosted.org> R?mi Lapeyre added the comment: New features will go in Python 3.10 indeed. ---------- nosy: +remi.lapeyre, vinay.sajip versions: -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 20:44:53 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 06 Jun 2020 00:44:53 +0000 Subject: [issue40883] parse_string.c: free "str" In-Reply-To: <1591397817.32.0.494425935201.issue40883@roundup.psfhosted.org> Message-ID: <1591404293.0.0.637289109844.issue40883@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 Jun 5 20:44:47 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 06 Jun 2020 00:44:47 +0000 Subject: [issue40880] Invalid read in pegen.c In-Reply-To: <1591394414.92.0.125857803863.issue40880@roundup.psfhosted.org> Message-ID: <1591404287.74.0.627915738366.issue40880@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 Jun 5 20:53:47 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 06 Jun 2020 00:53:47 +0000 Subject: [issue40879] Strange regex cycle In-Reply-To: <1591390163.66.0.486591765961.issue40879@roundup.psfhosted.org> Message-ID: <1591404827.71.0.299345165802.issue40879@roundup.psfhosted.org> Steven D'Aprano added the comment: > notice the stripped characters in the `repr` Er, no. Your regex looks like line noise, and it hurts my brain to look at it :-) If you have spotted a difference, can you tell us what characters are stripped? When I try running it, I don't get any characters stripped at all: py> import re py> STR_RE_URL = r"""(?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>???????]))""" py> r = re.compile(STR_RE_URL) py> r.pattern == STR_RE_URL True ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 20:56:53 2020 From: report at bugs.python.org (Nehal Patel) Date: Sat, 06 Jun 2020 00:56:53 +0000 Subject: [issue40885] Cannot pipe GzipFile into subprocess Message-ID: <1591405013.03.0.805954404624.issue40885@roundup.psfhosted.org> New submission from Nehal Patel : The following code produces incorrect behavior: with gzip.open("foo.gz") as gz: res = subprocess.run("cat", stdin=gz, capture_output=True) the contents of res.stdout are identical to the contents of "foo.gz" It seems the subprocess somehow gets a hold of the underlying file descriptor pointing to the compressed file, and ends up being fed the compressed bytes. ---------- components: IO messages: 370804 nosy: Nehal Patel priority: normal severity: normal status: open title: Cannot pipe GzipFile into subprocess type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 20:58:53 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 06 Jun 2020 00:58:53 +0000 Subject: [issue40879] Strange regex cycle In-Reply-To: <1591390163.66.0.486591765961.issue40879@roundup.psfhosted.org> Message-ID: <1591405133.66.0.557279830277.issue40879@roundup.psfhosted.org> Steven D'Aprano added the comment: Wait, I'm sorry, do you mean this? py> repr(r)[13:-16] '?i)\\\\b((?:[a-z][\\\\w-]+:(?:/{1,3}|[a-z0-9%])|www\\\\d{0,3}[.]|[a-z0-9.\\\\-]+[.][a-z]{2,4}/)(?:[^\\\\s()<>]+|\\\\(([^\\\\s()<>]+|(\\\\([^\\\\s()<>]+\\\\)))*\\\\))+(?:\\\\(([^\\\\s()<>]+|(\\\\([^\\\\s()<>]+\\\\)))*\\\\)|[^\\\\s`!()\\' Referring to the pattern being truncated in the repr? I would assume that's intentional. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 21:10:41 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 06 Jun 2020 01:10:41 +0000 Subject: [issue40879] Strange regex cycle In-Reply-To: <1591390163.66.0.486591765961.issue40879@roundup.psfhosted.org> Message-ID: <1591405841.83.0.676560588521.issue40879@roundup.psfhosted.org> Dennis Sweeney added the comment: It looks like only the first 200 characters of the input string's repr are used as the compiled pattern's repr for some reason: https://github.com/python/cpython/blob/master/Modules/_sre.c#L1294 I don't know if there is a good reason, especially since this violates eval(repr(pattern)) == pattern in a bad way: >>> eval(repr(re.compile(STR_RE_URL))) Traceback (most recent call last): File "", line 1, in File "", line 1 re.compile('(?i)\\b((?:[a-z][\\w-]+:(?:/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\, re.IGNORECASE) ^ SyntaxError: EOL while scanning string literal ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 21:11:59 2020 From: report at bugs.python.org (Bar Harel) Date: Sat, 06 Jun 2020 01:11:59 +0000 Subject: [issue40886] Add PYTHONLOGGING environment variable and -L cmdline argument Message-ID: <1591405919.07.0.877593512287.issue40886@roundup.psfhosted.org> New submission from Bar Harel : Per discussion on mailing list, I suggest adding a PYTHONLOGGING environment variable, and a matching -L cmdline argument. When set to a logging level of choice, they will initiate basicConfig with the appropriate level. For example, "py.exe -L info" will be equivalent to "logging.basicConfig(level='info')" on interpreter startup. Sames as setting env var "PYTHONLOGGING=info". This matches the current behavior of other settings, such as PYTHONWARNINGS and -W, allows to easily test programs without modifying them, and further completes the expected arguments available from the commandline. Discussion on mailing list for reference: https://mail.python.org/archives/list/python-ideas at python.org/thread/I74LVJWJLE2LUCCZGOF5A5JDSDHJ6WX2/ ---------- components: Library (Lib) messages: 370807 nosy: bar.harel priority: normal severity: normal status: open title: Add PYTHONLOGGING environment variable and -L cmdline argument type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 21:21:10 2020 From: report at bugs.python.org (Tim Peters) Date: Sat, 06 Jun 2020 01:21:10 +0000 Subject: [issue40879] Strange regex cycle In-Reply-To: <1591390163.66.0.486591765961.issue40879@roundup.psfhosted.org> Message-ID: <1591406470.69.0.365947824927.issue40879@roundup.psfhosted.org> Tim Peters added the comment: The repr truncates the pattern string, for display, if it's "too long". The only visual clue about that, though, is that the display is missing the pattern string's closing quote, as in the output you showed here. If you look at url_pat.pattern, though, you'll see that nothing has been lost. I'm not sure why it does that. As I vaguely recall, some years ago there was a crusade to limit maximum repr sizes because long output was considered to be "a security issue" (e.g., DoS attacks vis tricking logging/auditing facilities into writing giant strings when recording reprs). In any case, that's all there is to that part. For the rest, it's exceedingly unlikely that there's actually an infinite loop. Instead there's a messy regexp with multiple nested quantifiers, which are notorious for exhibiting exponential-time behavior and especially in non-matching cases. They can be rewritten to have linear-time behavior instead, but it's an effort I personally have no interest in pursuing here. See Jeffrey Friedl's "Mastering Regular Expressions" book for detailed explanations. The reason I have no interest: it's almost always a losing idea to try to parse any aspect of HTML with regexps. Use an HTML parser instead (or for URLs specifically, see urllib.parse). ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 21:23:28 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 06 Jun 2020 01:23:28 +0000 Subject: [issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't In-Reply-To: <1591124614.71.0.196427498662.issue40847@roundup.psfhosted.org> Message-ID: <1591406608.76.0.487669257421.issue40847@roundup.psfhosted.org> Lysandros Nikolaou added the comment: This is limited to cases where the line continuation character is on an otherwise empty line. For example this works correctly: $ cat t.py print("hello world") print("hello world 2") \ print("hello world 3") $ ./python.exe t.py hello world hello world 2 hello world 3 The actual problem is at the tokenizer level, where a line with only a continuation character is not considered an empty line and thus two NEWLINE tokens get emitted, one after the other. The old parser was somehow working around this, probably by having this in the grammar: file_input: (NEWLINE | stmt)* ENDMARKER The PEG parser OTOH does not allow this. The question now is, is it reasonable to change the tokenizer to consider a lone backslash an empty line? Do you also consider this a bug? Or should we change the new parser? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 21:24:26 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 06 Jun 2020 01:24:26 +0000 Subject: [issue40886] Add PYTHONLOGGING environment variable and -L cmdline argument In-Reply-To: <1591405919.07.0.877593512287.issue40886@roundup.psfhosted.org> Message-ID: <1591406666.97.0.839132759432.issue40886@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 22:04:04 2020 From: report at bugs.python.org (Tim Peters) Date: Sat, 06 Jun 2020 02:04:04 +0000 Subject: [issue40879] Strange regex cycle In-Reply-To: <1591390163.66.0.486591765961.issue40879@roundup.psfhosted.org> Message-ID: <1591409044.15.0.926341246595.issue40879@roundup.psfhosted.org> Tim Peters added the comment: Note that the relatively tiny pattern here extracts just a small piece of the regexp in question. As the output shows, increase the length of a string it fails to match by one character, and the time taken to fail approximately doubles: exponential-time behavior. >>> import re >>> c = re.compile(r'(?:[^\s()<>]+)+x') >>> from time import perf_counter as now >>> size = 1 >>> while True: ... s = 'a' * size ... start = now() ... junk = c.search(s) ... finish = now() ... print(size, finish - start) ... size += 1 1 9.900000009110954e-06 2 1.1800000009998257e-05 3 1.1200000017197453e-05 4 1.2099999992187804e-05 5 1.5200000007098424e-05 6 1.5699999977414336e-05 7 2.119999999194988e-05 8 3.39000000053602e-05 9 4.9599999982774534e-05 10 7.779999998547282e-05 11 0.00014810000001830304 12 0.00034099999999170905 13 0.0006348999999943317 14 0.0012191000000143504 15 0.002482499999985066 16 0.004694100000023127 17 0.009342199999991863 18 0.01954169999999067 19 0.03880150000000526 20 0.0762141000000156 21 0.1472148999999945 22 0.27771670000001336 23 0.6491722000000095 24 1.3553119999999979 25 2.229829699999982 26 4.986566299999993 27 9.567925599999995 28 19.09181079999999 29 42.363349 30 83.57493059999999 31 158.88249489999998 ... The machine was far from quiet while running this, but it doesn't matter: the _point_ is dead obvious regardless. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 22:31:27 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Jun 2020 02:31:27 +0000 Subject: [issue40862] argparse.BooleanOptionalAction accept and silently discard its the const argument In-Reply-To: <1591271988.48.0.105166319.issue40862@roundup.psfhosted.org> Message-ID: <1591410687.06.0.322836656644.issue40862@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset d5e7348e4105d1d4a1c5bd1087f61041532ecbf3 by Miss Islington (bot) in branch '3.9': bpo-40862: Raise TypeError when const is given to argparse.BooleanOptionalAction (GH-20623) (GH-20664) https://github.com/python/cpython/commit/d5e7348e4105d1d4a1c5bd1087f61041532ecbf3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 5 22:31:45 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Jun 2020 02:31:45 +0000 Subject: [issue40862] argparse.BooleanOptionalAction accept and silently discard its the const argument In-Reply-To: <1591271988.48.0.105166319.issue40862@roundup.psfhosted.org> Message-ID: <1591410705.84.0.690721548579.issue40862@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 Jun 6 00:18:43 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 06 Jun 2020 04:18:43 +0000 Subject: [issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't In-Reply-To: <1591124614.71.0.196427498662.issue40847@roundup.psfhosted.org> Message-ID: <1591417123.16.0.223731475205.issue40847@roundup.psfhosted.org> Guido van Rossum added the comment: Sure looks like a tokenizer issue to me. For example this is broken in both versions: pass \ pass It complains about an unexpected indent, but it should really be considered a blank line broken in two -- a backslash is supposed to just erase itself and the following newline. https://docs.python.org/3/reference/lexical_analysis.html#explicit-line-joining ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 04:06:43 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jun 2020 08:06:43 +0000 Subject: [issue40807] Codeop: Show warnings once during _maybe_compile In-Reply-To: <1590674108.19.0.341062869134.issue40807@roundup.psfhosted.org> Message-ID: <1591430803.7.0.917482376447.issue40807@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19888 pull_request: https://github.com/python/cpython/pull/20672 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 04:06:50 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jun 2020 08:06:50 +0000 Subject: [issue40807] Codeop: Show warnings once during _maybe_compile In-Reply-To: <1590674108.19.0.341062869134.issue40807@roundup.psfhosted.org> Message-ID: <1591430810.54.0.749180582175.issue40807@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19889 pull_request: https://github.com/python/cpython/pull/20673 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 04:23:56 2020 From: report at bugs.python.org (Stefan Krah) Date: Sat, 06 Jun 2020 08:23:56 +0000 Subject: [issue40887] Leaks in new free lists Message-ID: <1591431836.65.0.780118303952.issue40887@roundup.psfhosted.org> New submission from Stefan Krah : I'm opening a separate issue to prevent #40521 from getting too big. Lists and tuples sometimes leak (starting 69ac6e58f and later): ==1445== 56 bytes in 1 blocks are definitely lost in loss record 1,542 of 4,898 ==1445== at 0x4C2DE56: malloc (vg_replace_malloc.c:299) ==1445== by 0x550487: _PyObject_GC_Alloc (gcmodule.c:2233) ==1445== by 0x550487: _PyObject_GC_Malloc (gcmodule.c:2260) ==1445== by 0x550487: _PyObject_GC_New (gcmodule.c:2272) ==1445== by 0x44CB04: PyList_New (listobject.c:144) ==1445== by 0x4E3DE1: init_filters (_warnings.c:88) ==1445== by 0x4E3DE1: warnings_init_state (_warnings.c:120) ==1445== by 0x4E3DE1: _PyWarnings_InitState (_warnings.c:1372) ==1445== by 0x521720: pycore_init_import_warnings (pylifecycle.c:687) ==1445== by 0x521720: pycore_interp_init (pylifecycle.c:735) ==1445== by 0x5246A0: pyinit_config (pylifecycle.c:763) ==1445== by 0x5246A0: pyinit_core (pylifecycle.c:924) ==1445== by 0x5246A0: Py_InitializeFromConfig (pylifecycle.c:1134) ==1445== by 0x4285DC: pymain_init (main.c:66) ==1445== by 0x4296A1: pymain_main (main.c:653) ==1445== by 0x4296A1: Py_BytesMain (main.c:686) ==1445== by 0x578882F: (below main) (libc-start.c:291) ==1445== 64 bytes in 1 blocks are definitely lost in loss record 2,259 of 4,898 ==1445== at 0x4C2DE56: malloc (vg_replace_malloc.c:299) ==1445== by 0x550611: _PyObject_GC_Alloc (gcmodule.c:2233) ==1445== by 0x550611: _PyObject_GC_Malloc (gcmodule.c:2260) ==1445== by 0x550611: _PyObject_GC_NewVar (gcmodule.c:2289) ==1445== by 0x48452C: tuple_alloc (tupleobject.c:76) ==1445== by 0x48452C: _PyTuple_FromArray (tupleobject.c:413) ==1445== by 0x435EE0: _PyObject_MakeTpCall (call.c:165) ==1445== by 0x436947: _PyObject_FastCallDictTstate (call.c:113) ==1445== by 0x436947: PyObject_VectorcallDict (call.c:142) ==1445== by 0x61DFC5: builtin___build_class__ (bltinmodule.c:232) ==1445== by 0x5E8A39: cfunction_vectorcall_FASTCALL_KEYWORDS (methodobject.c:440) ==1445== by 0x41F4D5: _PyObject_VectorcallTstate (abstract.h:114) ==1445== by 0x41F4D5: PyObject_Vectorcall (abstract.h:123) ==1445== by 0x41F4D5: call_function (ceval.c:5111) ==1445== by 0x42220E: _PyEval_EvalFrameDefault (ceval.c:3542) ==1445== by 0x4E6882: _PyEval_EvalFrame (pycore_ceval.h:40) ==1445== by 0x4E6882: _PyEval_EvalCode (ceval.c:4366) ==1445== by 0x4E6A65: _PyEval_EvalCodeWithName (ceval.c:4398) ---------- messages: 370813 nosy: skrah, vstinner priority: normal severity: normal status: open title: Leaks in new free lists _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 04:24:48 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jun 2020 08:24:48 +0000 Subject: [issue40807] Codeop: Show warnings once during _maybe_compile In-Reply-To: <1590674108.19.0.341062869134.issue40807@roundup.psfhosted.org> Message-ID: <1591431888.97.0.177217168261.issue40807@roundup.psfhosted.org> miss-islington added the comment: New changeset c067183605cf84bb1a246635f52827251d0476f8 by Miss Islington (bot) in branch '3.8': bpo-40807: Show warnings once from codeop._maybe_compile (GH-20486) https://github.com/python/cpython/commit/c067183605cf84bb1a246635f52827251d0476f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 05:09:24 2020 From: report at bugs.python.org (SilentGhost) Date: Sat, 06 Jun 2020 09:09:24 +0000 Subject: [issue40885] Cannot pipe GzipFile into subprocess In-Reply-To: <1591405013.03.0.805954404624.issue40885@roundup.psfhosted.org> Message-ID: <1591434564.67.0.29657109733.issue40885@roundup.psfhosted.org> SilentGhost added the comment: > subprocess somehow gets a hold of the underlying file descriptor pointing to the compressed file, and ends up being fed the compressed bytes That is exactly what happens, and I'd wager this is not going to change. You could easily pass the decoded bytes into the process using input parameter. ---------- components: +Library (Lib) nosy: +SilentGhost, giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 06:09:05 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 06 Jun 2020 10:09:05 +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: <1591438145.93.0.968912639311.issue40614@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset f7ed4d4e83f5d9e85e244a1cbc460f26436ab24d by Shantanu in branch '3.8': bpo-40614: Respect feature version for f-string debug expressions (GH-20196) (GH-20466) https://github.com/python/cpython/commit/f7ed4d4e83f5d9e85e244a1cbc460f26436ab24d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 06:12:56 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 06 Jun 2020 10:12:56 +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: <1591438376.03.0.596313980693.issue40614@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 07:42:13 2020 From: report at bugs.python.org (=?utf-8?b?0JDQvdC00YDQtdC5INCa0LDQt9Cw0L3RhtC10LI=?=) Date: Sat, 06 Jun 2020 11:42:13 +0000 Subject: [issue40816] Add missed AsyncContextDecorator to contextlib In-Reply-To: <1590763993.17.0.319482222949.issue40816@roundup.psfhosted.org> Message-ID: <1591443733.64.0.350923781143.issue40816@roundup.psfhosted.org> ?????? ???????? added the comment: No, please look at the pull request. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 08:00:34 2020 From: report at bugs.python.org (=?utf-8?b?0JDQvdC00YDQtdC5INCa0LDQt9Cw0L3RhtC10LI=?=) Date: Sat, 06 Jun 2020 12:00:34 +0000 Subject: [issue40888] Add close method to queue Message-ID: <1591444834.07.0.323114052221.issue40888@roundup.psfhosted.org> New submission from ?????? ???????? : I have a problem with notifying all current subscribers and new subscribers about the closure of the queue and the reason. For example, I have a producer that reads messages from websocket or something else and send this to a queue, and several consumers (I do not know how many). If any exception occurred, then all current subscribers and subscribers which will be added later should know about this error. I tried to send an exception to a queue, but that did not help, because I have several consumers. Also, this will not protect new consumers. I propose to add a new close method with exc argument, which will throw an exception when calling the get method, and also throw an exception for all current _getters. ---------- components: asyncio messages: 370818 nosy: asvetlov, heckad, yselivanov priority: normal severity: normal status: open title: Add close method to queue _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 08:44:19 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jun 2020 12:44:19 +0000 Subject: [issue40870] Custom AST can crash Python (debug build) In-Reply-To: <1591350387.83.0.288817090794.issue40870@roundup.psfhosted.org> Message-ID: <1591447459.88.0.894398684668.issue40870@roundup.psfhosted.org> miss-islington added the comment: New changeset 68874a8502da440a1dc4746cf73262648b870aee by Batuhan Taskaya in branch 'master': bpo-40870: Invalidate usage of some constants with ast.Name (GH-20649) https://github.com/python/cpython/commit/68874a8502da440a1dc4746cf73262648b870aee ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 08:44:34 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jun 2020 12:44:34 +0000 Subject: [issue40870] Custom AST can crash Python (debug build) In-Reply-To: <1591350387.83.0.288817090794.issue40870@roundup.psfhosted.org> Message-ID: <1591447474.05.0.605498688546.issue40870@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19890 pull_request: https://github.com/python/cpython/pull/20675 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 08:44:41 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jun 2020 12:44:41 +0000 Subject: [issue40870] Custom AST can crash Python (debug build) In-Reply-To: <1591350387.83.0.288817090794.issue40870@roundup.psfhosted.org> Message-ID: <1591447481.24.0.537732428243.issue40870@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19891 pull_request: https://github.com/python/cpython/pull/20676 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 08:44:48 2020 From: report at bugs.python.org (Nehal Patel) Date: Sat, 06 Jun 2020 12:44:48 +0000 Subject: [issue40885] Cannot pipe GzipFile into subprocess In-Reply-To: <1591405013.03.0.805954404624.issue40885@roundup.psfhosted.org> Message-ID: <1591447488.22.0.113630791363.issue40885@roundup.psfhosted.org> Nehal Patel added the comment: In my use case, I was actually trying to stream a large gzip file from the cloud directly into subprocess without spilling onto disk or RAM i.e. the code actually looked something more like: r, w = os.pipe() # ... launch a thread to feed r with gzip.open(os.fdopen(w, 'rb')) as gz: res = subprocess.run("myexe", stdin=gz, capture_output=True) ## fyi, expected output is tiny (In my case, I could modify the executable to expect compressed input, so I chose that solution. Another possibility would have been to use subprocess.POpen twice, once with 'gzcat' and second with 'myexe') I agree that given how libgz works, it would be difficult to fix the problem. I would suggest finding a way to alert the user about this issue because it will in general be a very confusing situation when this happens. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 09:07:28 2020 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Jun 2020 13:07:28 +0000 Subject: [issue40643] Improve doc-strings for datetime.strftime & strptime In-Reply-To: <1589628564.12.0.439754688359.issue40643@roundup.psfhosted.org> Message-ID: <1591448848.46.0.0859948274711.issue40643@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 3.0 -> 4.0 pull_requests: +19892 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20677 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 09:49:09 2020 From: report at bugs.python.org (Ido Michael) Date: Sat, 06 Jun 2020 13:49:09 +0000 Subject: [issue40594] urljoin since 3.5 incorrectly filters out double slashes In-Reply-To: <1589198030.38.0.614579410038.issue40594@roundup.psfhosted.org> Message-ID: <1591451349.46.0.857410840881.issue40594@roundup.psfhosted.org> Ido Michael added the comment: I can take this ---------- nosy: +Ido Michael, taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 09:49:38 2020 From: report at bugs.python.org (Ido Michael) Date: Sat, 06 Jun 2020 13:49:38 +0000 Subject: [issue33689] Blank lines in .pth file cause a duplicate sys.path entry In-Reply-To: <1527634994.48.0.682650639539.issue33689@psf.upfronthosting.co.za> Message-ID: <1591451378.83.0.827059489231.issue33689@roundup.psfhosted.org> Change by Ido Michael : ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 09:50:43 2020 From: report at bugs.python.org (Ido Michael) Date: Sat, 06 Jun 2020 13:50:43 +0000 Subject: [issue40065] py39: remove deprecation note for xml.etree.cElementTree In-Reply-To: <1585163379.04.0.795433622529.issue40065@roundup.psfhosted.org> Message-ID: <1591451443.34.0.953452095818.issue40065@roundup.psfhosted.org> Ido Michael added the comment: Tal, is there a decision to this debate or can I just move the dep. warning? ---------- nosy: +Ido Michael, taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 10:05:06 2020 From: report at bugs.python.org (Ido Michael) Date: Sat, 06 Jun 2020 14:05:06 +0000 Subject: [issue33689] Blank lines in .pth file cause a duplicate sys.path entry In-Reply-To: <1527634994.48.0.682650639539.issue33689@psf.upfronthosting.co.za> Message-ID: <1591452306.91.0.405718705163.issue33689@roundup.psfhosted.org> Change by Ido Michael : ---------- keywords: +patch pull_requests: +19893 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20679 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 10:08:17 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 14:08:17 +0000 Subject: [issue40830] Certain uses of dictionary unpacking raise TypeError In-Reply-To: <1590869229.29.0.66661660878.issue40830@roundup.psfhosted.org> Message-ID: <1591452497.13.0.384980205337.issue40830@roundup.psfhosted.org> Terry J. Reedy added the comment: On Windows: works in installed 3.8.3, fails in 3.9.0b1. Works in freshly compiled 3.9 and master. The patch seems to have worked. Mark, is there any reason to not close this as fixed? ---------- nosy: +terry.reedy stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 10:17:11 2020 From: report at bugs.python.org (Ido Michael) Date: Sat, 06 Jun 2020 14:17:11 +0000 Subject: [issue33689] Blank lines in .pth file cause a duplicate sys.path entry In-Reply-To: <1527634994.48.0.682650639539.issue33689@psf.upfronthosting.co.za> Message-ID: <1591453031.46.0.775871199532.issue33689@roundup.psfhosted.org> Ido Michael added the comment: Created a PR: GH-20679 I did see some of the changes are already in the code for example, test_underpth_nosite_file.test_sity.py already had pth_lines filter out: ''. I think it's because this issue relevant only for 3.6? Or maybe this issue was solved already and this bug report is redundant ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 11:12:49 2020 From: report at bugs.python.org (Michael Felt) Date: Sat, 06 Jun 2020 15:12:49 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591456369.7.0.130958990417.issue39791@roundup.psfhosted.org> Michael Felt added the comment: The 'fancy' file name breaks on latin-1 character set. aixtools at gcc119:[/home/aixtools/python/py39-3.9] a4fa9a95153a3800dea60b3029b2dcaf8a4f6acb Lib/test/test_importlib/test_main.py < diff --git a/Lib/test/test_importlib/test_main.py b/Lib/test/test_importlib/test_main.py index 42a7999..7b18c3d 100644 --- a/Lib/test/test_importlib/test_main.py +++ b/Lib/test/test_importlib/test_main.py @@ -246,3 +246,19 @@ class TestEntryPoints(unittest.TestCase): """ with self.assertRaises(Exception): json.dumps(self.ep) + + def test_module(self): + assert self.ep.module == 'value' + + def test_attr(self): + assert self.ep.attr is None + + +class FileSystem(fixtures.OnSysPath, fixtures.SiteDir, unittest.TestCase): + def test_unicode_dir_on_sys_path(self): + """ + Ensure a Unicode subdirectory of a directory on sys.path + does not crash. + """ + fixtures.build_files({'?': {}}, prefix=self.site_dir) + list(distributions()) AIX bots fail with: Captured traceback ================== Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.9.edelsohn-aix-ppc64/build/Lib/test/test_importlib/test_main.py", line 263, in test_unicode_dir_on_sys_path fixtures.build_files({'\u2603': {}}, prefix=self.site_dir) File "/home/shager/cpython-buildarea/3.9.edelsohn-aix-ppc64/build/Lib/test/test_importlib/fixtures.py", line 202, in build_files full_name.mkdir() File "/home/shager/cpython-buildarea/3.9.edelsohn-aix-ppc64/build/Lib/pathlib.py", line 1309, in mkdir self._accessor.mkdir(self, mode) UnicodeEncodeError: 'latin-1' codec can't encode character '\u2603' in position 17: ordinal not in range(256) Test report =========== Failed tests: - test_importlib ---------- nosy: +Michael.Felt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 11:14:16 2020 From: report at bugs.python.org (Nathaniel Manista) Date: Sat, 06 Jun 2020 15:14:16 +0000 Subject: [issue34858] MappingProxy objects should JSON serialize just like a dictionary In-Reply-To: <1538358992.7.0.545547206417.issue34858@psf.upfronthosting.co.za> Message-ID: <1591456456.61.0.063356797149.issue34858@roundup.psfhosted.org> Nathaniel Manista added the comment: There's a great deal more additional discussion about this over at https://discuss.python.org/t/json-does-not-support-mapping-and-mutablemapping/2829, but I would like to heartily "hear hear" this issue for the way it is weird that json.dumps(frozendict.frozendict({'3':5})) does not evaluate to the string "{'3': 5}" and it's something that makes writing according to and teaching others to code according to the make-your-code-safer-by-using-immutability-in-all-possible-things principle. ---------- nosy: +Nathaniel Manista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 11:14:38 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 15:14:38 +0000 Subject: [issue5150] IDLE: add rstrip to Format menu In-Reply-To: <1233736664.4.0.115705275626.issue5150@psf.upfronthosting.co.za> Message-ID: <1591456478.83.0.927093045792.issue5150@roundup.psfhosted.org> Terry J. Reedy added the comment: Adding rstrip as it was then was done over a decade ago, and this issue was closed then. Improvements, as discussed immediately above have been added with other issues, or will be. I am rejecting the add-on idea of incorporating reindent.py as unneeded. (It should have been a new issue instead of re-opening this one.) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: IDLE to support reindent.py -> IDLE: add rstrip to Format menu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 11:30:59 2020 From: report at bugs.python.org (Nathaniel Manista) Date: Sat, 06 Jun 2020 15:30:59 +0000 Subject: [issue34858] MappingProxy objects should JSON serialize just like a dictionary In-Reply-To: <1538358992.7.0.545547206417.issue34858@psf.upfronthosting.co.za> Message-ID: <1591457459.02.0.150195042476.issue34858@roundup.psfhosted.org> Nathaniel Manista added the comment: Err, "... it's something that complicates writing code according to...", sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 11:58:56 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 15:58:56 +0000 Subject: [issue1350] IDLE - CallTips enhancement - show full doc-string in new window In-Reply-To: <1193540394.75.0.209428889105.issue1350@psf.upfronthosting.co.za> Message-ID: <1591459136.8.0.0227682514595.issue1350@roundup.psfhosted.org> Terry J. Reedy added the comment: I am not sure what to do with this. The addition of squeezer to Shell and ability to expand into textview makes this a bit less needed. It would have to be rewritten. It seems big, but a large part is revision of tests, which have since been moved to unittests in separate test files. ---------- nosy: -Saimadhav.Heblikar, gpolo, kbk, markroseman priority: normal -> low versions: +Python 3.10 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 11:59:56 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 15:59:56 +0000 Subject: [issue24826] ability to integrate editor, shell, debugger in one window In-Reply-To: <1438957748.57.0.555891700476.issue24826@psf.upfronthosting.co.za> Message-ID: <1591459196.21.0.504023402612.issue24826@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 Jun 6 12:01:46 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 16:01:46 +0000 Subject: [issue27965] Automatic .py extension when saving with IDLE on OSX In-Reply-To: <1473135606.27.0.92782184591.issue27965@psf.upfronthosting.co.za> Message-ID: <1591459306.03.0.0135464910197.issue27965@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE does not supply a default ext of .py on Windows or OS X for new file saves _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 12:02:22 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 16:02:22 +0000 Subject: [issue21152] Idle: timed autosave for shell (and maybe editor) window In-Reply-To: <1396599186.38.0.494576293163.issue21152@psf.upfronthosting.co.za> Message-ID: <1591459342.97.0.147950586559.issue21152@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 Jun 6 12:04:12 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 16:04:12 +0000 Subject: [issue1528593] Printing: No print dialog or page setup Message-ID: <1591459452.69.0.45372229446.issue1528593@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 Jun 6 12:09:03 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Jun 2020 16:09:03 +0000 Subject: [issue34858] MappingProxy objects should JSON serialize just like a dictionary In-Reply-To: <1538358992.7.0.545547206417.issue34858@psf.upfronthosting.co.za> Message-ID: <1591459743.48.0.507148531391.issue34858@roundup.psfhosted.org> Raymond Hettinger added the comment: +1 for reconsidering whether the json module should support mappings that don't inherit for dict. The decision not to support general mappings is ancient and predates a lot of modern tooling. The only worry is that the objects won't round-trip ? you could store a ChainMap but you wouldn't get a ChainMap back :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 12:11:08 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 16:11:08 +0000 Subject: [issue25352] Add 'make this my default python' to windows installs for Python3.5 and later In-Reply-To: <1444382005.62.0.6522456142.issue25352@psf.upfronthosting.co.za> Message-ID: <1591459868.15.0.890042072951.issue25352@roundup.psfhosted.org> Terry J. Reedy added the comment: The py launcher now prefered since at least a year ago. I believe the installer has the requested box. Hovering over taskbar icons pops up the version, and I think they now survive upgrades. (And none of these are idlelib issues.) ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 12:11:42 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 16:11:42 +0000 Subject: [issue25146] IDLE debugger could better visualize program execution In-Reply-To: <1442440221.76.0.764553903841.issue25146@psf.upfronthosting.co.za> Message-ID: <1591459902.49.0.231638007629.issue25146@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 Jun 6 12:12:19 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 16:12:19 +0000 Subject: [issue24781] Improve UX of IDLE Highlighting configuration tab In-Reply-To: <1438549335.27.0.888518387308.issue24781@psf.upfronthosting.co.za> Message-ID: <1591459939.11.0.755523992935.issue24781@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 Jun 6 12:26:52 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 16:26:52 +0000 Subject: [issue18823] Idle: use pipes instead of sockets to talk with user subprocess In-Reply-To: <1377300904.13.0.124289838176.issue18823@psf.upfronthosting.co.za> Message-ID: <1591460812.69.0.412173833542.issue18823@roundup.psfhosted.org> Terry J. Reedy added the comment: Problems with multiprocessing and tkinter on Mac might have been due to using the default start method, which used to be fork and is now spawn. This should be retested sometime. ---------- nosy: -kbk, roger.serwy versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 12:36:08 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 06 Jun 2020 16:36:08 +0000 Subject: [issue40888] Add close method to queue In-Reply-To: <1591444834.07.0.323114052221.issue40888@roundup.psfhosted.org> Message-ID: <1591461368.24.0.122883926782.issue40888@roundup.psfhosted.org> Eric V. Smith added the comment: You should probably bring this up on the python-ideas mailing list. ---------- nosy: +eric.smith type: -> enhancement versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 12:38:25 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 06 Jun 2020 16:38:25 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591461505.19.0.242228365807.issue39791@roundup.psfhosted.org> Jason R. Coombs added the comment: Thanks for the report Michael. I'm trying to figure out the best way to address the issue. That test is shared with importlib_metadata, so needs to run without CPython's test suite fixtures, such as the ones that generate non-ascii filenames. I'm tempted to just attempt to create the fixture and skip if the fixture fails. An alternate approach might be to attempt to load CPython's fixture, skip if that value is None, and fallback to the snowman otherwise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 13:04:45 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jun 2020 17:04:45 +0000 Subject: [issue40870] Custom AST can crash Python (debug build) In-Reply-To: <1591350387.83.0.288817090794.issue40870@roundup.psfhosted.org> Message-ID: <1591463085.47.0.788256581764.issue40870@roundup.psfhosted.org> miss-islington added the comment: New changeset 90ee51f1cd9e63cfe0f402392612f50fc1bea747 by Miss Islington (bot) in branch '3.9': bpo-40870: Invalidate usage of some constants with ast.Name (GH-20649) https://github.com/python/cpython/commit/90ee51f1cd9e63cfe0f402392612f50fc1bea747 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 13:04:50 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jun 2020 17:04:50 +0000 Subject: [issue40870] Custom AST can crash Python (debug build) In-Reply-To: <1591350387.83.0.288817090794.issue40870@roundup.psfhosted.org> Message-ID: <1591463090.9.0.499032507198.issue40870@roundup.psfhosted.org> miss-islington added the comment: New changeset 83a9ba442662c2a030b45955f3dd24ff4b24bb61 by Miss Islington (bot) in branch '3.8': bpo-40870: Invalidate usage of some constants with ast.Name (GH-20649) https://github.com/python/cpython/commit/83a9ba442662c2a030b45955f3dd24ff4b24bb61 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 13:06:56 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 17:06:56 +0000 Subject: [issue16123] IDLE - deprecate running without a subprocess In-Reply-To: <1349302429.82.0.0807471180715.issue16123@psf.upfronthosting.co.za> Message-ID: <1591463216.62.0.493305431013.issue16123@roundup.psfhosted.org> Terry J. Reedy added the comment: Deprecation has been done and a message is printed under the splash screen. With 5 more years of maintenance experience under deprecation, I have not experienced -n mode as a maintenance burden. So I have no inclination at present to remove it (or even implement any of the ideas above). Deprecation usually means 'no maintenance'. For idlelib, that means no new tests specifically for -n mode (and there never were any). I don't do manual tests either. (More patches and more testing in regular mode is more important to me.) It is possible that some feature has been disabled in that mode, but there are no such reports and I have not encountered anything in my occasional experiments in that mode. (Such as when someone claim that something only worked with -n.) I have occasionally touched blocks with 'if subprocess ... else ...' but it has not been hard to leave the else part alone. A year or so ago, I added a 'Startup failure' section to the IDLE doc. It list multiple possible causes and things to try. -n is irrelevant to most of them. If someone knows of another current issue, open a new tracker issue. ---------- dependencies: -Idle: use pipes instead of sockets to talk with user subprocess resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 13:10:05 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 06 Jun 2020 17:10:05 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591463405.31.0.184519709152.issue39791@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +19894 pull_request: https://github.com/python/cpython/pull/20681 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 13:09:59 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Jun 2020 17:09:59 +0000 Subject: [issue40889] Symmetric difference on dict_views is inefficient Message-ID: <1591463399.57.0.727941047538.issue40889@roundup.psfhosted.org> New submission from Raymond Hettinger : Running "d1.items() ^ d2.items()" will rehash every key and value in both dictionaries regardless of how much they overlap. By taking advantage of the known hashes, the analysis step could avoid making any calls to __hash__(). Only the result tuples would need to hashed. Currently the code below calls hash for every key and value on the left and for every key and value on the right: >>> left = {1: -1, 2: -2, 3: -3, 4: -4, 5: -5, 6: -6, 7: -7} >>> right = {1: -1, 2: -2, 3: -3, 4: -4, 5: -5, 8: -8, 9: -9} >>> left.items() ^ right.items() # Total work: 28 __hash__() calls {(6, -6), (7, -7), (8, -8), (9, -9)} Compare that with the workload for set symmetric difference which makes zero calls to __hash__(): >>> set(left) ^ set(right) {6, 7, 8, 9} FWIW, I do have an important use case where this matters. ---------- components: Interpreter Core messages: 370839 nosy: rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: Symmetric difference on dict_views is inefficient type: performance versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 13:12:33 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 06 Jun 2020 17:12:33 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591463553.71.0.650059279811.issue39791@roundup.psfhosted.org> Jason R. Coombs added the comment: See GH-20681 for a proposed fix. I've scheduled the build bots to run the patch. Will build bots prove the fix? If not, can you test the patch in the same environment where it was discovered? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 13:21:19 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Jun 2020 17:21:19 +0000 Subject: [issue40890] Dict views should be introspectable Message-ID: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> New submission from Raymond Hettinger : Dict views wrap an underlying mapping but don't expose that mapping as an attribute. Traditionally, we do expose wrapped objects: property() exposes fget, partial() exposes func, bound methods expose __func__, ChainMap() exposes maps, etc. Exposing this attribute would help with introspection, making it possible to write efficient functions that operate on dict views. ---------- components: Interpreter Core keywords: easy (C) messages: 370841 nosy: rhettinger priority: normal severity: normal status: open title: Dict views should be introspectable type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 13:26:34 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 06 Jun 2020 17:26:34 +0000 Subject: [issue40870] Custom AST can crash Python (debug build) In-Reply-To: <1591350387.83.0.288817090794.issue40870@roundup.psfhosted.org> Message-ID: <1591464394.97.0.84657805731.issue40870@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 Sat Jun 6 13:37:07 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 17:37:07 +0000 Subject: [issue7949] IDLE: avoid no-contrast popups and dialogs. In-Reply-To: <1266372113.11.0.0197701157976.issue7949@psf.upfronthosting.co.za> Message-ID: <1591465027.63.0.612444438684.issue7949@roundup.psfhosted.org> Terry J. Reedy added the comment: The IDLE Dark theme has been added and I use it routinely. Ttk widgets, including frames, are AFAIK used everywhere possible. We are not yet using ttk styles to configurable colors, but I would expect that the default style should always be viewable. My speculation is that this should prevent white-on-white or black-on-black. Mathias and Sureyya, do you see today the unusable combinations you say 10 and 7 years ago? Cheryl, are any of the issues described above possible on Ubuntu (today)? ---------- nosy: +cheryl.sabella title: IDLE: problems with dark GTK or KDE color schemes -> IDLE: avoid no-contrast popups and dialogs. versions: +Python 3.10 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 14:19:20 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 18:19:20 +0000 Subject: [issue27733] Test that self.bell is called in IDLE classes when intended. In-Reply-To: <1470888252.5.0.707581681371.issue27733@psf.upfronthosting.co.za> Message-ID: <1591467560.35.0.971073202153.issue27733@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 14:27:24 2020 From: report at bugs.python.org (hai shi) Date: Sat, 06 Jun 2020 18:27:24 +0000 Subject: [issue40891] Use pep573 in functools Message-ID: <1591468044.26.0.252061125305.issue40891@roundup.psfhosted.org> New submission from hai shi : petr have write a PR(adding a method: _PyType_GetModuleByDef) to supply pep573 in https://github.com/encukou/cpython/pull/4/commits/98dd889575cf7d1688495983ba791e14894a0bb8 So I try to use pep573 in functools again in: https://github.com/shihai1991/cpython/pull/5 >From the CI gate result, the only one question is a resource leak in functools(I am not find the leak reason now): https://github.com/shihai1991/cpython/pull/5/checks?check_run_id=743098116 some other discuss info in issue40137. ---------- components: Extension Modules messages: 370843 nosy: petr.viktorin, shihai1991, vstinner priority: normal severity: normal status: open title: Use pep573 in functools versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 15:01:26 2020 From: report at bugs.python.org (Bob Ippolito) Date: Sat, 06 Jun 2020 19:01:26 +0000 Subject: [issue34858] MappingProxy objects should JSON serialize just like a dictionary In-Reply-To: <1538358992.7.0.545547206417.issue34858@psf.upfronthosting.co.za> Message-ID: <1591470086.2.0.616084248582.issue34858@roundup.psfhosted.org> Bob Ippolito added the comment: I would certainly reconsider it at this point, I think a bona fide ABC *specific to JSON encoding* would be a good way to do it. simplejson has two ways to do this, the `for_json` parameter which will use a `for_json()` method on any object as the JSON representation if present, and the `namedtuple_as_object` parameter which will do the same for objects with an `_asdict()` method. As part of the standard library it might make more sense to rename `for_json()` to `__json__()` or similar. It is a bit unfortunate that you can't guarantee round-trip on deserialization, but that has always been the case. To get round-tripping (without tagging everything that has been encoded in some way like pickle does), you really should be working with a schema of some kind. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 15:23:27 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 19:23:27 +0000 Subject: [issue40892] IDLE: use rlcompleter suffixed for completions Message-ID: <1591471407.52.0.255326225411.issue40892@roundup.psfhosted.org> New submission from Terry J. Reedy : Tab completions may be suffixed with ' ' (keywords), ':' (keywords)*, or '(' (callables) if one of those is required. Ex. 'import ', 'finally:', 'len('. Attributes may get '('. The possible downside is needing to remove the suffix if one does not want the completion for what it is but as a prefix to a longer word. Ex. 'imports','elsewhere', 'length'. But this should be much less common in code. * 'else ' should be 'else:' With keywords added (#37765) tab list is sorted(Completer().global_match('') + list(__main__.dict__.keys())). Whatever decide on, calculate first part once (if not already). list.sort used preexisting order. key are sorted. builtins might be. ---------- messages: 370845 nosy: terry.reedy priority: normal severity: normal status: open title: IDLE: use rlcompleter suffixed for completions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 15:25:44 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 19:25:44 +0000 Subject: [issue27609] IDLE completions: format, factor, and fix In-Reply-To: <1469404988.71.0.674184496094.issue27609@psf.upfronthosting.co.za> Message-ID: <1591471544.48.0.121272689048.issue27609@roundup.psfhosted.org> Terry J. Reedy added the comment: 40892 Use prefixes from rlcompleter. Compute constant once. ---------- dependencies: +IDLE: use rlcompleter suffixed for completions versions: +Python 3.10 -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 15:30:11 2020 From: report at bugs.python.org (Zachary Ware) Date: Sat, 06 Jun 2020 19:30:11 +0000 Subject: [issue40314] python code order of magnitude faster than equivalent CPython code for simple import statement In-Reply-To: <1587162924.52.0.924325577944.issue40314@roundup.psfhosted.org> Message-ID: <1591471811.93.0.422743108998.issue40314@roundup.psfhosted.org> Zachary Ware added the comment: I've finally had a chance to try to reproduce this myself, and did. However, a subsequent run of `test.exe` showed exactly the same timing as the Python test, and even another attempt after removing and re-installing tensorflow showed comparable timing to the Python version. Can you reproduce the slow timing on multiple runs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 15:31:51 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 19:31:51 +0000 Subject: [issue17238] IDLE: Add import statement completion In-Reply-To: <1361287971.25.0.643782901011.issue17238@psf.upfronthosting.co.za> Message-ID: <1591471911.89.0.350476884125.issue17238@roundup.psfhosted.org> Terry J. Reedy added the comment: I opened #40892 for using rlcomplete suffixes. I should look as #25419 for patch and messages for import ideas. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 15:34:00 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 19:34:00 +0000 Subject: [issue27732] IDLE tests should be quiet In-Reply-To: <1470877350.75.0.899143333504.issue27732@psf.upfronthosting.co.za> Message-ID: <1591472040.26.0.254942093477.issue27732@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 15:35:17 2020 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 06 Jun 2020 19:35:17 +0000 Subject: [issue40724] Support buffer protocol with type specs In-Reply-To: <1590133862.04.0.206694262407.issue40724@roundup.psfhosted.org> Message-ID: <1591472117.81.0.997728450412.issue40724@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset f7c4e236429606e1c982cacf24e10fc86ef4462f by scoder in branch 'master': bpo-40724: Support setting buffer slots from type specs (GH-20648) https://github.com/python/cpython/commit/f7c4e236429606e1c982cacf24e10fc86ef4462f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 15:35:26 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 19:35:26 +0000 Subject: [issue27769] IDLE: Replace All up, no wrap replaces one up, all down In-Reply-To: <1471274021.81.0.142329752999.issue27769@psf.upfronthosting.co.za> Message-ID: <1591472126.97.0.69405403298.issue27769@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 15:35:34 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jun 2020 19:35:34 +0000 Subject: [issue40724] Support buffer protocol with type specs In-Reply-To: <1590133862.04.0.206694262407.issue40724@roundup.psfhosted.org> Message-ID: <1591472134.28.0.286252922864.issue40724@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +19895 pull_request: https://github.com/python/cpython/pull/20683 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 15:43:04 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 19:43:04 +0000 Subject: [issue21140] Idle: saving Shell or an OutputWindow should default to .txt In-Reply-To: <1396493259.83.0.13428125931.issue21140@psf.upfronthosting.co.za> Message-ID: <1591472584.34.0.534630352907.issue21140@roundup.psfhosted.org> Terry J. Reedy added the comment: There was a recent stackoverflow question in which newbie pulled shell log into editor and ran as is. Got SyntaxError as 'Python 3' start of startup message. ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 16:06:22 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 06 Jun 2020 20:06:22 +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: <1591473982.41.0.713608179343.issue40741@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: SQLite 3.32.2 is out: https://www.sqlite.org/releaselog/3_32_2.html >From the changelog: Fix a long-standing bug in the byte-code engine that can cause a COMMIT command report as success when in fact it failed to commit. Ticket 810dc8038872e212 I've created a PR for cpython-source-deps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 16:09:50 2020 From: report at bugs.python.org (E. Paine) Date: Sat, 06 Jun 2020 20:09:50 +0000 Subject: [issue40893] tkinter integrate TkDND support Message-ID: <1591474190.65.0.383574909158.issue40893@roundup.psfhosted.org> New submission from E. Paine : For years, the Python docs for the tkinter.dnd module (and prior Tkdnd module) have said that it will become deprecated once it has been replaced by TkDND bindings (I can find it back in the Python 2.2 docs ? https://docs.python.org/2.2/lib/node508.html). Despite this, I cannot find anywhere that the changes are actually proposed (have I missed something?!). Attached is a git diff of a draft of proposed changes for the tkinter library, tkinter docs and Windows installer. The changes to the tkinter library are designed so that TkDND is not required where tcl/tk is installed, and in particular I check before any call is made to the library that it has been successfully loaded so as to give the user a more helpful error message. I don?t feel it is ready to be a PR yet, unless that would be helpful, as I have not been able to extensively test on MacOS (I think I have sufficiently tested on Windows and Linux, though someone is bound to find a problem!). I also don?t feel it is ready for a PR because I would really appreciate if someone could take a serious look at the changes to the installer. I have got it working but I don?t really understand how the installer works and it is quite likely that the TkDND externals should have their own group and bindpath. On a similar note to the Windows installer, how do we declare to the Linux package maintainers that TkDND is now an optional dependency of Python? I cannot find a file where optional dependencies are mentioned, so is there some mechanism to notify them of the changes? I want to give credit where it is due and so it should be noted that new docs are very nearly just a ?translation? of the TkDND man page and that the changes in the tkinter library are (loosely) based on the TkinterDND bindings. I also have the relevant files for the cpython-source-deps and cpython-bin-deps repos, but would need someone with write permissions to create a ?tkdnd? branch in each of those repos before I create the PRs for them. I am very new to contributing and so have a few questions on what is expected of me: 1. What is required of a news entry, and where would it go (I am assuming Misc\NEWS.d\next\Library)? 2. Could such a change, though not particularly large for code, be considered a ?major new feature? (which would require a PEP)? If people don?t generally want to add TkDND bindings to the tkinter library, I would instead propose that we remove the note that the tkinter.dnd module will be deprecated (but leave the note about it being experimental). ---------- components: Tkinter files: tkdnd.diff keywords: patch messages: 370852 nosy: epaine priority: normal severity: normal status: open title: tkinter integrate TkDND support type: enhancement versions: Python 3.10 Added file: https://bugs.python.org/file49217/tkdnd.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 16:22:54 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 06 Jun 2020 20:22:54 +0000 Subject: [issue40830] Certain uses of dictionary unpacking raise TypeError In-Reply-To: <1590869229.29.0.66661660878.issue40830@roundup.psfhosted.org> Message-ID: <1591474974.74.0.577497686678.issue40830@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 17:13:26 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 06 Jun 2020 21:13:26 +0000 Subject: [issue35019] Allow ipaddres.IPv4/v6Address in asyncio.create_server In-Reply-To: <1539880104.22.0.788709270274.issue35019@psf.upfronthosting.co.za> Message-ID: <1591478006.34.0.982556348262.issue35019@roundup.psfhosted.org> R?mi Lapeyre added the comment: Issue 38952 is a duplicate of this. ---------- message_count: 4.0 -> 5.0 nosy: +remi.lapeyre nosy_count: 4.0 -> 5.0 pull_requests: +19896 versions: +Python 3.10, Python 3.9 pull_request: https://github.com/python/cpython/pull/17434 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 17:38:30 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 06 Jun 2020 21:38:30 +0000 Subject: [issue40882] memory leak in multiprocessing.shared_memory.SharedMemory in Windows In-Reply-To: <1591397225.82.0.932982465865.issue40882@roundup.psfhosted.org> Message-ID: <1591479510.18.0.107898872977.issue40882@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 5.0 -> 6.0 pull_requests: +19897 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20684 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 18:07:44 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 22:07:44 +0000 Subject: [issue27603] Migrate IDLE context menu items to shell extension In-Reply-To: <1469332799.74.0.70339682021.issue27603@psf.upfronthosting.co.za> Message-ID: <1591481264.26.0.510298009881.issue27603@roundup.psfhosted.org> Terry J. Reedy added the comment: Steve, is this out of date or still something that could be done in the code we control? Would you review and possibly merge a patch is submitted? (I don't know what 'shell extension' means.) ---------- versions: +Python 3.10 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 18:08:02 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 22:08:02 +0000 Subject: [issue27603] Migrate IDLE context menu items to shell extension In-Reply-To: <1469332799.74.0.70339682021.issue27603@psf.upfronthosting.co.za> Message-ID: <1591481282.91.0.0813487852995.issue27603@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- assignee: -> terry.reedy components: +Installation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 18:08:56 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 22:08:56 +0000 Subject: [issue27892] Idlelib: document or move delayed imports In-Reply-To: <1472522062.64.0.203498764549.issue27892@psf.upfronthosting.co.za> Message-ID: <1591481336.12.0.073783925501.issue27892@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 18:09:25 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 22:09:25 +0000 Subject: [issue29382] IDLE search and replace should use 'hit' tag instead of 'hilite' In-Reply-To: <1485565395.44.0.960082340731.issue29382@psf.upfronthosting.co.za> Message-ID: <1591481365.34.0.0330760427489.issue29382@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 18:10:34 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 06 Jun 2020 22:10:34 +0000 Subject: [issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action In-Reply-To: <1552354570.63.0.477016922618.issue36267@roundup.psfhosted.org> Message-ID: <1591481434.81.0.0139218610026.issue36267@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- versions: +Python 3.10, Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 18:13:51 2020 From: report at bugs.python.org (Timm Wagener) Date: Sat, 06 Jun 2020 22:13:51 +0000 Subject: [issue40894] asyncio.gather() cancelled() always False Message-ID: <1591481631.01.0.634103349075.issue40894@roundup.psfhosted.org> New submission from Timm Wagener : It seems like the future subclass returned by asyncio.gather() (_GatheringFuture) can never return True for future.cancelled() even after it's cancel() has been invoked successfully (returning True) and an await on it actually raised a CancelledError. This is in contrast to the behavior of normal Futures and it seems generally to be classified as a minor bug by developers. * Stackoverflow Post: https://stackoverflow.com/questions/61942306/asyncio-gather-task-cancelled-is-false-after-task-cancel * Github snippet: https://gist.github.com/timmwagener/dfed038dc2081c8b5a770e175ba3756b I have created a fix and will create a PR. It seemed rather easy to fix and the asyncio test suite still succeeds. So maybe this is a minor bug, whose fix has no backward-compatibility consequences. However, my understanding is that asyncio.gather() is scheduled for deprecation, so maybe changes in this area are on halt anyways!? ---- # excerpt from snippet async def main(): """Cancel a gather() future and child and return it.""" task_child = ensure_future(sleep(1.0)) future_gather = gather(task_child) future_gather.cancel() try: await future_gather except CancelledError: pass return future_gather, task_child # run future_gather, task_child = run(main()) # log gather state logger.info(future_gather.cancelled()) # False / UNEXPECTED / ASSUMED BUG logger.info(future_gather.done()) # True logger.info(future_gather.exception()) # CancelledError logger.info(future_gather._state) # FINISHED # log child state logger.info(task_child.cancelled()) # True logger.info(task_child.done()) # True # logger.info(task_child.exception()) Raises because _state is CANCELLED logger.info(task_child._state) # CANCELLED ---------- components: asyncio messages: 370855 nosy: asvetlov, timmwagener, yselivanov priority: normal severity: normal status: open title: asyncio.gather() cancelled() always False type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 18:13:54 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 22:13:54 +0000 Subject: [issue27922] Make IDLE tests less flashy In-Reply-To: <1472690016.39.0.67314028817.issue27922@psf.upfronthosting.co.za> Message-ID: <1591481634.06.0.156790729611.issue27922@roundup.psfhosted.org> Terry J. Reedy added the comment: After doing away with most of the flashes, we started adding tests using key and mouse event_generate, which seemed to require a visible GUI. So the goal seems a lost cause. If I revisit, a new issue. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 18:15:04 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 22:15:04 +0000 Subject: [issue30666] IDLE: add tests for autocomplete window. In-Reply-To: <1497464140.48.0.517260109183.issue30666@psf.upfronthosting.co.za> Message-ID: <1591481704.36.0.932767487437.issue30666@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 18:15:20 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 22:15:20 +0000 Subject: [issue30667] IDLE: revise doc subsection 'Completions' In-Reply-To: <1497464738.2.0.763247679228.issue30667@psf.upfronthosting.co.za> Message-ID: <1591481720.86.0.867799980526.issue30667@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 18:18:47 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 22:18:47 +0000 Subject: [issue6171] IDLE - TreeWidget draw and double-click (Ubuntu) In-Reply-To: <1243903612.81.0.195499978214.issue6171@psf.upfronthosting.co.za> Message-ID: <1591481927.43.0.472503846943.issue6171@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> works for me stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 18:20:53 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 22:20:53 +0000 Subject: [issue18064] IDLE: add current directory to open_module In-Reply-To: <1369517780.56.0.941397989466.issue18064@psf.upfronthosting.co.za> Message-ID: <1591482053.26.0.287012052432.issue18064@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 18:27:04 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 22:27:04 +0000 Subject: [issue18444] IDLE: Revise Mac OS X key bindings. In-Reply-To: <1373777050.16.0.963661085579.issue18444@psf.upfronthosting.co.za> Message-ID: <1591482424.48.0.446891203879.issue18444@roundup.psfhosted.org> Terry J. Reedy added the comment: Serhiy add IDLE Modern Unix a couple of years ago. Something similar is still needed for macOS. ---------- title: IDLE: Mac OS X pressing ctrl-A in Python shell moved cursor before the prompt, which then makes the keyboard unresponsive. -> IDLE: Revise Mac OS X key bindings. versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 18:27:52 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 22:27:52 +0000 Subject: [issue25036] IDLE - infrastructure changes so editors don't assume they're in a toplevel In-Reply-To: <1441753399.73.0.466397630291.issue25036@psf.upfronthosting.co.za> Message-ID: <1591482472.44.0.774980981539.issue25036@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: -kbk, roger.serwy versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 18:29:38 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 22:29:38 +0000 Subject: [issue25031] IDLE - file list improvements In-Reply-To: <1441727599.54.0.0383020553407.issue25031@psf.upfronthosting.co.za> Message-ID: <1591482578.62.0.379189431737.issue25031@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: -kbk, roger.serwy versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 18:31:20 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 22:31:20 +0000 Subject: [issue24996] IDLE: debugger local/global vars should not be editable In-Reply-To: <1441315753.96.0.0493251705052.issue24996@psf.upfronthosting.co.za> Message-ID: <1591482680.25.0.668702039482.issue24996@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 18:44:19 2020 From: report at bugs.python.org (Timm Wagener) Date: Sat, 06 Jun 2020 22:44:19 +0000 Subject: [issue40894] asyncio.gather() cancelled() always False In-Reply-To: <1591481631.01.0.634103349075.issue40894@roundup.psfhosted.org> Message-ID: <1591483459.68.0.256296376934.issue40894@roundup.psfhosted.org> Change by Timm Wagener : ---------- keywords: +patch pull_requests: +19898 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20686 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 19:09:26 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 23:09:26 +0000 Subject: [issue18330] Fix idlelib.PyShell.build_subprocess_arglist use of __import__ In-Reply-To: <1372543764.27.0.834894616208.issue18330@psf.upfronthosting.co.za> Message-ID: <1591484966.5.0.712861705943.issue18330@roundup.psfhosted.org> Terry J. Reedy added the comment: In #36429, the 'else' branch that did not work was deleted. The reason __import__ is discouraged is the reason for the repetition of 'run', in the line kept, as explained above. However, since the line works, it is not a bug, and I now prefer to leave it alone. If someone disables it, IDLE will not start. del_exitf was added for Visual IDLE -- VIDLE (sp?) Investigating whether it is still needed and possible deleting it is another issue. So is deprecating starting with PyShell, or having pyshell as main running tests in a development setting. ---------- resolution: -> not a bug stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 19:17:26 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 23:17:26 +0000 Subject: [issue22209] Idle: add better access to extension information In-Reply-To: <1408150641.09.0.182071744794.issue22209@psf.upfronthosting.co.za> Message-ID: <1591485446.17.0.24211120778.issue22209@roundup.psfhosted.org> Terry J. Reedy added the comment: Open on macOS Mohave now has an All files * filter option, and opening *.def is easy. If not true on every Mac still getting new versions of Python, too bad. ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 19:23:07 2020 From: report at bugs.python.org (Daniel Fortunov) Date: Sat, 06 Jun 2020 23:23:07 +0000 Subject: [issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation Message-ID: <1591485787.87.0.566129309531.issue40895@roundup.psfhosted.org> New submission from Daniel Fortunov : The doccumentation at https://docs.python.org/3.10/library/weakref.html cautions that the WeakKeyDictionary and WeakValueDictionary are susceptible to the problem of dictionary mutation during iteration. These notes present the user with a problem that has no easy solution. I dug into the implementation and found that fortunately, Antoine Pitrou already addressed this challenge (10 years ago!) by introducing an _IterationGuard context manager to the implementation, which delays mutation while an iteration is in progress. I asked for confirmation and Antoine agreed that these notes could be removed: https://github.com/python/cpython/commit/c1baa601e2b558deb690edfdf334fceee3b03327#commitcomment-39514438 ---------- assignee: docs at python components: Documentation messages: 370860 nosy: dfortunov, docs at python priority: normal severity: normal status: open title: weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 19:30:25 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 23:30:25 +0000 Subject: [issue22010] Idle: better management of Shell window output In-Reply-To: <1405732609.92.0.860307850836.issue22010@psf.upfronthosting.co.za> Message-ID: <1591486225.14.0.18686019471.issue22010@roundup.psfhosted.org> Terry J. Reedy added the comment: 1 is a another issue. 2. was partly taken care of by squeezer. 3 is needed. SyntaxError is often best handled by editing. 4 is still needed. Tab replacement will happen with a sidebar. ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 19:36:47 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 23:36:47 +0000 Subject: [issue17506] Improve IDLE news handling In-Reply-To: <1363852723.03.0.237286956936.issue17506@psf.upfronthosting.co.za> Message-ID: <1591486607.15.0.148205950606.issue17506@roundup.psfhosted.org> Terry J. Reedy added the comment: Separate news items are now consolidated during the release process. But two issue with copying them. 1. They are not line wrapped, whereas news.txt is. 2. I don't always make (or keep) entries identical. ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 19:39:26 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jun 2020 23:39:26 +0000 Subject: [issue27603] Migrate IDLE context menu items to shell extension In-Reply-To: <1469332799.74.0.70339682021.issue27603@psf.upfronthosting.co.za> Message-ID: <1591486766.68.0.118257625534.issue27603@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- assignee: terry.reedy -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 19:40:56 2020 From: report at bugs.python.org (Daniel Fortunov) Date: Sat, 06 Jun 2020 23:40:56 +0000 Subject: [issue31254] WeakKeyDictionary/Mapping doesn't call __missing__ In-Reply-To: <1503387072.25.0.0553627508053.issue31254@psf.upfronthosting.co.za> Message-ID: <1591486856.35.0.289620723439.issue31254@roundup.psfhosted.org> Change by Daniel Fortunov : ---------- keywords: +patch nosy: +dfortunov nosy_count: 4.0 -> 5.0 pull_requests: +19900 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20687 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 19:41:05 2020 From: report at bugs.python.org (Daniel Fortunov) Date: Sat, 06 Jun 2020 23:41:05 +0000 Subject: [issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation In-Reply-To: <1591485787.87.0.566129309531.issue40895@roundup.psfhosted.org> Message-ID: <1591486865.44.0.731509639492.issue40895@roundup.psfhosted.org> Change by Daniel Fortunov : ---------- keywords: +patch pull_requests: +19901 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20687 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 19:43:08 2020 From: report at bugs.python.org (Daniel Fortunov) Date: Sat, 06 Jun 2020 23:43:08 +0000 Subject: [issue7105] weak dict iterators are fragile because of unpredictable GC runs In-Reply-To: <1255282166.4.0.13882602695.issue7105@psf.upfronthosting.co.za> Message-ID: <1591486988.19.0.879090765902.issue7105@roundup.psfhosted.org> Change by Daniel Fortunov : ---------- nosy: +dfortunov nosy_count: 15.0 -> 16.0 pull_requests: +19902 pull_request: https://github.com/python/cpython/pull/20687 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 19:45:54 2020 From: report at bugs.python.org (Nathaniel Smith) Date: Sat, 06 Jun 2020 23:45:54 +0000 Subject: [issue31254] WeakKeyDictionary/Mapping doesn't call __missing__ In-Reply-To: <1503387072.25.0.0553627508053.issue31254@psf.upfronthosting.co.za> Message-ID: <1591487154.93.0.923628750403.issue31254@roundup.psfhosted.org> Change by Nathaniel Smith : ---------- pull_requests: -19900 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 20:20:06 2020 From: report at bugs.python.org (Edison Abahurire) Date: Sun, 07 Jun 2020 00:20:06 +0000 Subject: [issue40896] Missing links to Source Code in Documentation pages Message-ID: <1591489206.64.0.663736660712.issue40896@roundup.psfhosted.org> New submission from Edison Abahurire : Just below the Module heading, most library documenation pages like https://docs.python.org/3/library/datetime.html have a link to the source code in the form of `Source code: Lib/datetime.py` that links to the cpython github file of that module. Some modules like https://docs.python.org/3/library/time.html are missing this though and yet I think it would be quite useful for people who want to navigate the depths of the implementation. Now, the challenge is that most modules are not located in single code files but what if, instead of leaving it blank, we link to the folder that contains the code of that module? Wouldn't that be helpful? For example: For https://docs.python.org/3/library/wsgiref.html, we can add this https://github.com/python/cpython/tree/master/Lib/wsgiref as the link to source code. ---------- assignee: docs at python components: Documentation messages: 370863 nosy: docs at python, edison.abahurire, eric.araujo, ezio.melotti, mdk, willingc priority: normal severity: normal status: open title: Missing links to Source Code in Documentation pages type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 20:21:50 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 07 Jun 2020 00:21:50 +0000 Subject: [issue40894] asyncio.gather() cancelled() always False In-Reply-To: <1591481631.01.0.634103349075.issue40894@roundup.psfhosted.org> Message-ID: <1591489310.8.0.336414704638.issue40894@roundup.psfhosted.org> Kyle Stanley added the comment: Thank you for the bug report Timm. While I can certainly understand the source of the confusion here, I think you may be misunderstanding an important part of cancellation for futures. Specifically a future can't be cancelled once it reaches the PENDING state, this is indicated when future.cancel() returns false; see https://github.com/python/cpython/blob/0e96c419d7287c3c7f155c9f2de3c61020386256/Lib/asyncio/futures.py#L152 for the source code. In your example code snippet, you can also see this if you replace the line: ``` future_gather.cancel() ``` with the following: ``` if not future_gather.cancel(): logger.info("future_gather could not be cancelled") ``` Also, to clarify on something else: > However, my understanding is that asyncio.gather() is scheduled for deprecation, so maybe changes in this area are on halt anyways!? asyncio.gather() is not deprecated or scheduled for deprecation, it is simply the loop argument being deprecated. ---------- nosy: +aeros _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 21:04:06 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 07 Jun 2020 01:04:06 +0000 Subject: [issue31213] __context__ reset to None in nested exception In-Reply-To: <1502819039.28.0.810222147268.issue31213@psf.upfronthosting.co.za> Message-ID: <1591491846.74.0.43168448362.issue31213@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 22:01:08 2020 From: report at bugs.python.org (Evan Fagerberg) Date: Sun, 07 Jun 2020 02:01:08 +0000 Subject: [issue40864] spec_set/autospec/spec seems to not be reading attributes defined in class body In-Reply-To: <1591280927.55.0.854829069355.issue40864@roundup.psfhosted.org> Message-ID: <1591495268.77.0.269263800844.issue40864@roundup.psfhosted.org> Evan Fagerberg added the comment: Rereading the documentation, I see that a class attribute set to null will return a MagicMock for that attribute. That might be a reasonable workaround. Perhaps the more concrete solution would be that dir lists uninitialized class attributes and if a type hint is present the class attributes uses a spec of that type hint. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 22:41:00 2020 From: report at bugs.python.org (TheUltimatePineapple) Date: Sun, 07 Jun 2020 02:41:00 +0000 Subject: [issue40743] [CMake] It's 2020, where is CMake? In-Reply-To: <1590245768.91.0.904361700086.issue40743@roundup.psfhosted.org> Message-ID: <1591497660.53.0.547069592133.issue40743@roundup.psfhosted.org> TheUltimatePineapple added the comment: For me CPython has caused a lot of pain without having CMake. I have to manually compile CPython on each OS I want to support, having to fix the quirks on each build system and I have keep the built linkable blobs in my project which increases the repo size. It seems though the people here are so old-fashioned they don't see the point in CMake ?\_(?)_/? I don't think I can keep CPython adopted in my engine if it keeps being this way, I'll have to look into alternate scripting languages which don't rely on antiquated build systems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 23:14:07 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 07 Jun 2020 03:14:07 +0000 Subject: [issue40894] asyncio.gather() cancelled() always False In-Reply-To: <1591481631.01.0.634103349075.issue40894@roundup.psfhosted.org> Message-ID: <1591499647.93.0.374998392194.issue40894@roundup.psfhosted.org> Kyle Stanley added the comment: > Specifically a future can't be cancelled once it reaches the PENDING state, this is indicated when future.cancel() returns false; see https://github.com/python/cpython/blob/0e96c419d7287c3c7f155c9f2de3c61020386256/Lib/asyncio/futures.py#L152 for the source code Actually, I was mistaken in my previous message; sorry about that. It can *only* be cancelled when the state is PENDING. So, I suspect there's a race condition where the state is `PENDING` when future.cancel() is called, but transitions to `FINISHED` before the future is actually cancelled. I'll insert some logging in `future.cancel()` to verify this locally. The approach in PR-20686 has a fundamental problem though: simply because cancellation was requested does not mean the future was cancelled. So, we can't rely on checking ``self.done() and self._cancel_requested`` for future.cancelled() as this would mean that future.cancelled() would return true for a future that fully completed if `future.cancel()` was called after it finished (which is incorrect). I'll have to do some further investigation to determine the cause and a potential fix of the race condition. Thanks again for reporting it, and my apologies for the earlier mixup. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 23:25:10 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 07 Jun 2020 03:25:10 +0000 Subject: [issue40894] asyncio.gather() cancelled() always False In-Reply-To: <1591481631.01.0.634103349075.issue40894@roundup.psfhosted.org> Message-ID: <1591500310.23.0.509296283549.issue40894@roundup.psfhosted.org> Kyle Stanley added the comment: > So, we can't rely on checking ``self.done() and self._cancel_requested`` for future.cancelled() as this would mean that future.cancelled() would return true for a future that fully completed if `future.cancel()` was called after it finished (which is incorrect). This should be "was called *as* it finished", not "was called *after* it was finished". If gather_future.cancel() is called after the future is `FINISHED`, it will immediately return false since it checks `self.done()` first (https://github.com/python/cpython/blob/b8f67c0923ac85468dfbfd43375e0bbfb6ca50ea/Lib/asyncio/tasks.py#L727). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 23:36:24 2020 From: report at bugs.python.org (Tim Peters) Date: Sun, 07 Jun 2020 03:36:24 +0000 Subject: [issue40879] Strange regex cycle In-Reply-To: <1591390163.66.0.486591765961.issue40879@roundup.psfhosted.org> Message-ID: <1591500984.2.0.365925201091.issue40879@roundup.psfhosted.org> Tim Peters added the comment: Closing this as "Won't Fix", since the possibility of exponential-time behavior with naively written nested quantifiers is well known, and there are no plans to "do something" about that. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 23:37:38 2020 From: report at bugs.python.org (Edward Yang) Date: Sun, 07 Jun 2020 03:37:38 +0000 Subject: [issue40897] Inheriting from Generic causes inspect.signature to always return (*args, **kwargs) for constructor (and all subclasses) Message-ID: <1591501058.45.0.282415808867.issue40897@roundup.psfhosted.org> New submission from Edward Yang : Consider the following program: ``` import inspect from typing import Generic, TypeVar T = TypeVar('T') class A(Generic[T]): def __init__(self) -> None: pass print(inspect.signature(A)) ``` I expect inspect.signature to return () as the signature of the constructor of this function. However, I get this: ``` $ python3 foo.py (*args, **kwds) ``` Although it is true that one cannot generally rely on inspect.signature to always give the most accurate signature (because there may always be decorator or metaclass shenanigans getting in the way), in this particular case it seems especially undesirable because Python type annotations are supposed to be erased at runtime, and yet here inheriting from Generic (simply to add type annotations) causes a very clear change in runtime behavior. ---------- components: Library (Lib) messages: 370870 nosy: ezyang priority: normal severity: normal status: open title: Inheriting from Generic causes inspect.signature to always return (*args, **kwargs) for constructor (and all subclasses) type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 23:41:21 2020 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Jun 2020 03:41:21 +0000 Subject: [issue40743] [CMake] It's 2020, where is CMake? In-Reply-To: <1590245768.91.0.904361700086.issue40743@roundup.psfhosted.org> Message-ID: <1591501281.12.0.803584749296.issue40743@roundup.psfhosted.org> Ned Deily added the comment: Thanks for your suggestion but changing build systems is a *huge* undertaking for cPython thanks to the many different platforms that we have added support to over the years and the many, many customizations that have been made. cmake would certainly be one option; starting from scratch with modern autotools another. And there are many such others. But this is way beyond the scope of a standard feature enhancement. In fact, there have been some discussions around the PSF funding one or more persons to reimplement our Unix-y build system (note there is a separate build system for Windows platforms). As Christian suggests, one concrete step towards getting a new build system would be to write a detailed PEP and then discussing in the ideas and/or core-workflow groups; another would be to help secure funding. But without first steps like that, there won't be anything served by further discussions here. So I'm closing this issue. It could be re-opened in the future once there is consensus on an approach and implementation resources are identified. ---------- nosy: +ned.deily resolution: -> postponed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 23:54:31 2020 From: report at bugs.python.org (hai shi) Date: Sun, 07 Jun 2020 03:54:31 +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: <1591502071.14.0.954302391767.issue40521@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 6 23:56:10 2020 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Jun 2020 03:56:10 +0000 Subject: [issue17506] Improve IDLE news handling In-Reply-To: <1363852723.03.0.237286956936.issue17506@psf.upfronthosting.co.za> Message-ID: <1591502170.48.0.106203807234.issue17506@roundup.psfhosted.org> Ned Deily added the comment: A suggestion: rather than trying to maintain a separate IDLE news file ("don't repeat yourself), it might be much easier to link to the IDLE section in each releases's formatted CHANGELOG now included in Python 3 docsets. For example: https://docs.python.org/3/whatsnew/changelog.html#idle or https://docs.python.org/3.8/whatsnew/changelog.html#idle Yes, users would have to scroll down to each release's IDLE section but I suspect that wouldn't be a huge burden considering how infrequently change files are consulted. To be even more useful, IDLE could first attempt to find the changelog in the Python installer's bundled copy of the docset like the F1 key does. For example, with the macOS installer, the corresponding file URL is: file:///Library/Frameworks/Python.framework/Versions/3.8/Resources/English.lproj/Documentation/whatsnew/changelog.html#idle ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 00:00:08 2020 From: report at bugs.python.org (Ma Lin) Date: Sun, 07 Jun 2020 04:00:08 +0000 Subject: [issue40861] On Windows, liblzma is always built without optimization In-Reply-To: <1591263528.02.0.798205890082.issue40861@roundup.psfhosted.org> Message-ID: <1591502408.32.0.425793432637.issue40861@roundup.psfhosted.org> Ma Lin added the comment: Good catch. You can submit a PR to fix this. If you start from zero and do it slowly, it will take about a week or two. ---------- components: +Windows -Build nosy: +Ma Lin, paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 00:05:22 2020 From: report at bugs.python.org (hai shi) Date: Sun, 07 Jun 2020 04:05:22 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1591502722.77.0.802690790923.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19903 pull_request: https://github.com/python/cpython/pull/20689 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 00:10:13 2020 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Jun 2020 04:10:13 +0000 Subject: [issue40893] tkinter integrate TkDND support In-Reply-To: <1591474190.65.0.383574909158.issue40893@roundup.psfhosted.org> Message-ID: <1591503013.77.0.900125068367.issue40893@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +gpolo, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 00:14:46 2020 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Jun 2020 04:14:46 +0000 Subject: [issue40594] urljoin since 3.5 incorrectly filters out double slashes In-Reply-To: <1589198030.38.0.614579410038.issue40594@roundup.psfhosted.org> Message-ID: <1591503286.8.0.512346722905.issue40594@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 00:17:26 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 07 Jun 2020 04:17:26 +0000 Subject: [issue40897] Inheriting from Generic causes inspect.signature to always return (*args, **kwargs) for constructor (and all subclasses) In-Reply-To: <1591501058.45.0.282415808867.issue40897@roundup.psfhosted.org> Message-ID: <1591503446.8.0.829364491955.issue40897@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +gvanrossum, levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 02:14:28 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 07 Jun 2020 06:14:28 +0000 Subject: [issue40894] asyncio.gather() cancelled() always False In-Reply-To: <1591481631.01.0.634103349075.issue40894@roundup.psfhosted.org> Message-ID: <1591510468.81.0.973707001797.issue40894@roundup.psfhosted.org> Kyle Stanley added the comment: Upon further investigation, I've realized that the issue is just that the cancel() override for `_GatheringFuture` never sets its state to CANCELLED at any point (unlike its parent), and is instead going to always be set to FINISHED because of the `outer.set_exception()` (https://github.com/python/cpython/blob/b8f67c0923ac85468dfbfd43375e0bbfb6ca50ea/Lib/asyncio/tasks.py#L826 or https://github.com/python/cpython/blob/b8f67c0923ac85468dfbfd43375e0bbfb6ca50ea/Lib/asyncio/tasks.py#L791, depending on the arg for *return_exceptions*). Since we are unable to set the state of `_GatheringFuture` (at least not without causing side effects), I'm starting to agree that it makes sense to override the behavior for `cancelled()`. However, it might make more sense to replace the `self._cancel_requested` check with `isinstance(self.exception(), exceptions.CancelledError)`, as this more accurately indicates if and when the gather() was cancelled. I don't think we should rely on `self._cancel_requested` since it would be true before the future is actually cancelled and not always be correct since the gather() can be cancelled without setting `self._cancel_requested`. Here's one case where relying on `self._cancel_requested` for future_gather.cancelled() wouldn't work, based on a slight modification of the reproducer example: ``` async def main(): """Cancel a gather() future and child and return it.""" task_child = ensure_future(sleep(1.0)) future_gather = gather(task_child) task_child.cancel() try: await future_gather except asyncio.CancelledError: pass return future_gather, task_child ``` (Despite `await future_gather` raising a CancelError and effectively being cancelled, `future_gather.cancelled()` would return false since `self._cancel_requested` was never set to true.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 02:19:59 2020 From: report at bugs.python.org (Jonathan Hsu) Date: Sun, 07 Jun 2020 06:19:59 +0000 Subject: [issue39243] CDLL __init__ no longer supports name being passed as None when the handle is not None In-Reply-To: <1578394425.89.0.0381750651285.issue39243@roundup.psfhosted.org> Message-ID: <1591510799.03.0.712746526114.issue39243@roundup.psfhosted.org> Change by Jonathan Hsu : ---------- nosy: +Jonathan Hsu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 02:20:51 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 07 Jun 2020 06:20:51 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591510851.25.0.664392620921.issue40890@roundup.psfhosted.org> Dennis Sweeney added the comment: I'd be happy to write a PR. Method names could be "mapping", "target", "target_mapping", "target_dict", "referent_dict", etc. I like the choice of "target_mapping": d = dict() assert d is d.keys().target_mapping assert d is d.values().target_mapping assert d is d.items().target_mapping ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 02:28:49 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 07 Jun 2020 06:28:49 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591511329.53.0.872267861545.issue40890@roundup.psfhosted.org> Raymond Hettinger added the comment: Just "mapping" would suffice. That is variable name used in the ABCs, the name defined in the glossary, and the variable name used in ChainMap (in plural form). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 02:37:51 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 07 Jun 2020 06:37:51 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591511871.59.0.816756368504.issue40890@roundup.psfhosted.org> Dennis Sweeney added the comment: I think this will also require typing.MappingProxyType to change a bit, since it would make a proxy's underlying dict accessible: >>> d = dict() >>> proxy = MappingProxyType(d) >>> type(proxy.items()) is type(d.items()) # should be False True >>> proxy.items().mapping is d # should be False ??? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 02:57:16 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 07 Jun 2020 06:57:16 +0000 Subject: [issue40724] Support buffer protocol with type specs In-Reply-To: <1590133862.04.0.206694262407.issue40724@roundup.psfhosted.org> Message-ID: <1591513036.39.0.870581877006.issue40724@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- nosy: +remi.lapeyre nosy_count: 8.0 -> 9.0 pull_requests: +19904 pull_request: https://github.com/python/cpython/pull/20685 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 03:06:44 2020 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 07 Jun 2020 07:06:44 +0000 Subject: [issue40724] Support buffer protocol with type specs In-Reply-To: <1590133862.04.0.206694262407.issue40724@roundup.psfhosted.org> Message-ID: <1591513604.52.0.82798302162.issue40724@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 1e4fa91104a03c44baa241326102cbec42d387f1 by Miss Islington (bot) in branch '3.9': bpo-40724: Support setting buffer slots from type specs (GH-20648) (GH-20683) https://github.com/python/cpython/commit/1e4fa91104a03c44baa241326102cbec42d387f1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 03:08:37 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jun 2020 07:08:37 +0000 Subject: [issue40724] Support buffer protocol with type specs In-Reply-To: <1590133862.04.0.206694262407.issue40724@roundup.psfhosted.org> Message-ID: <1591513717.17.0.668977423232.issue40724@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19905 pull_request: https://github.com/python/cpython/pull/20690 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 03:28:11 2020 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 07 Jun 2020 07:28:11 +0000 Subject: [issue40724] Support buffer protocol with type specs In-Reply-To: <1590133862.04.0.206694262407.issue40724@roundup.psfhosted.org> Message-ID: <1591514891.45.0.475419405963.issue40724@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 1d711f2e31e02b2e9cbe4f109bf79541f56c35a2 by Miss Islington (bot) in branch '3.9': bpo-40724: Fix return type of test helper function heapctypewithbuffer_releasebuffer() (GH-20685) (GH-20690) https://github.com/python/cpython/commit/1d711f2e31e02b2e9cbe4f109bf79541f56c35a2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 03:29:43 2020 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 07 Jun 2020 07:29:43 +0000 Subject: [issue40724] Support buffer protocol with type specs In-Reply-To: <1590133862.04.0.206694262407.issue40724@roundup.psfhosted.org> Message-ID: <1591514983.8.0.428062623398.issue40724@roundup.psfhosted.org> Change by Stefan Behnel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 03:36:33 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 07 Jun 2020 07:36:33 +0000 Subject: [issue40741] Upgrade to SQLite v3.32 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1591515393.07.0.624555937711.issue40741@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- title: Upgrade to SQLite v3.32.1 in Windows and macOS builds -> Upgrade to SQLite v3.32 in Windows and macOS builds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 03:43:50 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 07 Jun 2020 07:43:50 +0000 Subject: [issue20178] Derby #9: Convert 52 sites to Argument Clinic across 11 files In-Reply-To: <1389140078.91.0.720761635456.issue20178@psf.upfronthosting.co.za> Message-ID: <1591515830.35.0.959550330139.issue20178@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 03:50:12 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 07 Jun 2020 07:50:12 +0000 Subject: [issue40617] sqlite3: expose sqlite3_create_window_function In-Reply-To: <1589395971.17.0.715578976108.issue40617@roundup.psfhosted.org> Message-ID: <1591516212.75.0.800762088923.issue40617@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Duplicate of bpo-34916 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 04:24:45 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 07 Jun 2020 08:24:45 +0000 Subject: [issue40896] Missing links to Source Code in Documentation pages In-Reply-To: <1591489206.64.0.663736660712.issue40896@roundup.psfhosted.org> Message-ID: <1591518285.62.0.921454165187.issue40896@roundup.psfhosted.org> R?mi Lapeyre added the comment: In the case of time, it's a C module. Those usually don't have a link to their implementation at the top. Others like wsgiref should have a link as having a quick way to read the implementation is a nice way to check on the implementation details and get acquainted with Python's internal. Could you open a PR to add those? ---------- nosy: +remi.lapeyre versions: +Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 04:56:02 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 07 Jun 2020 08:56:02 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591520162.2.0.159195547307.issue40890@roundup.psfhosted.org> Change by Dennis Sweeney : ---------- keywords: +patch pull_requests: +19906 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20691 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 05:02:24 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 07 Jun 2020 09:02:24 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591520544.56.0.845798531327.issue40890@roundup.psfhosted.org> Dennis Sweeney added the comment: Indeed, with PR 20691 applied, the following crashes: >>> vars(str).items().mapping.clear() >>> "uh oh" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 05:10:49 2020 From: report at bugs.python.org (hai shi) Date: Sun, 07 Jun 2020 09:10:49 +0000 Subject: [issue40898] Remove redundant if statements in tp_traverse Message-ID: <1591521049.7.0.876552225456.issue40898@roundup.psfhosted.org> New submission from hai shi : redundant if statements in itertools?_functools?_io, so remove it. ---------- components: Extension Modules messages: 370883 nosy: shihai1991 priority: normal severity: normal status: open title: Remove redundant if statements in tp_traverse versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 05:13:56 2020 From: report at bugs.python.org (hai shi) Date: Sun, 07 Jun 2020 09:13:56 +0000 Subject: [issue40898] Remove redundant if statements in tp_traverse In-Reply-To: <1591521049.7.0.876552225456.issue40898@roundup.psfhosted.org> Message-ID: <1591521236.07.0.475271236798.issue40898@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +19907 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20692 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 06:37:41 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 07 Jun 2020 10:37:41 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591526261.72.0.735179781382.issue40890@roundup.psfhosted.org> Dennis Sweeney added the comment: Would the best way to address this be adding new KeysProxy, ValuesProxy, and ItemsProxy types? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 06:57:10 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Jun 2020 10:57:10 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591527430.75.0.669043823659.issue40890@roundup.psfhosted.org> Serhiy Storchaka added the comment: I am not sure that it is good idea to expose internal details (do you want to expose also internal details of iterators?), but if expose an underlying dict of a dict view, I think it should be either a copy or a read-only proxy. It should be enough to help with introspection, but will not open the hole in integrity. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 06:58:03 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Jun 2020 10:58:03 +0000 Subject: [issue40898] Remove redundant if statements in tp_traverse In-Reply-To: <1591521049.7.0.876552225456.issue40898@roundup.psfhosted.org> Message-ID: <1591527483.01.0.782014483229.issue40898@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 07:03:35 2020 From: report at bugs.python.org (Timm Wagener) Date: Sun, 07 Jun 2020 11:03:35 +0000 Subject: [issue40894] asyncio.gather() cancelled() always False In-Reply-To: <1591481631.01.0.634103349075.issue40894@roundup.psfhosted.org> Message-ID: <1591527815.25.0.526507516359.issue40894@roundup.psfhosted.org> Timm Wagener added the comment: Hello Kyle, thanks for reviewing. > I'm starting to agree that it makes sense to override the behavior for `cancelled()`. However, it might make more sense to replace the `self._cancel_requested` check with `isinstance(self.exception(), exceptions.CancelledError)`, as this more accurately indicates if and when the gather() was cancelled. I don't think we should rely on `self._cancel_requested` since it would be true before the future is actually cancelled and not always be correct since the gather() can be cancelled without setting `self._cancel_requested`. My understanding of the current logic is, that there is a distinction between an explicit `gather().cancel()` and an external `child.cancel()`. This distinction is made by the `_cancel_requested` variable: * **Explicit gather.cancel():** Only an explicit cancellation of the gather task should result in `cancelled() is True`. This explicit cancellation is indicated by `_cancel_requested`. It works regardless of the `return_exceptions` kwarg. value. A `CancelledError` is always raised at the `await` site and `cancelled()` is True, provided that a previous `gather.cancel()` has been `True`. * **External invocation of child.cancel()/Implicit cancellation, finishing of gather:** In this case, no explicit user intent has caused a cancellation of gather. This is reflected by `_cancel_requested` being `False` and `gather.cancelled()` always being `False`. Instead based on the value of the `return_exceptions` kwarg.: * **False:** The normal `set_exception()` is invoked and the child exception is set on the gather future _(in this case a `CancelledError`)_ while also setting state to `FINISHED`. This results in the gather raising at the `await` site and finishing. What makes it slighty confusing though is the exception being a `CancelledError`. However, i believe its otherwise in line with how `Future.cancelled()` behaves for any exception. * **True:** `CancelledErrors` in children are collected and returned amongst other results and exceptions in a list. > Here's one case where relying on `self._cancel_requested` for future_gather.cancelled() wouldn't work, based on a slight modification of the reproducer example: As outlined above, i'd assume this falls into the category of _implicit cancellation, finishing of gather without user intent_ for which I'm assuming `cancelled()` should be `False`. However, as mentioned, this is just my assumption based on the logic. One could also take your viewpoint, that `cancelled()` should be `True` when `fut.exception()` is a `CancelledError`. > This should be "was called *as* it finished", not "was called *after* it was finished". If gather_future.cancel() is called after the future is `FINISHED`, it will immediately return false since it checks `self.done()` first I assume that these scenarios apply, when this like `current_task().cancel()` is happening in a `done()` callback or such? It seems like many (corner)-cases can be created and i'm certainly not aware of them. However, as `gather()` adds it's own callback first to its passed futures, and `outer` is not available beforehand for any done callback registration, i'm not sure how much of an effort one would have to make to create the case you described. But maybe I also didn't really understand the point you are getting at. > asyncio.gather() is not deprecated or scheduled for deprecation, it is simply the loop argument being deprecated. I was actually referring to [this PR comment](https://github.com/python/cpython/pull/6694#issuecomment-543445208) , which I happened to stumble upon while researching for the issue. > We'll likely have TaskGroups in asyncio 3.9 and will simply deprecate asyncio.gather. That's why I mentioned in the beginning that it may be a small, easy correctness improvement for a Python patch version if it's backwards compatible and not causing too much trouble. But maybe its also not considered that important anymore. I'd leave that up to the reviewers ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 07:08:14 2020 From: report at bugs.python.org (Johannes Buchner) Date: Sun, 07 Jun 2020 11:08:14 +0000 Subject: [issue40899] Ddcument exceptions raised by importlib.import Message-ID: <1591528094.81.0.814829435189.issue40899@roundup.psfhosted.org> New submission from Johannes Buchner : https://docs.python.org/3/library/functions.html#__import__ and https://docs.python.org/3/library/importlib.html#importlib.import_module do not list which Exceptions are raised in case the module cannot be imported. The two exceptions are listed here https://docs.python.org/3/library/exceptions.html#ImportError ModuleNotFoundError Could you add a half-sentence "and raises an ModuleNotFoundError if import was unsuccessful." to the function docs? ---------- assignee: docs at python components: Documentation messages: 370887 nosy: docs at python, j13r priority: normal severity: normal status: open title: Ddcument exceptions raised by importlib.import 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 Sun Jun 7 07:11:40 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Jun 2020 11:11:40 +0000 Subject: [issue40897] Inheriting from Generic causes inspect.signature to always return (*args, **kwargs) for constructor (and all subclasses) In-Reply-To: <1591501058.45.0.282415808867.issue40897@roundup.psfhosted.org> Message-ID: <1591528300.18.0.75542430356.issue40897@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is not special for Generic, but happens with every type implementing __new__. class A: def __new__(cls, a=1, *args, **kwargs): return object.__new__(cls) class B(A): def __init__(self, b): pass import inspect print(inspect.signature(B)) The above example prints "(a=1, *args, **kwargs)" instead of "(b)". ---------- nosy: +serhiy.storchaka, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 07:12:25 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Jun 2020 11:12:25 +0000 Subject: [issue40899] Document exceptions raised by importlib.import In-Reply-To: <1591528094.81.0.814829435189.issue40899@roundup.psfhosted.org> Message-ID: <1591528345.42.0.255913946271.issue40899@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- title: Ddcument exceptions raised by importlib.import -> Document exceptions raised by importlib.import _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 07:40:48 2020 From: report at bugs.python.org (Arkady) Date: Sun, 07 Jun 2020 11:40:48 +0000 Subject: [issue40860] Exception in multiprocessing/context.py under load In-Reply-To: <1591239973.04.0.347860195364.issue40860@roundup.psfhosted.org> Message-ID: <1591530048.4.0.667060963433.issue40860@roundup.psfhosted.org> Arkady added the comment: Is there any news about? This 50 lines sample reproduces the problem https://github.com/larytet-py/multiprocess Please let me know if more information is needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 08:05:53 2020 From: report at bugs.python.org (Inada Naoki) Date: Sun, 07 Jun 2020 12:05:53 +0000 Subject: [issue40898] Remove redundant if statements in tp_traverse In-Reply-To: <1591521049.7.0.876552225456.issue40898@roundup.psfhosted.org> Message-ID: <1591531553.04.0.480145292701.issue40898@roundup.psfhosted.org> Inada Naoki added the comment: Thanks. ---------- nosy: +inada.naoki resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 08:06:00 2020 From: report at bugs.python.org (Inada Naoki) Date: Sun, 07 Jun 2020 12:06:00 +0000 Subject: [issue40898] Remove redundant if statements in tp_traverse In-Reply-To: <1591521049.7.0.876552225456.issue40898@roundup.psfhosted.org> Message-ID: <1591531560.52.0.462607435477.issue40898@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 47a23fc63fa5df2da8dbc542e78e521d4a7f10c9 by Hai Shi in branch 'master': bpo-40898: Remove redundant if statements in tp_traverse (GH-20692) https://github.com/python/cpython/commit/47a23fc63fa5df2da8dbc542e78e521d4a7f10c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 08:11:53 2020 From: report at bugs.python.org (Inada Naoki) Date: Sun, 07 Jun 2020 12:11:53 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591531913.09.0.170849522863.issue40890@roundup.psfhosted.org> Inada Naoki added the comment: > Would the best way to address this be adding new KeysProxy, ValuesProxy, and ItemsProxy types? I feel it is too much. Until real high need is demonstrated, I don't want to introduce such complexity. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 08:35:52 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 07 Jun 2020 12:35:52 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591533352.45.0.29261229207.issue40890@roundup.psfhosted.org> R?mi Lapeyre added the comment: property, partial, bound methods and ChinMap all do something complex with the underlying object. Dict-views are quite simple by comparison, is there an example where this would be helpful and better than just passing directly the mapping object? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 08:55:47 2020 From: report at bugs.python.org (David CARLIER) Date: Sun, 07 Jun 2020 12:55:47 +0000 Subject: [issue40900] uuid module build fix on FreeBSD proposal Message-ID: <1591534547.12.0.261389892929.issue40900@roundup.psfhosted.org> Change by David CARLIER : ---------- components: FreeBSD nosy: devnexen, koobs priority: normal pull_requests: 19908 severity: normal status: open title: uuid module build fix on FreeBSD proposal type: compile error versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 08:59:45 2020 From: report at bugs.python.org (Sam Bull) Date: Sun, 07 Jun 2020 12:59:45 +0000 Subject: [issue38364] inspect.iscoroutinefunction / isgeneratorfunction / isasyncgenfunction can't handle partialmethod objects In-Reply-To: <1570109324.07.0.792957059658.issue38364@roundup.psfhosted.org> Message-ID: <1591534785.12.0.222102767065.issue38364@roundup.psfhosted.org> Change by Sam Bull : ---------- nosy: +dreamsorcerer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 09:17:37 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Sun, 07 Jun 2020 13:17:37 +0000 Subject: [issue40901] It's not clear what "interface name" means in socket if_nameindex/if_nametoindex/if_indextoname on Windows Message-ID: <1591535857.64.0.826872278568.issue40901@roundup.psfhosted.org> New submission from Jakub Stasiak : On Windows there are different names for the same interface in different contexts. ---------- components: Library (Lib), Windows messages: 370894 nosy: jstasiak, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: It's not clear what "interface name" means in socket if_nameindex/if_nametoindex/if_indextoname on Windows type: enhancement versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 09:23:08 2020 From: report at bugs.python.org (Sanmitha) Date: Sun, 07 Jun 2020 13:23:08 +0000 Subject: [issue40710] IDLE: Malfunctioning of '\r' In-Reply-To: <1590054301.73.0.843640972851.issue40710@roundup.psfhosted.org> Message-ID: <1591536188.47.0.839165906562.issue40710@roundup.psfhosted.org> Sanmitha added the comment: This issue is not based on Windows or my terminal. This is purely an IDLE error. In Windows, both in command prompt and powershell \r functions properly. ---------- versions: +Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file49218/Screenshot_20200607-185043.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 09:23:23 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Sun, 07 Jun 2020 13:23:23 +0000 Subject: [issue40901] It's not clear what "interface name" means in socket if_nameindex/if_nametoindex/if_indextoname on Windows In-Reply-To: <1591535857.64.0.826872278568.issue40901@roundup.psfhosted.org> Message-ID: <1591536203.01.0.624102775433.issue40901@roundup.psfhosted.org> Change by Jakub Stasiak : ---------- keywords: +patch pull_requests: +19909 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20694 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 09:27:00 2020 From: report at bugs.python.org (Sanmitha) Date: Sun, 07 Jun 2020 13:27:00 +0000 Subject: [issue40710] IDLE: Malfunctioning of '\r' In-Reply-To: <1590054301.73.0.843640972851.issue40710@roundup.psfhosted.org> Message-ID: <1591536420.04.0.92680955383.issue40710@roundup.psfhosted.org> Sanmitha added the comment: This issue is not based on Windows or my terminal. This is purely an IDLE error. In Windows, both in command prompt and powershell \r functions properly. ---------- status: closed -> open Added file: https://bugs.python.org/file49219/Screenshot_20200607-185043.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 09:27:35 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Sun, 07 Jun 2020 13:27:35 +0000 Subject: [issue40901] It's not clear what "interface name" means in socket if_nameindex/if_nametoindex/if_indextoname on Windows In-Reply-To: <1591535857.64.0.826872278568.issue40901@roundup.psfhosted.org> Message-ID: <1591536455.1.0.416448260256.issue40901@roundup.psfhosted.org> Jakub Stasiak added the comment: if_nameindex(), if_indextoname() and if_nametoindex() have been implemented as part of https://bugs.python.org/issue37007 While working on ifaddr I discovered that all three different kinds of names ifaddr fetches for an interface on Windows are not what Python socket functions use so I thought it'd be useful to document it for the next person who bumps into this. ---------- nosy: +ZackerySpytz, dtantsur _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 09:36:51 2020 From: report at bugs.python.org (Jonathan Haigh) Date: Sun, 07 Jun 2020 13:36:51 +0000 Subject: [issue40365] argparse: action "extend" with 1 parameter splits strings into characters In-Reply-To: <1587577356.91.0.833148420465.issue40365@roundup.psfhosted.org> Message-ID: <1591537011.55.0.392582955482.issue40365@roundup.psfhosted.org> Jonathan Haigh added the comment: The situation for type=int and unspecified nargs or nargs="?" is also surprising: Python 3.8.3 (default, May 21 2020, 12:19:36) [GCC 9.2.1 20191008] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import argparse >>> p = argparse.ArgumentParser() >>> p.add_argument("--c", action="extend", type=int) _ExtendAction(option_strings=['--c'], dest='c', nargs=None, const=None, default=None, type=, choices=None, help=None, metavar=None) >>> p.parse_args("--c 1".split()) Traceback (most recent call last): File "", line 1, in File "/home/jonathan/.pyenv/versions/3.8.3/lib/python3.8/argparse.py", line 1768, in parse_args args, argv = self.parse_known_args(args, namespace) File "/home/jonathan/.pyenv/versions/3.8.3/lib/python3.8/argparse.py", line 1800, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/home/jonathan/.pyenv/versions/3.8.3/lib/python3.8/argparse.py", line 2006, in _parse_known_args start_index = consume_optional(start_index) File "/home/jonathan/.pyenv/versions/3.8.3/lib/python3.8/argparse.py", line 1946, in consume_optional take_action(action, args, option_string) File "/home/jonathan/.pyenv/versions/3.8.3/lib/python3.8/argparse.py", line 1874, in take_action action(self, namespace, argument_values, option_string) File "/home/jonathan/.pyenv/versions/3.8.3/lib/python3.8/argparse.py", line 1171, in __call__ items.extend(values) TypeError: 'int' object is not iterable >>> p = argparse.ArgumentParser() >>> p.add_argument("--c", action="extend", type=int, nargs="?") _ExtendAction(option_strings=['--c'], dest='c', nargs='?', const=None, default=None, type=, choices=None, help=None, metavar=None) >>> p.parse_args("--c 1".split()) Traceback (most recent call last): File "", line 1, in File "/home/jonathan/.pyenv/versions/3.8.3/lib/python3.8/argparse.py", line 1768, in parse_args args, argv = self.parse_known_args(args, namespace) File "/home/jonathan/.pyenv/versions/3.8.3/lib/python3.8/argparse.py", line 1800, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/home/jonathan/.pyenv/versions/3.8.3/lib/python3.8/argparse.py", line 2006, in _parse_known_args start_index = consume_optional(start_index) File "/home/jonathan/.pyenv/versions/3.8.3/lib/python3.8/argparse.py", line 1946, in consume_optional take_action(action, args, option_string) File "/home/jonathan/.pyenv/versions/3.8.3/lib/python3.8/argparse.py", line 1874, in take_action action(self, namespace, argument_values, option_string) File "/home/jonathan/.pyenv/versions/3.8.3/lib/python3.8/argparse.py", line 1171, in __call__ items.extend(values) TypeError: 'int' object is not iterable >>> I suggest that the default nargs for extend should be "*" or "+" and an exception should be raised if nargs is given as "?". I don't see the current behaviour with unspecified nargs or nargs="?" being useful (and it certainly is surprising). In both cases, I think the least surprising behaviour would be for extend to act the same as append (or for an exception to be raised). > But I wonder, was this situation discussed in the original bug/issue? Doesn't look like it: https://bugs.python.org/issue23378 https://github.com/python/cpython/commit/aa32a7e1116f7aaaef9fec453db910e90ab7b101 ---------- nosy: +Jonathan Haigh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 10:16:17 2020 From: report at bugs.python.org (hai shi) Date: Sun, 07 Jun 2020 14:16:17 +0000 Subject: [issue40898] Remove redundant if statements in tp_traverse In-Reply-To: <1591521049.7.0.876552225456.issue40898@roundup.psfhosted.org> Message-ID: <1591539377.38.0.0447493386276.issue40898@roundup.psfhosted.org> hai shi added the comment: Thanks, Inada :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 10:22:10 2020 From: report at bugs.python.org (Edison Abahurire) Date: Sun, 07 Jun 2020 14:22:10 +0000 Subject: [issue40896] Missing links to Source Code in Documentation pages In-Reply-To: <1591489206.64.0.663736660712.issue40896@roundup.psfhosted.org> Message-ID: <1591539730.95.0.388702366885.issue40896@roundup.psfhosted.org> Edison Abahurire added the comment: Thanks for the review. I'll open a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 10:23:57 2020 From: report at bugs.python.org (Edison Abahurire) Date: Sun, 07 Jun 2020 14:23:57 +0000 Subject: [issue40643] Improve doc-strings for datetime.strftime & strptime In-Reply-To: <1589628564.12.0.439754688359.issue40643@roundup.psfhosted.org> Message-ID: <1591539837.11.0.681396782731.issue40643@roundup.psfhosted.org> Edison Abahurire added the comment: Update: I opened a PR for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 10:24:18 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jun 2020 14:24:18 +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: <1591539858.9.0.269386524324.issue39573@roundup.psfhosted.org> STINNER Victor added the comment: Note: numpy was updated to also the use the macros using ", (void)0": https://github.com/numpy/numpy/commit/f1671076c80bd972421751f2d48186ee9ac808aa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 10:57:49 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 07 Jun 2020 14:57:49 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591541869.76.0.768821624506.issue39791@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 2efe18bf277dd0f38a1d248ae6bdd30947c26880 by Jason R. Coombs in branch 'master': bpo-39791: Support file systems that cannot support non-ascii filenames (skipping tests in that case). (#20681) https://github.com/python/cpython/commit/2efe18bf277dd0f38a1d248ae6bdd30947c26880 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 10:58:02 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jun 2020 14:58:02 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591541882.57.0.168146777295.issue39791@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19910 pull_request: https://github.com/python/cpython/pull/20695 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 11:17:54 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jun 2020 15:17:54 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591543074.09.0.148694626156.issue39791@roundup.psfhosted.org> miss-islington added the comment: New changeset 71f501698d64af6463246bc6efdbbf1b85616102 by Miss Islington (bot) in branch '3.9': bpo-39791: Support file systems that cannot support non-ascii filenames (skipping tests in that case). (GH-20681) https://github.com/python/cpython/commit/71f501698d64af6463246bc6efdbbf1b85616102 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 11:27:15 2020 From: report at bugs.python.org (Timm Wagener) Date: Sun, 07 Jun 2020 15:27:15 +0000 Subject: [issue40894] asyncio.gather() cancelled() always False In-Reply-To: <1591481631.01.0.634103349075.issue40894@roundup.psfhosted.org> Message-ID: <1591543635.08.0.898941986986.issue40894@roundup.psfhosted.org> Timm Wagener added the comment: TLDR; ----- The intention of the PR is to make a future from gather return that cancelled() is True if, and only if, cancel() has successfully been called on it (explicit user intent) and it was awaited/has finished. All other finishing is not considered explicit user intent and has the state FINISHED (with exception or result), even if the exception is a CancelledError. As mentioned, just my interpretation based on the logic i've seen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 11:35:43 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jun 2020 15:35:43 +0000 Subject: [issue40900] uuid module build fix on FreeBSD proposal Message-ID: <1591544143.85.0.748554475357.issue40900@roundup.psfhosted.org> New submission from Christian Heimes : Please explain which problem you are facing and how your proposal is going to fix the problem. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 12:22:59 2020 From: report at bugs.python.org (paul j3) Date: Sun, 07 Jun 2020 16:22:59 +0000 Subject: [issue40862] argparse.BooleanOptionalAction accept and silently discard its the const argument In-Reply-To: <1591271988.48.0.105166319.issue40862@roundup.psfhosted.org> Message-ID: <1591546979.95.0.9363079099.issue40862@roundup.psfhosted.org> Change by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 12:32:17 2020 From: report at bugs.python.org (paul j3) Date: Sun, 07 Jun 2020 16:32:17 +0000 Subject: [issue40615] unstable behaviour for options in argparse In-Reply-To: <1589370586.91.0.862968954668.issue40615@roundup.psfhosted.org> Message-ID: <1591547537.85.0.751550485882.issue40615@roundup.psfhosted.org> Change by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 13:04:33 2020 From: report at bugs.python.org (David CARLIER) Date: Sun, 07 Jun 2020 17:04:33 +0000 Subject: [issue40900] uuid module build fix on FreeBSD proposal In-Reply-To: <1591544143.85.0.748554475357.issue40900@roundup.psfhosted.org> Message-ID: <1591549473.41.0.126534980844.issue40900@roundup.psfhosted.org> David CARLIER added the comment: This s about header picked up in a certain order. In case of FreeBSD, the uui_create case is taken which comes from the but ... is detected too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 13:06:50 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 07 Jun 2020 17:06:50 +0000 Subject: [issue36750] test_socket leaks file descriptors on macOS In-Reply-To: <1556526404.64.0.613873773496.issue36750@roundup.psfhosted.org> Message-ID: <1591549610.6.0.0383224581727.issue36750@roundup.psfhosted.org> R?mi Lapeyre added the comment: I think I stumbled on this too, I think the test that causes some issue is testCmsgTrunc2Int: ./python -m test -R: test_socket -m testCmsgTrunc2Int 0:00:00 load avg: 1.66 Run tests sequentially 0:00:00 load avg: 1.66 [1/1] test_socket beginning 9 repetitions 123456789 ......... test_socket leaked [2, 2, 2, 2] file descriptors, sum=8 test_socket failed == Tests result: FAILURE == 1 test failed: test_socket Total duration: 2.0 sec Tests result: FAILURE There is some file descriptors that are created by newFDs() but they are supposed to be cleaned up, maybe it is some race condition as I see that test_socket create a thread for each test? ---------- nosy: +remi.lapeyre versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 13:16:01 2020 From: report at bugs.python.org (Antony Lee) Date: Sun, 07 Jun 2020 17:16:01 +0000 Subject: [issue31254] WeakKeyDictionary/Mapping doesn't call __missing__ In-Reply-To: <1503387072.25.0.0553627508053.issue31254@psf.upfronthosting.co.za> Message-ID: <1591550161.61.0.521176466095.issue31254@roundup.psfhosted.org> Change by Antony Lee : ---------- nosy: -Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 14:59:17 2020 From: report at bugs.python.org (Ralf Gommers) Date: Sun, 07 Jun 2020 18:59:17 +0000 Subject: [issue40897] Inheriting from Generic causes inspect.signature to always return (*args, **kwargs) for constructor (and all subclasses) In-Reply-To: <1591501058.45.0.282415808867.issue40897@roundup.psfhosted.org> Message-ID: <1591556357.81.0.619506457498.issue40897@roundup.psfhosted.org> Change by Ralf Gommers : ---------- nosy: +ralf.gommers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 15:22:02 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 07 Jun 2020 19:22:02 +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: <1591557722.88.0.153283299004.issue40823@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Berker, do you have any objections to this change? ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 15:51:50 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 19:51:50 +0000 Subject: [issue40710] IDLE: Malfunctioning of '\r' In-Reply-To: <1590054301.73.0.843640972851.issue40710@roundup.psfhosted.org> Message-ID: <1591559510.1.0.430738175663.issue40710@roundup.psfhosted.org> Change by Terry J. Reedy : Removed file: https://bugs.python.org/file49219/Screenshot_20200607-185043.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 15:51:25 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 19:51:25 +0000 Subject: [issue40710] IDLE: Malfunctioning of '\r' In-Reply-To: <1590054301.73.0.843640972851.issue40710@roundup.psfhosted.org> Message-ID: <1591559485.72.0.935103997123.issue40710@roundup.psfhosted.org> Change by Terry J. Reedy : Removed file: https://bugs.python.org/file49179/r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 15:55:13 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 19:55:13 +0000 Subject: [issue40710] IDLE: Malfunctioning of '\r' In-Reply-To: <1590054301.73.0.843640972851.issue40710@roundup.psfhosted.org> Message-ID: <1591559713.78.0.351861942149.issue40710@roundup.psfhosted.org> Terry J. Reedy added the comment: Please stop spamming. This is a duplicate of an existing issue. ---------- status: open -> closed 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 Jun 7 16:33:08 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 20:33:08 +0000 Subject: [issue21673] Idle: hilite search terms in hits in Find in Files output window In-Reply-To: <1401998998.56.0.521906820097.issue21673@psf.upfronthosting.co.za> Message-ID: <1591561988.53.0.128236627468.issue21673@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 16:34:42 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 20:34:42 +0000 Subject: [issue18504] IDLE: Improve Mock_Text In-Reply-To: <1374238852.66.0.963662486602.issue18504@psf.upfronthosting.co.za> Message-ID: <1591562082.39.0.13381846861.issue18504@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 16:42:29 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 20:42:29 +0000 Subject: [issue20403] Idle options dialog: add help In-Reply-To: <1390794087.42.0.95323934944.issue20403@psf.upfronthosting.co.za> Message-ID: <1591562549.22.0.451031964241.issue20403@roundup.psfhosted.org> Terry J. Reedy added the comment: The help file is help.html. Pulling snippet from this would be rather awkward. The suggested additions to help.txt more or less duplicate the Setting preferences subsection. So closing. ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 16:44:27 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 20:44:27 +0000 Subject: [issue18583] Idle: enhance FormatParagraph In-Reply-To: <1375065577.4.0.851490009653.issue18583@psf.upfronthosting.co.za> Message-ID: <1591562667.28.0.521335757658.issue18583@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 16:48:30 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 20:48:30 +0000 Subject: [issue21473] Idle: test startup scripts. In-Reply-To: <1399854732.22.0.268177430342.issue21473@psf.upfronthosting.co.za> Message-ID: <1591562910.33.0.623740643363.issue21473@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 16:58:06 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 20:58:06 +0000 Subject: [issue17583] IDLE HOWTO In-Reply-To: <1364685156.29.0.769214841654.issue17583@psf.upfronthosting.co.za> Message-ID: <1591563486.23.0.991753642762.issue17583@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 17:37:55 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 21:37:55 +0000 Subject: [issue1074333] On linux, numeric pad input is ignored when numlock off Message-ID: <1591565875.56.0.398861489005.issue1074333@roundup.psfhosted.org> Terry J. Reedy added the comment: Summary: (Graves, msg23356, 2004-12-24) tk event for keypad keys depends on system keymap. Windows: numlock off, keypad up (8) is . Linux: same is and Text does *not* see this as (Polo, msg86364, 2009-04-23) Workaround is to capture both events and tk:call multiple upsupported internal tk functions. In the absence of more contemporary complaints by Linux users, closing. ---------- nosy: -ajaksu2, gpolo, jlgijsbers, kbk, netvigator resolution: accepted -> third party stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 17:57:41 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 21:57:41 +0000 Subject: [issue19042] Idle: run from editor without explicit save In-Reply-To: <1379438454.05.0.402533666166.issue19042@psf.upfronthosting.co.za> Message-ID: <1591567061.68.0.131356551822.issue19042@roundup.psfhosted.org> Terry J. Reedy added the comment: #5680 June 2019 also added no restart. Some other ideas are possible additions in new issues. ---------- resolution: -> out of date stage: test needed -> resolved status: open -> closed versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 17:58:30 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 21:58:30 +0000 Subject: [issue30719] IDLE: Make PyShell visible upon error. In-Reply-To: <1498001740.77.0.0953898655235.issue30719@psf.upfronthosting.co.za> Message-ID: <1591567110.16.0.290280439375.issue30719@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 17:59:21 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 21:59:21 +0000 Subject: [issue17238] IDLE: Add import statement completion In-Reply-To: <1361287971.25.0.643782901011.issue17238@psf.upfronthosting.co.za> Message-ID: <1591567161.1.0.414821301123.issue17238@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:00:04 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 22:00:04 +0000 Subject: [issue27620] IDLE: Add keyboard equivalents for mouse actions. In-Reply-To: <1469494491.39.0.22722488108.issue27620@psf.upfronthosting.co.za> Message-ID: <1591567204.65.0.356405680987.issue27620@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:00:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jun 2020 22:00:59 +0000 Subject: [issue7105] weak dict iterators are fragile because of unpredictable GC runs In-Reply-To: <1255282166.4.0.13882602695.issue7105@psf.upfronthosting.co.za> Message-ID: <1591567259.54.0.22327819378.issue7105@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:02:26 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 22:02:26 +0000 Subject: [issue27388] IDLE configdialog: reduce multiple references to Var names In-Reply-To: <1466907816.0.0.0265609699186.issue27388@psf.upfronthosting.co.za> Message-ID: <1591567346.17.0.917128683037.issue27388@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:02:43 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 22:02:43 +0000 Subject: [issue26143] Ensure that IDLE's stdlib imports are from the stdlib In-Reply-To: <1453089950.28.0.356846327087.issue26143@psf.upfronthosting.co.za> Message-ID: <1591567363.96.0.99074223476.issue26143@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:05:06 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 07 Jun 2020 22:05:06 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591567506.19.0.286812461424.issue40890@roundup.psfhosted.org> Raymond Hettinger added the comment: Do you see any easy way to have some_mapping_proxy.items().mapping return some_mapping_proxy rather than unmasking the proxied dict? ---------- keywords: -easy (C), patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:04:37 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 22:04:37 +0000 Subject: [issue16198] IDLE - tabbing in a string always brings up file completion window In-Reply-To: <1349974121.21.0.319562901545.issue16198@psf.upfronthosting.co.za> Message-ID: <1591567477.68.0.810333931627.issue16198@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:06:34 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 22:06:34 +0000 Subject: [issue24252] IDLE removes elements from tracebacks. In-Reply-To: <1432169048.6.0.710293421877.issue24252@psf.upfronthosting.co.za> Message-ID: <1591567594.02.0.603292783211.issue24252@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:06:49 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 22:06:49 +0000 Subject: [issue25032] IDLE - same menubar across application In-Reply-To: <1441732953.33.0.194435848116.issue25032@psf.upfronthosting.co.za> Message-ID: <1591567609.64.0.186947382904.issue25032@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:06:49 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 07 Jun 2020 22:06:49 +0000 Subject: [issue40902] Speed up PEG parser by using operator precedence for binary operators Message-ID: <1591567609.56.0.0913110799919.issue40902@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : Check https://github.com/we-like-parsers/cpython/issues/132 for context. ---------- messages: 370915 nosy: pablogsal priority: normal severity: normal status: open title: Speed up PEG parser by using operator precedence for binary operators _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:07:03 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 07 Jun 2020 22:07:03 +0000 Subject: [issue40902] Speed up PEG parser by using operator precedence for binary operators In-Reply-To: <1591567609.56.0.0913110799919.issue40902@roundup.psfhosted.org> Message-ID: <1591567623.39.0.508161349427.issue40902@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- assignee: -> pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:07:00 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 07 Jun 2020 22:07:00 +0000 Subject: [issue40902] Speed up PEG parser by using operator precedence for binary operators In-Reply-To: <1591567609.56.0.0913110799919.issue40902@roundup.psfhosted.org> Message-ID: <1591567620.62.0.255906848222.issue40902@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- components: +Interpreter Core versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:07:28 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 07 Jun 2020 22:07:28 +0000 Subject: [issue40902] Speed up PEG parser by using operator precedence for binary operators In-Reply-To: <1591567609.56.0.0913110799919.issue40902@roundup.psfhosted.org> Message-ID: <1591567648.61.0.509343425693.issue40902@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +19911 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20696 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:09:09 2020 From: report at bugs.python.org (Steve Stagg) Date: Sun, 07 Jun 2020 22:09:09 +0000 Subject: [issue40903] Segfault in new PEG parser Message-ID: <1591567749.45.0.607406261903.issue40903@roundup.psfhosted.org> New submission from Steve Stagg : The input `p=p=` causes python 3.10 to crash. I bisected the change, and the behavior appears to have been introduced by 16ab07063cb564c1937714bd39d6915172f005b5 (bpo-40334: Correctly identify invalid target in assignment errors (GH-20076) ) Steps to reproduce: $ echo 'p=p=' | /path/to/python3.10 === SIGSEGV (Address boundary error) Analysis: This code is an invalid assignment, and the parser tries to generate a useful message for this case (invalid_assignment_rule). However, the `target` of the assignment is a Name node. The invalid_assignment_rule function tries to identify the target of the assignment, to create a useful description for the error menssage by calling `_PyPegen_get_invalid_target`, passing in the Name Node. `PyPegen_get_invalid_target` returns NULL if the type is a Name type (pegen.c:2114). The result of this call is then passed unconditionally to _PyPegen_get_expr_name, which is expecting a statement, not NULL. Error happens here: pegen.c:164 `_PyPegen_get_expr_name(expr_ty e)` is being called with `e = 0x0` ---------- components: Interpreter Core messages: 370916 nosy: stestagg priority: normal severity: normal status: open title: Segfault in new PEG parser type: crash versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:11:13 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 22:11:13 +0000 Subject: [issue24860] Can IDLE's query box be improved In-Reply-To: <1439496143.45.0.879606750769.issue24860@psf.upfronthosting.co.za> Message-ID: <1591567873.27.0.87297527234.issue24860@roundup.psfhosted.org> Terry J. Reedy added the comment: Thanks for the push. query.py now has several subclasses which I believe covers all simple queries. ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:15:23 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 22:15:23 +0000 Subject: [issue22133] IDLE: Set correct WM_CLASS on X11 In-Reply-To: <1407162622.12.0.711549475862.issue22133@psf.upfronthosting.co.za> Message-ID: <1591568123.74.0.859073205914.issue22133@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:17:44 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 22:17:44 +0000 Subject: [issue23616] Idle: conflict between loop execution and undo shortcut. In-Reply-To: <1425881906.7.0.913975027091.issue23616@psf.upfronthosting.co.za> Message-ID: <1591568264.9.0.955479947065.issue23616@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: -kbk, roger.serwy versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:31:02 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 22:31:02 +0000 Subject: [issue23069] IDLE's F5 Run Module doesn't transfer effects of future import In-Reply-To: <1418783430.85.0.171264628982.issue23069@psf.upfronthosting.co.za> Message-ID: <1591569062.36.0.915229820138.issue23069@roundup.psfhosted.org> Terry J. Reedy added the comment: The only currently active __future__ import is 'annotations'. https://docs.python.org/3/reference/compound_stmts.html#index-23 The is currently scheduled to be needed indefinitely (until '4.0'). ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:34:44 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 22:34:44 +0000 Subject: [issue22460] idle editor: replace all in selection In-Reply-To: <1411381735.15.0.967867369025.issue22460@psf.upfronthosting.co.za> Message-ID: <1591569284.84.0.628007910439.issue22460@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:39:12 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 07 Jun 2020 22:39:12 +0000 Subject: [issue40889] Symmetric difference on dict_views is inefficient In-Reply-To: <1591463399.57.0.727941047538.issue40889@roundup.psfhosted.org> Message-ID: <1591569552.88.0.913079645347.issue40889@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:48:56 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 07 Jun 2020 22:48:56 +0000 Subject: [issue40903] Segfault in new PEG parser In-Reply-To: <1591567749.45.0.607406261903.issue40903@roundup.psfhosted.org> Message-ID: <1591570136.55.0.0619171675527.issue40903@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch nosy: +pablogsal nosy_count: 1.0 -> 2.0 pull_requests: +19912 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20697 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:58:08 2020 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiBEdm/FmcOhaw==?=) Date: Sun, 07 Jun 2020 22:58:08 +0000 Subject: [issue35228] Index search in CHM help crashes viewer In-Reply-To: <1542107217.87.0.788709270274.issue35228@psf.upfronthosting.co.za> Message-ID: <1591570688.61.0.271422915986.issue35228@roundup.psfhosted.org> V?clav Dvo??k added the comment: @steve.dower: I have cp1250 and I've had this issue for years now, on several Windows versions. Hoping Microsoft will fix it is obviously futile; can I ask for the Python community to apply the workaround suggested by Ma Lin please? Thanks. ---------- nosy: +V?clav Dvo??k _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:58:51 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 22:58:51 +0000 Subject: [issue14304] Implement utf-8-bmp codec In-Reply-To: <1331758870.76.0.606902244655.issue14304@psf.upfronthosting.co.za> Message-ID: <1591570731.61.0.552492130897.issue14304@roundup.psfhosted.org> Terry J. Reedy added the comment: October 2019, Serhiy solved the display issue with a _tkinter patch for #13153. bpo-13153: Use OS native encoding for converting between Python and Tcl. (GH-16545) https://github.com/python/cpython/commit/06cb94bc8419b9a24df6b0d724fcd8e40c6971d6 In Windows IDLE Shell >>> ''.join(map(chr, [76, 246, 119, 105, 115, 0x1F40D])) 'L?wis?' except that the snake is black and white. (Many astral chars have no glyph and appear as a box.) In console REPL, the snake shows as box box space box. Pasting astral characters into edited code 'works' except that editing following code is messy because the astral char is multiple chars internally and the visible cursor no longer matches the internal index. (But pasting such no longer crashes IDLE.) ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 18:59:32 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 22:59:32 +0000 Subject: [issue30751] IDLE: Display entry errors for key sequence entry in entry box In-Reply-To: <1498369820.44.0.770357079807.issue30751@psf.upfronthosting.co.za> Message-ID: <1591570772.22.0.995301279231.issue30751@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:01:48 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 23:01:48 +0000 Subject: [issue24813] Redesign Help => About IDLE, make it non-modal In-Reply-To: <1438921182.01.0.453311500566.issue24813@psf.upfronthosting.co.za> Message-ID: <1591570908.21.0.515423336766.issue24813@roundup.psfhosted.org> Terry J. Reedy added the comment: Still needs to make non-modal and consider other ideas. ---------- nosy: -kbk, roger.serwy versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:02:33 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 23:02:33 +0000 Subject: [issue30422] Add roadmap.txt section to idlelib In-Reply-To: <1495358662.91.0.337523431285.issue30422@psf.upfronthosting.co.za> Message-ID: <1591570953.31.0.796800592113.issue30422@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:02:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jun 2020 23:02:48 +0000 Subject: [issue40887] Leaks in new free lists In-Reply-To: <1591431836.65.0.780118303952.issue40887@roundup.psfhosted.org> Message-ID: <1591570968.5.0.682225974545.issue40887@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19913 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20698 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:04:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jun 2020 23:04:21 +0000 Subject: [issue40887] Leaks in new free lists In-Reply-To: <1591431836.65.0.780118303952.issue40887@roundup.psfhosted.org> Message-ID: <1591571061.97.0.971539025369.issue40887@roundup.psfhosted.org> STINNER Victor added the comment: > Lists and tuples sometimes leak (starting 69ac6e58f and later): It's not a regression. It's just that bpo-40521 helped Valgrind to detect such bug :-) I wrote bpo-20698 to fix this issue. I'm also working on a more generic approach to ensure that we don't add new objects to free lists after free lists are cleared. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:06:21 2020 From: report at bugs.python.org (Steve Stagg) Date: Sun, 07 Jun 2020 23:06:21 +0000 Subject: [issue40904] Segfault from new PEG parser handling yield withing f-strings Message-ID: <1591571181.13.0.747709905878.issue40904@roundup.psfhosted.org> New submission from Steve Stagg : The following command causes python to segfault: $ echo "f'{yield}'" | python/bin/python3 Bisect tracked this down to: c5fc15685202cda73f7c3f5c6f299b0945f58508 (bpo-40334: PEP 617 implementation: New PEG parser for CPython (GH-19503)) The illegal access is coming out of `fstring_shift_children_locations` as n->v.Yield.value is None. Correspondingly, the following produces the expected output: $ echo "f'{yield 1}'" | python/bin/python3 Suggesting there's a missing check for no yield value in this code. ---------- components: Interpreter Core messages: 370923 nosy: stestagg priority: normal severity: normal status: open title: Segfault from new PEG parser handling yield withing f-strings type: crash versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:13:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jun 2020 23:13:21 +0000 Subject: [issue14304] Implement utf-8-bmp codec In-Reply-To: <1331758870.76.0.606902244655.issue14304@psf.upfronthosting.co.za> Message-ID: <1591571601.64.0.904677210702.issue14304@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:13:57 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jun 2020 23:13:57 +0000 Subject: [issue40887] Leaks in new free lists In-Reply-To: <1591431836.65.0.780118303952.issue40887@roundup.psfhosted.org> Message-ID: <1591571637.23.0.667868715509.issue40887@roundup.psfhosted.org> STINNER Victor added the comment: I'm curious about this bug, so I looked at code changes. Before Python 3.6, warnings.c "garbage" is declared as a static variable. It is initialized once but never cleared. In Python 3.7, the variable moved into _PyRuntimeState.gc. In Python 3.8, _PyGC_Fini() started to clear the "garbage" list. This function is called by Py_FinalizeEx() *after* PyList_Fini(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:20:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jun 2020 23:20:51 +0000 Subject: [issue40881] --with-valgrind broken In-Reply-To: <1591396722.67.0.757074834651.issue40881@roundup.psfhosted.org> Message-ID: <1591572051.95.0.1515604673.issue40881@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19914 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20699 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:22:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jun 2020 23:22:39 +0000 Subject: [issue40887] Leaks in new free lists In-Reply-To: <1591431836.65.0.780118303952.issue40887@roundup.psfhosted.org> Message-ID: <1591572159.8.0.102521783246.issue40887@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 7907f8cbc6923240edb0b5b63adafb871c4c8875 by Victor Stinner in branch 'master': bpo-40887: Fix finalize_interp_clear() for free lists (GH-20698) https://github.com/python/cpython/commit/7907f8cbc6923240edb0b5b63adafb871c4c8875 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:24:36 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 23:24:36 +0000 Subject: =?utf-8?q?=5Bissue37614=5D_Pasteing_=F0=9F=8C=B9into_idle_makes_it_exit?= In-Reply-To: <1563424849.97.0.321788763811.issue37614@roundup.psfhosted.org> Message-ID: <1591572276.12.0.773300011931.issue37614@roundup.psfhosted.org> Terry J. Reedy added the comment: The crash issue is fixed, but editing does not work correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:27:02 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 23:27:02 +0000 Subject: [issue18318] Idle: stop depending on console output In-Reply-To: <1372373009.47.0.618602359328.issue18318@psf.upfronthosting.co.za> Message-ID: <1591572422.97.0.222342906631.issue18318@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:27:25 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 07 Jun 2020 23:27:25 +0000 Subject: [issue40903] Segfault in new PEG parser In-Reply-To: <1591567749.45.0.607406261903.issue40903@roundup.psfhosted.org> Message-ID: <1591572445.28.0.062920657552.issue40903@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- assignee: -> pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:28:23 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 23:28:23 +0000 Subject: [issue24265] IDLE -s and (-, -c command, or -r file) produces error message In-Reply-To: <1432300576.43.0.431930504874.issue24265@psf.upfronthosting.co.za> Message-ID: <1591572503.3.0.844698400148.issue24265@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:33:10 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jun 2020 23:33:10 +0000 Subject: [issue40881] --with-valgrind broken In-Reply-To: <1591396722.67.0.757074834651.issue40881@roundup.psfhosted.org> Message-ID: <1591572790.76.0.0262353397817.issue40881@roundup.psfhosted.org> STINNER Victor added the comment: Regression introduced by my commit fe2978b3b940fe2478335e3a2ca5ad22338cdf9c: bpo-39573. I wrote a PR 20699 to fix unicode_release_interned(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:37:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jun 2020 23:37:16 +0000 Subject: [issue40887] Leaks in new free lists In-Reply-To: <1591431836.65.0.780118303952.issue40887@roundup.psfhosted.org> Message-ID: <1591573036.36.0.00172811455018.issue40887@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19915 pull_request: https://github.com/python/cpython/pull/20700 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:37:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jun 2020 23:37:41 +0000 Subject: [issue40887] Free lists are still used after being finalized (cleared) In-Reply-To: <1591431836.65.0.780118303952.issue40887@roundup.psfhosted.org> Message-ID: <1591573061.08.0.995483115574.issue40887@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Leaks in new free lists -> Free lists are still used after being finalized (cleared) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:38:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jun 2020 23:38:21 +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: <1591573101.36.0.83207413682.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-40887: "Free lists are still used after being finalized (cleared)". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:38:49 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 23:38:49 +0000 Subject: [issue22554] Idle: optionally auto-pop-up completion window for names In-Reply-To: <1412455740.59.0.488205604563.issue22554@psf.upfronthosting.co.za> Message-ID: <1591573129.06.0.836189302736.issue22554@roundup.psfhosted.org> Terry J. Reedy added the comment: I think my proposal was to auto popup name completion without having to hit tab. Maybe only if match. I withdraw it. Would have to check updated completion list after each char, maybe call after, and usually cancel. Never a request for this. ---------- resolution: -> rejected stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:39:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jun 2020 23:39:51 +0000 Subject: [issue40881] --with-valgrind broken In-Reply-To: <1591396722.67.0.757074834651.issue40881@roundup.psfhosted.org> Message-ID: <1591573191.56.0.0511808704891.issue40881@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c96a61e8163c2d25ed4ac77cf96201fd0bdb945c by Victor Stinner in branch 'master': bpo-40881: Fix unicode_release_interned() (GH-20699) https://github.com/python/cpython/commit/c96a61e8163c2d25ed4ac77cf96201fd0bdb945c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:40:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jun 2020 23:40:14 +0000 Subject: [issue40881] --with-valgrind broken In-Reply-To: <1591396722.67.0.757074834651.issue40881@roundup.psfhosted.org> Message-ID: <1591573214.93.0.947575864771.issue40881@roundup.psfhosted.org> STINNER Victor added the comment: Fixed. Thanks for the bug report Stefan! ---------- components: +Build resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:41:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jun 2020 23:41:23 +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: <1591573283.61.0.959162662402.issue39573@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-40881 "--with-valgrind broken": unicode_release_interned() still used "Py_REFCNT(s) += 1;". It's now fixed by commit c96a61e8163c2d25ed4ac77cf96201fd0bdb945c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:41:30 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Jun 2020 23:41:30 +0000 Subject: [issue40889] Symmetric difference on dict_views is inefficient In-Reply-To: <1591463399.57.0.727941047538.issue40889@roundup.psfhosted.org> Message-ID: <1591573290.67.0.903775406733.issue40889@roundup.psfhosted.org> Serhiy Storchaka added the comment: But hashes of items are not known. Hashes of keys are known, hashes of values and items are not. We can add a special case for dict views in the set constructor and inline the hashing code for tuples, but it will be a lot of code for pretty rare case. And since hashes of values should be calculated in any case, and the significant time will be spent on allocating 2-tuples, the benefit of such optimization will be minor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:48:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jun 2020 23:48:59 +0000 Subject: [issue40904] Segfault from new PEG parser handling yield withing f-strings In-Reply-To: <1591571181.13.0.747709905878.issue40904@roundup.psfhosted.org> Message-ID: <1591573739.61.0.10933591151.issue40904@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +gvanrossum, lys.nikolaou, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:49:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jun 2020 23:49:13 +0000 Subject: [issue40904] Segfault from new PEG parser handling yield withing f-strings In-Reply-To: <1591571181.13.0.747709905878.issue40904@roundup.psfhosted.org> Message-ID: <1591573753.2.0.442057653672.issue40904@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +3.9regression versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 19:51:44 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jun 2020 23:51:44 +0000 Subject: [issue40905] IDLE relabel Save on close Message-ID: <1591573904.32.0.951896364407.issue40905@roundup.psfhosted.org> New submission from Terry J. Reedy : Currently [Yes] [No] [Cancel] Proposed (#13504) [Save] [Skip save] [Cancel close] ---------- assignee: terry.reedy components: IDLE messages: 370934 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE relabel Save on close type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 20:00:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 00:00:21 +0000 Subject: [issue40314] python code order of magnitude faster than equivalent CPython code for simple import statement In-Reply-To: <1587162924.52.0.924325577944.issue40314@roundup.psfhosted.org> Message-ID: <1591574421.47.0.990014181224.issue40314@roundup.psfhosted.org> STINNER Victor added the comment: Try maybe PYTHONPROFILEIMPORTTIME=1 env var to get stats on impots. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 20:09:49 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 08 Jun 2020 00:09:49 +0000 Subject: [issue40904] Segfault from new PEG parser handling yield withing f-strings In-Reply-To: <1591571181.13.0.747709905878.issue40904@roundup.psfhosted.org> Message-ID: <1591574989.55.0.998565536767.issue40904@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +19916 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20701 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 20:14:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 00:14:54 +0000 Subject: [issue40887] Free lists are still used after being finalized (cleared) In-Reply-To: <1591431836.65.0.780118303952.issue40887@roundup.psfhosted.org> Message-ID: <1591575294.69.0.694591717293.issue40887@roundup.psfhosted.org> STINNER Victor added the comment: New changeset bcb198385dee469d630a184182df9dc1463e2c47 by Victor Stinner in branch 'master': bpo-40887: Don't use finalized free lists (GH-20700) https://github.com/python/cpython/commit/bcb198385dee469d630a184182df9dc1463e2c47 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 20:15:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 00:15:40 +0000 Subject: [issue40887] Free lists are still used after being finalized (cleared) In-Reply-To: <1591431836.65.0.780118303952.issue40887@roundup.psfhosted.org> Message-ID: <1591575340.47.0.912141376054.issue40887@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Stefan for the bug report. It's now fixed and I made sure that such bug cannot strike back. ---------- components: +Interpreter Core resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> resource usage versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 20:15:54 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Jun 2020 00:15:54 +0000 Subject: [issue40905] IDLE relabel Save on close In-Reply-To: <1591573904.32.0.951896364407.issue40905@roundup.psfhosted.org> Message-ID: <1591575354.08.0.223339066447.issue40905@roundup.psfhosted.org> Terry J. Reedy added the comment: iomenu.maybesave pops up messagebox.askyesnocancel There is no way to change button labels, so would need query with only buttons. Simpledialog would not work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 20:28:20 2020 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 08 Jun 2020 00:28:20 +0000 Subject: [issue34023] timedelta(seconds=x) strange results when type(x) == np.int32 In-Reply-To: <1530539031.68.0.56676864532.issue34023@psf.upfronthosting.co.za> Message-ID: <1591576100.16.0.240235411229.issue34023@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 Jun 7 20:29:28 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Jun 2020 00:29:28 +0000 Subject: [issue13504] Meta-issue for "Invent with Python" IDLE feedback In-Reply-To: <1322613083.36.0.200533745275.issue13504@psf.upfronthosting.co.za> Message-ID: <1591576168.18.0.537436187291.issue13504@roundup.psfhosted.org> Terry J. Reedy added the comment: I am closing this kitchen-sink as unneeded since there are issues for most everything I think worthwhile. 14 #40905 However, tkinter.messagebox dialogs have canned buttons that cannot be relabeled, so would have to use something else. U1 Run => Run... Customized allows specification of argv. U2 Integrated pip not allowed. U3 Detecting 2x code. No. U4, reread "I'd move the final >>> prompt to a small separate window on its own at the bottom of the interactive shell window. This way, the top area is read-only" I intend to do this. ---------- dependencies: -Help button on preference window doesn't work, IDLE - add an "Interrupt Execution" to shell menu, IDLE Debugger: Improve GUI, IDLE does not supply a default ext of .py on Windows or OS X for new file saves, IDLE editor line numbers, IDLE: Remove tear-off menu feature, IDLE: Revise Mac OS X key bindings., IDLE: make .py default added extension on save, Include version info in Windows shortcuts resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 20:34:50 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Jun 2020 00:34:50 +0000 Subject: [issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface In-Reply-To: <1209319360.66.0.583090952017.issue2704@psf.upfronthosting.co.za> Message-ID: <1591576490.88.0.939834640317.issue2704@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 20:35:50 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Jun 2020 00:35:50 +0000 Subject: [issue14576] IDLE: inconsistent use of HOMEDRIVE, HOMEPATH, and USERPROFILE on Windows In-Reply-To: <1334400065.92.0.605072928338.issue14576@psf.upfronthosting.co.za> Message-ID: <1591576550.38.0.370406971534.issue14576@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 20:37:47 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Jun 2020 00:37:47 +0000 Subject: [issue22354] Idle: highlite tabs In-Reply-To: <1410095822.07.0.751550923398.issue22354@psf.upfronthosting.co.za> Message-ID: <1591576667.01.0.893171505939.issue22354@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 20:38:35 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Jun 2020 00:38:35 +0000 Subject: [issue20579] OS X IDLE keyboard accelerators fail or misbehave with Cocoa Tk In-Reply-To: <1392027042.62.0.0419013450349.issue20579@psf.upfronthosting.co.za> Message-ID: <1591576715.08.0.169005862701.issue20579@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 20:40:35 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Jun 2020 00:40:35 +0000 Subject: [issue24760] IDLE settings dialog shouldn't be modal In-Reply-To: <1438297628.71.0.179622085434.issue24760@psf.upfronthosting.co.za> Message-ID: <1591576835.51.0.623110446914.issue24760@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 20:47:41 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 08 Jun 2020 00:47:41 +0000 Subject: [issue40904] Segfault from new PEG parser handling yield withing f-strings In-Reply-To: <1591571181.13.0.747709905878.issue40904@roundup.psfhosted.org> Message-ID: <1591577261.53.0.730110277382.issue40904@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 972ab0327675e695373fc6272d5ac24e187579ad by Pablo Galindo in branch 'master': bpo-40904: Fix segfault in the new parser with f-string containing yield statements with no value (GH-20701) https://github.com/python/cpython/commit/972ab0327675e695373fc6272d5ac24e187579ad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 20:48:01 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 00:48:01 +0000 Subject: [issue40904] Segfault from new PEG parser handling yield withing f-strings In-Reply-To: <1591571181.13.0.747709905878.issue40904@roundup.psfhosted.org> Message-ID: <1591577281.98.0.864937895081.issue40904@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +19917 pull_request: https://github.com/python/cpython/pull/20702 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 20:48:28 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 08 Jun 2020 00:48:28 +0000 Subject: [issue40904] Segfault from new PEG parser handling yield withing f-strings In-Reply-To: <1591571181.13.0.747709905878.issue40904@roundup.psfhosted.org> Message-ID: <1591577308.09.0.495270011896.issue40904@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks, Steve for the report! ---------- nosy: -miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 20:48:33 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 08 Jun 2020 00:48:33 +0000 Subject: [issue40904] Segfault from new PEG parser handling yield withing f-strings In-Reply-To: <1591571181.13.0.747709905878.issue40904@roundup.psfhosted.org> Message-ID: <1591577313.8.0.209044172656.issue40904@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 Jun 7 20:56:04 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Jun 2020 00:56:04 +0000 Subject: [issue24893] Tk occasionally mispositions Text() insert cursor on mouse click. In-Reply-To: <1439946374.86.0.179742145584.issue24893@psf.upfronthosting.co.za> Message-ID: <1591577764.63.0.150146770737.issue24893@roundup.psfhosted.org> Terry J. Reedy added the comment: Perhaps this should be closed as 3rd party. I doubt _tkinter messes with clicks. ---------- components: +macOS -IDLE versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 20:56:20 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Jun 2020 00:56:20 +0000 Subject: [issue27621] Finish IDLE Query dialog appearance and behavior. In-Reply-To: <1469512966.74.0.594331033204.issue27621@psf.upfronthosting.co.za> Message-ID: <1591577780.59.0.856039090498.issue27621@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 21:00:06 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Jun 2020 01:00:06 +0000 Subject: [issue18903] IDLE file-completion is case-sensitive in Windows In-Reply-To: <1378085615.28.0.091077723559.issue18903@psf.upfronthosting.co.za> Message-ID: <1591578006.78.0.366509610289.issue18903@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 21:00:55 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 08 Jun 2020 01:00:55 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591578055.16.0.461932595397.issue39791@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 843c27765652e2322011fb3e5d88f4837de38c06 by Jason R. Coombs in branch 'master': bpo-39791 native hooks for importlib.resources.files (GH-20576) https://github.com/python/cpython/commit/843c27765652e2322011fb3e5d88f4837de38c06 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 21:01:07 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 01:01:07 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591578067.08.0.986374495948.issue39791@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19918 pull_request: https://github.com/python/cpython/pull/20703 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 21:02:36 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Jun 2020 01:02:36 +0000 Subject: [issue6804] IDLE: Detect Python files even if name doesn't end in .py In-Reply-To: <1251582280.35.0.0143459273436.issue6804@psf.upfronthosting.co.za> Message-ID: <1591578156.38.0.655969663107.issue6804@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 21:08:56 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 01:08:56 +0000 Subject: [issue40904] Segfault from new PEG parser handling yield withing f-strings In-Reply-To: <1591571181.13.0.747709905878.issue40904@roundup.psfhosted.org> Message-ID: <1591578536.58.0.642386577127.issue40904@roundup.psfhosted.org> miss-islington added the comment: New changeset 64409117361499058b1bf95e6efec31f7bb3c0d0 by Miss Islington (bot) in branch '3.9': bpo-40904: Fix segfault in the new parser with f-string containing yield statements with no value (GH-20701) https://github.com/python/cpython/commit/64409117361499058b1bf95e6efec31f7bb3c0d0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 21:09:28 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Jun 2020 01:09:28 +0000 Subject: [issue15808] IDLE: Update offline doc locations In-Reply-To: <1346239424.4.0.436515008596.issue15808@psf.upfronthosting.co.za> Message-ID: <1591578568.73.0.652026011455.issue15808@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: Possibility of setting custom key bindings for "Additional help sources" menu items -> IDLE: Update offline doc locations versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 21:11:18 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Jun 2020 01:11:18 +0000 Subject: [issue15808] IDLE: Update offline doc locations for linux In-Reply-To: <1346239424.4.0.436515008596.issue15808@psf.upfronthosting.co.za> Message-ID: <1591578678.93.0.502954319157.issue15808@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: IDLE: Update offline doc locations -> IDLE: Update offline doc locations for linux _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 21:30:15 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 01:30:15 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591579815.17.0.0354741533687.issue39791@roundup.psfhosted.org> miss-islington added the comment: New changeset 9cf1be46e3692d565461afd3afa326d124d743dd by Miss Islington (bot) in branch '3.9': bpo-39791 native hooks for importlib.resources.files (GH-20576) https://github.com/python/cpython/commit/9cf1be46e3692d565461afd3afa326d124d743dd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 21:57:06 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 01:57:06 +0000 Subject: [issue40903] Segfault in new PEG parser In-Reply-To: <1591567749.45.0.607406261903.issue40903@roundup.psfhosted.org> Message-ID: <1591581426.52.0.626567496561.issue40903@roundup.psfhosted.org> miss-islington added the comment: New changeset 9f495908c5bd3645ed1af82d7bae6782720dab77 by Pablo Galindo in branch 'master': bpo-40903: Handle multiple '=' in invalid assignment rules in the PEG parser (GH-20697) https://github.com/python/cpython/commit/9f495908c5bd3645ed1af82d7bae6782720dab77 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 21:57:12 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 01:57:12 +0000 Subject: [issue40903] Segfault in new PEG parser In-Reply-To: <1591567749.45.0.607406261903.issue40903@roundup.psfhosted.org> Message-ID: <1591581432.93.0.865619705339.issue40903@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19919 pull_request: https://github.com/python/cpython/pull/20704 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 22:05:34 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Jun 2020 02:05:34 +0000 Subject: [issue40741] Upgrade to SQLite v3.32 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1591581934.66.0.656053146811.issue40741@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +19920 pull_request: https://github.com/python/cpython/pull/20705 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 22:24:41 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Jun 2020 02:24:41 +0000 Subject: [issue40741] Upgrade to SQLite v3.32 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1591583081.35.0.58131245129.issue40741@roundup.psfhosted.org> Ned Deily added the comment: New changeset 37eed5a9ee7c802e7151ee9939ed604032886639 by Ned Deily in branch 'master': bpo-40741: Update macOS installer to use SQLite 3.32.2. (GH-20705) https://github.com/python/cpython/commit/37eed5a9ee7c802e7151ee9939ed604032886639 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 22:24:46 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 02:24:46 +0000 Subject: [issue40741] Upgrade to SQLite v3.32 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1591583086.83.0.715466354623.issue40741@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +19921 pull_request: https://github.com/python/cpython/pull/20706 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 22:25:01 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 02:25:01 +0000 Subject: [issue40741] Upgrade to SQLite v3.32 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1591583101.08.0.837010572292.issue40741@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19923 pull_request: https://github.com/python/cpython/pull/20708 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 22:24:53 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 02:24:53 +0000 Subject: [issue40741] Upgrade to SQLite v3.32 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1591583093.79.0.689731866427.issue40741@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19922 pull_request: https://github.com/python/cpython/pull/20707 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 22:42:24 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 02:42:24 +0000 Subject: [issue40741] Upgrade to SQLite v3.32 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1591584144.05.0.180621073346.issue40741@roundup.psfhosted.org> miss-islington added the comment: New changeset d1c449a5c6e1cd1f245ec8b721c0f32675d63872 by Miss Islington (bot) in branch '3.7': bpo-40741: Update macOS installer to use SQLite 3.32.2. (GH-20705) https://github.com/python/cpython/commit/d1c449a5c6e1cd1f245ec8b721c0f32675d63872 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 22:43:16 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 02:43:16 +0000 Subject: [issue40741] Upgrade to SQLite v3.32 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1591584196.11.0.573573991566.issue40741@roundup.psfhosted.org> miss-islington added the comment: New changeset 1e72fb2b78277c89b66e92396c84da912a8fa81f by Miss Islington (bot) in branch '3.9': bpo-40741: Update macOS installer to use SQLite 3.32.2. (GH-20705) https://github.com/python/cpython/commit/1e72fb2b78277c89b66e92396c84da912a8fa81f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 22:43:43 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 02:43:43 +0000 Subject: [issue40741] Upgrade to SQLite v3.32 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1591584223.57.0.967880621874.issue40741@roundup.psfhosted.org> miss-islington added the comment: New changeset 264e4fd9619dfab3d9de7f78a46efd8772b03ea6 by Miss Islington (bot) in branch '3.8': bpo-40741: Update macOS installer to use SQLite 3.32.2. (GH-20705) https://github.com/python/cpython/commit/264e4fd9619dfab3d9de7f78a46efd8772b03ea6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 23:21:04 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 08 Jun 2020 03:21:04 +0000 Subject: [issue34023] timedelta(seconds=x) strange results when type(x) == np.int32 In-Reply-To: <1530539031.68.0.56676864532.issue34023@psf.upfronthosting.co.za> Message-ID: <1591586464.32.0.824106459764.issue34023@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 23:21:46 2020 From: report at bugs.python.org (Kubilay Kocak) Date: Mon, 08 Jun 2020 03:21:46 +0000 Subject: [issue40900] uuid module build fix on FreeBSD proposal In-Reply-To: <1591544143.85.0.748554475357.issue40900@roundup.psfhosted.org> Message-ID: <1591586506.83.0.716936042668.issue40900@roundup.psfhosted.org> Kubilay Kocak added the comment: FreeBSD base provides uuid.h (uuid(3)) but uuid libraries/headers can be provided by e2fsprogs-libuuid (for example) in another location, for example /usr/local/ Pythons build system doesn't provide sufficient granularity to pass include/library locations for *specific* components of the build in every circumstance. The following is a bug related to Python 3.7+ and the uuid.h / linking problem: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229562 The current patch just ignores the third-party (/usr/local) version of uuid.h, allowing the build to proceed with the headers provided by base: https://bz-attachments.freebsd.org/attachment.cgi?id=200603 The proper/permanent solution might be to allow a --with-uuid= style build argument This issue of conflicting / multiple library versions and include order has also come up in various forms for other third party library support in Python, such as gettext (libintl), expat, ssl, libffi, curses) See the following FreeBSD Python port block for the libintl example: https://svnweb.freebsd.org/ports/head/lang/python37/Makefile?revision=536776&view=markup#l71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 7 23:25:42 2020 From: report at bugs.python.org (Andy Lester) Date: Mon, 08 Jun 2020 03:25:42 +0000 Subject: [issue40902] Speed up PEG parser by using operator precedence for binary operators In-Reply-To: <1591567609.56.0.0913110799919.issue40902@roundup.psfhosted.org> Message-ID: <1591586742.18.0.0212467579204.issue40902@roundup.psfhosted.org> Change by Andy Lester : ---------- nosy: +petdance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 00:19:17 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Jun 2020 04:19:17 +0000 Subject: [issue40889] Symmetric difference on dict_views is inefficient In-Reply-To: <1591463399.57.0.727941047538.issue40889@roundup.psfhosted.org> Message-ID: <1591589957.74.0.830111047845.issue40889@roundup.psfhosted.org> Raymond Hettinger added the comment: It really depends on whether the key hashes are cheap or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 00:20:41 2020 From: report at bugs.python.org (Eryk Sun) Date: Mon, 08 Jun 2020 04:20:41 +0000 Subject: [issue40882] memory leak in multiprocessing.shared_memory.SharedMemory in Windows In-Reply-To: <1591397225.82.0.932982465865.issue40882@roundup.psfhosted.org> Message-ID: <1591590041.93.0.319493615556.issue40882@roundup.psfhosted.org> Eryk Sun added the comment: Thanks for working on the PR, Zackery. Would you be interested in working on improvements to mmap for 3.10? With support in mmap, the Windows-specific initialization of SharedMemory could be as simple as the following: # Windows Named Shared Memory while True: tagname = _make_filename() if name is None else name try: self._mmap = mmap.mmap(-1, size if create else 0, tagname, create=create) break except FileExistsError: if name is not None: raise self._name = tagname self._size = len(self._mmap) The new mmap `create` parameter would default to None, which uses the current behavior that allows either opening or creating a file mapping with no sanity checking (e.g. a valid fd gets passed in, but it opens an unrelated file mapping via tagname). If `create` is true, and there's an existing file mapping named `tagname`, then raise FileExistsError. If `create` is false, call OpenFileMappingW instead of CreateFileMappingW. In this case, `fileno` must be -1, `length` is allowed to be 0, and `tagname` must be a non-empty string. If `length` is 0, map the entire file mapping and get the size via VirtualQuery: RegionSize. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 00:36:28 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Mon, 08 Jun 2020 04:36:28 +0000 Subject: [issue40889] Symmetric difference on dict_views is inefficient In-Reply-To: <1591463399.57.0.727941047538.issue40889@roundup.psfhosted.org> Message-ID: <1591590988.84.0.110440982112.issue40889@roundup.psfhosted.org> Dennis Sweeney added the comment: What about returning another dict_items instead of a set? As in (using the convention `d.items().mapping is d`): dict_items = type({}.items()) def __xor__(self: dict_items, other): if isinstance(other, dict_items): new = self.mapping.copy() MISSING = object() for key, value in other: existing = new.get(key, MISSING) if existing is MISSING: # (key, value) in (other - self) new[key] = value elif existing == value: # (key, value) in (self & other) del new[key] else: # (key, value) in (self - other) new[key] = value return new.items() else: return set(self) ^ set(other) I believe this wouldn't require any re-hashing. It would also allow for non-hashable values. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 00:52:44 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Jun 2020 04:52:44 +0000 Subject: [issue40889] Symmetric difference on dict_views is inefficient In-Reply-To: <1591463399.57.0.727941047538.issue40889@roundup.psfhosted.org> Message-ID: <1591591964.63.0.136662162619.issue40889@roundup.psfhosted.org> Raymond Hettinger added the comment: > What about returning another dict_items instead of a set? That API ship has already sailed. The published API guarantees that a set is returned ? there is no changing that. The question is whether we care enough to provide an optimized implementation that doesn't call __hash__() when the hash value has already been computed and stored. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 00:58:18 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Jun 2020 04:58:18 +0000 Subject: [issue40897] Inheriting from Generic causes inspect.signature to always return (*args, **kwargs) for constructor (and all subclasses) In-Reply-To: <1591501058.45.0.282415808867.issue40897@roundup.psfhosted.org> Message-ID: <1591592298.02.0.596233487855.issue40897@roundup.psfhosted.org> Guido van Rossum added the comment: So does that make this "not a bug"? Or is there something to document? For technical reasons we can't just add a __init__ method to Generic, and I doubt that it's feasible to change inspect.signature(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 01:00:46 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Jun 2020 05:00:46 +0000 Subject: [issue7105] weak dict iterators are fragile because of unpredictable GC runs In-Reply-To: <1255282166.4.0.13882602695.issue7105@psf.upfronthosting.co.za> Message-ID: <1591592446.32.0.336415132963.issue7105@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 01:01:45 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 05:01:45 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1591592505.97.0.817193269187.issue22021@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19925 pull_request: https://github.com/python/cpython/pull/20710 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 01:01:27 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 05:01:27 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1591592487.73.0.36809097825.issue22021@roundup.psfhosted.org> miss-islington added the comment: New changeset 7633371dace67aaa21eb4b86f889441571ec4167 by Lysandros Nikolaou in branch 'master': bpo-22021: Update root_dir and base_dir documentation in shutil (GH-10367) https://github.com/python/cpython/commit/7633371dace67aaa21eb4b86f889441571ec4167 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 01:01:53 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 05:01:53 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1591592513.49.0.975012811158.issue22021@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19926 pull_request: https://github.com/python/cpython/pull/20711 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 01:01:37 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 05:01:37 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1591592497.77.0.872358490307.issue22021@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19924 pull_request: https://github.com/python/cpython/pull/20709 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 01:02:00 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 05:02:00 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1591592520.77.0.394571320696.issue22021@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19927 pull_request: https://github.com/python/cpython/pull/20712 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 01:07:13 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 05:07:13 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1591592833.31.0.108495096636.issue22021@roundup.psfhosted.org> miss-islington added the comment: New changeset d5489a964fadc028c7086218702daf6fae087340 by Miss Islington (bot) in branch '3.7': bpo-22021: Update root_dir and base_dir documentation in shutil (GH-10367) https://github.com/python/cpython/commit/d5489a964fadc028c7086218702daf6fae087340 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 01:08:17 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 05:08:17 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1591592897.63.0.361457825191.issue22021@roundup.psfhosted.org> miss-islington added the comment: New changeset be5ed59e29106634a0d02d96ed35fb71ed61cb6d by Miss Islington (bot) in branch '3.9': bpo-22021: Update root_dir and base_dir documentation in shutil (GH-10367) https://github.com/python/cpython/commit/be5ed59e29106634a0d02d96ed35fb71ed61cb6d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 01:08:55 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 05:08:55 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1591592935.21.0.87005716298.issue22021@roundup.psfhosted.org> miss-islington added the comment: New changeset 12dfbae2ec30e7c90499129b17b6049bfd9bb2b6 by Miss Islington (bot) in branch '3.8': bpo-22021: Update root_dir and base_dir documentation in shutil (GH-10367) https://github.com/python/cpython/commit/12dfbae2ec30e7c90499129b17b6049bfd9bb2b6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 01:49:27 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Jun 2020 05:49:27 +0000 Subject: [issue40902] Speed up PEG parser by using operator precedence for binary operators In-Reply-To: <1591567609.56.0.0913110799919.issue40902@roundup.psfhosted.org> Message-ID: <1591595367.93.0.623389607686.issue40902@roundup.psfhosted.org> Guido van Rossum added the comment: I think this can wait until after beta 2. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 01:50:44 2020 From: report at bugs.python.org (Saba Kauser) Date: Mon, 08 Jun 2020 05:50:44 +0000 Subject: [issue40906] Unable to import module due to python unable to resolve dependecies Message-ID: <1591595444.88.0.936758108882.issue40906@roundup.psfhosted.org> New submission from Saba Kauser : Hi, I am building python ibm_db C extension for Python 3.8 support. while the binary is generated successfully and installed to site-packages, I am unable to load the same. The error I get is: Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import ibm_db Traceback (most recent call last): File "", line 1, in ImportError: DLL load failed while importing ibm_db: The specified module could not be found. >>> quit() I have correctly set PATH and LIB to point to python installation. I have also updated LIB to point to correct runtime dependencies. Seeing through procmon, python is unable to resolve the runtime lib dependency path from PATH. The same steps work just fine for python 3.7 and other versions. This problem is only seen on windows. Linux and MAC works fine. I am attaching the process monitor snippets for python 3.8(failing case) as well as python (3.7) success case. Can you kindly look into it and share insights on what could lead to this problem and any possible resolution/s that are currently available. I tried with python 3.8.2 as same problem there as well. Attached are the procmon logs for python 3.7(success case) and python 3.8(failing case). python 3.7 : python3.7.log python 3.8 : python3.8_1.log , python3.8_2.log ---------- components: Installation files: python3.8_1.png messages: 370964 nosy: sabakauser priority: normal severity: normal status: open title: Unable to import module due to python unable to resolve dependecies type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49220/python3.8_1.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 01:51:08 2020 From: report at bugs.python.org (Saba Kauser) Date: Mon, 08 Jun 2020 05:51:08 +0000 Subject: [issue40906] Unable to import module due to python unable to resolve dependecies In-Reply-To: <1591595444.88.0.936758108882.issue40906@roundup.psfhosted.org> Message-ID: <1591595468.56.0.821513229601.issue40906@roundup.psfhosted.org> Change by Saba Kauser : Added file: https://bugs.python.org/file49221/python3.7.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 01:51:18 2020 From: report at bugs.python.org (Saba Kauser) Date: Mon, 08 Jun 2020 05:51:18 +0000 Subject: [issue40906] Unable to import module due to python unable to resolve dependecies In-Reply-To: <1591595444.88.0.936758108882.issue40906@roundup.psfhosted.org> Message-ID: <1591595478.94.0.0455840363908.issue40906@roundup.psfhosted.org> Change by Saba Kauser : Added file: https://bugs.python.org/file49222/python3.8_2.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 02:59:47 2020 From: report at bugs.python.org (r n) Date: Mon, 08 Jun 2020 06:59:47 +0000 Subject: [issue40907] cpython/queue.py: put() does not acquire not_empty lock before notifying on it Message-ID: <1591599587.02.0.0884269120154.issue40907@roundup.psfhosted.org> Change by r n : ---------- components: Library (Lib) nosy: r n2 priority: normal severity: normal status: open title: cpython/queue.py: put() does not acquire not_empty lock before notifying on it type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 03:03:03 2020 From: report at bugs.python.org (r n) Date: Mon, 08 Jun 2020 07:03:03 +0000 Subject: [issue40907] cpython/queue.py: put() does not acquire not_empty lock before notifying on it Message-ID: <1591599783.2.0.144004792493.issue40907@roundup.psfhosted.org> Change by r n : ---------- versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 03:03:33 2020 From: report at bugs.python.org (r n) Date: Mon, 08 Jun 2020 07:03:33 +0000 Subject: [issue40907] cpython/queue.py: put() does not acquire not_empty before notifying on it Message-ID: <1591599813.15.0.757952778092.issue40907@roundup.psfhosted.org> Change by r n : ---------- title: cpython/queue.py: put() does not acquire not_empty lock before notifying on it -> cpython/queue.py: put() does not acquire not_empty before notifying on it _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 03:54:56 2020 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 08 Jun 2020 07:54:56 +0000 Subject: [issue15577] Real argc and argv in embedded interpreter In-Reply-To: <1344371910.44.0.262957922939.issue15577@psf.upfronthosting.co.za> Message-ID: <1591602896.66.0.955189791969.issue15577@roundup.psfhosted.org> Petr Viktorin added the comment: FWIW, another project that needs Py_GetArgcArgv is "setproctitle": https://bugzilla.redhat.com/show_bug.cgi?id=1792059 See also: https://github.com/cherrypy/cherrypy/issues/1506 ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 04:43:40 2020 From: report at bugs.python.org (Daniele Varrazzo) Date: Mon, 08 Jun 2020 08:43:40 +0000 Subject: [issue15577] Real argc and argv in embedded interpreter In-Reply-To: <1344371910.44.0.262957922939.issue15577@psf.upfronthosting.co.za> Message-ID: <1591605820.95.0.949614425732.issue15577@roundup.psfhosted.org> Daniele Varrazzo added the comment: Py_GetArgcArgv gone broke setproctitle indeed. https://github.com/dvarrazzo/py-setproctitle/issues/76 Is there a way to get the same feature in 3.9 or should setproctitle become no-op from 3.9 on and Python loses this feature? Thank you. ---------- nosy: +piro versions: +Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 04:46:30 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 08 Jun 2020 08:46:30 +0000 Subject: [issue34916] Add create_window_function() to sqlite3.Connection In-Reply-To: <1538846966.09.0.545547206417.issue34916@psf.upfronthosting.co.za> Message-ID: <1591605990.26.0.915019226977.issue34916@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Berker, are you still working on this? If not, I've got a proof-of-concept version of this w/unit tests ready for review. If you'd like to have a look at it, I can create a draft PR. ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 05:22:15 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 09:22:15 +0000 Subject: [issue40903] Segfault in new PEG parser In-Reply-To: <1591567749.45.0.607406261903.issue40903@roundup.psfhosted.org> Message-ID: <1591608135.87.0.786064482719.issue40903@roundup.psfhosted.org> miss-islington added the comment: New changeset 8df4f3942faf05790efeaf62a8f493aabd181d3f by Miss Islington (bot) in branch '3.9': bpo-40903: Handle multiple '=' in invalid assignment rules in the PEG parser (GH-20697) https://github.com/python/cpython/commit/8df4f3942faf05790efeaf62a8f493aabd181d3f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 05:24:46 2020 From: report at bugs.python.org (Mark Shannon) Date: Mon, 08 Jun 2020 09:24:46 +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: <1591608286.33.0.478294618233.issue40521@roundup.psfhosted.org> Mark Shannon added the comment: I'd be interested to see if you can get more consistent results. Performance of modern hardware is very sensitive to memory layout, so some sort of address randomization might be needed to remove artifacts of layout. It is possible that the objects on the free lists for telco are better aligned with cache lines, or fit is cache better in some way. And conversely, in chameleon, objects fit cache in a worse way. Just a guess, of course. Thanks for trying to get some benchmark results. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 05:25:51 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Jun 2020 09:25:51 +0000 Subject: [issue40897] Inheriting from Generic causes inspect.signature to always return (*args, **kwargs) for constructor (and all subclasses) In-Reply-To: <1591501058.45.0.282415808867.issue40897@roundup.psfhosted.org> Message-ID: <1591608351.75.0.04419244124.issue40897@roundup.psfhosted.org> Serhiy Storchaka added the comment: I think that inspect.signature() could be made more smart. It should take into account signatures of both __new__ and __init__ and return the most specific compatible signature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 06:00:33 2020 From: report at bugs.python.org (laurent chriqui) Date: Mon, 08 Jun 2020 10:00:33 +0000 Subject: [issue40908] datetime strftime with %Y and 2 digit years Message-ID: <1591610433.59.0.264285389277.issue40908@roundup.psfhosted.org> New submission from laurent chriqui : When you use strftime with a 2 digit year i.e. '32' it outputs a '32' instead of '0032'. This prevents parsing the string again with the same format through strftime. Exemple: import datetime datetime_format="%Y" date=datetime.date(32,1,1) date_str=datetime.datetime.strftime(date, datetime_format) datetime.datetime.strptime(date_str, datetime_format) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.8/_strptime.py", line 568, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) File "/usr/lib/python3.8/_strptime.py", line 349, in _strptime raise ValueError("time data %r does not match format %r" % ValueError: time data '32' does not match format '%Y' ---------- components: Library (Lib) messages: 370971 nosy: laurent chriqui priority: normal severity: normal status: open title: datetime strftime with %Y and 2 digit years type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 06:04:06 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 08 Jun 2020 10:04:06 +0000 Subject: [issue40903] Segfault in new PEG parser In-Reply-To: <1591567749.45.0.607406261903.issue40903@roundup.psfhosted.org> Message-ID: <1591610646.1.0.928811176036.issue40903@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 Jun 8 07:19:09 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 08 Jun 2020 11:19:09 +0000 Subject: [issue40887] Free lists are still used after being finalized (cleared) In-Reply-To: <1591431836.65.0.780118303952.issue40887@roundup.psfhosted.org> Message-ID: <1591615149.76.0.857437344667.issue40887@roundup.psfhosted.org> Stefan Krah added the comment: > It's not a regression. It's just that bpo-40521 helped Valgrind to detect such bug :-) Yes, I suspected that previously reachable global objects were just unreachable after the new free lists. Thanks for the fix! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 07:25:50 2020 From: report at bugs.python.org (Emil Bode) Date: Mon, 08 Jun 2020 11:25:50 +0000 Subject: [issue40909] unittest assertCountEqual doesn't filter on values in dict Message-ID: <1591615550.57.0.325345327913.issue40909@roundup.psfhosted.org> New submission from Emil Bode : Found as a comment on SO (https://stackoverflow.com/questions/12813633/how-to-assert-two-list-contain-the-same-elements-in-python#comment104082703_31832447): In unittest, `self.assertCountEqual({1: [1, 2, 3]}, {1: [5, 6, 7]})` succeeds, even though the two are different. In this simple case, using assertCountEqual is unnecessary, but there may be cases where a user wants to test for general equality regardless of order. Note that `self.assertCountEqual([{1: [1, 2, 3]}], [{1: [5, 6, 7]}])` (where both are a list, with only a dict-element), does fail. And comparing 2 dicts with different keys also fails as expected. ---------- components: Library (Lib) messages: 370973 nosy: EmilBode priority: normal severity: normal status: open title: unittest assertCountEqual doesn't filter on values in dict type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 07:33:59 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 08 Jun 2020 11:33:59 +0000 Subject: [issue35885] configparser: indentation In-Reply-To: <1549061954.1.0.734541407213.issue35885@roundup.psfhosted.org> Message-ID: <1591616039.84.0.385477192232.issue35885@roundup.psfhosted.org> Tal Einat added the comment: I'm -1 on making this change. Frankly, I think there are many better modern alternatives to ConfigParser, and I think we should avoid complicating it any further. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 07:56:35 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 08 Jun 2020 11:56:35 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1591617395.83.0.445851469145.issue22021@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Since GH-10367 is now merged, should we close this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 08:05:52 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Mon, 08 Jun 2020 12:05:52 +0000 Subject: [issue40889] Symmetric difference on dict_views is inefficient In-Reply-To: <1591463399.57.0.727941047538.issue40889@roundup.psfhosted.org> Message-ID: <1591617952.62.0.28369563393.issue40889@roundup.psfhosted.org> Change by Dennis Sweeney : ---------- keywords: +patch pull_requests: +19928 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20718 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 08:11:57 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Mon, 08 Jun 2020 12:11:57 +0000 Subject: [issue40889] Symmetric difference on dict_views is inefficient In-Reply-To: <1591463399.57.0.727941047538.issue40889@roundup.psfhosted.org> Message-ID: <1591618317.42.0.151407938037.issue40889@roundup.psfhosted.org> Dennis Sweeney added the comment: PR 20718 helps somewhat by only creating and hashing the tuples that wind up in the final set. Here's a benchmark: -m pyperf timeit -s "d1 = {i:i for i in range(100_000)}; d2 = {i:i|1 for i in range(100_000)}" "d1.items() ^ d2.items()" Master: 37.9 ms +- 0.4 ms PR 20718: 25.5 ms +- 0.4 ms ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 08:40:45 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 08 Jun 2020 12:40:45 +0000 Subject: [issue40909] unittest assertCountEqual doesn't filter on values in dict In-Reply-To: <1591615550.57.0.325345327913.issue40909@roundup.psfhosted.org> Message-ID: <1591620045.33.0.195129071233.issue40909@roundup.psfhosted.org> Steven D'Aprano added the comment: This is working as designed. assertCountEqual is documented here: https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertCountEqual It says: "Test that sequence *first* contains the same elements as *second*..." notice that it talks about *sequences*, not mappings. The (approximate) equivalent code is also given: assertEqual(Counter(list(first)), Counter(list(second))) If the arguments are dicts, only the keys are compared. The example you give correctly passes, because it is equivalent to calling `assertCountEqual(first.keys(), second.keys())` and the keys are equal. If you want to compare the items, you can call `assertCountEqual(first.items(), second.items())`. The example comparing lists correctly fails because the list elements are different. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 09:22:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 13:22:42 +0000 Subject: [issue40910] Py_GetArgcArgv() is no longer exported by the C API Message-ID: <1591622562.08.0.803364056725.issue40910@roundup.psfhosted.org> New submission from STINNER Victor : Python 3.9 is now built with -fvisibility=hidden. The Py_GetArgcArgv() function is no longer exported. Previously, it was exported because all symbols were exported by default. I'm working on a PR to export it again. Fedora downstream issue, setproctitle is broken on Python 3.9: https://bugzilla.redhat.com/show_bug.cgi?id=1792059 ---------- components: C API messages: 370978 nosy: vstinner priority: normal severity: normal status: open title: Py_GetArgcArgv() is no longer exported by the C API versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 09:23:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 13:23:04 +0000 Subject: [issue40910] Py_GetArgcArgv() is no longer exported by the C API In-Reply-To: <1591622562.08.0.803364056725.issue40910@roundup.psfhosted.org> Message-ID: <1591622584.1.0.00933481914549.issue40910@roundup.psfhosted.org> STINNER Victor added the comment: setproctitle upstream report: https://github.com/dvarrazzo/py-setproctitle/issues/76 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 09:23:56 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 13:23:56 +0000 Subject: [issue40910] Py_GetArgcArgv() is no longer exported by the C API In-Reply-To: <1591622562.08.0.803364056725.issue40910@roundup.psfhosted.org> Message-ID: <1591622636.69.0.960706435636.issue40910@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-15577 "Real argc and argv in embedded interpreter". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 09:38:19 2020 From: report at bugs.python.org (Rob Taft) Date: Mon, 08 Jun 2020 13:38:19 +0000 Subject: [issue40805] Can no longer patch flask.g In-Reply-To: <1590668397.14.0.891806096405.issue40805@roundup.psfhosted.org> Message-ID: <1591623499.64.0.511143479174.issue40805@roundup.psfhosted.org> Rob Taft added the comment: https://github.com/pallets/flask/issues/3637 I've worked around the issue and accept that this will not work in the future. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 09:42:45 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 08 Jun 2020 13:42:45 +0000 Subject: [issue40841] Provide mimetypes.sniff API as stdlib In-Reply-To: <1591080165.24.0.514984320107.issue40841@roundup.psfhosted.org> Message-ID: <1591623765.1.0.283796786071.issue40841@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +19929 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20720 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 10:02:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 14:02:49 +0000 Subject: [issue40910] Py_GetArgcArgv() is no longer exported by the C API In-Reply-To: <1591622562.08.0.803364056725.issue40910@roundup.psfhosted.org> Message-ID: <1591624969.4.0.945597818349.issue40910@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19930 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20721 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 10:08:56 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 14:08:56 +0000 Subject: [issue40910] Py_GetArgcArgv() is no longer exported by the C API In-Reply-To: <1591622562.08.0.803364056725.issue40910@roundup.psfhosted.org> Message-ID: <1591625336.45.0.498850044413.issue40910@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-5672 "Implement a way to change the python process name", especially this comment: https://bugs.python.org/issue5672#msg108524 """ setproctitle is quite stable, my company uses it in production environment very heavily with python 2.x. Probably its users base is not huge, but that's because it's a relatively specialized tool. Python3 porting is not straightforward because python2 exports the original argv pointer using Py_GetArgcArgv() whereas python3 only exports a decoded version in a wchar_t* array. This may not be a showstopper: probably the original argv can still be found scanning backwards from environ: I want to test it but I haven't had requests for it yet, so it wasn't a top priority. So, while I'd be pleased to have it included in the stdlib, I'm not really convinced it would be useful to such a large audience. Anyway I'm available for any improvement it would make the tool more useful and to anybody eager to push for its inclusion. """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 10:09:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 14:09:46 +0000 Subject: [issue40910] Py_GetArgcArgv() is no longer exported by the C API In-Reply-To: <1591622562.08.0.803364056725.issue40910@roundup.psfhosted.org> Message-ID: <1591625386.08.0.0167890286114.issue40910@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-29857: Provide `sys.executable_argv` for host application's command line arguments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 10:11:52 2020 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 08 Jun 2020 14:11:52 +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: <1591625512.62.0.40004926065.issue20928@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 301f0d4ff9b6bd60599eea0612904f65a92e6dd9 by Shantanu in branch 'master': bpo-33187: Document 3.9 changes to xml.etree.ElementInclude.include (GH-20438) https://github.com/python/cpython/commit/301f0d4ff9b6bd60599eea0612904f65a92e6dd9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 10:11:52 2020 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 08 Jun 2020 14:11:52 +0000 Subject: [issue33187] Document ElementInclude (XInclude) support in ElementTree In-Reply-To: <1522427694.7.0.467229070634.issue33187@psf.upfronthosting.co.za> Message-ID: <1591625512.73.0.395872249478.issue33187@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 301f0d4ff9b6bd60599eea0612904f65a92e6dd9 by Shantanu in branch 'master': bpo-33187: Document 3.9 changes to xml.etree.ElementInclude.include (GH-20438) https://github.com/python/cpython/commit/301f0d4ff9b6bd60599eea0612904f65a92e6dd9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 10:11:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 14:11:46 +0000 Subject: [issue40910] Py_GetArgcArgv() is no longer exported by the C API In-Reply-To: <1591622562.08.0.803364056725.issue40910@roundup.psfhosted.org> Message-ID: <1591625506.95.0.687679886541.issue40910@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-23427 "Python should expose command when invoked with -c" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 10:12:04 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 14:12:04 +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: <1591625524.91.0.478174040233.issue20928@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +19932 pull_request: https://github.com/python/cpython/pull/20722 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 10:12:04 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 14:12:04 +0000 Subject: [issue33187] Document ElementInclude (XInclude) support in ElementTree In-Reply-To: <1522427694.7.0.467229070634.issue33187@psf.upfronthosting.co.za> Message-ID: <1591625524.78.0.26814714709.issue33187@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +19931 pull_request: https://github.com/python/cpython/pull/20722 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 10:30:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 14:30:37 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1591626637.3.0.596348075141.issue29882@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c6b292cdeee689f0bfac6c1e2c2d4e4e01fa8d9e by Victor Stinner in branch 'master': bpo-29882: Add _Py_popcount32() function (GH-20518) https://github.com/python/cpython/commit/c6b292cdeee689f0bfac6c1e2c2d4e4e01fa8d9e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 10:47:55 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 14:47:55 +0000 Subject: [issue33187] Document ElementInclude (XInclude) support in ElementTree In-Reply-To: <1522427694.7.0.467229070634.issue33187@psf.upfronthosting.co.za> Message-ID: <1591627675.28.0.526642432044.issue33187@roundup.psfhosted.org> miss-islington added the comment: New changeset 1220a4707966679d15a9b5f7596ddd06bb4d5f23 by Miss Islington (bot) in branch '3.9': bpo-33187: Document 3.9 changes to xml.etree.ElementInclude.include (GH-20438) https://github.com/python/cpython/commit/1220a4707966679d15a9b5f7596ddd06bb4d5f23 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 10:47:55 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 14:47:55 +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: <1591627675.16.0.776264556887.issue20928@roundup.psfhosted.org> miss-islington added the comment: New changeset 1220a4707966679d15a9b5f7596ddd06bb4d5f23 by Miss Islington (bot) in branch '3.9': bpo-33187: Document 3.9 changes to xml.etree.ElementInclude.include (GH-20438) https://github.com/python/cpython/commit/1220a4707966679d15a9b5f7596ddd06bb4d5f23 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 10:48:20 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 08 Jun 2020 14:48:20 +0000 Subject: [issue40908] datetime strftime with %Y and 2 digit years In-Reply-To: <1591610433.59.0.264285389277.issue40908@roundup.psfhosted.org> Message-ID: <1591627700.5.0.0915232409226.issue40908@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +belopolsky, p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 10:58:25 2020 From: report at bugs.python.org (Adam Cmiel) Date: Mon, 08 Jun 2020 14:58:25 +0000 Subject: [issue40911] Unexpected behaviour for += assignment to list inside tuple Message-ID: <1591628305.3.0.352312564341.issue40911@roundup.psfhosted.org> New submission from Adam Cmiel : Python version: Python 3.8.3 (default, May 15 2020, 00:00:00) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] on linux Description: When assigning to a tuple index using +=, if the element at that index is a list, the list is extended and a TypeError is raised. a = ([],) try: a[0] += [1] except TypeError: assert a != ([1],) # assertion fails else: assert a == ([1],) The expected behaviour is that only one of those things would happen (probably the list being extended with no error, given that a[0].extend([1]) works fine). ---------- components: Interpreter Core messages: 370990 nosy: Adam Cmiel priority: normal severity: normal status: open title: Unexpected behaviour for += assignment to list inside tuple type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 11:20:27 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 08 Jun 2020 15:20:27 +0000 Subject: [issue40911] Unexpected behaviour for += assignment to list inside tuple In-Reply-To: <1591628305.3.0.352312564341.issue40911@roundup.psfhosted.org> Message-ID: <1591629627.66.0.00910266350245.issue40911@roundup.psfhosted.org> Steven D'Aprano added the comment: Alas, this gotcha is the consequence of the way `+=` is defined in Python. Although the behaviour is surprising, there's nothing to fix because everything is working as expected: * addition to a list will extend the list, as expected; * trying to assign into a tuple will fail, as expected. It's just the combination that is surprising. There's even a FAQ for it: https://docs.python.org/3/faq/programming.html#why-does-a-tuple-i-item-raise-an-exception-when-the-addition-works ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 11:27:14 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 08 Jun 2020 15:27:14 +0000 Subject: [issue40911] Unexpected behaviour for += assignment to list inside tuple In-Reply-To: <1591628305.3.0.352312564341.issue40911@roundup.psfhosted.org> Message-ID: <1591630034.84.0.964675504233.issue40911@roundup.psfhosted.org> R?mi Lapeyre added the comment: Multiple steps happens at once here, first the list is extended, then the result is written back to the tuple, at which point it raises TypeError because you can't write to a tuple. When TypeError is raised, the list has already be extended. The code is equivalent to: a = ([],) try: b = a[0] b += [1] a[0] = b except TypeError: assert a != ([1],) # assertion fails else: assert a == ([1],) This is explained in the documentation at https://docs.python.org/3/reference/simple_stmts.html#augmented-assignment-statements: An augmented assignment expression like x += 1 can be rewritten as x = x + 1 to achieve a similar, but not exactly equal effect. In the augmented version, x is only evaluated once. Also, when possible, the actual operation is performed in-place, meaning that rather than creating a new object and assigning that to the target, the old object is modified instead. Unlike normal assignments, augmented assignments evaluate the left-hand side before evaluating the right-hand side. For example, a[i] += f(x) first looks-up a[i], then it evaluates f(x) and performs the addition, and lastly, it writes the result back to a[i]. ---------- nosy: +remi.lapeyre -steven.daprano versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 11:28:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 15:28:20 +0000 Subject: [issue40854] [Patch] Allow overriding sys.platlibdir In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591630100.13.0.202217185934.issue40854@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8f023a2f664f902a3d0b7a6f64d63afc0d1c15ae by Sandro Mani in branch 'master': bpo-40854: Allow overriding sys.platlibdir via PYTHONPLATLIBDIR env-var (GH-20605) https://github.com/python/cpython/commit/8f023a2f664f902a3d0b7a6f64d63afc0d1c15ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 11:29:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 15:29:47 +0000 Subject: [issue40854] [Patch] Allow overriding sys.platlibdir In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591630187.07.0.398292768911.issue40854@roundup.psfhosted.org> STINNER Victor added the comment: I merged the patch in master, future Python 3.10. I would prefer to leave Python 3.9 unchanged, if possible. Can we close this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 11:34:28 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 08 Jun 2020 15:34:28 +0000 Subject: [issue40065] py39: remove deprecation note for xml.etree.cElementTree In-Reply-To: <1585163379.04.0.795433622529.issue40065@roundup.psfhosted.org> Message-ID: <1591630468.71.0.876720320021.issue40065@roundup.psfhosted.org> Tal Einat added the comment: AFAICT from following the discussion, the decision is to hold off on a few deprecations which were causing most of the breakage. However, this does not appear to include xml.etree.cElementTree. Since that has currently been removed in the 3.9 branch, we should indeed fix the docs accordingly. (Note that previous versions' docs, especially 3.8, should also be updated in this regard, as per the other issue Fred opened about this, #40064.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 11:35:09 2020 From: report at bugs.python.org (Daniele Varrazzo) Date: Mon, 08 Jun 2020 15:35:09 +0000 Subject: [issue40910] Py_GetArgcArgv() is no longer exported by the C API In-Reply-To: <1591622562.08.0.803364056725.issue40910@roundup.psfhosted.org> Message-ID: <1591630509.67.0.240089762921.issue40910@roundup.psfhosted.org> Daniele Varrazzo added the comment: Thank you for opening this. FYI: > probably the original argv can still be found scanning backwards from environ this is how the module works indeed in Python 3. ---------- nosy: +piro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 11:36:14 2020 From: report at bugs.python.org (Sandro Mani) Date: Mon, 08 Jun 2020 15:36:14 +0000 Subject: [issue40854] [Patch] Allow overriding sys.platlibdir In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591630574.03.0.913818933205.issue40854@roundup.psfhosted.org> Sandro Mani added the comment: Many thanks! - I'll ask downstream to carry the patch for the 3.9 cycle, so I'm ok with closing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 11:37:14 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 08 Jun 2020 15:37:14 +0000 Subject: [issue40065] py39: remove deprecation note for xml.etree.cElementTree In-Reply-To: <1585163379.04.0.795433622529.issue40065@roundup.psfhosted.org> Message-ID: <1591630634.55.0.216933887322.issue40065@roundup.psfhosted.org> Tal Einat added the comment: (Also, please note that the "master" branch is now for version 3.10; PRs for version 3.9 should be based on the "3.9" branch, and the pull request made for that branch too.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 11:38:27 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 08 Jun 2020 15:38:27 +0000 Subject: [issue40065] py39: remove deprecation note for xml.etree.cElementTree In-Reply-To: <1585163379.04.0.795433622529.issue40065@roundup.psfhosted.org> Message-ID: <1591630707.76.0.419173136331.issue40065@roundup.psfhosted.org> Tal Einat added the comment: (My mistake! This should be done from/against the master branch, and then back-ported to 3.9, as usual.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 11:44:58 2020 From: report at bugs.python.org (Adam Cmiel) Date: Mon, 08 Jun 2020 15:44:58 +0000 Subject: [issue40911] Unexpected behaviour for += assignment to list inside tuple In-Reply-To: <1591628305.3.0.352312564341.issue40911@roundup.psfhosted.org> Message-ID: <1591631098.52.0.934312941426.issue40911@roundup.psfhosted.org> Adam Cmiel added the comment: Got it, I didn't realize that the last step of augmented assignment is (in this case) assigning the result of __iadd__ back to the tuple. Thanks for the explanations! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 11:53:23 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jun 2020 15:53:23 +0000 Subject: [issue40065] py39: remove deprecation note for xml.etree.cElementTree In-Reply-To: <1585163379.04.0.795433622529.issue40065@roundup.psfhosted.org> Message-ID: <1591631603.52.0.204240435385.issue40065@roundup.psfhosted.org> Christian Heimes added the comment: No, please don't change the docs yet. I want to re-introduce the cElementTree and go through a proper deprecation phase. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:02:30 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 16:02:30 +0000 Subject: [issue40903] Segfault in new PEG parser In-Reply-To: <1591567749.45.0.607406261903.issue40903@roundup.psfhosted.org> Message-ID: <1591632150.65.0.295481373714.issue40903@roundup.psfhosted.org> STINNER Victor added the comment: https://buildbot.python.org/all/#builders/765/builds/51 The new test fails with the old parser: ********************************************************************** File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.oldparser/build/Lib/test/test_syntax.py", line 66, in test.test_syntax Failed example: yield = 1 Expected: Traceback (most recent call last): SyntaxError: assignment to yield expression not possible Got: Traceback (most recent call last): File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.oldparser/build/Lib/doctest.py", line 1336, in __run exec(compile(example.source, filename, "single", File "", line 1 yield = 1 ^ SyntaxError: invalid syntax ********************************************************************** 1 items had failures: 1 of 108 in test.test_syntax ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:03:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 16:03:53 +0000 Subject: [issue40903] Segfault in new PEG parser In-Reply-To: <1591567749.45.0.607406261903.issue40903@roundup.psfhosted.org> Message-ID: <1591632233.39.0.606486761668.issue40903@roundup.psfhosted.org> STINNER Victor added the comment: > The new test fails with the old parser: Oh, it's already fixed by: https://github.com/python/cpython/commit/2b33cc3a2509983c4fa7884fa2722bd2e5781e51 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:04:00 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 08 Jun 2020 16:04:00 +0000 Subject: [issue40903] Segfault in new PEG parser In-Reply-To: <1591567749.45.0.607406261903.issue40903@roundup.psfhosted.org> Message-ID: <1591632240.16.0.192759568205.issue40903@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > The new test fails with the old parser: I fixed it this morning in https://github.com/python/cpython/pull/20717 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:07:06 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 08 Jun 2020 16:07:06 +0000 Subject: [issue40065] py39: remove deprecation note for xml.etree.cElementTree In-Reply-To: <1585163379.04.0.795433622529.issue40065@roundup.psfhosted.org> Message-ID: <1591632426.76.0.358060741361.issue40065@roundup.psfhosted.org> Tal Einat added the comment: Ah, thanks for the update Christian, I must have misunderstood your intentions. So should the deprecation note be removed in the "master" branch for 3.10? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:13:07 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 16:13:07 +0000 Subject: [issue40910] Py_GetArgcArgv() is no longer exported by the C API In-Reply-To: <1591622562.08.0.803364056725.issue40910@roundup.psfhosted.org> Message-ID: <1591632787.27.0.885508829024.issue40910@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e81f6e687d0f04a45f2389d0b43fafd6d8491624 by Victor Stinner in branch 'master': bpo-40910: Export Py_GetArgcArgv() function (GH-20721) https://github.com/python/cpython/commit/e81f6e687d0f04a45f2389d0b43fafd6d8491624 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:16:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 16:16:44 +0000 Subject: [issue40910] Py_GetArgcArgv() is no longer exported by the C API In-Reply-To: <1591622562.08.0.803364056725.issue40910@roundup.psfhosted.org> Message-ID: <1591633004.17.0.0576819132242.issue40910@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19933 pull_request: https://github.com/python/cpython/pull/20723 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:27:32 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 Jun 2020 16:27:32 +0000 Subject: [issue40861] On Windows, liblzma is always built without optimization In-Reply-To: <1591263528.02.0.798205890082.issue40861@roundup.psfhosted.org> Message-ID: <1591633652.17.0.411874560338.issue40861@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +19934 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20724 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:28:16 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 Jun 2020 16:28:16 +0000 Subject: [issue40861] On Windows, liblzma is always built without optimization In-Reply-To: <1591263528.02.0.798205890082.issue40861@roundup.psfhosted.org> Message-ID: <1591633696.46.0.455200819312.issue40861@roundup.psfhosted.org> Change by Steve Dower : ---------- assignee: -> steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:31:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 16:31:20 +0000 Subject: [issue40854] [Patch] Allow overriding sys.platlibdir In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591633880.22.0.5389947613.issue40854@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19935 pull_request: https://github.com/python/cpython/pull/20725 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:33:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 16:33:58 +0000 Subject: [issue40854] [Patch] Allow overriding sys.platlibdir In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591634038.55.0.157005606481.issue40854@roundup.psfhosted.org> STINNER Victor added the comment: bpo-1294959 added sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE to Python 3.9. The problem is that msg370655 use case seems to be a regression compared to Python 3.9. I now consider to backport the commit 8f023a2f664f902a3d0b7a6f64d63afc0d1c15ae to 3.9 since it looks like a fix part of bpo-1294959 rather than a bug fix. I created PR 20725 to backport PyConfig.platlibdir and PYTHONPLATLIBDIR env var to Python 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:34:05 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 16:34:05 +0000 Subject: [issue40854] [Patch] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591634045.82.0.707550263843.issue40854@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: [Patch] Allow overriding sys.platlibdir -> [Patch] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:36:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 16:36:27 +0000 Subject: [issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1591634187.63.0.124268629745.issue1294959@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19936 pull_request: https://github.com/python/cpython/pull/20725 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:37:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 16:37:25 +0000 Subject: [issue40854] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591634245.56.0.419153329265.issue40854@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: [Patch] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var -> Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:37:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 16:37:59 +0000 Subject: [issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1591634279.53.0.242659072347.issue1294959@roundup.psfhosted.org> STINNER Victor added the comment: Oh, it seems like one of the changes merged in this issue broke the following use case if platlibdir is different than "lib": export PYTHONHOME= export PYTHONPATH=/lib/python3.9 python3.9 See bpo-40854 "Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:41:28 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 08 Jun 2020 16:41:28 +0000 Subject: [issue35885] configparser: indentation In-Reply-To: <1549061954.1.0.734541407213.issue35885@roundup.psfhosted.org> Message-ID: <1591634488.39.0.936507520767.issue35885@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks for your contribution Ido Michael but I'm also -1 on the feature. .ini is an underspecified format and it's supposed to be interoperable between applications. Indenting keys sounds like a compatibility challenge. ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:44:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 16:44:36 +0000 Subject: [issue40910] Py_GetArgcArgv() is no longer exported by the C API In-Reply-To: <1591622562.08.0.803364056725.issue40910@roundup.psfhosted.org> Message-ID: <1591634676.19.0.834999242785.issue40910@roundup.psfhosted.org> STINNER Victor added the comment: Py_GetArgcArgv() is not new at all. It exists since: commit ac56b03f9a931423714ab3a0e8cfae78f81f9b85 Author: Guido van Rossum Date: Sun Jul 21 02:33:38 1996 +0000 New style names for getprogramname and getargcargv Previously, the function was known as getargcargv() and it existed since: commit 7b1e974b4bd7c17cd90a6d03bab0aaa079d78d29 Author: Guido van Rossum Date: Mon Aug 29 10:46:42 1994 +0000 Makefile.pre.in: add $(OPT) to link command audioop.c: fix for MPW config.c.in: save original argc/argv for Lance rotormodule.c: new coding conventions timemodule.c: add casts for Lance +void +getargcargv(argc,argv) + int *argc; + char ***argv; +{ + *argc = orig_argc; + *argv = orig_argv; +} + ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:44:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 16:44:58 +0000 Subject: [issue40910] Py_GetArgcArgv() is no longer exported by the C API In-Reply-To: <1591622562.08.0.803364056725.issue40910@roundup.psfhosted.org> Message-ID: <1591634698.77.0.680380322491.issue40910@roundup.psfhosted.org> STINNER Victor added the comment: New changeset dedaac040fe5b0b88acdec072623bb39ec53687f by Victor Stinner in branch '3.9': bpo-40910: Export Py_GetArgcArgv() function (GH-20721) (GH-20723) https://github.com/python/cpython/commit/dedaac040fe5b0b88acdec072623bb39ec53687f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:48:31 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 Jun 2020 16:48:31 +0000 Subject: [issue35228] Index search in CHM help crashes viewer In-Reply-To: <1542107217.87.0.788709270274.issue35228@psf.upfronthosting.co.za> Message-ID: <1591634911.14.0.461797544746.issue35228@roundup.psfhosted.org> Steve Dower added the comment: We either need someone to contribute a fix to sphinxcontrib\htmlhelp\templates\project.hhp (bearing in mind that this *must* be optional, as it breaks search), or write code to patch the generated file between generation and use (which is probably hard). And I'm not yet comfortable breaking search for it (as shown in the screenshot). I'd rather switch to distributing regular HTML files if there isn't a way to have both. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:48:46 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 Jun 2020 16:48:46 +0000 Subject: [issue40861] On Windows, liblzma is always built without optimization In-Reply-To: <1591263528.02.0.798205890082.issue40861@roundup.psfhosted.org> Message-ID: <1591634926.85.0.93940581805.issue40861@roundup.psfhosted.org> Steve Dower added the comment: New changeset 3a3a30c5a4622e18be9f7e4a239dc9e0d7c8054c by Steve Dower in branch 'master': bpo-40861: Enable optimizations when building liblzma (GH-20724) https://github.com/python/cpython/commit/3a3a30c5a4622e18be9f7e4a239dc9e0d7c8054c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:48:58 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 16:48:58 +0000 Subject: [issue40861] On Windows, liblzma is always built without optimization In-Reply-To: <1591263528.02.0.798205890082.issue40861@roundup.psfhosted.org> Message-ID: <1591634938.03.0.919498694581.issue40861@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +19937 pull_request: https://github.com/python/cpython/pull/20726 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:49:05 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 16:49:05 +0000 Subject: [issue40861] On Windows, liblzma is always built without optimization In-Reply-To: <1591263528.02.0.798205890082.issue40861@roundup.psfhosted.org> Message-ID: <1591634945.86.0.306183938492.issue40861@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19938 pull_request: https://github.com/python/cpython/pull/20727 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:49:13 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 16:49:13 +0000 Subject: [issue40861] On Windows, liblzma is always built without optimization In-Reply-To: <1591263528.02.0.798205890082.issue40861@roundup.psfhosted.org> Message-ID: <1591634953.35.0.956017194044.issue40861@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19939 pull_request: https://github.com/python/cpython/pull/20728 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:51:53 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 08 Jun 2020 16:51:53 +0000 Subject: [issue36457] functools.singledispatchmethod interacts poorly with subclasses In-Reply-To: <1553744559.32.0.207343635807.issue36457@roundup.psfhosted.org> Message-ID: <1591635113.67.0.0697031078134.issue36457@roundup.psfhosted.org> ?ukasz Langa added the comment: The proposed fix requires using a required base class which I'd like to avoid. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:57:08 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 08 Jun 2020 16:57:08 +0000 Subject: [issue27657] urlparse fails if the path is numeric In-Reply-To: <1469908637.82.0.696114480311.issue27657@psf.upfronthosting.co.za> Message-ID: <1591635428.25.0.627686417.issue27657@roundup.psfhosted.org> ?ukasz Langa added the comment: Micha?, this change has been reverted in 3.7 and 3.8. Senthil says this needs further work in 3.9. Senthil, please prioritize this. We're already releasing 3.9.0b2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:57:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 16:57:23 +0000 Subject: [issue29857] Provide `sys.executable_argv` for host application's command line arguments In-Reply-To: <1489991623.12.0.90529490385.issue29857@psf.upfronthosting.co.za> Message-ID: <1591635443.51.0.541128797718.issue29857@roundup.psfhosted.org> STINNER Victor added the comment: I mark this issue as a duplicate of bpo-23427 which has patch and is older. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Python should expose command when invoked with -c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 12:57:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 16:57:35 +0000 Subject: [issue23427] Python should expose command when invoked with -c In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1591635455.02.0.57375008996.issue23427@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-29857 as a duplicate of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:06:40 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 17:06:40 +0000 Subject: [issue40861] On Windows, liblzma is always built without optimization In-Reply-To: <1591263528.02.0.798205890082.issue40861@roundup.psfhosted.org> Message-ID: <1591636000.62.0.863013319324.issue40861@roundup.psfhosted.org> miss-islington added the comment: New changeset 62e7f9ab55a6426708d5316da6f07d3fe220b53a by Miss Islington (bot) in branch '3.7': bpo-40861: Enable optimizations when building liblzma (GH-20724) https://github.com/python/cpython/commit/62e7f9ab55a6426708d5316da6f07d3fe220b53a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:07:20 2020 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 08 Jun 2020 17:07:20 +0000 Subject: [issue40908] datetime strftime with %Y and 2 digit years In-Reply-To: <1591610433.59.0.264285389277.issue40908@roundup.psfhosted.org> Message-ID: <1591636040.61.0.14303559549.issue40908@roundup.psfhosted.org> Paul Ganssle added the comment: This is a duplicate of bpo-13305 and is due to platform-specific implementations of %Y. On Linux, `strftime()` does not zero-pad to 4, and if you need to represent years <1000, you should use "%4Y" to zero-pad the output. I think the ideal resolution would be a cross-platform implementation of strftime and strptime that does not rely on the system symbols, but that is a pretty large and overwhelming project. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> datetime.strftime("%Y") not consistent for years < 1000 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:07:35 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 17:07:35 +0000 Subject: [issue40861] On Windows, liblzma is always built without optimization In-Reply-To: <1591263528.02.0.798205890082.issue40861@roundup.psfhosted.org> Message-ID: <1591636055.22.0.275005651221.issue40861@roundup.psfhosted.org> miss-islington added the comment: New changeset 30513b627777b936e3df8e4b6dd4d6b280a6b765 by Miss Islington (bot) in branch '3.8': bpo-40861: Enable optimizations when building liblzma (GH-20724) https://github.com/python/cpython/commit/30513b627777b936e3df8e4b6dd4d6b280a6b765 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:08:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 17:08:11 +0000 Subject: [issue23427] Python should expose command when invoked with -c In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1591636091.83.0.482986652926.issue23427@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19940 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20729 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:09:09 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 17:09:09 +0000 Subject: [issue40861] On Windows, liblzma is always built without optimization In-Reply-To: <1591263528.02.0.798205890082.issue40861@roundup.psfhosted.org> Message-ID: <1591636149.59.0.71715568508.issue40861@roundup.psfhosted.org> miss-islington added the comment: New changeset 298c8c895f0d4fdd23a16f959efac83039fa1d19 by Miss Islington (bot) in branch '3.9': bpo-40861: Enable optimizations when building liblzma (GH-20724) https://github.com/python/cpython/commit/298c8c895f0d4fdd23a16f959efac83039fa1d19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:12:38 2020 From: report at bugs.python.org (Jakub Wilk) Date: Mon, 08 Jun 2020 17:12:38 +0000 Subject: [issue23427] Python should expose command when invoked with -c In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1591636358.94.0.592151482377.issue23427@roundup.psfhosted.org> Change by Jakub Wilk : ---------- nosy: +jwilk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:12:47 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Mon, 08 Jun 2020 17:12:47 +0000 Subject: [issue40897] Inheriting from Generic causes inspect.signature to always return (*args, **kwargs) for constructor (and all subclasses) In-Reply-To: <1591501058.45.0.282415808867.issue40897@roundup.psfhosted.org> Message-ID: <1591636367.18.0.117801630036.issue40897@roundup.psfhosted.org> Change by Filipe La?ns : ---------- nosy: +FFY00 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:13:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 17:13:40 +0000 Subject: [issue23427] Python should expose command when invoked with -c In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1591636420.67.0.117113456231.issue23427@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-14208 "No way to recover original argv with python -m". For the specific case of `python -m`, the original argument has been available as `__main__.__spec__.name` since Python 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:14:32 2020 From: report at bugs.python.org (hai shi) Date: Mon, 08 Jun 2020 17:14:32 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1591636472.17.0.552820183852.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19941 pull_request: https://github.com/python/cpython/pull/20732 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:16:39 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Jun 2020 17:16:39 +0000 Subject: [issue40897] Inheriting from class that defines __new__ causes inspect.signature to always return (*args, **kwargs) for constructor In-Reply-To: <1591501058.45.0.282415808867.issue40897@roundup.psfhosted.org> Message-ID: <1591636599.29.0.0685595052334.issue40897@roundup.psfhosted.org> Guido van Rossum added the comment: Changing the topic to not point fingers at Generic. ---------- nosy: -levkivskyi title: Inheriting from Generic causes inspect.signature to always return (*args, **kwargs) for constructor (and all subclasses) -> Inheriting from class that defines __new__ causes inspect.signature to always return (*args, **kwargs) for constructor _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:16:41 2020 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 08 Jun 2020 17:16:41 +0000 Subject: [issue27657] urlparse fails if the path is numeric In-Reply-To: <1469908637.82.0.696114480311.issue27657@psf.upfronthosting.co.za> Message-ID: <1591636601.6.0.614336066997.issue27657@roundup.psfhosted.org> Senthil Kumaran added the comment: Hi All, On the previous message. > I plan to address that point raised in this issue and close this ticket. My intention was to close the bug. 1) The Issue was originally a regression in 3.8, and 3.7, And this been be resolved. The change introduced did alter the behavior, but it was actually the correct one as I wrote "For 3.9. - I am ready to defend the patch even at the cost of the breaking of the parsing of undefined behavior. We should keep it. The patch simplifies a lot of corner cases and fixes the reported bugs. We don't guarantee backward compatibility between major versions, so I assume users will be careful when relying upon this undefined behavior and will take corrective action on their side before upgrading to 3.9. We want patch releases to be backward compatible. That was the user-complaint." I agree with Ned Deily, that there are plenty of corner cases with urlparse APIs (Ref: https://bugs.python.org/issue36338#msg355322) That making any change is difficult (especially if not caught by regression suite). *And if we simplify the code, it will be welcome, and will help us continue with next changes* - This was the original motivation of this code acceptance (Here https://github.com/python/cpython/commit/5a88d50ff013a64fbdb25b877c87644a9034c969 and https://bugs.python.org/issue27657#msg289557) I was not very explicit on stance proposal previously, and assumed if anything else can be done. But No. I think, this behavior we want in Python3.9 (as discussed in the initial messages of this ticket). I apologize, Micha? that I missed responding to your question quickly. I hope this clarifies the stance. ---------- keywords: -3.8regression, patch priority: critical -> normal resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:17:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 17:17:29 +0000 Subject: [issue23427] Python should expose command when invoked with -c In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1591636649.49.0.81618970325.issue23427@roundup.psfhosted.org> STINNER Victor added the comment: Many names have been proposed: * sys.__argv__: https://bugs.python.org/issue14208#msg155002 * sys.argv_original: https://bugs.python.org/issue14208#msg155053 * sys.full_argv or sys.executable_argv: https://bugs.python.org/issue14208#msg155102 * sys.executable_argv: https://bugs.python.org/issue29857 (issue title) * sys._executable_argv: https://bugs.python.org/issue29857#msg289938 * sys._configuration.raw_argv: https://bugs.python.org/issue14208#msg179845 * sys.raw_argv: https://bugs.python.org/issue14208#msg179852 * sys.raw_args: https://bugs.python.org/issue29857#msg289933 * sys._raw_argv: https://bugs.python.org/issue29857#msg289873 * sys.orig_arv: https://bugs.python.org/issue29857#msg289936 I chose "sys.orig_argv" attribute name with the documentation: The list of the original command line arguments passed to the Python executable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:18:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 17:18:11 +0000 Subject: [issue15577] Real argc and argv in embedded interpreter In-Reply-To: <1344371910.44.0.262957922939.issue15577@psf.upfronthosting.co.za> Message-ID: <1591636691.8.0.378791240153.issue15577@roundup.psfhosted.org> STINNER Victor added the comment: I mark this issue as a duplicate of bpo-23427. ---------- resolution: out of date -> duplicate superseder: -> Python should expose command when invoked with -c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:19:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 17:19:00 +0000 Subject: [issue23427] Python should expose command when invoked with -c In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1591636740.48.0.0404663508725.issue23427@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-15577 "Real argc and argv in embedded interpreter" as duplicate of this issue: my PR 20729 allows embedders to set PyConfig.orig_argv which becomes sys.orig_argv. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:25:18 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 17:25:18 +0000 Subject: [issue23427] Python should expose command when invoked with -c In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1591637118.48.0.413477965829.issue23427@roundup.psfhosted.org> STINNER Victor added the comment: Example of sys.orig_argv usage to re-execute the Python process with different options: --- import sys import os if not sys.flags.utf8_mode: # Force UTF-8 mode argv = sys.orig_argv.copy() argv[1:1] = ["-X", "utf8"] print(f"Re-execute to force UTF-8 mode! argv={argv}") os.execv(argv[0], argv) print(f"Everybody loves UTF-8! utf8_mode={sys.flags.utf8_mode}") --- Example coming from discussions on the PEP 597 :-) Output: --- $ ./python force_utf8_mode.py Re-execute to force UTF-8 mode! argv=['./python', '-X', 'utf8', 'force_utf8_mode.py'] Everybody loves UTF-8! utf8_mode=1 --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:25:56 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 17:25:56 +0000 Subject: [issue15577] Real argc and argv in embedded interpreter In-Reply-To: <1344371910.44.0.262957922939.issue15577@psf.upfronthosting.co.za> Message-ID: <1591637156.66.0.772069854886.issue15577@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-40910: "Py_GetArgcArgv() is no longer exported by the C API". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:26:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 17:26:53 +0000 Subject: [issue40910] Py_GetArgcArgv() is no longer exported by the C API In-Reply-To: <1591622562.08.0.803364056725.issue40910@roundup.psfhosted.org> Message-ID: <1591637213.02.0.49777742264.issue40910@roundup.psfhosted.org> STINNER Victor added the comment: Ok, I fixed Python 3.9: Py_GetArgcArgv() function is exported again. Let's continue the discussion in bpo-23427. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:31:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 17:31:21 +0000 Subject: [issue23427] Python should expose command when invoked with -c In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1591637481.42.0.408797770376.issue23427@roundup.psfhosted.org> STINNER Victor added the comment: My implementation (PR 20729) is based on bpo-40910 change which added a private PyConfig._orig_argv member to fix Py_GetArgcArgv(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:32:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 17:32:12 +0000 Subject: [issue23427] Add sys.orig_argv: original command line arguments passed to the Python executable In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1591637532.91.0.16453177141.issue23427@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Python should expose command when invoked with -c -> Add sys.orig_argv: original command line arguments passed to the Python executable _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:36:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 17:36:19 +0000 Subject: [issue40854] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591637779.73.0.18423571853.issue40854@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 817506432dd1908cd154500ef18dc276b8dd7071 by Victor Stinner in branch '3.9': bpo-40854: Allow overriding sys.platlibdir via PYTHONPLATLIBDIR env-var (GH-20605) (GH-20725) https://github.com/python/cpython/commit/817506432dd1908cd154500ef18dc276b8dd7071 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 13:39:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 17:39:23 +0000 Subject: [issue40854] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591637963.75.0.488304963264.issue40854@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19942 pull_request: https://github.com/python/cpython/pull/20735 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 14:01:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 18:01: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: <1591639311.41.0.682285503335.issue40684@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19943 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20736 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 14:04:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 18:04:51 +0000 Subject: [issue40854] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591639491.69.0.176517546403.issue40854@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 5edb83241f2ff899917e895092aca0216faf42d3 by Victor Stinner in branch 'master': bpo-40854: PYTHONPLATLIBDIR env var added to 3.9 (GH-20735) https://github.com/python/cpython/commit/5edb83241f2ff899917e895092aca0216faf42d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 14:07:32 2020 From: report at bugs.python.org (Brett Cannon) Date: Mon, 08 Jun 2020 18:07:32 +0000 Subject: [issue24914] Python: Not just OO style but this is not mentioned on python.org or in FAQ In-Reply-To: <1440225910.92.0.539487452884.issue24914@psf.upfronthosting.co.za> Message-ID: <1591639652.81.0.36750768859.issue24914@roundup.psfhosted.org> Brett Cannon added the comment: New changeset 3ab3475c42c8ee5580f4ea1aeda73ebc8e5d5478 by Brett Cannon in branch 'master': bpo-24914: mention Python supports multiple paradigms in the FAQ (#20658) https://github.com/python/cpython/commit/3ab3475c42c8ee5580f4ea1aeda73ebc8e5d5478 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 14:08:05 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 18:08:05 +0000 Subject: [issue24914] Python: Not just OO style but this is not mentioned on python.org or in FAQ In-Reply-To: <1440225910.92.0.539487452884.issue24914@psf.upfronthosting.co.za> Message-ID: <1591639685.13.0.994502369608.issue24914@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +19944 pull_request: https://github.com/python/cpython/pull/20737 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 14:08:12 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jun 2020 18:08:12 +0000 Subject: [issue24914] Python: Not just OO style but this is not mentioned on python.org or in FAQ In-Reply-To: <1440225910.92.0.539487452884.issue24914@psf.upfronthosting.co.za> Message-ID: <1591639692.51.0.0693893268194.issue24914@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19945 pull_request: https://github.com/python/cpython/pull/20738 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 14:08:21 2020 From: report at bugs.python.org (Niklas Fiekas) Date: Mon, 08 Jun 2020 18:08:21 +0000 Subject: [issue29782] Use __builtin_clzl for bits_in_digit if available In-Reply-To: <1489143237.03.0.753738364063.issue29782@psf.upfronthosting.co.za> Message-ID: <1591639701.54.0.889079549827.issue29782@roundup.psfhosted.org> Change by Niklas Fiekas : ---------- pull_requests: +19946 pull_request: https://github.com/python/cpython/pull/20739 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 14:19:32 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 Jun 2020 18:19:32 +0000 Subject: [issue40861] On Windows, liblzma is always built without optimization In-Reply-To: <1591263528.02.0.798205890082.issue40861@roundup.psfhosted.org> Message-ID: <1591640372.7.0.748699519326.issue40861@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 14:24:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 18:24:27 +0000 Subject: [issue29782] Use __builtin_clzl for bits_in_digit if available In-Reply-To: <1489143237.03.0.753738364063.issue29782@psf.upfronthosting.co.za> Message-ID: <1591640667.01.0.515482295925.issue29782@roundup.psfhosted.org> STINNER Victor added the comment: I reopen the issue since PR 20739 was created. ---------- resolution: rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 14:39:53 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 Jun 2020 18:39:53 +0000 Subject: [issue40912] _PyOS_SigintEvent is never closed on Windows Message-ID: <1591641593.68.0.465410581538.issue40912@roundup.psfhosted.org> New submission from Steve Dower : Currently, it's just stored as global state in signalmodule.c and forgotten about. It probably needs to become module state, and the signal module needs better initialization/shutdown. ---------- components: Windows messages: 371036 nosy: eric.snow, paul.moore, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal stage: needs patch status: open title: _PyOS_SigintEvent is never closed on Windows type: enhancement versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 14:40:16 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 Jun 2020 18:40:16 +0000 Subject: [issue40913] time.sleep ignores errors on Windows Message-ID: <1591641616.51.0.015066290777.issue40913@roundup.psfhosted.org> New submission from Steve Dower : In time.sleep on Windows, if the WaitForSingleObject call fails, the call returns success. It essentially looks like the timeout was 0. Errors should be highly unlikely, as the event object is leaked (see issue40912), but if they _do_ occur, we should raise them. ---------- components: Windows messages: 371037 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: time.sleep ignores errors on Windows type: behavior versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 14:47:14 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Mon, 08 Jun 2020 18:47:14 +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: <1591642034.78.0.554406793269.issue40548@roundup.psfhosted.org> Change by Filipe La?ns : ---------- pull_requests: +19947 pull_request: https://github.com/python/cpython/pull/20740 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 14:53:32 2020 From: report at bugs.python.org (Brett Cannon) Date: Mon, 08 Jun 2020 18:53:32 +0000 Subject: [issue24914] Python: Not just OO style but this is not mentioned on python.org or in FAQ In-Reply-To: <1440225910.92.0.539487452884.issue24914@psf.upfronthosting.co.za> Message-ID: <1591642412.89.0.228050960769.issue24914@roundup.psfhosted.org> Brett Cannon added the comment: New changeset 14073c509058f8efeb5ea7f7693bf84f410d24b7 by Miss Islington (bot) in branch '3.8': bpo-24914: mention Python supports multiple paradigms in the FAQ (GH-20658) (GH-20738) https://github.com/python/cpython/commit/14073c509058f8efeb5ea7f7693bf84f410d24b7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 14:53:40 2020 From: report at bugs.python.org (Brett Cannon) Date: Mon, 08 Jun 2020 18:53:40 +0000 Subject: [issue24914] Python: Not just OO style but this is not mentioned on python.org or in FAQ In-Reply-To: <1440225910.92.0.539487452884.issue24914@psf.upfronthosting.co.za> Message-ID: <1591642420.12.0.0796887808303.issue24914@roundup.psfhosted.org> Brett Cannon added the comment: New changeset b155381314c632e7dd452fbade3903e58657cfc7 by Miss Islington (bot) in branch '3.9': bpo-24914: mention Python supports multiple paradigms in the FAQ (GH-20658) (GH-20737) https://github.com/python/cpython/commit/b155381314c632e7dd452fbade3903e58657cfc7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 14:53:51 2020 From: report at bugs.python.org (Brett Cannon) Date: Mon, 08 Jun 2020 18:53:51 +0000 Subject: [issue24914] Python: Not just OO style but this is not mentioned on python.org or in FAQ In-Reply-To: <1440225910.92.0.539487452884.issue24914@psf.upfronthosting.co.za> Message-ID: <1591642431.92.0.601012968527.issue24914@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 15:43:08 2020 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Mon, 08 Jun 2020 19:43:08 +0000 Subject: [issue27657] urlparse fails if the path is numeric In-Reply-To: <1469908637.82.0.696114480311.issue27657@psf.upfronthosting.co.za> Message-ID: <1591645388.78.0.100532459505.issue27657@roundup.psfhosted.org> Micha? G?rny added the comment: I wonder if it would be feasible to support new behavior in earlier versions of Python via __future__. I suppose that could help software avoid having Python version-dependent behavior in the long run. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 15:44:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 19:44:50 +0000 Subject: [issue40912] _PyOS_SigintEvent is never closed on Windows In-Reply-To: <1591641593.68.0.465410581538.issue40912@roundup.psfhosted.org> Message-ID: <1591645490.72.0.2048847363.issue40912@roundup.psfhosted.org> STINNER Victor added the comment: PyOS_FiniInterrupts() is a good place to close _PyOS_SigintEvent. Hopefully, it's a internal C API and it's not exported, since it's fine to change its behavior. Maybe it should be renamed to _PyOS_FiniInterrupts(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 16:14:34 2020 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 08 Jun 2020 20:14:34 +0000 Subject: [issue27657] urlparse fails if the path is numeric In-Reply-To: <1469908637.82.0.696114480311.issue27657@psf.upfronthosting.co.za> Message-ID: <1591647274.05.0.18057063111.issue27657@roundup.psfhosted.org> Senthil Kumaran added the comment: Micha?, for this particular issue, to rely on the expected and consistent parsing behavior, it might easier to add "scheme" to URLs in the client code. That will be less confusing IMO. Not sure if __future__ is a good idea. Personally, I am -1 at this point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 16:22:08 2020 From: report at bugs.python.org (Chris Dent) Date: Mon, 08 Jun 2020 20:22:08 +0000 Subject: [issue27657] urlparse fails if the path is numeric In-Reply-To: <1469908637.82.0.696114480311.issue27657@psf.upfronthosting.co.za> Message-ID: <1591647728.26.0.612284228681.issue27657@roundup.psfhosted.org> Chris Dent added the comment: I just wanted to reiterate what I said at https://bugs.python.org/issue27657#msg360196 The supposed fix provides terribly UX and violates what I think for many people is the path of least surprise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 17:05:03 2020 From: report at bugs.python.org (r n) Date: Mon, 08 Jun 2020 21:05:03 +0000 Subject: [issue40907] cpython/lib/queue.py: put() does not acquire not_empty before notifying on it Message-ID: <1591650303.54.0.0697365124726.issue40907@roundup.psfhosted.org> Change by r n : ---------- nosy: +rhettinger -r n2 title: cpython/queue.py: put() does not acquire not_empty before notifying on it -> cpython/lib/queue.py: put() does not acquire not_empty before notifying on it _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 17:10:11 2020 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 08 Jun 2020 21:10:11 +0000 Subject: [issue27657] urlparse fails if the path is numeric In-Reply-To: <1469908637.82.0.696114480311.issue27657@psf.upfronthosting.co.za> Message-ID: <1591650611.0.0.253664752208.issue27657@roundup.psfhosted.org> Senthil Kumaran added the comment: Chris, my understanding of the primary objection in your previous post was with a violation of backward compatibility. It was resolved by reverting. The 3.9+ changes are useful ones, particularly when well-defined behaviors are listed for URLs with the scheme. --- Let's please assume that the behavior will be consistent for a) Scheme URLs for all supported versions of Python for numeric paths. b) Consistent with other widely observed behavior (or supported by RFC) in 3.9+ onwards for this particular case. If there is any violation of b), please point out, I am certainly open to treat this as a bug (again) and revisit the 3+ issues across which this discussion has spanned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 17:15:00 2020 From: report at bugs.python.org (Michael Richardson) Date: Mon, 08 Jun 2020 21:15:00 +0000 Subject: [issue40914] tarfile creates output that appears to omit files Message-ID: <1591650900.31.0.37019490492.issue40914@roundup.psfhosted.org> New submission from Michael Richardson : The simplest tarcopy program seems to result in output that GNU tar, bsdtar, and even Emacs tar-mode is unable to correctly process. It appears that the resulting tar file is missing files, but examination of the raw output shows they might be there, but just corrupt. GNU tar actually complains while reading the file. https://github.com/mcr/python3-tar-copy-failure has a test case. Here is the stupid code to reproduce it: import tarfile out = tarfile.open(name="./t2.tar", mode="w", format=tarfile.PAX_FORMAT) with tarfile.open("./t1.tar") as tar: for file in tar.getmembers(): print (file.name) out.addfile(file) out.close() This has been confirmed on python 3.6.9 (Ubuntu 18.04 LTS), and python 3.7.3 (Devuan Beowulf). It seems to omit different files on 32-bit and 64-bit systems. ---------- components: Library (Lib) messages: 371045 nosy: mcr314 priority: normal severity: normal status: open title: tarfile creates output that appears to omit files type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 17:15:26 2020 From: report at bugs.python.org (Michael Richardson) Date: Mon, 08 Jun 2020 21:15:26 +0000 Subject: [issue40914] tarfile creates output that appears to omit files In-Reply-To: <1591650900.31.0.37019490492.issue40914@roundup.psfhosted.org> Message-ID: <1591650926.61.0.577251244485.issue40914@roundup.psfhosted.org> Change by Michael Richardson : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 17:23:17 2020 From: report at bugs.python.org (Chris Dent) Date: Mon, 08 Jun 2020 21:23:17 +0000 Subject: [issue27657] urlparse fails if the path is numeric In-Reply-To: <1469908637.82.0.696114480311.issue27657@psf.upfronthosting.co.za> Message-ID: <1591651397.66.0.177203347452.issue27657@roundup.psfhosted.org> Chris Dent added the comment: I don't want to belabour the point. If there's general agreement that the new behaviour is the best result that's fine, especially if it is well announced. I agree that it has been inconsistent and weird for a long time. I think my objection simply comes down to "we all got used to it being weird over the years, and now you want to change it!?" Followed by table flips and all the rest. But it really isn't that much of a big deal, so I won't persist. Long term having it be its most correct is probably the best thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 17:27:31 2020 From: report at bugs.python.org (Zachary Ware) Date: Mon, 08 Jun 2020 21:27:31 +0000 Subject: [issue40914] tarfile creates output that appears to omit files In-Reply-To: <1591650900.31.0.37019490492.issue40914@roundup.psfhosted.org> Message-ID: <1591651651.51.0.523703674313.issue40914@roundup.psfhosted.org> Zachary Ware added the comment: Note that `TarFile.getmembers()` is documented to return `TarInfo` objects, which are documented as explicitly *not* including file data. Try replacing `out.addfile(file)` with `out.addfile(file, tar.extractfile(file))`. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 18:12:32 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 08 Jun 2020 22:12:32 +0000 Subject: [issue35823] Use vfork() in subprocess on Linux In-Reply-To: <1548381806.02.0.709569222975.issue35823@roundup.psfhosted.org> Message-ID: <1591654352.25.0.0635009587761.issue35823@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 18:30:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jun 2020 22:30:52 +0000 Subject: [issue35823] Use vfork() in subprocess on Linux In-Reply-To: <1548381806.02.0.709569222975.issue35823@roundup.psfhosted.org> Message-ID: <1591655452.6.0.106458669773.issue35823@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 18:48:32 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Mon, 08 Jun 2020 22:48:32 +0000 Subject: [issue40889] Symmetric difference on dict_views is inefficient In-Reply-To: <1591463399.57.0.727941047538.issue40889@roundup.psfhosted.org> Message-ID: <1591656512.01.0.515498863518.issue40889@roundup.psfhosted.org> Dennis Sweeney added the comment: A demo: >>> class Int(int): ... hash_calls = 0 ... def __hash__(self): ... Int.hash_calls += 1 ... return super().__hash__() ... >>> left = {Int(1): -1, Int(2): -2, Int(3): -3, Int(4): -4, Int(5): -5, Int(6): -6, Int(7): -7} >>> right = {Int(1): -1, Int(2): -2, Int(3): -3, Int(4): -4, Int(5): -5, Int(8): -8, Int(9): -9} >>> Int.hash_calls = 0 >>> left.items() ^ right.items() {(9, -9), (7, -7), (8, -8), (6, -6)} >>> Int.hash_calls It looks like the same trick (searching by key and comparing values before maybe constructing a 2-tuple) might give similar performance improvements for dict_items.__or__, dict_items.__and__, and dict_items.__sub__. Is it worth discussing these other operators in this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:01:10 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 08 Jun 2020 23:01:10 +0000 Subject: [issue39576] Surprising MemoryError in `decimal` with MAX_PREC In-Reply-To: <1581046760.48.0.443155322154.issue39576@roundup.psfhosted.org> Message-ID: <1591657270.74.0.974189415107.issue39576@roundup.psfhosted.org> Stefan Krah added the comment: I think I'm going to revert this for 3.7 and 3.8 -- not because of xlc (it is almost certainly a compiler or missing flag error), but because coordination with the Linux distributions is a mess, see #40874. I really want the system libmpdec to be the same as the one in Python. So, there has been one 3.7 and 3.8 release in the meantime. However, I highly doubt that anyone will have relied on this in the meantime. In the worst case, people can compile 3.7/3.8 with the upcoming libmpdec-2.5.0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:08:03 2020 From: report at bugs.python.org (Eryk Sun) Date: Mon, 08 Jun 2020 23:08:03 +0000 Subject: [issue40915] muultiple problems with mmap.resize() in Windows Message-ID: <1591657683.26.0.992231826575.issue40915@roundup.psfhosted.org> New submission from Eryk Sun : In Windows, mmap.resize() unmaps the view of the section [1], closes the section handle, resizes the file (without error checking), creates a new section (without checking for ERROR_ALREADY_EXISTS), and maps a new view. This code has several problems. Case 1 If it tries to shrink a file that has existing section references, SetEndOfFile fails with ERROR_USER_MAPPED_FILE. Since the error isn't checked, the code proceeds to silently map a smaller view without changing the file size, which contradicts the documented behavior. For example: >>> f = open('C:/Temp/spam.txt', 'wb+') >>> f.truncate(8192) 8192 >>> m1 = mmap.mmap(f.fileno(), 0) >>> m2 = mmap.mmap(f.fileno(), 0) >>> m1.resize(4096) >>> os.fstat(f.fileno()).st_size 8192 In this case, it should set dwErrCode = ERROR_USER_MAPPED_FILE; set new_size = self->size; remap the file; and fail the resize() call. The mmap object should remain open. Case 2 Growing the file may succeed, but if it's a named section (i.e. self->tagname is set) with multiple handle references, then CreateFileMapping just reopens the existing section by name. Or there could be a race condition with another section that gets created with the same name in the window between closing the current section, resizing the file, and creating a new section. Generally mapping a new view will fail in this case. In particular, if the section isn't large enough, then the NtMapViewOfSection system call fails with STATUS_INVALID_VIEW_SIZE, which WinAPI MapViewOfFile translates to ERROR_ACCESS_DENIED. For example: >>> f = open('C:/Temp/spam.txt', 'wb+') >>> f.truncate(8192) 8192 >>> m1 = mmap.mmap(f.fileno(), 0, 'spam') >>> m2 = mmap.mmap(-1, 8192, 'spam') >>> m1.resize(16384) Traceback (most recent call last): File "", line 1, in PermissionError: [WinError 5] Access is denied >>> m1[0] Traceback (most recent call last): File "", line 1, in ValueError: mmap closed or invalid >>> os.fstat(f.fileno()).st_size 16384 If CreateFileMapping succeeds with the last error set to ERROR_ALREADY_EXISTS, then it either opened the previous section or there was a race condition in which another section was created with the same name. This case should be handled by closing the section and failing the call. It should not proceed to MapViewOfFile, which may 'succeed' unreliably. Additionally, there could be a LBYL check at the outset to avoid having to close the section in the case of a named section that's opened multiple times. If self->tagname is set, get the handle count of the section via NtQueryObject: ObjectBasicInformation [2]. If the handle count is not exactly 1, fail the resize() call, but don't close the mmap object. Case 3 resize() is broken for sections that are backed by the system paging file. For example: >>> m = mmap.mmap(-1, 4096) >>> m.resize(8192) Traceback (most recent call last): File "", line 1, in OSError: [WinError 87] The parameter is incorrect >>> m[0] Traceback (most recent call last): File "", line 1, in ValueError: mmap closed or invalid Since the handle value is INVALID_HANDLE_VALUE in this case, the calls to resize the 'file' via SetFilePointer and SetEndOfFile fail with ERROR_INVALID_HANDLE (due to an object type mismatch because handle value -1 is the current process). There's no error checking, so it proceeds to call CreateFileMapping with dwMaximumSizeHigh and dwMaximumSizeLow as 0, which fails immediately as an invalid parameter. Creating a section that's backed by the system paging file requires a non-zero size. The view of a section can shrink, but the section itself cannot grow. Generally resize() in this case would have to create a copy as follows: close the section; create another section with the new size; map the new view; copy the contents of the old view to the new view; and unmap the old view. Note that creating a new named section may open the previous section, or open an unrelated section if there's a race condition, so ERROR_ALREADY_EXISTS has to be handled. [1]: "section" is the native system name of a "file mapping". [2]: https://docs.microsoft.com/en-us/windows/win32/api/winternl/nf-winternl-ntqueryobject ---------- components: IO, Library (Lib), Windows messages: 371050 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: muultiple problems with mmap.resize() in Windows type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:08:49 2020 From: report at bugs.python.org (Eryk Sun) Date: Mon, 08 Jun 2020 23:08:49 +0000 Subject: [issue40915] multiple problems with mmap.resize() in Windows In-Reply-To: <1591657683.26.0.992231826575.issue40915@roundup.psfhosted.org> Message-ID: <1591657729.14.0.261996069831.issue40915@roundup.psfhosted.org> Change by Eryk Sun : ---------- title: muultiple problems with mmap.resize() in Windows -> multiple problems with mmap.resize() in Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:10:30 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 08 Jun 2020 23:10:30 +0000 Subject: [issue39576] Surprising MemoryError in `decimal` with MAX_PREC In-Reply-To: <1581046760.48.0.443155322154.issue39576@roundup.psfhosted.org> Message-ID: <1591657830.74.0.320344061877.issue39576@roundup.psfhosted.org> Change by Stefan Krah : ---------- pull_requests: +19948 pull_request: https://github.com/python/cpython/pull/20743 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:12:21 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 08 Jun 2020 23:12:21 +0000 Subject: [issue39576] Surprising MemoryError in `decimal` with MAX_PREC In-Reply-To: <1581046760.48.0.443155322154.issue39576@roundup.psfhosted.org> Message-ID: <1591657941.26.0.160068779361.issue39576@roundup.psfhosted.org> Change by Stefan Krah : ---------- pull_requests: +19949 pull_request: https://github.com/python/cpython/pull/20744 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:21:02 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 08 Jun 2020 23:21:02 +0000 Subject: [issue39576] Surprising MemoryError in `decimal` with MAX_PREC In-Reply-To: <1581046760.48.0.443155322154.issue39576@roundup.psfhosted.org> Message-ID: <1591658462.5.0.236115105267.issue39576@roundup.psfhosted.org> Stefan Krah added the comment: New changeset 706de4e5a4b21880c67f6b90e3a2147a258d6fc5 by Stefan Krah in branch '3.8': [3.8] Revert bpo-39576: Clarify the word size for the 32-bit build. (GH-20743) https://github.com/python/cpython/commit/706de4e5a4b21880c67f6b90e3a2147a258d6fc5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:22:07 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 08 Jun 2020 23:22:07 +0000 Subject: [issue39576] Surprising MemoryError in `decimal` with MAX_PREC In-Reply-To: <1581046760.48.0.443155322154.issue39576@roundup.psfhosted.org> Message-ID: <1591658527.03.0.626421775752.issue39576@roundup.psfhosted.org> Stefan Krah added the comment: New changeset c0b79450bc9e93105799528151c48d25af8240a3 by Stefan Krah in branch '3.7': [3.7] Revert bpo-39576: Clarify the word size for the 32-bit build. (GH-20744) https://github.com/python/cpython/commit/c0b79450bc9e93105799528151c48d25af8240a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:23:21 2020 From: report at bugs.python.org (Joshua Oreman) Date: Mon, 08 Jun 2020 23:23:21 +0000 Subject: [issue40916] Proposed tweak to allow for per-task async generator semantics Message-ID: <1591658601.25.0.694478043873.issue40916@roundup.psfhosted.org> New submission from Joshua Oreman : The current async generator finalization hooks are per-thread, but sometimes you want different async generator semantics in different async tasks in the same thread. This is currently challenging to implement using the thread-level hooks. I'm proposing a small backwards-compatible change to the existing async generator hook semantics in order to better support this use case. I'm seeking feedback on the proposal and also on how "major" it would be considered. Does it need a PEP? If not, does it need to wait for 3.10 or could it maybe still make 3.9 at this point? TL;DR: if the firstiter hook returns a callable, use that as the finalizer hook for this async generator instead of using the thread-level finalizer hook. == Why would you want this? == The use case that brought me here is trio-asyncio, a library that allows asyncio and Trio tasks to coexist in the same thread. Trio is working on adding async generator finalization support at the moment, which presents problems for trio-asyncio: it wouldn't work to finalize asyncio-flavored async generators as if they were Trio-flavored, or vice versa. It's easy to tell an async generator's flavor from the firstiter hook (just look at which flavor of task is running right now), but hard to ensure that the corresponding correct finalizer hook is called (more on this below). There are other possible uses as well. For example, one could imagine writing an async context manager that ensures all async generators firstiter'd within the context are aclose'd before exiting the context. This would be less verbose than guarding each individual use of an async generator, but still provide more deterministic cleanup behavior than leaving it up to GC. == Why is this challenging to implement currently? == Both of the above use cases want to provide a certain async generator firstiter/finalizer behavior, but only within a particular task or tasks. A task-local firstiter hook is easy: just install a thread-local hook that checks if you're in a task of interest, calls your custom logic if so or calls the previous hook if not. But a task-local finalizer hook is challenging, because finalization doesn't necessarily occur in the same context where the generator was being used. The firstiter hook would need to remember which finalizer hook to use for this async generator, but where could it store that information? Using the async generator iterator object as a key in a regular dictionary will prevent it from being finalized, and as a key in a WeakKeyDictionary will remove the information before the finalizer hook can look it up (because weakrefs are broken before finalizers are called). About the only solution I've found is to store it in the generator's f_locals dict, but that's not very appealing. == What's the proposed change? == My proposal is to allow the firstiter hook to return the finalizer hook that this async generator should use. If it does so, then when this async generator is finalized, it will call the returned finalizer hook instead of the thread-level one. If the firstiter hook returns None, then this async generator will use whatever the thread-level finalizer was just before firstiter was called, same as the current behavior. == How disruptive would this be? == Async generator objects already have an ag_finalizer field, so this would not change the object size. It's just providing a more flexible way to determine the value of ag_finalizer, which is currently not accessible from Python. There is a theoretical backwards compatibility concern if any existing firstiter hook returns a non-None value. There wouldn't be any reason to do so, though, and the number of different users of set_asyncgen_hooks() currently is likely extremely small. I searched all of Github and found only asyncio, curio, uvloop, async_generator, and my work-in-progress PR for Trio. All of these install either no firstiter hook or a firstiter hook that returns None. The implementation would likely only be a handful of lines change to genobject.c. ---------- components: asyncio messages: 371053 nosy: Joshua Oreman, asvetlov, njs, yselivanov priority: normal severity: normal status: open title: Proposed tweak to allow for per-task async generator semantics type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:24:40 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 08 Jun 2020 23:24:40 +0000 Subject: [issue39576] Surprising MemoryError in `decimal` with MAX_PREC In-Reply-To: <1581046760.48.0.443155322154.issue39576@roundup.psfhosted.org> Message-ID: <1591658680.52.0.41323039998.issue39576@roundup.psfhosted.org> Change by Stefan Krah : ---------- pull_requests: +19950 pull_request: https://github.com/python/cpython/pull/20745 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:27:11 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 08 Jun 2020 23:27:11 +0000 Subject: [issue39576] Surprising MemoryError in `decimal` with MAX_PREC In-Reply-To: <1581046760.48.0.443155322154.issue39576@roundup.psfhosted.org> Message-ID: <1591658831.77.0.18868580715.issue39576@roundup.psfhosted.org> Change by Stefan Krah : ---------- pull_requests: +19951 pull_request: https://github.com/python/cpython/pull/20746 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:33:15 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 08 Jun 2020 23:33:15 +0000 Subject: [issue39576] Surprising MemoryError in `decimal` with MAX_PREC In-Reply-To: <1581046760.48.0.443155322154.issue39576@roundup.psfhosted.org> Message-ID: <1591659195.34.0.561854985577.issue39576@roundup.psfhosted.org> Stefan Krah added the comment: New changeset 32c1fb07e6f2ded90e5dd24d4b46b7aa7a795d2e by Stefan Krah in branch '3.8': [3.8] Revert bpo-39576: docs: set context for decimal arbitrary precision arithmetic (GH-20745) https://github.com/python/cpython/commit/32c1fb07e6f2ded90e5dd24d4b46b7aa7a795d2e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:34:06 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 08 Jun 2020 23:34:06 +0000 Subject: [issue39576] Surprising MemoryError in `decimal` with MAX_PREC In-Reply-To: <1581046760.48.0.443155322154.issue39576@roundup.psfhosted.org> Message-ID: <1591659246.88.0.676473443675.issue39576@roundup.psfhosted.org> Stefan Krah added the comment: New changeset 9bd891920a5186b7d02281ea9966225efa0ceba1 by Stefan Krah in branch '3.7': [3.7] Revert bpo-39576: docs: set context for decimal arbitrary precision arithmetic (GH-20746) https://github.com/python/cpython/commit/9bd891920a5186b7d02281ea9966225efa0ceba1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:37:08 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 08 Jun 2020 23:37:08 +0000 Subject: [issue39576] Surprising MemoryError in `decimal` with MAX_PREC In-Reply-To: <1581046760.48.0.443155322154.issue39576@roundup.psfhosted.org> Message-ID: <1591659428.63.0.145102805197.issue39576@roundup.psfhosted.org> Change by Stefan Krah : ---------- pull_requests: +19952 pull_request: https://github.com/python/cpython/pull/20747 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:39:35 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 08 Jun 2020 23:39:35 +0000 Subject: [issue39576] Surprising MemoryError in `decimal` with MAX_PREC In-Reply-To: <1581046760.48.0.443155322154.issue39576@roundup.psfhosted.org> Message-ID: <1591659575.11.0.46768860615.issue39576@roundup.psfhosted.org> Change by Stefan Krah : ---------- pull_requests: +19953 pull_request: https://github.com/python/cpython/pull/20748 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:43:44 2020 From: report at bugs.python.org (Adam Williamson) Date: Mon, 08 Jun 2020 23:43:44 +0000 Subject: [issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't In-Reply-To: <1591124614.71.0.196427498662.issue40847@roundup.psfhosted.org> Message-ID: <1591659824.45.0.70601161588.issue40847@roundup.psfhosted.org> Adam Williamson added the comment: I'm not the best person to ask what I'd "consider" to be a bug or not, to be honest. I'm just a Fedora packaging guy trying to make our packages build with Python 3.9 :) If this is still an important question, I'd suggest asking the folks from the Black issue and PR I linked to, that's the "real world" case if any. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:46:10 2020 From: report at bugs.python.org (Toshio Kuratomi) Date: Mon, 08 Jun 2020 23:46:10 +0000 Subject: [issue40917] pickling exceptions with mandatory keyword args will traceback Message-ID: <1591659970.45.0.239988250333.issue40917@roundup.psfhosted.org> New submission from Toshio Kuratomi : I was trying to use multiprocessing (via a concurrent.futures.ProcessPoolExecutor) and encountered an error when pickling a custom Exception. On closer examination I was able to create a simple test case that only involves pickle: import pickle class StrRegexError(Exception): def __init__(self, *, pattern): self.pattern = pattern data = pickle.dumps(StrRegexError(pattern='test')) instance = pickle.loads(data) [pts/11 at peru /srv/ansible]$ python3.8 ~/p.py Traceback (most recent call last): File "/home/badger/p.py", line 7, in instance = pickle.loads(data) TypeError: __init__() missing 1 required keyword-only argument: 'pattern' pickle can handle mandatory keyword args in other classes derived from object; it's only classes derived from Exception that have issues. ---------- components: Library (Lib) messages: 371057 nosy: a.badger priority: normal severity: normal status: open title: pickling exceptions with mandatory keyword args will traceback versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:47:04 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Jun 2020 23:47:04 +0000 Subject: [issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't In-Reply-To: <1591124614.71.0.196427498662.issue40847@roundup.psfhosted.org> Message-ID: <1591660024.86.0.981719173194.issue40847@roundup.psfhosted.org> Guido van Rossum added the comment: To be clear, I consider it a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:55:55 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 08 Jun 2020 23:55:55 +0000 Subject: [issue39576] Surprising MemoryError in `decimal` with MAX_PREC In-Reply-To: <1581046760.48.0.443155322154.issue39576@roundup.psfhosted.org> Message-ID: <1591660554.98.0.168688038679.issue39576@roundup.psfhosted.org> Stefan Krah added the comment: New changeset 22faf6ad3bcc0ae478a9a3e2d8e35888d88d6ce8 by Stefan Krah in branch '3.7': [3.7] Revert bpo-39576: Prevent memory error for overly optimistic precisions (GH-20748) https://github.com/python/cpython/commit/22faf6ad3bcc0ae478a9a3e2d8e35888d88d6ce8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 19:57:14 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 08 Jun 2020 23:57:14 +0000 Subject: [issue39576] Surprising MemoryError in `decimal` with MAX_PREC In-Reply-To: <1581046760.48.0.443155322154.issue39576@roundup.psfhosted.org> Message-ID: <1591660634.69.0.963258958589.issue39576@roundup.psfhosted.org> Stefan Krah added the comment: New changeset 0f5a28f834bdac2da8a04597dc0fc5b71e50da9d by Stefan Krah in branch '3.8': [3.8] Revert bpo-39576: Prevent memory error for overly optimistic precisions (GH-20747) https://github.com/python/cpython/commit/0f5a28f834bdac2da8a04597dc0fc5b71e50da9d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 20:11:34 2020 From: report at bugs.python.org (=?utf-8?q?La=C3=ABl_Cellier?=) Date: Tue, 09 Jun 2020 00:11:34 +0000 Subject: =?utf-8?q?=5Bissue40923=5D_Thread_safety=C2=A0=3A_disable_intel=E2=80=99s?= =?utf-8?q?_compiler_autopar_where_it=E2=80=99s_being_relevant=2E?= Message-ID: <1591661494.52.0.310043483361.issue40923@roundup.psfhosted.org> New submission from La?l Cellier : As the bug tracker constantly crash over a continuation byte error while using latest Edge?????s Edge browser the description is posted here : https://pastebin.com/5AU9HuQk ---------- components: Build, C API, Interpreter Core messages: 371066 nosy: La?l Cellier priority: normal severity: normal status: open title: Thread safety?: disable intel?s compiler autopar where it?s being relevant. type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 20:12:42 2020 From: report at bugs.python.org (=?utf-8?q?La=C3=ABl_Cellier?=) Date: Tue, 09 Jun 2020 00:12:42 +0000 Subject: =?utf-8?q?=5Bissue40923=5D_Thread_safety=C2=A0=3A_disable_intel=E2=80=99s?= =?utf-8?q?_compiler_autopar_where_it=E2=80=99s_being_relevant=2E?= In-Reply-To: <1591661494.52.0.310043483361.issue40923@roundup.psfhosted.org> Message-ID: <1591661562.75.0.608563774867.issue40923@roundup.psfhosted.org> La?l Cellier added the comment: (about the bug tracker I was meaning server?side error message) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 20:15:52 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Tue, 09 Jun 2020 00:15:52 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591661752.71.0.969152937342.issue40890@roundup.psfhosted.org> Change by Dennis Sweeney : ---------- keywords: +patch pull_requests: +19954 pull_request: https://github.com/python/cpython/pull/20749 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 20:16:12 2020 From: report at bugs.python.org (=?utf-8?q?La=C3=ABl_Cellier?=) Date: Tue, 09 Jun 2020 00:16:12 +0000 Subject: =?utf-8?q?=5Bissue40923=5D_Thread_safety=C2=A0=3A_disable_intel=E2=80=99s?= =?utf-8?q?_compiler_autopar_where_it=E2=80=99s_being_relevant=2E?= In-Reply-To: <1591661494.52.0.310043483361.issue40923@roundup.psfhosted.org> Message-ID: <1591661772.15.0.828622218815.issue40923@roundup.psfhosted.org> La?l Cellier added the comment: It also turns out the problematic binary can?t be posted here because of a ???? 413 Entity too large error despite the attachment being only 4MB https://filebin.net/4lp4nb61dav9qamo ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 20:32:14 2020 From: report at bugs.python.org (Stefan Krah) Date: Tue, 09 Jun 2020 00:32:14 +0000 Subject: [issue39576] Surprising MemoryError in `decimal` with MAX_PREC In-Reply-To: <1581046760.48.0.443155322154.issue39576@roundup.psfhosted.org> Message-ID: <1591662734.14.0.25963445712.issue39576@roundup.psfhosted.org> Stefan Krah added the comment: The 3.9 change (see #40874) works successfully on all buildbots, except for the 32-bit xlc bot which should use c99_r. Additionally, it has been tested with the latest gcc/clang/icc/cl.exe, static analyzers and clang-tidy. It survives brute force allocation failure tests under Valgrind and all sanitizers (ASAN + integrated LSAN, UBSAN, TSAN). Except for one (standalone LSAN), and that is an LSAN issue: https://github.com/google/sanitizers/issues/1257 It looks very similar to the xlc issue and was found by using a debugger, which is apparently not possible with the xlc toolchain. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 20:36:03 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Tue, 09 Jun 2020 00:36:03 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591662963.62.0.277349357299.issue40890@roundup.psfhosted.org> Dennis Sweeney added the comment: PR 20749 gives each dict view access to a mappingproxy for the original dict, although I don't know if that defeats the original purpose. It might be hard to sensibly make MappingProxy(d).items() return something other than d.items(), since this is already the behavior for user-defined classes: >>> class A: def __getitem__(self, key): return "value" def items(self): return 17 >>> from types import MappingProxyType >>> MappingProxyType(A()).items() 17 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 20:53:50 2020 From: report at bugs.python.org (Toshio Kuratomi) Date: Tue, 09 Jun 2020 00:53:50 +0000 Subject: [issue40917] pickle exceptions with mandatory keyword args will traceback In-Reply-To: <1591659970.45.0.239988250333.issue40917@roundup.psfhosted.org> Message-ID: <1591664030.61.0.971684435157.issue40917@roundup.psfhosted.org> Change by Toshio Kuratomi : ---------- title: pickling exceptions with mandatory keyword args will traceback -> pickle exceptions with mandatory keyword args will traceback _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 21:16:52 2020 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 09 Jun 2020 01:16:52 +0000 Subject: [issue40916] Proposed tweak to allow for per-task async generator semantics In-Reply-To: <1591658601.25.0.694478043873.issue40916@roundup.psfhosted.org> Message-ID: <1591665412.1.0.741512052047.issue40916@roundup.psfhosted.org> Nathaniel Smith added the comment: FWIW, this seems like a pretty straightforward improvement to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 8 22:01:23 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Tue, 09 Jun 2020 02:01:23 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591668083.66.0.934535048399.issue40890@roundup.psfhosted.org> Dennis Sweeney added the comment: Here's a workaround that's possible with PR 20749 applied: >>> d = {"a":1, "b":2} # fill up the dict... >>> DICT = object() >>> d[DICT] = d >>> items = d.items() >>> del d >>> >>> d = items.mapping[DICT].pop(DICT) >>> d {'a': 1, 'b': 2} ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 00:09:03 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Jun 2020 04:09:03 +0000 Subject: [issue13179] IDLE uses common tkinter variables across all editor windows In-Reply-To: <1318607548.28.0.391563618977.issue13179@psf.upfronthosting.co.za> Message-ID: <1591675743.42.0.389581245019.issue13179@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 01:59:48 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 09 Jun 2020 05:59:48 +0000 Subject: [issue40924] Recent importlib change breaks most recent certifi == 2020.4.5.2 Message-ID: <1591682388.65.0.686796854093.issue40924@roundup.psfhosted.org> New submission from Ned Deily : The very recent latest commits for Issue39791, "New `files()` api from importlib_resources", have broken the popular certifi package, a package which provides a basic set of Root Certificates for TLS secure network connection verification. Among other users of it, the python.org macOS installers encourage its users to run a provided script to install certifi. Alas, we discovered just after v3.9.2b2 was tagged that that script is broken because certifi.where() is returning a bogus path toe the pem file, what appears to be a path in a deleted temp directory. The culprit commits are 843c27765652e2322011fb3e5d88f4837de38c06 (master) and 9cf1be46e3692d565461afd3afa326d124d743dd (3.9). This is now a critical problem because in its most recent release, certifi 2020.4.5.2, certifi was changed to try to use importlib.resources.path(), if available, to find the path to the installed cacert.pem file. (The previous release, 2020.4.5.1, appears not to use path() and so is not affected by this bug.) https://github.com/certifi/python-certifi/commit/3fc8fec0466b0f12f10ad3e429b8d915bc5c26fb https://pypi.org/project/certifi/2020.4.5.2/ Without trying to debug the bug, I was able to bisect the branch and then reduce the problem seen in macOS installer testing to a fairly simple reproducible test case. The problem was reproduced on both Linux and macOS systems. The test case: # in a current cpython git repo, checkout the commit before the failing one git checkout 843c27765652e2322011fb3e5d88f4837de38c06^ git log HEAD^..HEAD git clean -fdxq ./configure --prefix=$PWD/root -q make -j4 ./python -m ensurepip ./python -m pip install --upgrade pip # not necessary to reproduce ./python -m pip install --force --no-binary certifi certifi==2020.4.5.2 ./python -c 'import certifi;print(certifi.where())' The output tail should be something like: [...] Successfully installed certifi-2020.4.5.2 /home/nad/cpython/root/lib/python3.10/site-packages/certifi/cacert.pem Now checkout the failing commit and repeat all the other steps: git checkout 843c27765652e2322011fb3e5d88f4837de38c06 git log HEAD^..HEAD [...] The output tail is now incorrect: [...] Successfully installed certifi-2020.4.5.2 /tmp/tmpqfjnbj5bcacert.pem The cacert.pem is installed to the expected (same) location in either case; its just the output from importlib.resources.path that is incorrect: ./python Python 3.10.0a0 (remotes/upstream/master:0a40849eb9, Jun 9 2020, 00:35:07) [GCC 8.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import importlib.resources, os, os.path, certifi >>> certifi.__file__ '/home/nad/cpython/root/lib/python3.10/site-packages/certifi/__init__.py' >>> os.listdir(os.path.dirname(certifi.__file__)) ['__pycache__', 'cacert.pem', '__init__.py', 'core.py', '__main__.py'] >>> with importlib.resources.path('certifi', 'cacert.pem') as f: print(f) ... /tmp/tmpxsrjxb8lcacert.pem >>> with importlib.resources.path('certifi', 'core.py') as f: print(f) ... /tmp/tmpjq8h3si5core.py No test suite failures were noted. Perhaps there should be a test case for this? Presumably any other downstream users of importlib.resources.path() are affected. ?ukasz as 3.9 release manager is aware there is an issue but was awaiting the tracking down of the problem before making a decision about what to do for 3.9.0b2. cc: Donald as the author of the certifi change. ---------- assignee: jaraco components: Library (Lib) messages: 371073 nosy: dstufft, jaraco, lukasz.langa, ned.deily priority: release blocker severity: normal stage: needs patch status: open title: Recent importlib change breaks most recent certifi == 2020.4.5.2 type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 02:06:42 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 09 Jun 2020 06:06:42 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591682802.65.0.309674816256.issue39791@roundup.psfhosted.org> Ned Deily added the comment: Note that the most recent commits have introduced a critical regression in importlib.resources.path() that breaks the certifi package from PyPI and presumably other users of path(). See Issue40924. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 02:16:36 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 09 Jun 2020 06:16:36 +0000 Subject: [issue40917] pickle exceptions with mandatory keyword args will traceback In-Reply-To: <1591659970.45.0.239988250333.issue40917@roundup.psfhosted.org> Message-ID: <1591683396.34.0.513529686109.issue40917@roundup.psfhosted.org> R?mi Lapeyre added the comment: This is a duplicate of issue 27015. ---------- nosy: +remi.lapeyre versions: +Python 3.10, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 02:21:04 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Jun 2020 06:21:04 +0000 Subject: [issue21756] IDLE - ParenMatch fails to find closing paren of multi-line statements In-Reply-To: <1402739295.59.0.675144010232.issue21756@psf.upfronthosting.co.za> Message-ID: <1591683664.53.0.144617519462.issue21756@roundup.psfhosted.org> Terry J. Reedy added the comment: Updated summary: 1. Typing a closer highlights closer back to the opener. No issue. 2. Hitting ^0 on the closer line before the closer highlights from opener to closer. Hitting ^0 on after the opener on the opener line or any following line before the closer line highlights from opener to the end of that line. This behavior is documented but seems problematical. ^0 is most useful when the match spans multiple lines. 3. The 4 occurrences of 'get_surrounding_brackets in master. hyperparser.py, 116: def get_surrounding_brackets(self, openers='([{', mustclose=False) 'tip': calltip.py, 61, in open_calltip # Called in all 3 tip function. sur_paren = hp.get_surrounding_brackets('(') 'flash' (^0): parenmatch.py, 79, in flash_paren_event indices = (HyperParser(self.editwin, "insert") .get_surrounding_brackets()) 'close' (closer): parenmatch.py, 92, paren_closed_event indices = hp.get_surrounding_brackets(_openers[closer], True) 'tip' and 'flash' both use default mustclose=False. The truncate behavior for tips is that one can move the cursur between opener and closer or eol without dismissing box. I think we agree that 'tip' should remain truncated while 'flash' need not be. You solution is to add a new parameter to __init__ only used by 'flash'. I would rather replace 'mustclose' with mode = 'tip', 'flash', or 'close'. I believe that Stopatindex could be revised within the call. I have not reviewed most of the rest of the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 02:21:11 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Jun 2020 06:21:11 +0000 Subject: [issue21756] IDLE - ParenMatch fails to find closing paren of multi-line statements In-Reply-To: <1402739295.59.0.675144010232.issue21756@psf.upfronthosting.co.za> Message-ID: <1591683671.05.0.415309769811.issue21756@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 03:22:34 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 09 Jun 2020 07:22:34 +0000 Subject: [issue21756] IDLE - ParenMatch fails to find closing paren of multi-line statements In-Reply-To: <1402739295.59.0.675144010232.issue21756@psf.upfronthosting.co.za> Message-ID: <1591687354.81.0.798217794109.issue21756@roundup.psfhosted.org> Tal Einat added the comment: Terry, kudos for getting back to this! Let me make a PR for this, it will make reviewing and testing easier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 03:23:37 2020 From: report at bugs.python.org (Thomas Scheruebl) Date: Tue, 09 Jun 2020 07:23:37 +0000 Subject: [issue40906] Unable to import module due to python unable to resolve dependecies In-Reply-To: <1591595444.88.0.936758108882.issue40906@roundup.psfhosted.org> Message-ID: <1591687417.66.0.82193364151.issue40906@roundup.psfhosted.org> Thomas Scheruebl added the comment: >From what I can see this behavior is intended starting with Python 3.8 for Windows and DLL loading for extension modules. You can use add_dll_directory to add directories to the DLL load path (see https://docs.python.org/3/library/os.html#os.add_dll_directory). More information can be found e.g. here https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew ---------- nosy: +schribl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 03:42:34 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 09 Jun 2020 07:42:34 +0000 Subject: [issue21756] IDLE - ParenMatch fails to find closing paren of multi-line statements In-Reply-To: <1402739295.59.0.675144010232.issue21756@psf.upfronthosting.co.za> Message-ID: <1591688554.03.0.720650088343.issue21756@roundup.psfhosted.org> Tal Einat added the comment: > You solution is to add a new parameter to __init__ only used by 'flash'. I would rather replace 'mustclose' with mode = 'tip', 'flash', or 'close'. I believe that Stopatindex could be revised within the call. The problem with this suggestion is that 'mustclose' is a parameter for HyperParser.get_surrounding_brackets(). When that is called, it is too late to affect whether the parsing goes beyond the end of the current line. We could add a 'mode' parameter to the HyperParser constructor, though. Still, I don't like that approach: HyperParser is currently well encapsulated, but giving it such "modes" would tightly couple it with its current specific uses in IDLE. The approach used in the current patch, with the 'end_at_eol' parameter, preserves HyperParser's encapsulation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 03:58:48 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 09 Jun 2020 07:58:48 +0000 Subject: [issue21756] IDLE - ParenMatch fails to find closing paren of multi-line statements In-Reply-To: <1402739295.59.0.675144010232.issue21756@psf.upfronthosting.co.za> Message-ID: <1591689528.1.0.299641697382.issue21756@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +19955 pull_request: https://github.com/python/cpython/pull/20753 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 04:00:01 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 09 Jun 2020 08:00:01 +0000 Subject: [issue21756] IDLE - ParenMatch fails to find closing paren of multi-line statements In-Reply-To: <1402739295.59.0.675144010232.issue21756@psf.upfronthosting.co.za> Message-ID: <1591689601.81.0.180799666899.issue21756@roundup.psfhosted.org> Tal Einat added the comment: I've created a PR against current master based on the patch, see GH-20753. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 04:06:00 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Jun 2020 08:06:00 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591689960.2.0.588695964938.issue40890@roundup.psfhosted.org> Serhiy Storchaka added the comment: I meant that you can make dict_view.mapping always returning a MappingProxyType. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 04:17:52 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Jun 2020 08:17:52 +0000 Subject: [issue40889] Symmetric difference on dict_views is inefficient In-Reply-To: <1591463399.57.0.727941047538.issue40889@roundup.psfhosted.org> Message-ID: <1591690672.58.0.683655170929.issue40889@roundup.psfhosted.org> Serhiy Storchaka added the comment: So it needs to add 100 lines of C code to speed up a pretty uncommon operation for arguments of a particular type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 04:23:46 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 09 Jun 2020 08:23:46 +0000 Subject: [issue39372] The header files in Include/ have many declarations with no definition In-Reply-To: <1579283234.13.0.0884348783159.issue39372@roundup.psfhosted.org> Message-ID: <1591691026.34.0.0945430300666.issue39372@roundup.psfhosted.org> Petr Viktorin added the comment: Since the removal of PyNoArgsFunction breaks user code, does it deserve a mention in What's New ? Porting to Python 3.9? ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 04:25:48 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Jun 2020 08:25:48 +0000 Subject: [issue40924] Recent importlib change breaks most recent certifi == 2020.4.5.2 In-Reply-To: <1591682388.65.0.686796854093.issue40924@roundup.psfhosted.org> Message-ID: <1591691148.73.0.101939332504.issue40924@roundup.psfhosted.org> Steve Dower added the comment: That was a *big* patch to importlib.resources... And newly defined and standardised protocols? That seems like a lot to bring in without having gone through a PEP anyway, despite the minor bug that has drawn attention to it. I don't think backports should be treated as incubators for standard modules, getting new features that then flow directly into the stdlib. It's fine to have a fork for incubation, but people need to rely on consistency in stdlib and backports. All that to say, I think we should revert the importlib changes *anyway*, and also because there's something wrong with them right now. ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 05:20:15 2020 From: report at bugs.python.org (=?utf-8?q?La=C3=ABl_Cellier?=) Date: Tue, 09 Jun 2020 09:20:15 +0000 Subject: =?utf-8?q?=5Bissue40923=5D_Thread_safety=C2=A0=3A_disable_intel=E2=80=99s?= =?utf-8?q?_compiler_autopar_where_it=E2=80=99s_being_relevant=2E?= In-Reply-To: <1591661494.52.0.310043483361.issue40923@roundup.psfhosted.org> Message-ID: <1591694415.98.0.00876311600436.issue40923@roundup.psfhosted.org> La?l Cellier added the comment: Unlike gcc, icc can pretty much parallelize everything while detecting cases like the mutexes used by the ??? for deciding not to parallelize. The requirement is to use a less conservative approach using -par-threshold97 while using -par-schedule-auto -qoverride-limits -parallel -ipo1 -O3 ?ip inside icc.cfg and CFLAGS at the same time. The build does produce the main python C library, but the python interpreter using it doesn?t even start : Program received signal SIGSEGV, Segmentation fault. 0x00007fffff6128b0 in _PyEval_EvalFrameDefault () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 (gdb) bt #0 0x00007fffff6128b0 in _PyEval_EvalFrameDefault () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #1 0x00007fffff3d55bc in _PyEval_EvalCodeWithName () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #2 0x00007fffff3d474b in _PyFunction_Vectorcall () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #3 0x00007fffff60da57 in call_function () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #4 0x00007fffff613fb4 in _PyEval_EvalFrameDefault () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #5 0x00007fffff3d55bc in _PyEval_EvalCodeWithName () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #6 0x00007fffff4bbbb2 in builtin___build_class__ () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #7 0x00007fffff42d72a in cfunction_vectorcall_FASTCALL_KEYWORDS () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #8 0x00007fffff60da57 in call_function () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #9 0x00007fffff613fb4 in _PyEval_EvalFrameDefault () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #10 0x00007fffff3d55bc in _PyEval_EvalCodeWithName () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #11 0x00007fffff4ea2ff in exec_code_in_module () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #12 0x00007fffff4e9fdf in PyImport_ImportFrozenModuleObject () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #13 0x00007fffff4e9d8f in PyImport_ImportFrozenModule () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #14 0x00007fffff5e3643 in init_importlib () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #15 0x00007fffff5e442c in pycore_init_import_warnings () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #16 0x00007fffff5e45ac in pyinit_config () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #17 0x00007fffff5e4922 in pyinit_core () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #18 0x00007fffff5eb67c in Py_InitializeFromConfig () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #19 0x00007fffff5d8fd0 in pymain_init () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #20 0x00007fffff50e099 in pymain_main () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #21 0x00007fffff50e071 in Py_BytesMain () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0 #22 0x00000000004011b5 in main () The point of doing this is about significant speedups at some intensive workloads like those handling large strings. The configure script is already detecting case where icc is used in order to append ?fp?model fast=1. It looks like the same should be done where (on the specific files) it?s relevant (but I?m not having enough time to determines where not even to debug this). A better approach in order to fix this would be to ensure thread safety at the relevant places if we consider gcc might one day be able to automatically parallelize at that level which means disabling the compiler option for icc is only a temporary fix at best. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 06:07:20 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 09 Jun 2020 10:07:20 +0000 Subject: [issue19670] SimpleCookie Generates Non-RFC6265-Compliant Cookies In-Reply-To: <1384979004.61.0.0353093814459.issue19670@psf.upfronthosting.co.za> Message-ID: <1591697240.47.0.995054767182.issue19670@roundup.psfhosted.org> Tal Einat added the comment: It seems that the docs haven't been updated regarding this, so I don't think this should be closed. On the contrary, A PR adding a clarification to the docs would be most welcome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 06:07:45 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 09 Jun 2020 10:07:45 +0000 Subject: [issue19670] SimpleCookie Generates Non-RFC6265-Compliant Cookies In-Reply-To: <1384979004.61.0.0353093814459.issue19670@psf.upfronthosting.co.za> Message-ID: <1591697265.27.0.217808942727.issue19670@roundup.psfhosted.org> Change by Tal Einat : ---------- components: -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 06:07:30 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 09 Jun 2020 10:07:30 +0000 Subject: [issue19670] SimpleCookie Generates Non-RFC6265-Compliant Cookies In-Reply-To: <1384979004.61.0.0353093814459.issue19670@psf.upfronthosting.co.za> Message-ID: <1591697250.42.0.604667945391.issue19670@roundup.psfhosted.org> Change by Tal Einat : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 06:13:40 2020 From: report at bugs.python.org (Mark Shannon) Date: Tue, 09 Jun 2020 10:13:40 +0000 Subject: [issue40925] Remove redundant macros used for stack manipulation in interpreter Message-ID: <1591697620.81.0.981270573583.issue40925@roundup.psfhosted.org> New submission from Mark Shannon : Currently, there are fourteen macros provided for stack manipulation. Along with the fundamental, POP(), PUSH() and PEEK(n) the following eleven are also provided: TOP() SECOND() THIRD() FOURTH() SET_TOP(v) SET_SECOND(v) SET_THIRD(v) SET_FOURTH(v) SET_VALUE(n, v) STACK_GROW(n) STACK_SHRINK(n) These are unnecessary as compilers have long understood the sequences of pointer increments and decrements that is generated by using POPs and PUSHes. See https://godbolt.org/z/Htw-2k which shows GCC generating exactly the same code from just POP, PUSH and PEEK as from direct access to items on the stack. Removing the redundant macros would make the code easier to reason about and analyze. TOP() and SECOND() are used quite heavily and are trivial to convert to PEEK by tools, so should probably be left alone. Notes: I'm ignoring the stack debugging macros here, they aren't a problem. The EMPTY() macro is only used twice, so might as well be replaced with STACK_LEVEL == 0. Sadly, there is no "maintainability/code quality" selection for "type" of issue, so I've chosen "performance" :( ---------- components: Interpreter Core keywords: easy (C) messages: 371087 nosy: Mark.Shannon priority: normal severity: normal stage: needs patch status: open title: Remove redundant macros used for stack manipulation in interpreter type: performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 06:20:39 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 09 Jun 2020 10:20:39 +0000 Subject: [issue40926] command line interface of symtable module is broken Message-ID: <1591698039.58.0.381389763759.issue40926@roundup.psfhosted.org> New submission from Batuhan Taskaya : (.venv) (Python 3.10.0a0) [ 1:11?S ] [ isidentical at x200:~ ] $ cat t.py import x a = 1 print(x) (.venv) (Python 3.10.0a0) [ 1:11?S ] [ isidentical at x200:~ ] $ python -m symtable t.py True False True False True False True False True False ... It can clearly seen that the initial argument [t.py] is completely ignored, and this script prints out the symtable.py itself. This is because the script uses argv[0] (itself) instead of argv[1] (the first argument). I also find this output quite poor since we don't know what these boolean values are; True False The fix I had in my mind is printing all properties instead of 2 boolean values $ ./cpython/cpython/python -m symtable t.py ==> {'local', 'imported', 'referenced'} ==> {'local', 'assigned'} ==> {'referenced', 'global'} ---------- components: Library (Lib) messages: 371088 nosy: BTaskaya priority: normal severity: normal stage: needs patch status: open title: command line interface of symtable module is broken type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 06:22:22 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 09 Jun 2020 10:22:22 +0000 Subject: [issue40926] command line interface of symtable module is broken In-Reply-To: <1591698039.58.0.381389763759.issue40926@roundup.psfhosted.org> Message-ID: <1591698142.37.0.968151673914.issue40926@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +19956 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20757 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 06:40:22 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 09 Jun 2020 10:40:22 +0000 Subject: [issue40926] command line interface of symtable module is broken In-Reply-To: <1591698039.58.0.381389763759.issue40926@roundup.psfhosted.org> Message-ID: <1591699222.74.0.245338932279.issue40926@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +benjamin.peterson, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 06:46:35 2020 From: report at bugs.python.org (Stefan Krah) Date: Tue, 09 Jun 2020 10:46:35 +0000 Subject: =?utf-8?q?=5Bissue40923=5D_Thread_safety=C2=A0=3A_disable_intel=E2=80=99s?= =?utf-8?q?_compiler_autopar_where_it=E2=80=99s_being_relevant=2E?= In-Reply-To: <1591661494.52.0.310043483361.issue40923@roundup.psfhosted.org> Message-ID: <1591699595.5.0.695061699358.issue40923@roundup.psfhosted.org> Stefan Krah added the comment: It would be easier to understand this issue if you provide the exact command line. icc also segfaults without -fwrapv, see #40223, so that may be the cause here, too. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 06:47:16 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 09 Jun 2020 10:47:16 +0000 Subject: [issue40927] ./python -m test test___all__ test_binhex fails Message-ID: <1591699636.51.0.837580045442.issue40927@roundup.psfhosted.org> New submission from R?mi Lapeyre : It looks like the warning registry does not get flushed properly: ./python -m test test___all__ test_binhex 0:00:00 load avg: 1.55 Run tests sequentially 0:00:00 load avg: 1.55 [1/2] test___all__ 0:00:01 load avg: 1.55 [2/2] test_binhex test test_binhex crashed -- Traceback (most recent call last): File "/Users/remi/src/cpython/Lib/test/libregrtest/runtest.py", line 270, in _runtest_inner refleak = _runtest_inner2(ns, test_name) File "/Users/remi/src/cpython/Lib/test/libregrtest/runtest.py", line 221, in _runtest_inner2 the_module = importlib.import_module(abstest) File "/Users/remi/src/cpython/Lib/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "/Users/remi/src/cpython/Lib/test/test_binhex.py", line 10, in import binhex File "/Users/remi/src/cpython/Lib/contextlib.py", line 124, in __exit__ next(self.gen) File "/Users/remi/src/cpython/Lib/test/support/__init__.py", line 1166, in _filterwarnings raise AssertionError("filter (%r, %s) did not catch any warning" % AssertionError: filter ('', DeprecationWarning) did not catch any warning test_binhex failed == Tests result: FAILURE == 1 test OK. 1 test failed: test_binhex Total duration: 2.0 sec Tests result: FAILURE It's not a very issue but does appear when running refleaks on the whole stdlib. ---------- components: Tests messages: 371090 nosy: remi.lapeyre priority: normal severity: normal status: open title: ./python -m test test___all__ test_binhex fails versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 06:47:31 2020 From: report at bugs.python.org (Stefan Krah) Date: Tue, 09 Jun 2020 10:47:31 +0000 Subject: =?utf-8?q?=5Bissue40923=5D_Thread_safety=C2=A0=3A_disable_intel=E2=80=99s?= =?utf-8?q?_compiler_autopar_where_it=E2=80=99s_being_relevant=2E?= In-Reply-To: <1591661494.52.0.310043483361.issue40923@roundup.psfhosted.org> Message-ID: <1591699651.12.0.80781979999.issue40923@roundup.psfhosted.org> Stefan Krah added the comment: s/icc/Python compiled with icc/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 06:52:50 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 09 Jun 2020 10:52:50 +0000 Subject: [issue40927] ./python -m test test___all__ test_binhex fails In-Reply-To: <1591699636.51.0.837580045442.issue40927@roundup.psfhosted.org> Message-ID: <1591699970.35.0.481989343749.issue40927@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +19957 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20758 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 07:46:35 2020 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Jun 2020 11:46:35 +0000 Subject: [issue40594] urljoin since 3.5 incorrectly filters out double slashes In-Reply-To: <1589198030.38.0.614579410038.issue40594@roundup.psfhosted.org> Message-ID: <1591703195.31.0.51503902043.issue40594@roundup.psfhosted.org> Senthil Kumaran added the comment: > 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 And what is the de-facto behavior of browsers, when double URL is used? As far as I know, the browsers remove them, combine them as a single URL. (Tested on Chrome with some URLs to confirm on June 2020) ``` Where as the expected result should be: 'http://www.example.com/this//double/path' ``` This statement should be supported by a) An RFC b) Or behavior or some popular clients. c) Or libcurl exhibiting this behavior will gain a huge support too. Please share if you have any references and we should confirm ourselves to those. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 07:49:27 2020 From: report at bugs.python.org (=?utf-8?b?0JDQvdC00YDQtdC5INCa0LDQt9Cw0L3RhtC10LI=?=) Date: Tue, 09 Jun 2020 11:49:27 +0000 Subject: [issue40888] Add close method to queue In-Reply-To: <1591444834.07.0.323114052221.issue40888@roundup.psfhosted.org> Message-ID: <1591703367.8.0.526876692535.issue40888@roundup.psfhosted.org> ?????? ???????? added the comment: How to do this? ---------- type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 07:51:30 2020 From: report at bugs.python.org (Ilya Kulakov) Date: Tue, 09 Jun 2020 11:51:30 +0000 Subject: [issue17013] Allow waiting on a mock In-Reply-To: <1358856947.82.0.71016271567.issue17013@psf.upfronthosting.co.za> Message-ID: <1591703490.81.0.823365798134.issue17013@roundup.psfhosted.org> Change by Ilya Kulakov : ---------- nosy: +Ilya.Kulakov nosy_count: 11.0 -> 12.0 pull_requests: +19958 pull_request: https://github.com/python/cpython/pull/20759 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 08:09:05 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 09 Jun 2020 12:09:05 +0000 Subject: [issue40924] Recent importlib change breaks most recent certifi == 2020.4.5.2 In-Reply-To: <1591691148.73.0.101939332504.issue40924@roundup.psfhosted.org> Message-ID: Jason R. Coombs added the comment: I understand the issue here and can supply more details soon (no later than this weekend). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 08:14:11 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 09 Jun 2020 12:14:11 +0000 Subject: [issue40924] Recent importlib change breaks most recent certifi == 2020.4.5.2 In-Reply-To: <1591682388.65.0.686796854093.issue40924@roundup.psfhosted.org> Message-ID: <1591704851.45.0.725158276695.issue40924@roundup.psfhosted.org> ?ukasz Langa added the comment: In this case we need to revert the 3.9 backport to release a hotfix tonight. Please respect the beta feature freeze. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 08:15:00 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 09 Jun 2020 12:15:00 +0000 Subject: [issue40888] Add close method to queue In-Reply-To: <1591444834.07.0.323114052221.issue40888@roundup.psfhosted.org> Message-ID: <1591704900.69.0.927183378665.issue40888@roundup.psfhosted.org> R?mi Lapeyre added the comment: The python-ideas is hosted at https://mail.python.org/mailman3/lists/python-ideas.python.org/, you can create an account and once it's validated you will be able to post a new message either using the web UI or by sending a mail directly to the list. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 08:19:28 2020 From: report at bugs.python.org (=?utf-8?b?0JDQvdC00YDQtdC5INCa0LDQt9Cw0L3RhtC10LI=?=) Date: Tue, 09 Jun 2020 12:19:28 +0000 Subject: [issue40888] Add close method to queue In-Reply-To: <1591444834.07.0.323114052221.issue40888@roundup.psfhosted.org> Message-ID: <1591705168.47.0.0296388024465.issue40888@roundup.psfhosted.org> ?????? ???????? added the comment: Thank you so much ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 08:20:47 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 09 Jun 2020 12:20:47 +0000 Subject: [issue40594] urljoin since 3.5 incorrectly filters out double slashes In-Reply-To: <1589198030.38.0.614579410038.issue40594@roundup.psfhosted.org> Message-ID: <1591705247.63.0.147793071366.issue40594@roundup.psfhosted.org> Tal Einat added the comment: According to section 3.3 of RFC 3986[1], and also RFC 2396[2] which preceded it, a path is made up of zero or more consecutive "/" + section pieces, and a section may be empty. In other words, paths may include consecutive slashes. Several StackOverflow answers to questions on this subject (e.g. this[3], and this[4]) also agree that consecutive slashes are valid, based on the aforementioned RFCs and other references. .. [1]: https://tools.ietf.org/html/rfc3986#section-3.3 .. [2]: https://tools.ietf.org/html/rfc2396#section-3.3 .. [3]: https://stackoverflow.com/questions/20523318/is-a-url-with-in-the-path-section-valid .. [4]: https://stackoverflow.com/questions/10161177/url-with-multiple-forward-slashes-does-it-break-anything ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 08:29:29 2020 From: report at bugs.python.org (=?utf-8?q?La=C3=ABl_Cellier?=) Date: Tue, 09 Jun 2020 12:29:29 +0000 Subject: =?utf-8?q?=5Bissue40923=5D_Thread_safety=C2=A0=3A_disable_intel=E2=80=99s?= =?utf-8?q?_compiler_autopar_where_it=E2=80=99s_being_relevant=2E?= In-Reply-To: <1591661494.52.0.310043483361.issue40923@roundup.psfhosted.org> Message-ID: <1591705769.33.0.0550362087749.issue40923@roundup.psfhosted.org> La?l Cellier added the comment: I?m using parallel studio xe 2020 and I didn?t receive any crash from icc itself. The problem is the resulting binary which can be downloaded here https://filebin.net/4lp4nb61dav9qamo but that can?t be posted on this issue that is crashing. The only thing I put in CFLAGS is ?O3 and the remaining options are inside icc.cfg ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 08:43:48 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 09 Jun 2020 12:43:48 +0000 Subject: [issue7949] IDLE: avoid no-contrast popups and dialogs. In-Reply-To: <1266372113.11.0.0197701157976.issue7949@psf.upfronthosting.co.za> Message-ID: <1591706628.54.0.234866208271.issue7949@roundup.psfhosted.org> Cheryl Sabella added the comment: I believe this was fixed with #36176. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 08:51:29 2020 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Jun 2020 12:51:29 +0000 Subject: [issue40594] urljoin since 3.5 incorrectly filters out double slashes In-Reply-To: <1589198030.38.0.614579410038.issue40594@roundup.psfhosted.org> Message-ID: <1591707089.08.0.322148892374.issue40594@roundup.psfhosted.org> Senthil Kumaran added the comment: Hi Tal, Thank you. To be specific, it is about parsing behavior, specifically urljoin behavior, There is no question about the validity of the double-slash in the URL. If we find a source (like libcurl) which exhibits parsing behavior different than CPython, or sections in docs which give examples which our current test suite fails, those serve as good sources for expected results. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 08:53:47 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 09 Jun 2020 12:53:47 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591707227.27.0.388574031655.issue39791@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- nosy: +lukasz.langa nosy_count: 6.0 -> 7.0 pull_requests: +19960 pull_request: https://github.com/python/cpython/pull/20760 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 08:53:47 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 09 Jun 2020 12:53:47 +0000 Subject: [issue40924] Recent importlib change breaks most recent certifi == 2020.4.5.2 In-Reply-To: <1591682388.65.0.686796854093.issue40924@roundup.psfhosted.org> Message-ID: <1591707227.17.0.9799221457.issue40924@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- keywords: +patch pull_requests: +19959 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20760 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 09:12:26 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Jun 2020 13:12:26 +0000 Subject: [issue40807] Codeop: Show warnings once during _maybe_compile In-Reply-To: <1590674108.19.0.341062869134.issue40807@roundup.psfhosted.org> Message-ID: <1591708346.11.0.600207846496.issue40807@roundup.psfhosted.org> Terry J. Reedy added the comment: The 3.7 backport is needed but required a revised example. The changeset is 4b378acb97a575892c0e372a6bb0c17da1ccdf3e. PRs 20486, 20639, 20672, and 20673 are the main patch. PRs 20646 and 20647 for 3.8 and 3.7 backport a test_codeop import change made elsewhere and not backported. The alternative would have been changing our backport to the older naming convention. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 09:20:45 2020 From: report at bugs.python.org (Jonathan Haigh) Date: Tue, 09 Jun 2020 13:20:45 +0000 Subject: [issue40365] argparse: action "extend" with 1 parameter splits strings into characters In-Reply-To: <1587577356.91.0.833148420465.issue40365@roundup.psfhosted.org> Message-ID: <1591708845.41.0.456186136262.issue40365@roundup.psfhosted.org> Jonathan Haigh added the comment: >> But I wonder, was this situation discussed in the original bug/issue? >Doesn't look like it: I was looking at the wrong PR link. This has more discussion: https://github.com/python/cpython/pull/13305. nargs is discussed but I'm not sure it was realized that the nargs=None and nargs="?" cases would act in the way seen here rather than acting like append. Having a default nargs of "+" was suggested but that suggestion was not addressed. > I suggest that the default nargs for extend should be "*" or "+" and an exception should be raised if nargs is given as "?". I'm not convinced about that any more. Using append's behaviour is probably more reasonable for nargs=None and nargs="?". ---------- nosy: +Anthony Sottile, BTaskaya, berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 09:22:11 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Jun 2020 13:22:11 +0000 Subject: [issue7949] IDLE: avoid no-contrast popups and dialogs. In-Reply-To: <1266372113.11.0.0197701157976.issue7949@psf.upfronthosting.co.za> Message-ID: <1591708931.89.0.576105523739.issue7949@roundup.psfhosted.org> Terry J. Reedy added the comment: Thanks for finding that. Technically, #36176 should have been closed as a duplicate of this issue. But a fix anywhere is OK. Any other contrast problems should be a new issue. ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Fix IDLE Autocomplete / Calltip Window Colors _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 09:32:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jun 2020 13:32: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: <1591709571.25.0.528953566685.issue40684@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 51ae31e5b93b986e57a7e18e25f981a6ffcdefb7 by Victor Stinner in branch 'master': bpo-40684: Fix make install for platlibdir=lib64 (GH-20736) https://github.com/python/cpython/commit/51ae31e5b93b986e57a7e18e25f981a6ffcdefb7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 09:33:54 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Jun 2020 13:33:54 +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: <1591709634.15.0.681250018665.issue40684@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19961 pull_request: https://github.com/python/cpython/pull/20761 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 09:55:00 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Jun 2020 13:55:00 +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: <1591710900.95.0.948518225742.issue40684@roundup.psfhosted.org> miss-islington added the comment: New changeset 6cb24a035c5980cab39b6dc5d70762af07293bea by Miss Islington (bot) in branch '3.9': bpo-40684: Fix make install for platlibdir=lib64 (GH-20736) https://github.com/python/cpython/commit/6cb24a035c5980cab39b6dc5d70762af07293bea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 10:23:41 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 09 Jun 2020 14:23:41 +0000 Subject: [issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS Message-ID: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> New submission from R?mi Lapeyre : Here's the result of "./python -m test test_decimal -m test_maxcontext_exact_arith": 0:00:00 load avg: 1.33 Run tests sequentially 0:00:00 load avg: 1.33 [1/1] test_decimal python(7835,0x11a218dc0) malloc: can't allocate region :*** mach_vm_map(size=842105263157895168, flags: 100) failed (error code=3) python(7835,0x11a218dc0) malloc: *** set a breakpoint in malloc_error_break to debug python(7835,0x11a218dc0) malloc: can't allocate region :*** mach_vm_map(size=842105263157895168, flags: 100) failed (error code=3) python(7835,0x11a218dc0) malloc: *** set a breakpoint in malloc_error_break to debug python(7835,0x11a218dc0) malloc: can't allocate region :*** mach_vm_map(size=421052631578947584, flags: 100) failed (error code=3) python(7835,0x11a218dc0) malloc: *** set a breakpoint in malloc_error_break to debug python(7835,0x11a218dc0) malloc: can't allocate region :*** mach_vm_map(size=421052631578947584, flags: 100) failed (error code=3) python(7835,0x11a218dc0) malloc: *** set a breakpoint in malloc_error_break to debug == Tests result: SUCCESS == 1 test OK. Total duration: 553 ms Tests result: SUCCESS I spent quite a time to find where this error was coming from and it's actually not an error but a dubious message from OSX. Others will surely lose time on this too, I think the best way to handle it is to use bigmemtest() with a small value on MacOS so that it's only run when '-M' is given on this platform, but always on the others. ---------- components: Tests messages: 371107 nosy: remi.lapeyre priority: normal severity: normal status: open title: test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 10:25:24 2020 From: report at bugs.python.org (Stefan Krah) Date: Tue, 09 Jun 2020 14:25:24 +0000 Subject: =?utf-8?q?=5Bissue40923=5D_Thread_safety=C2=A0=3A_disable_intel=E2=80=99s?= =?utf-8?q?_compiler_autopar_where_it=E2=80=99s_being_relevant=2E?= In-Reply-To: <1591661494.52.0.310043483361.issue40923@roundup.psfhosted.org> Message-ID: <1591712724.49.0.929091126226.issue40923@roundup.psfhosted.org> Change by Stefan Krah : ---------- nosy: -skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 10:25:17 2020 From: report at bugs.python.org (Stefan Krah) Date: Tue, 09 Jun 2020 14:25:17 +0000 Subject: =?utf-8?q?=5Bissue40923=5D_Thread_safety=C2=A0=3A_disable_intel=E2=80=99s?= =?utf-8?q?_compiler_autopar_where_it=E2=80=99s_being_relevant=2E?= In-Reply-To: <1591661494.52.0.310043483361.issue40923@roundup.psfhosted.org> Message-ID: <1591712717.05.0.496154262461.issue40923@roundup.psfhosted.org> Stefan Krah added the comment: Yes, the generated Python crashes (as the link I gave shows). I'm using the command line, so I can't be of any assistance with Parallel Studio XE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 10:30:51 2020 From: report at bugs.python.org (=?utf-8?q?La=C3=ABl_Cellier?=) Date: Tue, 09 Jun 2020 14:30:51 +0000 Subject: =?utf-8?q?=5Bissue40923=5D_Thread_safety=C2=A0=3A_disable_intel=E2=80=99s?= =?utf-8?q?_compiler_autopar_where_it=E2=80=99s_being_relevant=2E?= In-Reply-To: <1591661494.52.0.310043483361.issue40923@roundup.psfhosted.org> Message-ID: <1591713051.53.0.170917539071.issue40923@roundup.psfhosted.org> La?l Cellier added the comment: I?m talking about the latest icc installed along with Parallel studio xe. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 10:39:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jun 2020 14:39:04 +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: <1591713544.82.0.231514539004.issue40684@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 10:40:02 2020 From: report at bugs.python.org (=?utf-8?q?La=C3=ABl_Cellier?=) Date: Tue, 09 Jun 2020 14:40:02 +0000 Subject: [issue40223] Add -fwrapv for new icc versions In-Reply-To: <1586342429.44.0.914021178636.issue40223@roundup.psfhosted.org> Message-ID: <1591713602.12.0.737383876722.issue40223@roundup.psfhosted.org> La?l Cellier added the comment: If -fwrapv isn?t enabled (whereas with gcc this is the default with ?O2), then it means -ftrapv is enabled. And from the manual page?: This option generates traps for signed overflow on addition, subtraction, multiplication operations. Did you checked if the binary compiles fines with all ?O2/?O3 options replaced with ?O0 in configure/Makefiles along gcc?? ---------- nosy: +La?l Cellier _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 10:45:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jun 2020 14:45:39 +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: <1591713939.32.0.161957588004.issue40684@roundup.psfhosted.org> STINNER Victor added the comment: > make install writes into /opt/py39b1/lib/python3.9/lib-dynload/ ("lib") I tested manually my fix: it works as expected. Install: ./configure --prefix /opt/py39_lib64 --with-platlibdir=lib64 make make install Test: $ /opt/py39_lib64/bin/python3.9 -m site sys.path = [ '/', '/opt/py39_lib64/lib64/python39.zip', '/opt/py39_lib64/lib64/python3.9', '/opt/py39_lib64/lib64/python3.9/lib-dynload', '/home/vstinner/.local/lib/python3.9/site-packages', '/opt/py39_lib64/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 $ /opt/py39_lib64/bin/python3.9 Python 3.9.0b2+ (heads/3.9:6cb24a035c, Jun 9 2020, 16:43:12) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import _asyncio >>> _asyncio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 10:46:15 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 09 Jun 2020 14:46:15 +0000 Subject: [issue40873] Something wrong with html.unescape() In-Reply-To: <1591373228.55.0.770453836865.issue40873@roundup.psfhosted.org> Message-ID: <1591713975.96.0.205343541531.issue40873@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 10:50:52 2020 From: report at bugs.python.org (Stefan Krah) Date: Tue, 09 Jun 2020 14:50:52 +0000 Subject: [issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591714252.82.0.579051885368.issue40928@roundup.psfhosted.org> Stefan Krah added the comment: The annoying "error" looks the same as #5614, which was closed as "won't fix". Is this the only place in the test suite now? If it is, I'm okay with squashing the remark. ---------- nosy: +skrah versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 10:51:43 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 09 Jun 2020 14:51:43 +0000 Subject: [issue40873] Something wrong with html.unescape() In-Reply-To: <1591373228.55.0.770453836865.issue40873@roundup.psfhosted.org> Message-ID: <1591714303.27.0.529870199432.issue40873@roundup.psfhosted.org> Change by Dong-hee Na : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 10:51:50 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 09 Jun 2020 14:51:50 +0000 Subject: [issue40873] Something wrong with html.unescape() In-Reply-To: <1591373228.55.0.770453836865.issue40873@roundup.psfhosted.org> Message-ID: <1591714310.54.0.590478956661.issue40873@roundup.psfhosted.org> Change by Dong-hee Na : ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 10:52:22 2020 From: report at bugs.python.org (Saba Kauser) Date: Tue, 09 Jun 2020 14:52:22 +0000 Subject: [issue40906] Unable to import module due to python unable to resolve dependecies In-Reply-To: <1591595444.88.0.936758108882.issue40906@roundup.psfhosted.org> Message-ID: <1591714342.31.0.566118968543.issue40906@roundup.psfhosted.org> Saba Kauser added the comment: Thanks a ton! That worked.. As I understand, users are required to add the directory path of the dll. Is there any way I can set this while building the extension with dependency? I basically want to hard-code the dependency path so that import module works fine without additional settings like you mentioned. Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 10:56:14 2020 From: report at bugs.python.org (Stefan Krah) Date: Tue, 09 Jun 2020 14:56:14 +0000 Subject: [issue40223] Add -fwrapv for new icc versions In-Reply-To: <1586342429.44.0.914021178636.issue40223@roundup.psfhosted.org> Message-ID: <1591714574.91.0.418889296257.issue40223@roundup.psfhosted.org> Stefan Krah added the comment: I'm aware of what -fwrapv does, it is a long standing issue in Python. I didn't try to find the exact location of overflow, since we also use -fwrapv for gcc. It is also possible that giving -fwrapv to icc disables another optimization that is the actual culprit. But I don't have time to figure out any of that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 10:57:55 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 09 Jun 2020 14:57:55 +0000 Subject: [issue40873] Something wrong with html.unescape() In-Reply-To: <1591373228.55.0.770453836865.issue40873@roundup.psfhosted.org> Message-ID: <1591714675.09.0.618382616982.issue40873@roundup.psfhosted.org> Change by Dong-hee Na : ---------- stage: needs patch -> versions: -Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 10:58:22 2020 From: report at bugs.python.org (r n) Date: Tue, 09 Jun 2020 14:58:22 +0000 Subject: [issue40907] cpython/lib/queue.py: put() does not acquire not_empty before notifying on it Message-ID: <1591714702.35.0.317538264623.issue40907@roundup.psfhosted.org> Change by r n : ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 10:59:21 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 09 Jun 2020 14:59:21 +0000 Subject: [issue40891] Use pep573 in functools In-Reply-To: <1591468044.26.0.252061125305.issue40891@roundup.psfhosted.org> Message-ID: <1591714761.18.0.489232814147.issue40891@roundup.psfhosted.org> Petr Viktorin added the comment: I wrote about the _PyType_GetModuleByDef idea on the capi-sig mailing list: https://mail.python.org/archives/list/capi-sig at python.org/thread/T3P2QNLNLBRFHWSKYSTPMVEIL2EEKFJU/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 11:40:10 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 09 Jun 2020 15:40:10 +0000 Subject: [issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591717210.54.0.360354076365.issue40928@roundup.psfhosted.org> R?mi Lapeyre added the comment: > The annoying "error" looks the same as #5614, which was closed as "won't fix". Yes, it's a similar message, test_io does not display it on Catalina anymore thought. > Is this the only place in the test suite now? As far as I know yes. > If it is, I'm okay with squashing the remark. I'm not sure to what this means. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 12:01:56 2020 From: report at bugs.python.org (cyberlis) Date: Tue, 09 Jun 2020 16:01:56 +0000 Subject: [issue40929] Multiprocessing. Instance of the custom class is missing in subprocesses Message-ID: <1591718516.0.0.742849238452.issue40929@roundup.psfhosted.org> New submission from cyberlis : When I use python3.7 everything works correctly and every subprocess has its own `Hello` instance. When I use python3.8 subprocesses do not have an instance of `Hello` class. Is this behavior correct? My code to reproduce an issue ```python from concurrent.futures.process import ProcessPoolExecutor from concurrent.futures import as_completed class Hello: _instance = None def __init__(self): print("Creating instance of Hello ", self) Hello._instance = self def worker(): return Hello._instance def main(): hello = Hello() with ProcessPoolExecutor(max_workers=2) as pool: futures = [] for _ in range(4): futures.append(pool.submit(worker)) for future in as_completed(futures): print(future.result()) if __name__ == "__main__": main() ``` Output ```bash pyenv local 3.7.6 python main.py Creating instance of Hello <__main__.Hello object at 0x102f48310> <__main__.Hello object at 0x103587410> <__main__.Hello object at 0x1035874d0> <__main__.Hello object at 0x103587110> <__main__.Hello object at 0x1035871d0> pyenv local 3.8.1 python main.py Creating instance of Hello <__main__.Hello object at 0x102104d90> None None None None ``` ---------- files: main.py messages: 371117 nosy: cyberlis priority: normal severity: normal status: open title: Multiprocessing. Instance of the custom class is missing in subprocesses type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49223/main.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 12:08:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jun 2020 16:08:00 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1591718880.25.0.635575430562.issue1635741@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19962 pull_request: https://github.com/python/cpython/pull/20763 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 12:10:24 2020 From: report at bugs.python.org (Stefan Krah) Date: Tue, 09 Jun 2020 16:10:24 +0000 Subject: [issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591719024.03.0.637277234475.issue40928@roundup.psfhosted.org> Stefan Krah added the comment: "squashing the remark" means suppressing the message from malloc(). I would really like it if the test could be executed by default though. Looking at: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/malloc.3.html Could you try what happens if you set this environment variable? export MallocLogFile=/dev/null If it works, we could build a solution around that. . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 12:10:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jun 2020 16:10:36 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1591719036.04.0.854410061529.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 20763 to "finalize" static types in Py_Finalize(). It mostly works, but "./Programs/_testembed test_forced_io_encoding" crash. This program calls Py_Initialize() and Py_Finalize() multiple times in a loop. It doesn't look to be safe to clear static types. Many functions rely on the fact that static types are "always there" and are never finalized. Also, only a few static types are cleared by my PR: many static types are left unchanged. For example, static types of the _io module. It seems like a safer approach is to continue the work on bpo-40077: "Convert static types to PyType_FromSpec()". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 12:10:51 2020 From: report at bugs.python.org (cyberlis) Date: Tue, 09 Jun 2020 16:10:51 +0000 Subject: [issue40929] Multiprocessing. Instance of the custom class is missing in subprocesses In-Reply-To: <1591718516.0.0.742849238452.issue40929@roundup.psfhosted.org> Message-ID: <1591719051.57.0.295602755631.issue40929@roundup.psfhosted.org> Change by cyberlis : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 12:11:56 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jun 2020 16:11:56 +0000 Subject: [issue40077] Convert static types to PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1591719116.48.0.0479252063457.issue40077@roundup.psfhosted.org> STINNER Victor added the comment: I tried to finalize static types in Py_Finalize(), but it didn't work: * https://bugs.python.org/issue1635741#msg371119 * https://github.com/python/cpython/pull/20763 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 12:20:33 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 Jun 2020 16:20:33 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591719633.09.0.477461142658.issue40890@roundup.psfhosted.org> Raymond Hettinger added the comment: > I meant that you can make dict_view.mapping always > returning a MappingProxyType. That would be a reasonable constraint. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 12:22:17 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 09 Jun 2020 16:22:17 +0000 Subject: [issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591719737.84.0.891410346468.issue40928@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 12:42:10 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 09 Jun 2020 16:42:10 +0000 Subject: [issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591720930.37.0.787871181583.issue40928@roundup.psfhosted.org> R?mi Lapeyre added the comment: Thanks, I found "MallocDebugReport" in `man malloc` (I could have thought to look into there...) that seem to do the trick: $ MallocDebugReport=none ./python -m test test_decimal -m test_maxcontext_exact_arith 0:00:00 load avg: 1.27 Run tests sequentially 0:00:00 load avg: 1.27 [1/1] test_decimal == Tests result: SUCCESS == 1 test OK. Total duration: 694 ms Tests result: SUCCESS There is also MallocDebugReport=crash that will "write messages to standard error only for a condition that is about to cause a crash." and effectively suppress this one. Setting it in the test with os.putenv() does not seem to work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 12:44:10 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 09 Jun 2020 16:44:10 +0000 Subject: [issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591721050.14.0.0954437813266.issue40928@roundup.psfhosted.org> R?mi Lapeyre added the comment: I forgot to say that MallocLogFile=/dev/null did not work, that's why I tried MallocDebugReport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 12:44:27 2020 From: report at bugs.python.org (honglei jiang) Date: Tue, 09 Jun 2020 16:44:27 +0000 Subject: [issue40754] Test installers before releasing (ModuleNotFoundErrors) In-Reply-To: <1590324430.61.0.117510991737.issue40754@roundup.psfhosted.org> Message-ID: <1591721067.92.0.304341238079.issue40754@roundup.psfhosted.org> honglei jiang added the comment: c:\Python39>python -m test -j4 == CPython 3.9.0b2 (tags/v3.9.0b2:0b1a1c8, Jun 8 2020, 22:55:31) [MSC v.1924 64 bit (AMD64)] == Windows-10-10.0.18362-SP0 little-endian == cwd: C:\Users\jhong\AppData\Local\Temp\test_python_5960 == CPU count: 4 == encodings: locale=cp936, FS=utf-8 0:00:00 Run tests in parallel using 4 child processes == Tests result: FAILURE == 358 tests OK. 24 tests failed: test__locale test_array test_buffer test_capi test_deque test_exceptions test_flufl test_fstring 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_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 Total duration: 6 min 44 sec Tests result: FAILURE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 12:44:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jun 2020 16:44:46 +0000 Subject: [issue39372] The header files in Include/ have many declarations with no definition In-Reply-To: <1579283234.13.0.0884348783159.issue39372@roundup.psfhosted.org> Message-ID: <1591721086.27.0.865943526178.issue39372@roundup.psfhosted.org> STINNER Victor added the comment: > Maybe backport this change (except PyNoArgsFunction)? I don't think that it's a good idea. I suggest to only do cleanup in the master branch, just in case if something goes wrong. Like the PyNoArgsFunction removal :-) ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 12:49:05 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jun 2020 16:49:05 +0000 Subject: [issue40927] ./python -m test test___all__ test_binhex fails In-Reply-To: <1591699636.51.0.837580045442.issue40927@roundup.psfhosted.org> Message-ID: <1591721345.32.0.621202596295.issue40927@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner nosy_count: 1.0 -> 2.0 pull_requests: +19963 pull_request: https://github.com/python/cpython/pull/20764 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 12:51:08 2020 From: report at bugs.python.org (=?utf-8?q?La=C3=ABl_Cellier?=) Date: Tue, 09 Jun 2020 16:51:08 +0000 Subject: [issue40223] Add -fwrapv for new icc versions In-Reply-To: <1586342429.44.0.914021178636.issue40223@roundup.psfhosted.org> Message-ID: <1591721468.39.0.533510794963.issue40223@roundup.psfhosted.org> La?l Cellier added the comment: No I?m meaning disabling all optimization when using gcc and using ?ftrapv. This should cause the same problem?: a crashing binary? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 12:52:17 2020 From: report at bugs.python.org (=?utf-8?q?La=C3=ABl_Cellier?=) Date: Tue, 09 Jun 2020 16:52:17 +0000 Subject: [issue40223] Add -fwrapv for new icc versions In-Reply-To: <1586342429.44.0.914021178636.issue40223@roundup.psfhosted.org> Message-ID: <1591721537.34.0.216329415588.issue40223@roundup.psfhosted.org> La?l Cellier added the comment: since ?fwrapv is the default with ??? as ?O2 is used in Cpython build scripts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 12:53:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jun 2020 16:53:22 +0000 Subject: [issue40854] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591721602.74.0.537785798278.issue40854@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Sandro Mani. The new env var should be part of the incoming Python 3.9.0 beta3. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 13:01:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jun 2020 17:01:03 +0000 Subject: [issue38160] [subinterpreters] Add a "PyInterpreterState *" field to PyTypeObject. In-Reply-To: <1568381609.99.0.399978002813.issue38160@roundup.psfhosted.org> Message-ID: <1591722063.4.0.478969449027.issue38160@roundup.psfhosted.org> STINNER Victor added the comment: I close the issue. ---------- resolution: -> not a bug stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 13:30:35 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 09 Jun 2020 17:30:35 +0000 Subject: [issue40925] Remove redundant macros used for stack manipulation in interpreter In-Reply-To: <1591697620.81.0.981270573583.issue40925@roundup.psfhosted.org> Message-ID: <1591723835.61.0.710618367729.issue40925@roundup.psfhosted.org> Eric V. Smith added the comment: What type of changes are you proposing to make? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 13:50:09 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 09 Jun 2020 17:50:09 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1591725009.85.0.597506831346.issue39791@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset ce5e6f098f8a270e50b989baa75765584573706b by ?ukasz Langa in branch '3.9': [3.9] bpo-40924: Revert "bpo-39791 native hooks for importlib.resources.files (GH-20576)" (#20760) https://github.com/python/cpython/commit/ce5e6f098f8a270e50b989baa75765584573706b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 13:50:09 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 09 Jun 2020 17:50:09 +0000 Subject: [issue40924] Recent importlib change breaks most recent certifi == 2020.4.5.2 In-Reply-To: <1591682388.65.0.686796854093.issue40924@roundup.psfhosted.org> Message-ID: <1591725009.96.0.551727926413.issue40924@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset ce5e6f098f8a270e50b989baa75765584573706b by ?ukasz Langa in branch '3.9': [3.9] bpo-40924: Revert "bpo-39791 native hooks for importlib.resources.files (GH-20576)" (#20760) https://github.com/python/cpython/commit/ce5e6f098f8a270e50b989baa75765584573706b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 13:56:03 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 09 Jun 2020 17:56:03 +0000 Subject: [issue17013] Allow waiting on a mock In-Reply-To: <1358856947.82.0.71016271567.issue17013@psf.upfronthosting.co.za> Message-ID: <1591725363.08.0.25158389734.issue17013@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: isn't PR 20759 backwards incompatible? If I understand correctly, this would break anyone that is checking for identity as : assert mymock.called is True ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 13:59:02 2020 From: report at bugs.python.org (hai shi) Date: Tue, 09 Jun 2020 17:59:02 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1591725542.58.0.10097454265.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19964 pull_request: https://github.com/python/cpython/pull/20765 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 14:06:27 2020 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 09 Jun 2020 18:06:27 +0000 Subject: [issue40802] AbstractEventLoop.shutdown_default_executor breaks backwards compatibility In-Reply-To: <1590658311.02.0.725664008315.issue40802@roundup.psfhosted.org> Message-ID: <1591725987.09.0.739615100876.issue40802@roundup.psfhosted.org> Yury Selivanov added the comment: > Since asyncio is no longer provisional, should it break backwards compatibility with just a What's New entry? Adding new APIs to asyncio can't be classified as a backward compatibility issue. Otherwise the development of it would stall and nobody would benefit from it. uvloop and anyio will be eventually updated to support new APIs, I don't see any problem here. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 14:26:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jun 2020 18:26:36 +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: <1591727196.89.0.55769960128.issue39465@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19965 pull_request: https://github.com/python/cpython/pull/20766 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 14:55:11 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 09 Jun 2020 18:55:11 +0000 Subject: [issue40594] urljoin since 3.5 incorrectly filters out double slashes In-Reply-To: <1589198030.38.0.614579410038.issue40594@roundup.psfhosted.org> Message-ID: <1591728911.89.0.0865581263209.issue40594@roundup.psfhosted.org> Tal Einat added the comment: Putting aside backwards compatibility, I would argue the opposite: Since consecutive slashes are valid, I suggest we would need to see that collapsing them into a single slash is the status quo, otherwise we should avoid such collapsing. Here's some evidence that we should keep consecutive slashes: 1. The curl cli does not appear to collapse consecutive slashes in URLs before sending them: $ nc -l localhost 8000 & [1] 39380 $ curl --dump-header - --proxy localhost:8000 --silent --max-time 1 http://www.example.com/this//double/path GET http://www.example.com/this//double/path HTTP/1.1 Host: www.example.com User-Agent: curl/7.64.1 Accept: */* Proxy-Connection: Keep-Alive [1] + 39380 done nc -l localhost 8000 2. With NodeJS v10.18.0 and v12.16.1: ? > const urllib = require('url'); > new url.URL("this//double/path", "http://www.example.com/").href 'http://www.example.com/this//double/path' For me this is evidence enough that urljoin should *not* be collapsing consecutive slashes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 14:59:43 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 09 Jun 2020 18:59:43 +0000 Subject: [issue40077] Convert static types to PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1591729183.51.0.636979727764.issue40077@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 16:09:18 2020 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 09 Jun 2020 20:09:18 +0000 Subject: [issue40930] zoneinfo gives incorrect dst() in Pacific/Rarotonga between 1978 and 1991 Message-ID: <1591733358.04.0.308688404979.issue40930@roundup.psfhosted.org> New submission from Paul Ganssle : While developing a shim for deprecating pytz, I discovered this issue with the Pacific/Rarotonga zone: >>> from datetime import datetime, timedelta >>> from backports.zoneinfo import ZoneInfo >>> datetime(1991, 2, 1, tzinfo=ZoneInfo("Pacific/Rarotonga")).dst() / timedelta(hours=1) 1.0 This reports that the DST offset is 1 hour, but in fact it should be 30 minutes, because from 1978 to 1991, Pacific/Rarotonga alternated between -0930 and -10: $ zdump -V -c 1990,1993 'Pacific/Rarotonga' Pacific/Rarotonga Sun Mar 4 09:29:59 1990 UT = Sat Mar 3 23:59:59 1990 -0930 isdst=1 gmtoff=-34200 Pacific/Rarotonga Sun Mar 4 09:30:00 1990 UT = Sat Mar 3 23:30:00 1990 -10 isdst=0 gmtoff=-36000 Pacific/Rarotonga Sun Oct 28 09:59:59 1990 UT = Sat Oct 27 23:59:59 1990 -10 isdst=0 gmtoff=-36000 Pacific/Rarotonga Sun Oct 28 10:00:00 1990 UT = Sun Oct 28 00:30:00 1990 -0930 isdst=1 gmtoff=-34200 Pacific/Rarotonga Sun Mar 3 09:29:59 1991 UT = Sat Mar 2 23:59:59 1991 -0930 isdst=1 gmtoff=-34200 Pacific/Rarotonga Sun Mar 3 09:30:00 1991 UT = Sat Mar 2 23:30:00 1991 -10 isdst=0 gmtoff=-36000 I believe that the error comes from the fact that before 1978, they were on -1030 time, then they transitioned to -0930, then started alternating between -0930 and -10: $ zdump -V -c 1977,1980 'Pacific/Rarotonga' Pacific/Rarotonga Sun Nov 12 10:29:59 1978 UT = Sat Nov 11 23:59:59 1978 -1030 isdst=0 gmtoff=-37800 Pacific/Rarotonga Sun Nov 12 10:30:00 1978 UT = Sun Nov 12 01:00:00 1978 -0930 isdst=1 gmtoff=-34200 Pacific/Rarotonga Sun Mar 4 09:29:59 1979 UT = Sat Mar 3 23:59:59 1979 -0930 isdst=1 gmtoff=-34200 Pacific/Rarotonga Sun Mar 4 09:30:00 1979 UT = Sat Mar 3 23:30:00 1979 -10 isdst=0 gmtoff=-36000 Pacific/Rarotonga Sun Oct 28 09:59:59 1979 UT = Sat Oct 27 23:59:59 1979 -10 isdst=0 gmtoff=-36000 Pacific/Rarotonga Sun Oct 28 10:00:00 1979 UT = Sun Oct 28 00:30:00 1979 -0930 isdst=1 gmtoff=-34200 This is not amazingly important, but it would be a good idea to make the result correct. Right now I think the heuristic looks for the first example of an STD ? DST transition and decides that's the best option. It might be a good idea to change the heuristic to look at *all* examples of such transitions and choose the plurality value, and if there's no plurality value and one of the values is 1H, choose that one. ---------- assignee: p-ganssle components: Library (Lib) messages: 371136 nosy: p-ganssle priority: normal severity: normal stage: needs patch status: open title: zoneinfo gives incorrect dst() in Pacific/Rarotonga between 1978 and 1991 type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 16:21:28 2020 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 09 Jun 2020 20:21:28 +0000 Subject: [issue40931] zoneinfo gives incorrect dst() in Europe/Madrid in 1938 Message-ID: <1591734088.53.0.352585166753.issue40931@roundup.psfhosted.org> New submission from Paul Ganssle : Apparently in 1938, Madrid had a "double daylight saving time", where they transitioned from WET (+0) ? WEST (+1) ? WEMT (+2) ? WEST (+1) ? WET (+0): $ zdump -V -c 1938,1940 'Europe/Madrid' Europe/Madrid Sat Apr 2 22:59:59 1938 UT = Sat Apr 2 22:59:59 1938 WET isdst=0 gmtoff=0 Europe/Madrid Sat Apr 2 23:00:00 1938 UT = Sun Apr 3 00:00:00 1938 WEST isdst=1 gmtoff=3600 Europe/Madrid Sat Apr 30 21:59:59 1938 UT = Sat Apr 30 22:59:59 1938 WEST isdst=1 gmtoff=3600 Europe/Madrid Sat Apr 30 22:00:00 1938 UT = Sun May 1 00:00:00 1938 WEMT isdst=1 gmtoff=7200 Europe/Madrid Sun Oct 2 21:59:59 1938 UT = Sun Oct 2 23:59:59 1938 WEMT isdst=1 gmtoff=7200 Europe/Madrid Sun Oct 2 22:00:00 1938 UT = Sun Oct 2 23:00:00 1938 WEST isdst=1 gmtoff=3600 Europe/Madrid Sat Oct 7 23:59:59 1939 UT = Sun Oct 8 00:59:59 1939 WEST isdst=1 gmtoff=3600 Europe/Madrid Sun Oct 8 00:00:00 1939 UT = Sun Oct 8 00:00:00 1939 WET isdst=0 gmtoff=0 However, zoneinfo reports `.dst()` during the "double daylight saving time" period as 1 hour: >>> from datetime import datetime, timedelta >>> from backports.zoneinfo import ZoneInfo >>> datetime(1938, 5, 5, tzinfo=ZoneInfo("Europe/Madrid")).dst() / timedelta(hours=1) 1.0 >>> datetime(1938, 5, 5, tzinfo=ZoneInfo("Europe/Madrid")).tzname() 'WEMT' I believe the issue is that the "WEMT" is bordered on both sides by DST offsets, and so the heuristic of "Look for the previous or next non-DST zone and calculate the difference" doesn't work. We can probably solve this with one of two heuristics: 1. Allow DST ? DST transitions to be included in the calculation of the current DST, such that when going from x_dst ? y_dst, y_dstoff = (y_utcoff - x_utcoff) + x_dstoff 2. Look more than 1 transition away to find the nearest STD zone in either direction, and calculate the offsets from there. Between this bug and bpo-40930, I suspect we may want to write a rudimentary parser for `tzdata.zi` to be used only for testing our heuristics, since the `tzdata.zi` file (shipped with the `tzdata` package), does actually have the information we want, without resorting to heuristics. ---------- assignee: p-ganssle components: Library (Lib) messages: 371137 nosy: p-ganssle priority: normal severity: normal status: open title: zoneinfo gives incorrect dst() in Europe/Madrid in 1938 versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 16:29:35 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 09 Jun 2020 20:29:35 +0000 Subject: [issue40924] Recent importlib change breaks most recent certifi == 2020.4.5.2 In-Reply-To: <1591682388.65.0.686796854093.issue40924@roundup.psfhosted.org> Message-ID: <1591734575.75.0.438922392383.issue40924@roundup.psfhosted.org> Jason R. Coombs added the comment: This issue stems from improper reliance on implementation details of `importlib.resources.path`, which returns a context manager that is designed to clean up the file after the context closes. certifi would have encountered the same problem on older Pythons if certifi had been installed as a zip egg or other non-filesystem-based package. That said, it is also undesirable for path no longer to return a reference to an existing path when one exists. That behavior has come about as the importlib.resources API moves from the legacy implementation to the new one based on TraversableResources (files function). I encountered [a similar issue](https://github.com/python/cpython/pull/20576#issuecomment-637881341) during the original submission, which I addressed by removing the same assumption from another library (importlib.metadata). I believe the best fix here is to restore that assumption while retaining other important changes in this patch. Should this assumed behavior also be tested (guaranteed)? That I'm less sure about. > Please respect the beta feature freeze. I do respect the beta feature freeze. The relevant feature was added prior to b1. The reverted change is an incremental fix addressing underlying implementation details such as how resources are resolved and removing duplicate code paths. More importantly, the change also addresses a [key interface problem](https://github.com/python/cpython/pull/20576#issuecomment-639954228) that I identified in b1 - that the previously advertised interface of `loaders` supplying `files()` methods is inadequate. I've put a lot of effort into pulling this all together for 3.9 (three full days just this past weekend and hundreds of hours leading up to that). It would be a real shame for it to be released in a broken state due to a minor (though admittedly impactful) hiccup. I suspect there's a small change that to the submitted patch that will restore the prior expectation and leave the codebase in a healthier state. I'll prepare that soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 16:31:50 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 Jun 2020 20:31:50 +0000 Subject: [issue40889] Symmetric difference on dict_views is inefficient In-Reply-To: <1591463399.57.0.727941047538.issue40889@roundup.psfhosted.org> Message-ID: <1591734710.12.0.745929554651.issue40889@roundup.psfhosted.org> Raymond Hettinger added the comment: To my eyes, the patch looks somewhat tame. It is readable enough and doesn't do anything tricky. The set object implementation aimed to never recompute the hash when it was already known. It is reasonable that other set-like operations share that aspiration. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 16:49:51 2020 From: report at bugs.python.org (Stephen Farris) Date: Tue, 09 Jun 2020 20:49:51 +0000 Subject: [issue40932] subprocess docs don't qualify the instruction to use shlex.quote by OS Message-ID: <1591735791.89.0.818565720729.issue40932@roundup.psfhosted.org> New submission from Stephen Farris : The subprocess docs state: "When using shell=True, the shlex.quote() function can be used to properly escape whitespace and shell metacharacters in strings that are going to be used to construct shell commands." While this is true on Unix, it is not true on Windows. On Windows it is easy to create scenarios where shell injection still exists despite using shlex.quote properly (e.g. subprocess.run(shlex.quote("'&calc '"), shell=True) launches the Windows calculator, which it wouldn't do if shlex.quote was able to prevent shell injection on Windows). While the shlex docs state that shlex is for Unix, the subprocess docs imply that shlex.quote will work on Windows too, possibly leading some developers to erroneously use shlex.quote on Windows to try to prevent shell injection. Recommend: 1) qualifying the above section in the subprocess docs to make it clear that this only works on Unix, and 2) updating the shlex docs with warnings that shlex.quote in particular is not for use on Windows. ---------- assignee: docs at python components: Documentation messages: 371140 nosy: Stephen Farris, docs at python priority: normal severity: normal status: open title: subprocess docs don't qualify the instruction to use shlex.quote by OS versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 16:50:18 2020 From: report at bugs.python.org (Stephen Farris) Date: Tue, 09 Jun 2020 20:50:18 +0000 Subject: [issue40932] subprocess docs don't qualify the instruction to use shlex.quote by OS In-Reply-To: <1591735791.89.0.818565720729.issue40932@roundup.psfhosted.org> Message-ID: <1591735818.29.0.485257085605.issue40932@roundup.psfhosted.org> Change by Stephen Farris : ---------- type: -> security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 16:57:31 2020 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 09 Jun 2020 20:57:31 +0000 Subject: [issue40933] zoneinfo may give incorrect dst() in Europe/Minsk in 1942 Message-ID: <1591736251.74.0.950208419673.issue40933@roundup.psfhosted.org> New submission from Paul Ganssle : Related to bpo-40930 and bpo-40931, it *seems* that in 1942 only, `zoneinfo.ZoneInfo` returns -01:00 for DST in Europe/Minsk: >>> from datetime import datetime, timedelta >>> from backports.zoneinfo import ZoneInfo >>> datetime(1942, 1, 1, tzinfo=ZoneInfo("Europe/Minsk")).dst() // timedelta(hours=1) It looks like this occurs because they transitioned directly from MSK to CEST, jumping back 1 hour, then started switching between CEST and CET. $ zdump -V -c 1941,1944 'Europe/Minsk' Europe/Minsk Fri Jun 27 20:59:59 1941 UT = Fri Jun 27 23:59:59 1941 MSK isdst=0 gmtoff=10800 Europe/Minsk Fri Jun 27 21:00:00 1941 UT = Fri Jun 27 23:00:00 1941 CEST isdst=1 gmtoff=7200 Europe/Minsk Mon Nov 2 00:59:59 1942 UT = Mon Nov 2 02:59:59 1942 CEST isdst=1 gmtoff=7200 Europe/Minsk Mon Nov 2 01:00:00 1942 UT = Mon Nov 2 02:00:00 1942 CET isdst=0 gmtoff=3600 Europe/Minsk Mon Mar 29 00:59:59 1943 UT = Mon Mar 29 01:59:59 1943 CET isdst=0 gmtoff=3600 Europe/Minsk Mon Mar 29 01:00:00 1943 UT = Mon Mar 29 03:00:00 1943 CEST isdst=1 gmtoff=7200 Europe/Minsk Mon Oct 4 00:59:59 1943 UT = Mon Oct 4 02:59:59 1943 CEST isdst=1 gmtoff=7200 Europe/Minsk Mon Oct 4 01:00:00 1943 UT = Mon Oct 4 02:00:00 1943 CET isdst=0 gmtoff=3600 This might get fixed automatically if we do the "plurality" heuristic in bpo-40930, though we might also consider a heuristic that puts greater weight on a transition if the names associated with them different only by transforming a single letter, or insertion of a letter. I am somewhat puzzled as to why only 1943 is affected, since I would have thought that all the CEST offsets in that stretch would be considered the same ttinfo (and thus all would be assigned the same dstoff). ---------- assignee: p-ganssle messages: 371141 nosy: p-ganssle priority: normal severity: normal status: open title: zoneinfo may give incorrect dst() in Europe/Minsk in 1942 versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 17:20:05 2020 From: report at bugs.python.org (Stefan Krah) Date: Tue, 09 Jun 2020 21:20:05 +0000 Subject: [issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591737605.56.0.021111477855.issue40928@roundup.psfhosted.org> Stefan Krah added the comment: Thanks for checking, it's a pity that os.putenv() does not work. There's a global variable malloc_logger that is set from the environment on startup: https://opensource.apple.com/source/libmalloc/libmalloc-53.1.1/src/malloc.c It seems to be always checked for NULL, but I can't find any documentation that says it is guaranteed. A nuclear option would be to set malloc_logger to NULL on Python startup. Or write a custom malloc_logger, which *does* seem to be supported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 17:58:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jun 2020 21:58:27 +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: <1591739907.75.0.217772623732.issue39465@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19966 pull_request: https://github.com/python/cpython/pull/20767 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 18:34:32 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 09 Jun 2020 22:34:32 +0000 Subject: [issue40924] Recent importlib change breaks most recent certifi == 2020.4.5.2 In-Reply-To: <1591682388.65.0.686796854093.issue40924@roundup.psfhosted.org> Message-ID: <1591742072.37.0.595011099263.issue40924@roundup.psfhosted.org> ?ukasz Langa added the comment: > I do respect the beta feature freeze. The relevant feature was added prior to b1. The reverted change is an incremental fix addressing underlying implementation details such as how resources are resolved and removing duplicate code paths. Using the revert hammer is never an easy call and I've only done that a handful times so far. In this particular case the following helped me make the decision: - the change was over 2,000 lines big; - as you say, a non-trivial amount of it was refactoring; - the change was committed without review; - the backport was done three weeks after the beta freeze without consulting the RM or anybody else in that matter. Sure, it's worth fixing the problems you identified after Beta 1, maybe even bring the fixes back to 3.9, but not how this was done this time. We'd like to keep our release cadence stable and avoid hotfixes in the future. We are all grateful for your work, Jason, and we're happy to have somebody around who is invested in making Python better. To reiterate, I'm less worried about the introduced bug itself, and more about the change management attitude. Yes, it would indeed be a shame if your feature had to wait for another Python release. But risking widespread breakage isn't a good trade off. It sucks for me to be this boring beaurocrat, believe me, but the purest solution to a deep design issue identified after Beta 1 in a new feature is to... revert that feature altogether and go back to the drawing board for the next release. It's not a theoretical situation. I went through this in the Python 3.8 cycle (see BPO-38242). It sucked but it was the right thing to do. ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 18:52:39 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 09 Jun 2020 22:52:39 +0000 Subject: [issue18319] gettext() cannot find translations with plural forms In-Reply-To: <1372373603.42.0.596981858746.issue18319@psf.upfronthosting.co.za> Message-ID: <1591743159.24.0.644498246042.issue18319@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- nosy: +barry versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 19:21:53 2020 From: report at bugs.python.org (YoSTEALTH) Date: Tue, 09 Jun 2020 23:21:53 +0000 Subject: [issue40869] errno missing descriptions In-Reply-To: <1591325557.2.0.303009626884.issue40869@roundup.psfhosted.org> Message-ID: <1591744913.09.0.651812574284.issue40869@roundup.psfhosted.org> Change by YoSTEALTH : ---------- components: +C API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 19:27:00 2020 From: report at bugs.python.org (kernc) Date: Tue, 09 Jun 2020 23:27:00 +0000 Subject: [issue30533] missing feature in inspect module: getmembers_static In-Reply-To: <1496271168.24.0.639482608296.issue30533@psf.upfronthosting.co.za> Message-ID: <1591745220.14.0.713885134943.issue30533@roundup.psfhosted.org> Change by kernc : ---------- nosy: +kernc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 19:28:37 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Tue, 09 Jun 2020 23:28:37 +0000 Subject: [issue30533] missing feature in inspect module: getmembers_static In-Reply-To: <1496271168.24.0.639482608296.issue30533@psf.upfronthosting.co.za> Message-ID: <1591745317.85.0.712234904357.issue30533@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- nosy: -lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 19:35:22 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 09 Jun 2020 23:35:22 +0000 Subject: [issue40924] Recent importlib change breaks most recent certifi == 2020.4.5.2 In-Reply-To: <1591682388.65.0.686796854093.issue40924@roundup.psfhosted.org> Message-ID: <1591745722.75.0.400989935301.issue40924@roundup.psfhosted.org> Jason R. Coombs added the comment: I feel terrible and really regret that this was able to break things so badly. What options are available at this point? I'd at the very least like to remove the `loader.files()` behavior to avoid encouraging other loaders to implement it. Should we also revert the `resources.files()` feature altogether, as you suggested? ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 19:48:28 2020 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 09 Jun 2020 23:48:28 +0000 Subject: [issue29242] Crash on GC when compiling PyPy In-Reply-To: <1484146996.34.0.185188210895.issue29242@psf.upfronthosting.co.za> Message-ID: <1591746508.97.0.956339692596.issue29242@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 Tue Jun 9 19:51:27 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Tue, 09 Jun 2020 23:51:27 +0000 Subject: [issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't In-Reply-To: <1591124614.71.0.196427498662.issue40847@roundup.psfhosted.org> Message-ID: <1591746687.59.0.588081973969.issue40847@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- keywords: +patch pull_requests: +19967 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20769 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 20:09:43 2020 From: report at bugs.python.org (Misko Dzamba) Date: Wed, 10 Jun 2020 00:09:43 +0000 Subject: [issue40934] Default RLock does not work well for Manager Condition Message-ID: <1591747783.0.0.431376232538.issue40934@roundup.psfhosted.org> New submission from Misko Dzamba : I get unexpected behavior from Condition when using a Manager. I expected that if I call Condition.acquire() in one thread (or process) and then call .acquire() if another thread (or process) without first releasing the condition that it should block. However it seems like Condition.acquire() never blocks... from multiprocessing import Pool,Manager import time def f(x): cv,t=x cv.acquire() print(t,"Got cv") return if __name__ == '__main__': m=Manager() cv=m.Condition(m.RLock()) p = Pool(5) print(p.map(f, [ (cv,x) for x in range(10) ])) ---------- messages: 371146 nosy: Misko Dzamba priority: normal severity: normal status: open title: Default RLock does not work well for Manager Condition type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 20:50:54 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 10 Jun 2020 00:50:54 +0000 Subject: [issue40907] cpython/lib/queue.py: put() does not acquire not_empty before notifying on it Message-ID: <1591750254.86.0.293598479847.issue40907@roundup.psfhosted.org> New submission from Raymond Hettinger : This code looks correct to me. For condition variables, the requirement is that the underlying lock be held when notify() is called. The not_full and not_empty condition variables share the same underlying lock, so it is sufficient that not_empty.notify() is called inside the body of "with self.not_full". ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 20:55:43 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 10 Jun 2020 00:55:43 +0000 Subject: [issue40882] memory leak in multiprocessing.shared_memory.SharedMemory in Windows In-Reply-To: <1591397225.82.0.932982465865.issue40882@roundup.psfhosted.org> Message-ID: <1591750543.72.0.831277773339.issue40882@roundup.psfhosted.org> Change by Eryk Sun : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 21:02:15 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 10 Jun 2020 01:02:15 +0000 Subject: [issue34003] csv.DictReader can return basic dict instead of OrderedDict In-Reply-To: <1530301659.14.0.56676864532.issue34003@psf.upfronthosting.co.za> Message-ID: <1591750935.52.0.626711242084.issue34003@roundup.psfhosted.org> miss-islington added the comment: New changeset 7aed0524d4129766a6032326949ef7f91f6f6dfc by ?ric Araujo in branch 'master': bpo-34003: Re-add versionchanged entry in csv docs (GH-20657) https://github.com/python/cpython/commit/7aed0524d4129766a6032326949ef7f91f6f6dfc ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 21:02:39 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 10 Jun 2020 01:02:39 +0000 Subject: [issue34003] csv.DictReader can return basic dict instead of OrderedDict In-Reply-To: <1530301659.14.0.56676864532.issue34003@psf.upfronthosting.co.za> Message-ID: <1591750959.39.0.162846492659.issue34003@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19968 pull_request: https://github.com/python/cpython/pull/20770 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 21:02:52 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 10 Jun 2020 01:02:52 +0000 Subject: [issue34003] csv.DictReader can return basic dict instead of OrderedDict In-Reply-To: <1530301659.14.0.56676864532.issue34003@psf.upfronthosting.co.za> Message-ID: <1591750972.39.0.972807126787.issue34003@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19969 pull_request: https://github.com/python/cpython/pull/20771 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 21:05:04 2020 From: report at bugs.python.org (Ma Lin) Date: Wed, 10 Jun 2020 01:05:04 +0000 Subject: [issue29242] Crash on GC when compiling PyPy In-Reply-To: <1484146996.34.0.185188210895.issue29242@psf.upfronthosting.co.za> Message-ID: <1591751104.51.0.379148135622.issue29242@roundup.psfhosted.org> Ma Lin added the comment: I suggest not to close this issue, this is an opportunity to investigate whether Python3 has this problem as well. ---------- nosy: +Ma Lin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 21:23:53 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 10 Jun 2020 01:23:53 +0000 Subject: [issue40907] cpython/lib/queue.py: put() does not acquire not_empty before notifying on it In-Reply-To: <1591750254.86.0.293598479847.issue40907@roundup.psfhosted.org> Message-ID: <1591752233.38.0.0719569182059.issue40907@roundup.psfhosted.org> Raymond Hettinger added the comment: Also note that threading.Condition.notify() would raise a RuntimeError if the underlying lock had not been acquired. Have you observed any behavior to the contrary? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 21:26:19 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 10 Jun 2020 01:26:19 +0000 Subject: [issue34003] csv.DictReader can return basic dict instead of OrderedDict In-Reply-To: <1530301659.14.0.56676864532.issue34003@psf.upfronthosting.co.za> Message-ID: <1591752379.83.0.422396940318.issue34003@roundup.psfhosted.org> miss-islington added the comment: New changeset 663836e1179ea79eac12e55670af7e89a531a060 by Miss Islington (bot) in branch '3.8': [3.8] bpo-34003: Re-add versionchanged entry in csv docs (GH-20657) (GH-20771) https://github.com/python/cpython/commit/663836e1179ea79eac12e55670af7e89a531a060 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 21:26:39 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 10 Jun 2020 01:26:39 +0000 Subject: [issue34003] csv.DictReader can return basic dict instead of OrderedDict In-Reply-To: <1530301659.14.0.56676864532.issue34003@psf.upfronthosting.co.za> Message-ID: <1591752399.75.0.412418437451.issue34003@roundup.psfhosted.org> miss-islington added the comment: New changeset 73b728a779aa7d6d8f088c4b21447bba4bf3a351 by Miss Islington (bot) in branch '3.9': [3.9] bpo-34003: Re-add versionchanged entry in csv docs (GH-20657) (GH-20770) https://github.com/python/cpython/commit/73b728a779aa7d6d8f088c4b21447bba4bf3a351 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 22:26:33 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 10 Jun 2020 02:26:33 +0000 Subject: [issue40915] multiple problems with mmap.resize() in Windows In-Reply-To: <1591657683.26.0.992231826575.issue40915@roundup.psfhosted.org> Message-ID: <1591755993.03.0.343725134843.issue40915@roundup.psfhosted.org> Eryk Sun added the comment: For a concrete example, here's a rewrite of the Windows implementation that incorporates the suggested changes. #include #ifdef MS_WINDOWS /* a named file mapping that's open more than once can't be resized */ /* this check could be moved into is_resizeable */ if (self->tagname) { typedef NTSTATUS NTAPI ntqo_f(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG); ntqo_f *pNtQueryObject = (ntqo_f *)GetProcAddress( GetModuleHandleW(L"ntdll"), "NtQueryObject"); if (pNtQueryObject) { PUBLIC_OBJECT_BASIC_INFORMATION info; NTSTATUS status = pNtQueryObject(self->map_handle, ObjectBasicInformation, &info, sizeof(info), NULL); if (NT_SUCCESS(status) && info.HandleCount > 1) { PyErr_SetFromWindowsErr(ERROR_USER_MAPPED_FILE); return NULL; } } } DWORD error = 0; char *old_data = self->data; LARGE_INTEGER offset; offset.QuadPart = self->offset; /* close the file mapping */ CloseHandle(self->map_handle); self->map_handle = NULL; /* if it's not the paging file, unmap the view and resize the file */ if (self->file_handle != INVALID_HANDLE_VALUE) { UnmapViewOfFile(self->data); self->data = NULL; /* resize the file */ if (!SetFilePointerEx(self->file_handle, offset, NULL, FILE_BEGIN) || !SetEndOfFile(self->file_handle)) { /* resizing failed. try to remap the file */ error = GetLastError(); new_size = self->size; } } /* create a new file mapping and map a new view */ LARGE_INTEGER max_size; max_size.QuadPart = new_size; /* FIXME: call CreateFileMappingW with wchar_t tagname */ self->map_handle = CreateFileMapping(self->file_handle, NULL, PAGE_READWRITE, max_size.HighPart, max_size.LowPart, self->tagname); if (self->map_handle != NULL && GetLastError() != ERROR_ALREADY_EXISTS) { self->data = MapViewOfFile(self->map_handle, FILE_MAP_WRITE, offset.HighPart, offset.LowPart, new_size); if (self->data != NULL) { /* copy the old view if using the paging file */ if (self->file_handle == INVALID_HANDLE_VALUE) { memcpy(self->data, old_data, self->size < new_size ? self->size : new_size); } self->size = new_size; } else { error = GetLastError(); CloseHandle(self->map_handle); self->map_handle = NULL; } } else { error = GetLastError(); } /* unmap the old view if using the paging file */ if (self->file_handle == INVALID_HANDLE_VALUE) { UnmapViewOfFile(old_data); } if (error) { PyErr_SetFromWindowsErr(error); return NULL; } Py_RETURN_NONE; #endif /* MS_WINDOWS */ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 22:41:30 2020 From: report at bugs.python.org (Edison Abahurire) Date: Wed, 10 Jun 2020 02:41:30 +0000 Subject: [issue40935] Links to Python3 docs for some libs return 404 Message-ID: <1591756890.13.0.690147132201.issue40935@roundup.psfhosted.org> New submission from Edison Abahurire : These links in the deprecation warning on some Python 2 stdlib libraries documentation pages pointing to Python 3 alternatives return 404s. The link behind the words "Python documentation for the current stable release." Examples: https://docs.python.org/2/library/cgihttpserver.html https://docs.python.org/2/library/basehttpserver.html https://docs.python.org/2/library/simplehttpserver.html https://docs.python.org/2/library/httplib.html https://docs.python.org/2/library/cookie.html The current methodology used is to replace the `2` with a `3` when making a new url and the challenge is that some libraries names changed. ---------- messages: 371154 nosy: edison.abahurire, eric.araujo, ezio.melotti, mdk, willingc priority: normal severity: normal status: open title: Links to Python3 docs for some libs return 404 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 22:42:46 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 10 Jun 2020 02:42:46 +0000 Subject: [issue40915] multiple problems with mmap.resize() in Windows In-Reply-To: <1591657683.26.0.992231826575.issue40915@roundup.psfhosted.org> Message-ID: <1591756966.97.0.481480235857.issue40915@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg371153 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 22:46:27 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 10 Jun 2020 02:46:27 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591757187.1.0.333180316148.issue40890@roundup.psfhosted.org> Inada Naoki added the comment: +1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 22:48:16 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 10 Jun 2020 02:48:16 +0000 Subject: [issue40915] multiple problems with mmap.resize() in Windows In-Reply-To: <1591657683.26.0.992231826575.issue40915@roundup.psfhosted.org> Message-ID: <1591757296.72.0.721585527527.issue40915@roundup.psfhosted.org> Eryk Sun added the comment: For a concrete example, here's a rewrite of the Windows implementation that incorporates the suggested changes. #include #ifdef MS_WINDOWS /* a named file mapping that's open more than once can't be resized */ /* this check could be moved into is_resizeable */ if (self->tagname) { typedef NTSTATUS NTAPI ntqo_f(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG); ntqo_f *pNtQueryObject = (ntqo_f *)GetProcAddress( GetModuleHandleW(L"ntdll"), "NtQueryObject"); if (pNtQueryObject) { PUBLIC_OBJECT_BASIC_INFORMATION info; NTSTATUS status = pNtQueryObject(self->map_handle, ObjectBasicInformation, &info, sizeof(info), NULL); if (NT_SUCCESS(status) && info.HandleCount > 1) { PyErr_SetFromWindowsErr(ERROR_USER_MAPPED_FILE); return NULL; } } } DWORD error = 0; char *old_data = self->data; LARGE_INTEGER offset, max_size; offset.QuadPart = self->offset; max_size.QuadPart = new_size; /* close the file mapping */ CloseHandle(self->map_handle); self->map_handle = NULL; /* if it's not the paging file, unmap the view and resize the file */ if (self->file_handle != INVALID_HANDLE_VALUE) { UnmapViewOfFile(self->data); self->data = NULL; /* resize the file */ if (!SetFilePointerEx(self->file_handle, max_size, NULL, FILE_BEGIN) || !SetEndOfFile(self->file_handle)) { /* resizing failed. try to remap the file */ error = GetLastError(); new_size = max_size.QuadPart = self->size; } } /* create a new file mapping and map a new view */ /* FIXME: call CreateFileMappingW with wchar_t tagname */ self->map_handle = CreateFileMapping(self->file_handle, NULL, PAGE_READWRITE, max_size.HighPart, max_size.LowPart, self->tagname); if (self->map_handle != NULL && GetLastError() != ERROR_ALREADY_EXISTS) { self->data = MapViewOfFile(self->map_handle, FILE_MAP_WRITE, offset.HighPart, offset.LowPart, new_size); if (self->data != NULL) { /* copy the old view if using the paging file */ if (self->file_handle == INVALID_HANDLE_VALUE) { memcpy(self->data, old_data, self->size < new_size ? self->size : new_size); } self->size = new_size; } else { error = GetLastError(); CloseHandle(self->map_handle); self->map_handle = NULL; } } else { error = GetLastError(); } /* unmap the old view if using the paging file */ if (self->file_handle == INVALID_HANDLE_VALUE) { UnmapViewOfFile(old_data); } if (error) { PyErr_SetFromWindowsErr(error); return NULL; } Py_RETURN_NONE; #endif /* MS_WINDOWS */ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 9 23:53:30 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Wed, 10 Jun 2020 03:53:30 +0000 Subject: [issue32604] [subinterpreters] PEP 554 implementation: add interpreters module In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1591761210.35.0.812306240363.issue32604@roundup.psfhosted.org> Joannah Nanjekye added the comment: New changeset bae872f1fe9b3a0d3e3b8800a2ac8d6b440d6e4d by Joannah Nanjekye in branch 'master': bpo-32604: Recommit "bpo-32604: PEP 554 for use in test suite (GH-19985)" (GH-20611) https://github.com/python/cpython/commit/bae872f1fe9b3a0d3e3b8800a2ac8d6b440d6e4d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 00:41:14 2020 From: report at bugs.python.org (Kubilay Kocak) Date: Wed, 10 Jun 2020 04:41:14 +0000 Subject: [issue40900] uuid module build fix on FreeBSD proposal In-Reply-To: <1591544143.85.0.748554475357.issue40900@roundup.psfhosted.org> Message-ID: <1591764074.5.0.321648874697.issue40900@roundup.psfhosted.org> Kubilay Kocak added the comment: Another example, this time for lzma: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209355 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 00:49:40 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 10 Jun 2020 04:49:40 +0000 Subject: [issue40888] Add close method to queue In-Reply-To: <1591444834.07.0.323114052221.issue40888@roundup.psfhosted.org> Message-ID: <1591764580.24.0.963394504315.issue40888@roundup.psfhosted.org> Raymond Hettinger added the comment: This can be re-opened if the discussion on the list warrants it. ---------- nosy: +rhettinger resolution: -> later stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 01:13:48 2020 From: report at bugs.python.org (Kubilay Kocak) Date: Wed, 10 Jun 2020 05:13:48 +0000 Subject: [issue37224] [subinterpreters] test__xxsubinterpreters fails randomly In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1591766028.53.0.680241088021.issue37224@roundup.psfhosted.org> Kubilay Kocak added the comment: Failure on AMD64 FreeBSD Shared 3.x (full log attached): ====================================================================== FAIL: test_subinterpreter (test.test__xxsubinterpreters.IsRunningTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test__xxsubinterpreters.py", line 478, in test_subinterpreter self.assertTrue(interpreters.is_running(interp)) AssertionError: False is not true ... 2 tests failed: test__xxsubinterpreters test_interpreters ... test_already_running (test.test_interpreters.TestInterpreterRun) ... spam Stderr: Exception in thread Thread-19: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/threading.py", line 950, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/threading.py", line 888, in run self._target(*self._args, **self._kwargs) File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_interpreters.py", line 45, in run interp.run(dedent(f""" File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/interpreters.py", line 94, in run _interpreters.run_string(self._id, src_str) RuntimeError: unrecognized interpreter ID 111 FAIL ... test test_interpreters failed test_send_recv_same_interpreter (test.test_interpreters.TestSendRecv) ... ok ====================================================================== FAIL: test_still_running (test.test_interpreters.TestInterpreterDestroy) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_interpreters.py", line 309, in test_still_running interp.close() AssertionError: RuntimeError not raised ====================================================================== FAIL: test_subinterpreter (test.test_interpreters.TestInterpreterIsRunning) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_interpreters.py", line 207, in test_subinterpreter self.assertTrue(interp.is_running()) AssertionError: False is not true ====================================================================== FAIL: test_already_running (test.test_interpreters.TestInterpreterRun) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_interpreters.py", line 383, in test_already_running self.interp.run('print("spam")') AssertionError: RuntimeError not raised Stderr: Exception in thread Thread-19: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/threading.py", line 950, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/threading.py", line 888, in run self._target(*self._args, **self._kwargs) File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_interpreters.py", line 45, in run interp.run(dedent(f""" File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/interpreters.py", line 94, in run _interpreters.run_string(self._id, src_str) RuntimeError: unrecognized interpreter ID 111 ---------------------------------------------------------------------- Ran 40 tests in 20.251s FAILED (failures=3) 1 test failed again: test_interpreters == Tests result: FAILURE then FAILURE == ... 1 test failed: test_interpreters ... 2 re-run tests: test__xxsubinterpreters test_interpreters ---------- nosy: +koobs Added file: https://bugs.python.org/file49224/3.x.koobs-freebsd-564d-build-973-test-stdio.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 01:57:07 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 10 Jun 2020 05:57:07 +0000 Subject: [issue40889] Symmetric difference on dict_views is inefficient In-Reply-To: <1591463399.57.0.727941047538.issue40889@roundup.psfhosted.org> Message-ID: <1591768627.88.0.914661821744.issue40889@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 07d81128124f2b574808e33267c38b104b42ae2a by Dennis Sweeney in branch 'master': bpo-40889: Optimize dict.items() ^ dict.items() (GH-20718) https://github.com/python/cpython/commit/07d81128124f2b574808e33267c38b104b42ae2a ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 01:57:30 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 10 Jun 2020 05:57:30 +0000 Subject: [issue40889] Symmetric difference on dict_views is inefficient In-Reply-To: <1591463399.57.0.727941047538.issue40889@roundup.psfhosted.org> Message-ID: <1591768650.03.0.830432917449.issue40889@roundup.psfhosted.org> Change by Inada Naoki : ---------- nosy: -inada.naoki resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 02:03:58 2020 From: report at bugs.python.org (r n) Date: Wed, 10 Jun 2020 06:03:58 +0000 Subject: [issue40907] cpython/lib/queue.py: put() does not acquire not_empty before notifying on it In-Reply-To: <1591750254.86.0.293598479847.issue40907@roundup.psfhosted.org> Message-ID: <1591769038.58.0.35181674346.issue40907@roundup.psfhosted.org> r n added the comment: Thanks for the response. However, if you see, every condition object has their own queue of waiters in self._waiters, that get notified during notify(), which are different for not_empty and not_full. I see a hang very very rarely, like 1/25 times, in my program, which keeps, reading from and writing to a queue from multiple threads. ---------- nosy: +r n2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 02:06:51 2020 From: report at bugs.python.org (Arpit Mishra) Date: Wed, 10 Jun 2020 06:06:51 +0000 Subject: [issue40869] errno missing descriptions In-Reply-To: <1591325557.2.0.303009626884.issue40869@roundup.psfhosted.org> Message-ID: <1591769211.36.0.783015025867.issue40869@roundup.psfhosted.org> Arpit Mishra added the comment: Hello, I am new to this platform and this would be my first opportunity. Please let me know how can I contribute to this. Thank you. ---------- nosy: +Arpit Mishra _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 02:08:40 2020 From: report at bugs.python.org (r n) Date: Wed, 10 Jun 2020 06:08:40 +0000 Subject: [issue40907] cpython/lib/queue.py: put() does not acquire not_empty before notifying on it In-Reply-To: <1591750254.86.0.293598479847.issue40907@roundup.psfhosted.org> Message-ID: <1591769320.26.0.487163300993.issue40907@roundup.psfhosted.org> r n added the comment: Sorry, please ignore my previous comment, I can see that the issue is not in the queue, but probably be somewhere in my setup. I'll close this bug therefore. Thanks again for the clarification. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 02:18:59 2020 From: report at bugs.python.org (Ilya Kulakov) Date: Wed, 10 Jun 2020 06:18:59 +0000 Subject: [issue17013] Allow waiting on a mock In-Reply-To: <1591725363.08.0.25158389734.issue17013@roundup.psfhosted.org> Message-ID: <4923BC45-9206-42AA-A399-4C8BBC582872@gmail.com> Ilya Kulakov added the comment: Correct, it is not backward compatible in that respect. I did not check thoroughly, but a quick lookup shown no such use among public repos on GitHub. I can instead add the called_event property and make the CallEvent ?public?. Best Regards Ilya Kulakov > On Jun 9, 2020, at 11:56 PM, Pablo Galindo Salgado wrote: > > ? > Pablo Galindo Salgado added the comment: > > isn't PR 20759 backwards incompatible? If I understand correctly, this would break anyone that is checking for identity as : > > assert mymock.called is True > > ---------- > nosy: +pablogsal > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 02:25:33 2020 From: report at bugs.python.org (Arkady) Date: Wed, 10 Jun 2020 06:25:33 +0000 Subject: [issue40860] Exception in multiprocessing/context.py under load In-Reply-To: <1591239973.04.0.347860195364.issue40860@roundup.psfhosted.org> Message-ID: <1591770333.7.0.56182134642.issue40860@roundup.psfhosted.org> Arkady added the comment: Update. I have reproduced the problem in the code not calling Process.join() at all. It require more time and more load, but eventually Process.start() crashes. Posted a question on https://stackoverflow.com/questions/62276345/call-to-pythons-mutliprocessing-process-join-fails The problem reproduces in MacOS as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 02:50:59 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Jun 2020 06:50:59 +0000 Subject: [issue40889] Symmetric difference on dict_views is inefficient In-Reply-To: <1591463399.57.0.727941047538.issue40889@roundup.psfhosted.org> Message-ID: <1591771859.32.0.736938171928.issue40889@roundup.psfhosted.org> Serhiy Storchaka added the comment: I don't like a tendency of optimizing very uncommon cases. We can optimize every operation for specific types by inlining the code. But it increases maintaining cost and can have negative net effect on performance: because increasing the code size and adding additional runtime checks. In past we usually rejected such kind of patches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 02:56:22 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Jun 2020 06:56:22 +0000 Subject: [issue40860] Exception in multiprocessing/context.py under load In-Reply-To: <1591239973.04.0.347860195364.issue40860@roundup.psfhosted.org> Message-ID: <1591772182.04.0.445936052351.issue40860@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +davin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 03:18:04 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Jun 2020 07:18:04 +0000 Subject: [issue40935] Links to Python3 docs for some libs return 404 In-Reply-To: <1591756890.13.0.690147132201.issue40935@roundup.psfhosted.org> Message-ID: <1591773484.51.0.997061204626.issue40935@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report! If the links are always to ../3/.. it should be easy to set up permanent redirects on the website to the most appropriate webpage in the current Python 3 docset. If someone could produce a list of 2 to 3 mappings here, creating the redirects should be trivial. The hard part is finding the missing links and figuring out the best replacements for each. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 03:21:24 2020 From: report at bugs.python.org (David Bolen) Date: Wed, 10 Jun 2020 07:21:24 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591773684.62.0.22218600081.issue40826@roundup.psfhosted.org> David Bolen added the comment: So a script I use on the buildbot intended to prevent hanging on assertions was failing to work in this particular case, which I've corrected. That changes the failure mode for new Win10 buildbot runs. The test in question (test_close_stdin) still fails, but does so immediately (return code not 0, as the child process aborts) rather than timing out. If the assertion is expected, and something to be ignored, the test itself still needs to handle that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 03:35:25 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Jun 2020 07:35:25 +0000 Subject: [issue29242] Crash on GC when compiling PyPy In-Reply-To: <1484146996.34.0.185188210895.issue29242@psf.upfronthosting.co.za> Message-ID: <1591774525.55.0.148353934614.issue29242@roundup.psfhosted.org> Ned Deily added the comment: I agree with Zachery that this issue should be closed. There has been no activity on it since it was opened three years ago and no indication that it has been an ongoing problem. I'm not even sure what the current state of using cPython 3 to build PyPy is. If someone can reliably reproduce a crash when compiling with a currently support Python 3 version, they can re-open this with appropriate supporting documentation. ---------- nosy: +ned.deily resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 03:36:48 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Jun 2020 07:36:48 +0000 Subject: [issue40934] Default RLock does not work well for Manager Condition In-Reply-To: <1591747783.0.0.431376232538.issue40934@roundup.psfhosted.org> Message-ID: <1591774608.08.0.790453960571.issue40934@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +davin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 03:40:03 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Jun 2020 07:40:03 +0000 Subject: [issue40932] subprocess docs should warn of shlex use on Windows In-Reply-To: <1591735791.89.0.818565720729.issue40932@roundup.psfhosted.org> Message-ID: <1591774803.91.0.319653965328.issue40932@roundup.psfhosted.org> Change by Ned Deily : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware title: subprocess docs don't qualify the instruction to use shlex.quote by OS -> subprocess docs should warn of shlex use on Windows versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 03:42:03 2020 From: report at bugs.python.org (YoSTEALTH) Date: Wed, 10 Jun 2020 07:42:03 +0000 Subject: [issue40869] errno missing descriptions In-Reply-To: <1591325557.2.0.303009626884.issue40869@roundup.psfhosted.org> Message-ID: <1591774923.14.0.23622455024.issue40869@roundup.psfhosted.org> YoSTEALTH added the comment: Hello Arpit, Welcome to python bugs. I have already created the patch at https://github.com/python/cpython/pull/20665 if you feel like i missed something you can comment on it. That said there is always something to do with python, just keep your eye out for it ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 03:48:23 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Jun 2020 07:48:23 +0000 Subject: [issue40906] Unable to import module due to python unable to resolve dependecies In-Reply-To: <1591595444.88.0.936758108882.issue40906@roundup.psfhosted.org> Message-ID: <1591775303.76.0.448489261057.issue40906@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 Jun 10 04:21:53 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 10 Jun 2020 08:21:53 +0000 Subject: [issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591777313.45.0.0976205803432.issue40928@roundup.psfhosted.org> R?mi Lapeyre added the comment: Would it be possible to wrap malloc_print_configure() (https://github.com/PureDarwin/libmalloc/blob/e37056265821cd6e014ab911d9fe3b9d0da88e22/src/malloc_printf.c#L59) in a context manager that we put in test.support? or to override https://github.com/PureDarwin/libmalloc/blob/e37056265821cd6e014ab911d9fe3b9d0da88e22/src/malloc_printf.c#L36? This would let us change this behaviour locally without masking all other errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 05:06:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 09:06: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: <1591780002.44.0.719627052907.issue32604@roundup.psfhosted.org> STINNER Victor added the comment: test__xxsubinterpreters and test_interpreters failed on AMD64 FreeBSD Shared 3.x: https://buildbot.python.org/all/#/builders/152/builds/973 See also bpo-37224: "[subinterpreters] test__xxsubinterpreters fails randomly". IMO there are multiple race conditions in these tests. ====================================================================== FAIL: test_subinterpreter (test.test__xxsubinterpreters.IsRunningTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test__xxsubinterpreters.py", line 478, in test_subinterpreter self.assertTrue(interpreters.is_running(interp)) AssertionError: False is not true ====================================================================== FAIL: test_still_running (test.test_interpreters.TestInterpreterDestroy) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_interpreters.py", line 309, in test_still_running interp.close() AssertionError: RuntimeError not raised ====================================================================== FAIL: test_subinterpreter (test.test_interpreters.TestInterpreterIsRunning) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_interpreters.py", line 207, in test_subinterpreter self.assertTrue(interp.is_running()) AssertionError: False is not true ====================================================================== FAIL: test_already_running (test.test_interpreters.TestInterpreterRun) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_interpreters.py", line 383, in test_already_running self.interp.run('print("spam")') AssertionError: RuntimeError not raised ---------- versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 05:08:16 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Jun 2020 09:08:16 +0000 Subject: [issue32604] [subinterpreters] PEP 554 implementation: add interpreters module In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1591780096.32.0.557098173065.issue32604@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: -ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 05:17:33 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 10 Jun 2020 09:17:33 +0000 Subject: [issue40936] Remove deprecated functions from gettext Message-ID: <1591780653.48.0.661147089613.issue40936@roundup.psfhosted.org> New submission from R?mi Lapeyre : The codeset parameter and the following functions were marked for removal in Python 3.10: - bind_textdomain_codeset() - lgettext() - ldgettext() - lngettext() - ldngettext() - output_charset() - set_output_charset() ---------- components: Library (Lib) messages: 371174 nosy: barry, remi.lapeyre priority: normal severity: normal status: open title: Remove deprecated functions from gettext versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 05:20:12 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 10 Jun 2020 09:20:12 +0000 Subject: [issue40936] Remove deprecated functions from gettext In-Reply-To: <1591780653.48.0.661147089613.issue40936@roundup.psfhosted.org> Message-ID: <1591780812.39.0.578221947713.issue40936@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +19970 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20773 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 05:23:26 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Jun 2020 09:23:26 +0000 Subject: [issue17013] Allow waiting on a mock In-Reply-To: <1358856947.82.0.71016271567.issue17013@psf.upfronthosting.co.za> Message-ID: <1591781006.47.0.557097120098.issue17013@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Correct, it is not backward compatible in that respect. Unfortunately, we take backwards compatibility very seriously in the core team and this is a big downside of this proposal. > I can instead add the called_event property Wouldn't that also break any mock that is mocking an object with a "called_event" attribute? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 06:19:08 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Jun 2020 10:19:08 +0000 Subject: [issue32604] [subinterpreters] PEP 554 implementation: add interpreters module In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1591784348.51.0.428960016564.issue32604@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Joannah, Eric, could you look into this? Having random failures in the builbots can make debugging more challenging, hide other issues and can also spam the buildbot list :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 06:43:51 2020 From: report at bugs.python.org (Saba Kauser) Date: Wed, 10 Jun 2020 10:43:51 +0000 Subject: [issue40906] Unable to import module due to python unable to resolve dependecies In-Reply-To: <1591595444.88.0.936758108882.issue40906@roundup.psfhosted.org> Message-ID: <1591785831.85.0.538138093954.issue40906@roundup.psfhosted.org> Saba Kauser added the comment: Hello Steve, You have added changes to load windows dependent DLLs for python C extension modules. After building the source, I can import the module only after I set dll path as: os.add_dll_directory('C:\\Program Files\\IBM\\IBM DATA SERVER DRIVER_01\\bin') Is there a backward compatibility or any other way I can hardcode the dependency resolution path while building the extension itself. I have read through the discussion in https://bugs.python.org/issue36085 but I don't seem to understand if there is a real way for users to import the module without any additional step like os.add_dll_directory() from python. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 06:43:59 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 10 Jun 2020 10:43:59 +0000 Subject: [issue40937] Remove deprecated functions marked for removal in 3.10 Message-ID: <1591785839.81.0.272297043685.issue40937@roundup.psfhosted.org> New submission from R?mi Lapeyre : The following modules have functions marked for deprecation in Python 3.10: - asyncio-queue - asyncio-subprocess - asyncio-sync - asyncio-task - collections - builtins - gettext - the old parser I already opened a PR to remove those in gettext and Pablo Galindo removed the old parser. I will open PRs to fix the remainding modules. Instead of creating a new issue to track those separately, I thought it would be easier to list them all here and open multiple PRs. ---------- components: Library (Lib) messages: 371178 nosy: remi.lapeyre priority: normal severity: normal status: open title: Remove deprecated functions marked for removal in 3.10 versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 06:50:12 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 10 Jun 2020 10:50:12 +0000 Subject: [issue40937] Remove deprecated functions marked for removal in 3.10 In-Reply-To: <1591785839.81.0.272297043685.issue40937@roundup.psfhosted.org> Message-ID: <1591786212.93.0.452780636554.issue40937@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +19971 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20774 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 07:18:48 2020 From: report at bugs.python.org (Open Close) Date: Wed, 10 Jun 2020 11:18:48 +0000 Subject: [issue40938] urllib.parse.urlunsplit makes relative path to absolute (http:g -> http:///g) Message-ID: <1591787928.34.0.800218743026.issue40938@roundup.psfhosted.org> New submission from Open Close : path 'g' in 'http:g' becomes '/g'. >>> urlsplit('http:g') SplitResult(scheme='http', netloc='', path='g', query='', fragment='') >>> urlunsplit(urlsplit('http:g')) 'http:///g' >>> urlsplit('http:///g') SplitResult(scheme='http', netloc='', path='/g', query='', fragment='') >>> urljoin('http://a/b/c/d', 'http:g') 'http://a/b/c/g' >>> urljoin('http://a/b/c/d', 'http:///g') 'http://a/g' The problematic part of the code is: def urlunsplit(components): [...] if netloc or (scheme and scheme in uses_netloc and url[:2] != '//'): ---> if url and url[:1] != '/': url = '/' + url url = '//' + (netloc or '') + url Note also that urllib has decided on the interpretation of 'http:g' (in test). def test_RFC3986(self): [...] #self.checkJoin(RFC3986_BASE, 'http:g','http:g') # strict parser self.checkJoin(RFC3986_BASE, 'http:g','http://a/b/c/g') #relaxed parser ---------- messages: 371179 nosy: op368 priority: normal severity: normal status: open title: urllib.parse.urlunsplit makes relative path to absolute (http:g -> http:///g) type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 07:21:47 2020 From: report at bugs.python.org (Open Close) Date: Wed, 10 Jun 2020 11:21:47 +0000 Subject: [issue37969] Correct urllib.parse functions dropping the delimiters of empty URI components In-Reply-To: <1567004091.58.0.0475239472757.issue37969@roundup.psfhosted.org> Message-ID: <1591788107.49.0.962275791902.issue37969@roundup.psfhosted.org> Open Close added the comment: This is a duplicate of issue22852 ('urllib.parse wrongly strips empty #fragment, ?query, //netloc'). Also note that three alternative solutions have already proposed. (1) Add 'None' type to Result objects members like this one. But it is considering not only query and fragment, but also netloc, which may solve many other issues. (2) Add 'has_netloc', 'has_query' and 'has_fragment' attribute. (3) like (1), but conditional on 'allow_none' argument (similar to 'allow_fragments') ---------- nosy: +op368 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 07:24:18 2020 From: report at bugs.python.org (Open Close) Date: Wed, 10 Jun 2020 11:24:18 +0000 Subject: [issue22852] urllib.parse wrongly strips empty #fragment, ?query, //netloc In-Reply-To: <1415787811.02.0.365080072485.issue22852@psf.upfronthosting.co.za> Message-ID: <1591788258.79.0.159981740965.issue22852@roundup.psfhosted.org> Open Close added the comment: I found another related issue (issue37969). I also filed one myself (issue 40938). --- One thing against the 'has_netloc' etc. solution is that while it guarantees round-trips (urlunsplit(urlsplit('...')) etc.), it is conditional on 'urlunsplit' getting 'SplitResult' object. When 'urlunsplit' gets a normal tuple, it is helpless. ---------- nosy: +op368 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 07:25:17 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Jun 2020 11:25:17 +0000 Subject: [issue40939] Remove the old parser Message-ID: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : As stated in PEP 617, the old parser will be removed in Python 3.10 ---------- assignee: pablogsal components: Interpreter Core messages: 371182 nosy: pablogsal priority: normal severity: normal status: open title: Remove the old parser versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 07:25:28 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Jun 2020 11:25:28 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591788328.14.0.855734219001.issue40939@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +gvanrossum, lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 07:25:59 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Jun 2020 11:25:59 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591788359.07.0.315824551778.issue40939@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +19972 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20768 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 07:28:16 2020 From: report at bugs.python.org (Open Close) Date: Wed, 10 Jun 2020 11:28:16 +0000 Subject: [issue40938] urllib.parse.urlunsplit makes relative path to absolute (http:g -> http:///g) In-Reply-To: <1591787928.34.0.800218743026.issue40938@roundup.psfhosted.org> Message-ID: <1591788496.12.0.715488836025.issue40938@roundup.psfhosted.org> Change by Open Close : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 07:46:31 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 10 Jun 2020 11:46:31 +0000 Subject: [issue40937] Remove deprecated functions marked for removal in 3.10 In-Reply-To: <1591785839.81.0.272297043685.issue40937@roundup.psfhosted.org> Message-ID: <1591789591.43.0.691622472179.issue40937@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- pull_requests: +19973 pull_request: https://github.com/python/cpython/pull/20775 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 07:47:12 2020 From: report at bugs.python.org (Frank Henigman) Date: Wed, 10 Jun 2020 11:47:12 +0000 Subject: [issue40283] Documentation of turtle.circle() In-Reply-To: <1586883280.42.0.803600338852.issue40283@roundup.psfhosted.org> Message-ID: <1591789632.0.0.244072253557.issue40283@roundup.psfhosted.org> Change by Frank Henigman : ---------- nosy: +fjh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 07:53:23 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 10 Jun 2020 11:53:23 +0000 Subject: [issue40932] subprocess docs should warn of shlex use on Windows In-Reply-To: <1591735791.89.0.818565720729.issue40932@roundup.psfhosted.org> Message-ID: <1591790003.0.0.00681327513465.issue40932@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 08:01:23 2020 From: report at bugs.python.org (Mark Shannon) Date: Wed, 10 Jun 2020 12:01:23 +0000 Subject: [issue40925] Remove redundant macros used for stack manipulation in interpreter In-Reply-To: <1591697620.81.0.981270573583.issue40925@roundup.psfhosted.org> Message-ID: <1591790483.69.0.461961241319.issue40925@roundup.psfhosted.org> Mark Shannon added the comment: I'm proposing that we remove the nine macros above; the eleven listed, except TOP() and SECOND(). They can be replaced by POP(), PUSH() and PEEK() without lost of functionality or performance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 08:13:49 2020 From: report at bugs.python.org (Arkady) Date: Wed, 10 Jun 2020 12:13:49 +0000 Subject: [issue40860] Exception in multiprocessing/context.py under load In-Reply-To: <1591239973.04.0.347860195364.issue40860@roundup.psfhosted.org> Message-ID: <1591791229.94.0.657635762104.issue40860@roundup.psfhosted.org> Arkady added the comment: A workaround is to synchronize the call to Process.start() diff --git a/main.py b/main.py index d09dc53..49d68f0 100644 --- a/main.py +++ b/main.py @@ -26,17 +26,24 @@ def load_cpu(deadline): while time.time() - start < 0.2*deadline: math.pow(random.randint(0, 1), random.randint(0, 1)) +def join_process(job, timeout): + time_start = time.time() + while time.time()-time_start < timeout and job.is_alive(): + time.sleep(0.1 * timeout) + continue + job_counter = 0 +lock = threading.Lock() def spawn_job(deadline): ''' Creat a new Process, call join(), process errors ''' global job_counter time_start = time.time() - job = multiprocessing.Process(target=load_cpu, args=(deadline, )) - job.start() - # timeout=None in the call to join() solves the problem - job.join(deadline) + with lock: + job = multiprocessing.Process(target=load_cpu, args=(deadline, )) + job.start() + join_process(job, deadline) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 08:14:59 2020 From: report at bugs.python.org (Stefan Krah) Date: Wed, 10 Jun 2020 12:14:59 +0000 Subject: [issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591791299.26.0.993796257046.issue40928@roundup.psfhosted.org> Stefan Krah added the comment: I have two observations: First, I think that the default DEBUG_WRITE_ALWAYS, which is the cause of this issue, is not C standard conforming -- The standard does not permit implementation defined diagnostics (global side effects!) on a completely normal allocation failure. So I would feel justified to make DEBUG_WRITE_ON_CRASH the default on Python startup, even if that means that we force that on extension modules. That would also address annoyances like in msg327446. Speaking of which, do you also get that diagnostic in cases like these? >>> [0] * 10000000000000000 Traceback (most recent call last): File "", line 1, in MemoryError FreeBSD has a similar reporting mechanism, but the default is not DEBUG_WRITE_ALWAYS. I suspect DEBUG_WRITE_ALWAYS is there for the convenience of Apple developers dealing with user reports. Second, we *could* write such a context manager and it would probably be okay *for the test suite*, but in general changing a static variable that is not thread safe at runtime in a library should be avoided. I don't have OS X at all though. Ronald, what do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 08:23:48 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 10 Jun 2020 12:23:48 +0000 Subject: [issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591791828.85.0.254030196077.issue40928@roundup.psfhosted.org> R?mi Lapeyre added the comment: > I have two observations: > > First, I think that the default DEBUG_WRITE_ALWAYS, which is the cause > of this issue, is not C standard conforming -- The standard does not > permit implementation defined diagnostics (global side effects!) on a > completely normal allocation failure. That makes sense > So I would feel justified to make DEBUG_WRITE_ON_CRASH the default > on Python startup, even if that means that we force that on extension > modules. > > That would also address annoyances like in msg327446. Speaking of > which, do you also get that diagnostic in cases like these? > > > >>> [0] * 10000000000000000 > Traceback (most recent call last): > File "", line 1, in > MemoryError > It gives: >>> [0] * 10000000000000000 python3(36633,0x110c08dc0) malloc: can't allocate region :*** mach_vm_map(size=80000000000004096, flags: 100) failed (error code=3) python3(36633,0x110c08dc0) malloc: *** set a breakpoint in malloc_error_break to debug Traceback (most recent call last): File "", line 1, in MemoryError Not very nice. > > FreeBSD has a similar reporting mechanism, but the default is not > DEBUG_WRITE_ALWAYS. I suspect DEBUG_WRITE_ALWAYS is there for the > convenience of Apple developers dealing with user reports. > > > Second, we *could* write such a context manager and it would probably > be okay *for the test suite*, but in general changing a static variable > that is not thread safe at runtime in a library should be avoided. > What about overriding the default to DEBUG_WRITE_ON_CRASH if MallocDebugReport is not set? This would be more standard compliant and still let the user override it if he whishes so. > > I don't have OS X at all though. Ronald, what do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 08:26:43 2020 From: report at bugs.python.org (tillus) Date: Wed, 10 Jun 2020 12:26:43 +0000 Subject: [issue40940] How to update pip permanently for new venv? Message-ID: <1591792003.17.0.226692929121.issue40940@roundup.psfhosted.org> New submission from tillus : **Describe the bug** Every new environment has the old pip version (19.2.3) **Expected behavior** My system python has pip version 20 so I would expect direnv also to use the most recent pip version. But it installs the old pip version for every new environment **Environment** - OS: macOS Catalina 10.15.4 - Shell: zsh 5.7.1 - Python version: stable 3.7.7 (homebrew bottled) **To Reproduce** ```console ? ~ pip list Package Version ------------------ ------- appdirs 1.4.4 astroid 2.4.1 distlib 0.3.0 filelock 3.0.12 importlib-metadata 1.6.1 isort 4.3.21 lazy-object-proxy 1.4.3 mccabe 0.6.1 numpy 1.18.5 pip 20.1.1 pylint 2.5.2 python-dateutil 2.8.1 pytz 2020.1 setuptools 40.8.0 six 1.12.0 toml 0.10.1 typed-ast 1.4.1 virtualenv 20.0.21 wheel 0.33.1 wrapt 1.12.1 zipp 3.1.0 ? ~ python3 -m venv ./foobar ? ~ source ./foobar/bin/activate (foobar) ? ~ pip list Package Version ---------- ------- pip 19.2.3 setuptools 41.2.0 WARNING: You are using pip version 19.2.3, however version 20.1.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. ``` ---------- components: asyncio messages: 371187 nosy: asvetlov, tillus, yselivanov priority: normal severity: normal status: open title: How to update pip permanently for new venv? type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 08:29:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 12:29:06 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1591792146.25.0.338059319035.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0d00b2a5d74390da7bbeff7dfa73abf2eb46124a by Hai Shi in branch 'master': bpo-40275: Add os_helper submodule in test.support (GH-20765) https://github.com/python/cpython/commit/0d00b2a5d74390da7bbeff7dfa73abf2eb46124a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 08:30:08 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Wed, 10 Jun 2020 12:30:08 +0000 Subject: [issue32604] [subinterpreters] PEP 554 implementation: add interpreters module In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1591792208.79.0.547576571322.issue32604@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- pull_requests: +19974 pull_request: https://github.com/python/cpython/pull/20777 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 08:34:44 2020 From: report at bugs.python.org (Stefan Krah) Date: Wed, 10 Jun 2020 12:34:44 +0000 Subject: [issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591792484.96.0.275669673622.issue40928@roundup.psfhosted.org> Stefan Krah added the comment: > What about overriding the default to DEBUG_WRITE_ON_CRASH if MallocDebugReport is not set? That sounds like a very good compromise! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 08:37:57 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 10 Jun 2020 12:37:57 +0000 Subject: [issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591792677.57.0.311402208066.issue40928@roundup.psfhosted.org> R?mi Lapeyre added the comment: Ok, I will try to do this in the coming days. Is adding this kind of super ugly, super specific code to pymain_init() ok? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 09:02:40 2020 From: report at bugs.python.org (Stefan Krah) Date: Wed, 10 Jun 2020 13:02:40 +0000 Subject: [issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591794160.07.0.534276099197.issue40928@roundup.psfhosted.org> Stefan Krah added the comment: I would probably put all that code in a separate function like init_darwin_libc(), and call init_darwin_libc() in pymain_init(). The real fun will start when we figure out which OS X versions support this feature. I hope we have a buildbot for each. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 09:14:17 2020 From: report at bugs.python.org (Stefan Krah) Date: Wed, 10 Jun 2020 13:14:17 +0000 Subject: [issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591794857.04.0.0575735853971.issue40928@roundup.psfhosted.org> Stefan Krah added the comment: Changing the title to get more input from others. ---------- title: test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS -> OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 09:15:58 2020 From: report at bugs.python.org (Ilya Kulakov) Date: Wed, 10 Jun 2020 13:15:58 +0000 Subject: [issue17013] Allow waiting on a mock In-Reply-To: <1591781006.47.0.557097120098.issue17013@roundup.psfhosted.org> Message-ID: <1F3994E8-05D1-4BE0-9FF4-9980680B092B@gmail.com> Ilya Kulakov added the comment: > Unfortunately, we take backwards compatibility very seriously in the core team and this is a big downside of this proposal. Current implementation relies on that: 1. called is almost never used in practice (people just use .assert*) 2. The is True / False is discouraged and is rarely used by itself, let alone in combination with .called > Wouldn't that also break any mock that is mocking an object with a "called_event" attribute? It should break them in the same way as "called" breaks them now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 09:33:12 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Jun 2020 13:33:12 +0000 Subject: [issue17013] Allow waiting on a mock In-Reply-To: <1358856947.82.0.71016271567.issue17013@psf.upfronthosting.co.za> Message-ID: <1591795992.71.0.247195836578.issue17013@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > 1. called is almost never used in practice (people just use .assert*) Sorry but saying "almost never used" is not good enough. Not only because you hold incomplete data but because backwards compatibility is mainly binary: it breaks or it does not, and this breaks. > 2. The is True / False is discouraged and is rarely used by itself, let alone in combination with .called That is not true, is actually encouraged to check for singletons like True, False and None. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 09:33:12 2020 From: report at bugs.python.org (Mark Shannon) Date: Wed, 10 Jun 2020 13:33:12 +0000 Subject: [issue40941] Merge generator.gi_running and frame executing flag into single frame state Message-ID: <1591795992.13.0.468529987519.issue40941@roundup.psfhosted.org> New submission from Mark Shannon : Generators have a "gi_running" attribute (coroutines have an equivalent cr_running flag). Internally frame also has an executing flag. We use these, plus the test `f_stacktop pointer == NULL`, to determine what state a generator or frame is in. It would be much cleaner to maintain a single f_state field in the frame to track the state of a frame, reducing the change of ambiguity and error. The possible states of a frame are: CREATED -- Frame exists but has not been executed at all SUSPENDED -- Frame has been executed, and has been suspended by a yield EXECUTING -- Frame is being executed RETURNED -- Frame has completed by a RETURN_VALUE instruction RAISED -- Frame has completed as a result of an exception being raised CLEARED -- Frame has been cleared, either by explicit call to clear or by the GC. ---------- assignee: Mark.Shannon components: Interpreter Core messages: 371194 nosy: Mark.Shannon priority: normal severity: normal stage: needs patch status: open title: Merge generator.gi_running and frame executing flag into single frame state type: performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 09:35:48 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Jun 2020 13:35:48 +0000 Subject: [issue17013] Allow waiting on a mock In-Reply-To: <1358856947.82.0.71016271567.issue17013@psf.upfronthosting.co.za> Message-ID: <1591796148.63.0.950466347011.issue17013@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Current implementation relies on that: Notice that this is a clear disadvantage over a subclass-based approach, which is backwards compatible and preserves the semantics of mock. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 09:36:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 13:36:44 +0000 Subject: [issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591796204.56.0.629769174918.issue40928@roundup.psfhosted.org> STINNER Victor added the comment: > Ok, I will try to do this in the coming days. Is adding this kind of super ugly, super specific code to pymain_init() ok? Maybe _PyPreConfig_Write() would be a better place. There is a very little risk that memory allocation done before _PyPreConfig_Write() (i.e. in _PyPreConfig_Read()) fail with out of memory. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 09:40:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 13:40:53 +0000 Subject: [issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591796453.5.0.721171654126.issue40928@roundup.psfhosted.org> STINNER Victor added the comment: > Would it be possible to wrap malloc_print_configure() (https://github.com/PureDarwin/libmalloc/blob/e37056265821cd6e014ab911d9fe3b9d0da88e22/src/malloc_printf.c#L59) in a context manager that we put in test.support? or to override https://github.com/PureDarwin/libmalloc/blob/e37056265821cd6e014ab911d9fe3b9d0da88e22/src/malloc_printf.c#L36? I don't see much benefit of having a feature which only works on macOS. You can put a hook on memory allocations using PyMem_SetAllocator() to trigger any action you want when any memory allocation done by Python fails. But is it really an use case to log any memory allocation failure? Python is very likely to raise a MemoryError exception in this case. It's well defined, no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 09:51:22 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 10 Jun 2020 13:51:22 +0000 Subject: [issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591797082.88.0.254594461722.issue40928@roundup.psfhosted.org> R?mi Lapeyre added the comment: > But is it really an use case to log any memory allocation failure? Python is very likely to raise a MemoryError exception in this case. It's well defined, no? Yes, we are not trying to log the allocation failure, we are just trying to suppress a dubious error message that occurs specifically on MacOS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 09:55:16 2020 From: report at bugs.python.org (Paul Anton Letnes) Date: Wed, 10 Jun 2020 13:55:16 +0000 Subject: [issue36439] Inconsistencies with datetime.fromtimestamp(t) when t < 0 In-Reply-To: <1553613506.18.0.935251324399.issue36439@roundup.psfhosted.org> Message-ID: <1591797316.7.0.214511706839.issue36439@roundup.psfhosted.org> Paul Anton Letnes added the comment: I've encountered an issue on anaconda python on windows 10 v1909 which I suspect is related. It looks like no dates in 1970 can be converted to datetime.timestamp(): Python 3.8.2 (default, Apr 14 2020, 19:01:40) [MSC v.1916 64 bit (AMD64)] Type 'copyright', 'credits' or 'license' for more information IPython 7.13.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: import datetime In [2]: datetime.datetime(1970, 1, 2, 0, 0, 1, 123456).timestamp() --------------------------------------------------------------------------- OSError Traceback (most recent call last) in ----> 1 datetime.datetime(1970, 1, 2, 0, 0, 1, 123456).timestamp() OSError: [Errno 22] Invalid argument In [3]: datetime.datetime(1971, 1, 2, 0, 0, 1, 123456).timestamp() Out[3]: 31618801.123456 ---------- nosy: +Paul Anton Letnes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 09:55:58 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 10 Jun 2020 13:55:58 +0000 Subject: [issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591797358.41.0.178277329744.issue40928@roundup.psfhosted.org> Ronald Oussoren added the comment: I'm not sure if it is worthwhile to tweak CPython to work around this misfeature of libc on macOS (and likely iOS). Is this something that causes issues in real code, or just in the test suite? Looking at this particular test is seems to use a context that is not likely to occur in real code (due to using a lot of memory) Note that malloc_print_configure is not a public API, using that can cause problems for folks that embed Python in apps that are shipped in the app store. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 09:57:37 2020 From: report at bugs.python.org (Ilya Kulakov) Date: Wed, 10 Jun 2020 13:57:37 +0000 Subject: [issue17013] Allow waiting on a mock In-Reply-To: <1591796148.63.0.950466347011.issue17013@roundup.psfhosted.org> Message-ID: <87296754-C8AE-4EBF-81BB-B991D8CCDB1A@gmail.com> Ilya Kulakov added the comment: As far as I understand it introduces 3 methods that may clash. It's unlikely but (I speculate) is still more likely than an identity check with called. That being said, the PR can be redone as a subclass. But that implementation will not play as nicely with the planned `awaited` property for asyncio mocks (see description in the PR). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 10:00:25 2020 From: report at bugs.python.org (Stefan Krah) Date: Wed, 10 Jun 2020 14:00:25 +0000 Subject: [issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591797625.3.0.203292076666.issue40928@roundup.psfhosted.org> Stefan Krah added the comment: No, it does not cause real issues. Adding this feature would just suppress chatty diagnostics like this one, which are a bit unfriendly: >>> [0] * 10000000000000000 python3(36633,0x110c08dc0) malloc: can't allocate region :*** mach_vm_map(size=80000000000004096, flags: 100) failed (error code=3) python3(36633,0x110c08dc0) malloc: *** set a breakpoint in malloc_error_break to debug Traceback (most recent call last): File "", line 1, in MemoryError So yes, users do occasionally see it outside the test suite. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 10:03:14 2020 From: report at bugs.python.org (Stefan Krah) Date: Wed, 10 Jun 2020 14:03:14 +0000 Subject: [issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591797794.55.0.430175190732.issue40928@roundup.psfhosted.org> Stefan Krah added the comment: But if malloc_print_configure() is not a public API, it should probably not be used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 10:15:07 2020 From: report at bugs.python.org (Stefan Krah) Date: Wed, 10 Jun 2020 14:15:07 +0000 Subject: [issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591798507.86.0.0818691733718.issue40928@roundup.psfhosted.org> Stefan Krah added the comment: And indeed, with the new decimal MAX_PREC feature, you should see the misguided diagnostic as well on OS X: >>> from decimal import * >>> >>> c = getcontext() >>> c.prec = MAX_PREC >>> Decimal(4).sqrt() Decimal('2') >>> So it is real code, but extremely rarely used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 10:25:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 14:25:28 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591799128.13.0.193440459315.issue40826@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19975 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/20779 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 10:26:52 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Jun 2020 14:26:52 +0000 Subject: [issue39666] IDLE: Factor out similar code in editor and hyperparser In-Reply-To: <1581963120.77.0.85896962977.issue39666@roundup.psfhosted.org> Message-ID: <1591799212.28.0.263761116829.issue39666@roundup.psfhosted.org> Terry J. Reedy added the comment: The quote from #32989 is from my msg313179, msg313179. There are two levels of duplication. First, between Hyperparser and EditorWindow. Second between editor and shell branches. While I said before to resolve the first with an EditorWindow method, as done in the patch, a hyperparser function, with 'self' replaced by 'editwin' would be possible. I might prefer that. The second level of duplication could be handled by a method in EditorWindow overridden by a method in PyShell. But with duplication between the branches removed as in the patch, leaving the Shell branch so short, this does not seem as worthwhile. I suspect/expect it would be even less so after future Shell changes. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 10:37:15 2020 From: report at bugs.python.org (Ilya Kulakov) Date: Wed, 10 Jun 2020 14:37:15 +0000 Subject: [issue17013] Allow waiting on a mock In-Reply-To: <1358856947.82.0.71016271567.issue17013@psf.upfronthosting.co.za> Message-ID: <1591799835.93.0.126327456966.issue17013@roundup.psfhosted.org> Ilya Kulakov added the comment: > That is not true, is actually encouraged to check for singletons like True, False and None. You're right, just never used it as I never needed an identity check against True / False The PR is re-done to use an additional property call_event instead of extending called for backwards compatibility. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 10:55:45 2020 From: report at bugs.python.org (Pinto) Date: Wed, 10 Jun 2020 14:55:45 +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: <1591800945.93.0.326007413441.issue40562@roundup.psfhosted.org> Pinto added the comment: I have the same problem on my site https://lesmarketing.fr I deactivated the breadcrumbs, you have found a solution ? ---------- nosy: +khaled _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 11:13:47 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 10 Jun 2020 15:13:47 +0000 Subject: [issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591802027.25.0.700118688973.issue40928@roundup.psfhosted.org> Ronald Oussoren added the comment: I've filed a report with Apple about this (FB7731971), even though I expect that this behaviour will not change. That's something we should have done years ago. BTW. The link to malloc_print_configure that Victor shared seems to indicate that the default for MallocDebugReport should be "none", instead of "stderr". The code on opensource.apple.com conforms this (https://opensource.apple.com/source/libmalloc/libmalloc-283.60.1/src/malloc_printf.c.auto.html). Apparently Apple uses a slightly different code when building macOS :-( Note that this annoying message is only printed when the proces runs out of address space, which requires allocating an insane amount of memory (the first warning line in the initial message of this bug report tries to allocate 872 petabyte). If this is something we want to avoid its probably easier to switch to a allocator that won't avoids calling malloc(3) on large enough allocations (for example return NULL for any allocation attempt above 4TB, which is comfortably above the max amount of memory in a Mac Pro). This theoretically limits memory allocations, but in practice the system will be unusable with far smaller allocations (assuming the allocated memory is actually used). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 11:31:07 2020 From: report at bugs.python.org (Zachary Ware) Date: Wed, 10 Jun 2020 15:31:07 +0000 Subject: [issue40940] How to update pip permanently for new venv? In-Reply-To: <1591792003.17.0.226692929121.issue40940@roundup.psfhosted.org> Message-ID: <1591803067.52.0.0591933410763.issue40940@roundup.psfhosted.org> Change by Zachary Ware : ---------- components: +Library (Lib) -asyncio nosy: +vinay.sajip -asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 11:39:19 2020 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 10 Jun 2020 15:39:19 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1591803559.8.0.211935389894.issue36543@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset ec88e1bca81a167e6d5c0ac635e22f84298cb1df by Serhiy Storchaka in branch 'master': bpo-36543: Revert "bpo-36543: Remove the xml.etree.cElementTree module." (GH-20117) https://github.com/python/cpython/commit/ec88e1bca81a167e6d5c0ac635e22f84298cb1df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 11:39:26 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 10 Jun 2020 15:39:26 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1591803566.75.0.348266095987.issue36543@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +19976 pull_request: https://github.com/python/cpython/pull/20780 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 11:54:57 2020 From: report at bugs.python.org (Mike Jarvis) Date: Wed, 10 Jun 2020 15:54:57 +0000 Subject: [issue40942] BaseManager cannot start with local manager Message-ID: <1591804497.09.0.165286994066.issue40942@roundup.psfhosted.org> New submission from Mike Jarvis : I had a function for making a logger proxy that could be safely passed to multiprocessing workers and log back to the main logger with essentially the following code: ``` import logging from multiprocessing.managers import BaseManager class SimpleGenerator: def __init__(self, obj): self._obj = obj def __call__(self): return self._obj def get_logger_proxy(logger): class LoggerManager(BaseManager): pass logger_generator = SimpleGenerator(logger) LoggerManager.register('logger', callable = logger_generator) logger_manager = LoggerManager() logger_manager.start() logger_proxy = logger_manager.logger() return logger_proxy logger = logging.getLogger('test') logger_proxy = get_logger_proxy(logger) ``` This worked great on python 2.7 through 3.7. I could pass the resulting logger_proxy to workers and they would log information, which would then be properly sent back to the main logger. However, on python 3.8.2 (and 3.8.0) I get the following: ``` Traceback (most recent call last): File "test_proxy.py", line 20, in logger_proxy = get_logger_proxy(logger) File "test_proxy.py", line 13, in get_logger_proxy logger_manager.start() File "/anaconda3/envs/py3.8/lib/python3.8/multiprocessing/managers.py", line 579, in start self._process.start() File "/anaconda3/envs/py3.8/lib/python3.8/multiprocessing/process.py", line 121, in start self._popen = self._Popen(self) File "/anaconda3/envs/py3.8/lib/python3.8/multiprocessing/context.py", line 283, in _Popen return Popen(process_obj) File "/anaconda3/envs/py3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__ super().__init__(process_obj) File "/anaconda3/envs/py3.8/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__ self._launch(process_obj) File "/anaconda3/envs/py3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch reduction.dump(process_obj, fp) File "/anaconda3/envs/py3.8/lib/python3.8/multiprocessing/reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) AttributeError: Can't pickle local object 'get_logger_proxy..LoggerManager' ``` So it seems that something changed about ForkingPickler that makes it unable to handle the closure in my get_logger_proxy function. I don't know if this is an intentional change in behavior or an unintentional regression. If the former, I would appreciate advice on how to modify the above code to work. Possibly relevant system details: ``` $ uname -a Darwin Fife 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64 $ python --version Python 3.8.2 $ which python /anaconda3/envs/py3.8/bin/python $ conda info active environment : py3.8 active env location : /anaconda3/envs/py3.8 shell level : 2 user config file : /Users/Mike/.condarc populated config files : /Users/Mike/.condarc conda version : 4.8.3 conda-build version : 3.18.5 python version : 3.6.5.final.0 virtual packages : __osx=10.13.4 base environment : /anaconda3 (writable) channel URLs : https://conda.anaconda.org/conda-forge/osx-64 https://conda.anaconda.org/conda-forge/noarch https://conda.anaconda.org/astropy/osx-64 https://conda.anaconda.org/astropy/noarch https://repo.anaconda.com/pkgs/main/osx-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /anaconda3/pkgs /Users/Mike/.conda/pkgs envs directories : /anaconda3/envs /Users/Mike/.conda/envs platform : osx-64 user-agent : conda/4.8.3 requests/2.23.0 CPython/3.6.5 Darwin/17.5.0 OSX/10.13.4 UID:GID : 501:20 netrc file : /Users/Mike/.netrc offline mode : False ``` ---------- components: Library (Lib) messages: 371211 nosy: Mike Jarvis priority: normal severity: normal status: open title: BaseManager cannot start with local manager type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:01:33 2020 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 10 Jun 2020 16:01:33 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1591804893.6.0.338953724461.issue36543@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 3b97d1becbe08cf56c58d9c740a4622cbf6285fd by Miss Islington (bot) in branch '3.9': bpo-36543: Revert "bpo-36543: Remove the xml.etree.cElementTree module." (GH-20117) (GH-20780) https://github.com/python/cpython/commit/3b97d1becbe08cf56c58d9c740a4622cbf6285fd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:03:53 2020 From: report at bugs.python.org (Stefan Krah) Date: Wed, 10 Jun 2020 16:03:53 +0000 Subject: [issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH In-Reply-To: <1591712621.72.0.447782390229.issue40928@roundup.psfhosted.org> Message-ID: <1591805033.25.0.346517119564.issue40928@roundup.psfhosted.org> Stefan Krah added the comment: > The first warning line in the initial message of this bug report tries to allocate 872 petabyte. Yes, that's for systems like Linux where you never know what overallocation is going to permit and subsequently freeze the system. Special casing malloc() for OS X/large allocations sounds like a good plan. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:04:24 2020 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 10 Jun 2020 16:04:24 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1591805064.73.0.0987120219431.issue36543@roundup.psfhosted.org> Stefan Behnel added the comment: The xml.etree.cElementTree module is restored. We'll see about what to do with it later. It hurts less to keep it around than to delete it. I think this ticket can be closed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:09:09 2020 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 10 Jun 2020 16:09:09 +0000 Subject: [issue40703] PyType_FromSpec*() overwrites the type's "__module__" In-Reply-To: <1590009872.3.0.237127808252.issue40703@roundup.psfhosted.org> Message-ID: <1591805349.12.0.275274624206.issue40703@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 24b8bad6d30ae4fb37ee686a073adfa5308659f9 by scoder in branch 'master': bpo-40703: Let PyType_FromSpec() set "type.__module__" only if it is not set yet. (GH-20273) https://github.com/python/cpython/commit/24b8bad6d30ae4fb37ee686a073adfa5308659f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:09:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 16:09:12 +0000 Subject: [issue40943] Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not defined Message-ID: <1591805352.1.0.263144015623.issue40943@roundup.psfhosted.org> New submission from STINNER Victor : Follow-up of bpo-36381: In Python 3.8, PyArg_ParseTuple() and Py_BuildValue() formats using "int" when PY_SSIZE_T_CLEAN is not defined, but Py_ssize_t when PY_SSIZE_T_CLEAN is defined, were deprecated by: commit d3c72a223a5f771f964fc34557c55eb5bfa0f5a0 Author: Inada Naoki Date: Sat Mar 23 21:04:40 2019 +0900 bpo-36381: warn when no PY_SSIZE_T_CLEAN defined (GH-12473) We will remove int support from 3.10 or 4.0. I propose to drop support for these formats in Python 3.10. It is a backward incompatible change on purpose, to ensure that all C extensions are compatible with objects larger than 2 GB, and that all C extensions behave the same. I'm not sure of the effects of this issue on bpo-27499 "PY_SSIZE_T_CLEAN conflicts with Py_LIMITED_API". ---------- components: C API messages: 371216 nosy: inada.naoki, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not defined versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:09:15 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 10 Jun 2020 16:09:15 +0000 Subject: [issue40703] PyType_FromSpec*() overwrites the type's "__module__" In-Reply-To: <1590009872.3.0.237127808252.issue40703@roundup.psfhosted.org> Message-ID: <1591805355.77.0.00550821008629.issue40703@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +19977 pull_request: https://github.com/python/cpython/pull/20782 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:09:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 16:09:22 +0000 Subject: [issue40943] Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not defined In-Reply-To: <1591805352.1.0.263144015623.issue40943@roundup.psfhosted.org> Message-ID: <1591805362.57.0.997307206257.issue40943@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19978 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20781 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:18:11 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 10 Jun 2020 16:18:11 +0000 Subject: [issue40925] Remove redundant macros used for stack manipulation in interpreter In-Reply-To: <1591697620.81.0.981270573583.issue40925@roundup.psfhosted.org> Message-ID: <1591805891.67.0.227530492312.issue40925@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:21:37 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 10 Jun 2020 16:21:37 +0000 Subject: [issue40925] Remove redundant macros used for stack manipulation in interpreter In-Reply-To: <1591697620.81.0.981270573583.issue40925@roundup.psfhosted.org> Message-ID: <1591806097.81.0.153503980334.issue40925@roundup.psfhosted.org> Dong-hee Na added the comment: AFAIK, SET_VALUE is not used in CPython master codebase. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:24:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 16:24:12 +0000 Subject: [issue40943] PEP 353: Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not defined In-Reply-To: <1591805352.1.0.263144015623.issue40943@roundup.psfhosted.org> Message-ID: <1591806252.97.0.0183306021819.issue40943@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not defined -> PEP 353: Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not defined _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:26:24 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 10 Jun 2020 16:26:24 +0000 Subject: [issue40925] Remove redundant macros used for stack manipulation in interpreter In-Reply-To: <1591697620.81.0.981270573583.issue40925@roundup.psfhosted.org> Message-ID: <1591806384.6.0.0132619429522.issue40925@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +19979 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20783 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:38:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 16:38:13 +0000 Subject: [issue40943] PEP 353: Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not defined In-Reply-To: <1591805352.1.0.263144015623.issue40943@roundup.psfhosted.org> Message-ID: <1591807093.85.0.12308854171.issue40943@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d36cf5f1d20ce9f111a8fc997104785086e8eee6 by Victor Stinner in branch 'master': bpo-40943: Replace PY_FORMAT_SIZE_T with "z" (GH-20781) https://github.com/python/cpython/commit/d36cf5f1d20ce9f111a8fc997104785086e8eee6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:38:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 16:38:28 +0000 Subject: [issue40943] PEP 353: Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not defined In-Reply-To: <1591805352.1.0.263144015623.issue40943@roundup.psfhosted.org> Message-ID: <1591807108.87.0.777977588264.issue40943@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19980 pull_request: https://github.com/python/cpython/pull/20784 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:39:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 16:39:46 +0000 Subject: [issue40943] PEP 353: Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not defined In-Reply-To: <1591805352.1.0.263144015623.issue40943@roundup.psfhosted.org> Message-ID: <1591807186.71.0.43220674354.issue40943@roundup.psfhosted.org> STINNER Victor added the comment: I started to write a long rationale to explain why "#" variants of formats must be deprecated, before I noticed that they are already deprecated! To not lost it, here is my rationale :-) The C code base of Python switched from int to Py_ssize_t with PEP 353. For not break the backward compatibility, C extension modules have to opt-in for Py_ssize_t by defining PY_SSIZE_T_CLEAN macro in their code base. It affects a few format PyArg_ParseTuple() and Py_BuildValue(): https://docs.python.org/dev/c-api/arg.html Currently, the documentation says "This behavior will change in a future Python version to only support Py_ssize_t and drop int support. It is best to always define PY_SSIZE_T_CLEAN." Continue to use int by default prevents to accept content larger than 2 GB and causes issues with limited C API: bpo-27499. I propose to raise a DeprecationWarning on C extension modules built without the PY_SSIZE_T_CLEAN macro defined. #warning could be used to emit a warning when building a C extension without PY_SSIZE_T_CLEAN. The problem is that the compiler output is hidden by "pip install", only few developers pay attention to such warnings, and also we should not bother C extensions which don't use PyArg_ParseTuple() and Py_BuildValue(). I prefer to raise a DeprecationWarning exception at runtime since this warning can be made an error when using -Werror: it eases detection of deprecated modules without preventing to build or use a C extension using the deprecated functions. Two releases after the DeprecationWarning is introduced, we can consider to always raise an exception. Again, I dislike the idea of always require PY_SSIZE_T_CLEAN macro when including "Python.h" header file. I suggest to only raise an exception at runtime when the few affected functions are called. For example, PyArg_ParseTuple(args, "y*", &buffer) always Py_buffer which uses Py_ssize_t: the behavior does not depend on PY_SSIZE_T_CLEAN. An alternative is to even deprecate the few "#" formats which are affected by PY_SSIZE_T_CLEAN. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:43:16 2020 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 10 Jun 2020 16:43:16 +0000 Subject: [issue40703] PyType_FromSpec*() overwrites the type's "__module__" In-Reply-To: <1590009872.3.0.237127808252.issue40703@roundup.psfhosted.org> Message-ID: <1591807396.79.0.710130898506.issue40703@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 9419158a3e67ba2eadf33215568003ed723b0a98 by Miss Islington (bot) in branch '3.9': bpo-40703: Let PyType_FromSpec() set "type.__module__" only if it is not set yet. (GH-20273) (GH-20782) https://github.com/python/cpython/commit/9419158a3e67ba2eadf33215568003ed723b0a98 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:43:59 2020 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 10 Jun 2020 16:43:59 +0000 Subject: [issue40703] PyType_FromSpec*() overwrites the type's "__module__" In-Reply-To: <1590009872.3.0.237127808252.issue40703@roundup.psfhosted.org> Message-ID: <1591807439.25.0.85378596846.issue40703@roundup.psfhosted.org> Change by Stefan Behnel : ---------- stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:48:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 16:48:28 +0000 Subject: [issue27499] PY_SSIZE_T_CLEAN conflicts with Py_LIMITED_API In-Reply-To: <1468339187.51.0.412519931192.issue27499@psf.upfronthosting.co.za> Message-ID: <1591807708.22.0.656680280888.issue27499@roundup.psfhosted.org> STINNER Victor added the comment: > Oh, I can avoid this problem by setting Py_LIMITED_API to 0x30300000 or greater. Hum, maybe the behavior is different because of the following code in Include/modsupport.h: /* Due to a glitch in 3.2, the _SizeT versions weren't exported from the DLL. */ #if !defined(PY_SSIZE_T_CLEAN) || !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:48:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 16:48:48 +0000 Subject: [issue27499] PY_SSIZE_T_CLEAN conflicts with Py_LIMITED_API In-Reply-To: <1468339187.51.0.412519931192.issue27499@psf.upfronthosting.co.za> Message-ID: <1591807728.3.0.603737221988.issue27499@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-40943: PEP 353: Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not defined. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:48:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 16:48:54 +0000 Subject: [issue40943] PEP 353: Drop support for PyArg_ParseTuple() "#" formats when PY_SSIZE_T_CLEAN is not defined In-Reply-To: <1591805352.1.0.263144015623.issue40943@roundup.psfhosted.org> Message-ID: <1591807734.14.0.95901211928.issue40943@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: PEP 353: Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not defined -> PEP 353: Drop support for PyArg_ParseTuple() "#" formats when PY_SSIZE_T_CLEAN is not defined _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:49:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 16:49:29 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591807769.42.0.243506738119.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f6e58aefde2e57e4cb11ea7743955da53a3f1e80 by Victor Stinner in branch 'master': bpo-40826: Fix test_repl.test_close_stdin() on Windows (GH-20779) https://github.com/python/cpython/commit/f6e58aefde2e57e4cb11ea7743955da53a3f1e80 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 12:58:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 16:58:19 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591808299.13.0.955026935184.issue40826@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19981 pull_request: https://github.com/python/cpython/pull/20785 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 13:00:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 17:00:22 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591808422.79.0.0366710948852.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: Thanks for the bug report David Bolen and thanks for the analysis Eryk Sun. The bug should be be fixed in the master branch, and backports to 3.8 and 3.9 are coming. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 13:03:59 2020 From: report at bugs.python.org (Tim Golden) Date: Wed, 10 Jun 2020 17:03:59 +0000 Subject: [issue40913] time.sleep ignores errors on Windows In-Reply-To: <1591641616.51.0.015066290777.issue40913@roundup.psfhosted.org> Message-ID: <1591808638.93.0.00263436707293.issue40913@roundup.psfhosted.org> Tim Golden added the comment: Thinking about testing here.. is there any straightforward way to cause WaitForSingleObjectEx to fail? The code change would be fairly slight and amenable to inspection, but it would be good to actually test it ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 13:25:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 17:25:04 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591809904.29.0.354979833345.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4a4f660cfde8b683634c53e6214a6baa51de43b1 by Victor Stinner in branch '3.9': bpo-40826: Fix test_repl.test_close_stdin() on Windows (GH-20779) (GH-20785) https://github.com/python/cpython/commit/4a4f660cfde8b683634c53e6214a6baa51de43b1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 13:27:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 17:27:35 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591810055.68.0.900651859429.issue40826@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19982 pull_request: https://github.com/python/cpython/pull/20787 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 13:33:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 17:33:36 +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: <1591810416.36.0.728488604241.issue39465@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19983 pull_request: https://github.com/python/cpython/pull/20788 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 13:45:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 17:45:53 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591811153.97.0.864101124512.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c7a6c7b5279f766e65b7cc9dc5bebb73acee6672 by Victor Stinner in branch '3.8': bpo-40826: Fix test_repl.test_close_stdin() on Windows (GH-20779) (GH-20785) (GH-20787) https://github.com/python/cpython/commit/c7a6c7b5279f766e65b7cc9dc5bebb73acee6672 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 13:46:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 17:46:11 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591811171.54.0.454512784587.issue40826@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 Jun 10 13:54:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 17:54:33 +0000 Subject: [issue40927] ./python -m test test___all__ test_binhex fails In-Reply-To: <1591699636.51.0.837580045442.issue40927@roundup.psfhosted.org> Message-ID: <1591811673.39.0.308314908862.issue40927@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 9c24e2e4c10705d95258558348417a28007dac66 by Victor Stinner in branch 'master': bpo-40927: Fix test_binhex when run twice (GH-20764) https://github.com/python/cpython/commit/9c24e2e4c10705d95258558348417a28007dac66 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 13:57:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 17:57:23 +0000 Subject: [issue40927] ./python -m test test___all__ test_binhex fails In-Reply-To: <1591699636.51.0.837580045442.issue40927@roundup.psfhosted.org> Message-ID: <1591811843.51.0.127336765016.issue40927@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19984 pull_request: https://github.com/python/cpython/pull/20789 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 14:08:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 18:08:29 +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: <1591812509.69.0.999247424942.issue39465@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1bcc32f0620d2e99649a6d423284d9496b7b3548 by Victor Stinner in branch 'master': bpo-39465: Use _PyInterpreterState_GET() (GH-20788) https://github.com/python/cpython/commit/1bcc32f0620d2e99649a6d423284d9496b7b3548 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 14:13:24 2020 From: report at bugs.python.org (Viktor Roytman) Date: Wed, 10 Jun 2020 18:13:24 +0000 Subject: [issue39679] functools: singledispatchmethod doesn't work with classmethod In-Reply-To: <1582053375.25.0.178240077179.issue39679@roundup.psfhosted.org> Message-ID: <1591812804.25.0.966129294509.issue39679@roundup.psfhosted.org> Viktor Roytman added the comment: Sorry to bump this after months of inactivity but is there something I need to do here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 14:17:18 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 18:17:18 +0000 Subject: [issue40927] ./python -m test test___all__ test_binhex fails In-Reply-To: <1591699636.51.0.837580045442.issue40927@roundup.psfhosted.org> Message-ID: <1591813038.06.0.66818829402.issue40927@roundup.psfhosted.org> STINNER Victor added the comment: New changeset af6932575391bca10f4f2145b56e3edbe9765343 by Victor Stinner in branch '3.9': bpo-40927: Fix test_binhex when run twice (GH-20764) (GH-20789) https://github.com/python/cpython/commit/af6932575391bca10f4f2145b56e3edbe9765343 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 14:17:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 18:17:38 +0000 Subject: [issue40927] ./python -m test test___all__ test_binhex fails In-Reply-To: <1591699636.51.0.837580045442.issue40927@roundup.psfhosted.org> Message-ID: <1591813058.43.0.509028077753.issue40927@roundup.psfhosted.org> STINNER Victor added the comment: R?mi Lapeyre: Thanks for the bug report, it's now fixed! ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 14:39:23 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 10 Jun 2020 18:39:23 +0000 Subject: [issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't In-Reply-To: <1591124614.71.0.196427498662.issue40847@roundup.psfhosted.org> Message-ID: <1591814363.05.0.0364687914096.issue40847@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 14:41:22 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 10 Jun 2020 18:41:22 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591814482.39.0.111414199535.issue40826@roundup.psfhosted.org> Eryk Sun added the comment: Why doesn't SuppressCrashReport suppress the hard error dialog (i.e. SEM_FAILCRITICALERRORS)? This dialog gets created by the NtRaiseHardError system call. For example: >>> NtRaiseHardError = ctypes.windll.ntdll.NtRaiseHardError >>> response = (ctypes.c_ulong * 1)() With the default OS error mode, the following raises a hard error dialog for STATUS_UNSUCCESSFUL (0xC0000001), with abort/retry/ignore options: >>> NtRaiseHardError(0xC000_0001, 0, 0, None, 0, response) 0 >>> response[0] 2 The response value is limited to abort (2), retry (7), ignore (4) -- or simply returned (0) when the process hard error mode is disabled: >>> msvcrt.SetErrorMode(msvcrt.SEM_FAILCRITICALERRORS) 0 >>> NtRaiseHardError(0xC000_0001, 0, 0, None, 0, response) 0 >>> response[0] 0 NtRaiseHardError also checks for an error-mode override flag (0x1000_0000) in the status code, which is used in cases such as WinAPI FatalAppExitW. For example, the following will raise the dialog regardless of the hard error mode: >>> NtRaiseHardError(0xC000_0001 | 0x1000_0000, 0, 0, None, 0, response) 0 >>> response[0] 2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 15:05:29 2020 From: report at bugs.python.org (Ivan Savin) Date: Wed, 10 Jun 2020 19:05:29 +0000 Subject: [issue40944] email.message.EmailMessage address parser fails to handle 'example@' Message-ID: <1591815929.0.0.387967575361.issue40944@roundup.psfhosted.org> New submission from Ivan Savin : How to reproduce: >>> import email.message >>> message = email.message.EmailMessage() >>> message['From'] = 'hey@' Traceback (most recent call last): File "/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py", line 1956, in get_address token, value = get_group(value) File "/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py", line 1914, in get_group raise errors.HeaderParseError("expected ':' at end of group " email.errors.HeaderParseError: expected ':' at end of group display name but found '@' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py", line 1782, in get_mailbox token, value = get_name_addr(value) File "/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py", line 1768, in get_name_addr token, value = get_angle_addr(value) File "/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py", line 1693, in get_angle_addr raise errors.HeaderParseError( email.errors.HeaderParseError: expected angle-addr but found '@' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/message.py", line 409, in __setitem__ self._headers.append(self.policy.header_store_parse(name, val)) File "/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/policy.py", line 148, in header_store_parse return (name, self.header_factory(name, value)) File "/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/headerregistry.py", line 596, in __call__ return self[name](name, value) File "/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/headerregistry.py", line 191, in __new__ cls.parse(value, kwds) File "/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/headerregistry.py", line 334, in parse kwds['parse_tree'] = address_list = cls.value_parser(value) File "/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/headerregistry.py", line 325, in value_parser address_list, value = parser.get_address_list(value) File "/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py", line 1979, in get_address_list token, value = get_address(value) File "/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py", line 1959, in get_address token, value = get_mailbox(value) File "/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py", line 1785, in get_mailbox token, value = get_addr_spec(value) File "/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py", line 1638, in get_addr_spec token, value = get_domain(value[1:]) File "/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py", line 1595, in get_domain if value[0] in CFWS_LEADER: IndexError: string index out of range ---------- components: email messages: 371234 nosy: Ivan Savin, barry, r.david.murray priority: normal severity: normal status: open title: email.message.EmailMessage address parser fails to handle 'example@' type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 15:12:53 2020 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Jun 2020 19:12:53 +0000 Subject: [issue40944] email.message.EmailMessage address parser fails to handle 'example@' In-Reply-To: <1591815929.0.0.387967575361.issue40944@roundup.psfhosted.org> Message-ID: <1591816373.45.0.0720765688838.issue40944@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 3.0 -> 4.0 pull_requests: +19985 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20790 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 15:36:50 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 10 Jun 2020 19:36:50 +0000 Subject: [issue40913] time.sleep ignores errors on Windows In-Reply-To: <1591641616.51.0.015066290777.issue40913@roundup.psfhosted.org> Message-ID: <1591817810.14.0.117848052342.issue40913@roundup.psfhosted.org> Eryk Sun added the comment: > is there any straightforward way to cause WaitForSingleObjectEx to fail? The wait can fail for ERROR_INVALID_HANDLE or ERROR_ACCESS_DENIED (i.e. the handle lacks SYNCHRONIZE access). If _PyOS_SigintEvent were replaced with get/set functions, then a non-waitable handle could be set temporarily via ctypes. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:04:18 2020 From: report at bugs.python.org (Ben Li-Sauerwine) Date: Wed, 10 Jun 2020 20:04:18 +0000 Subject: [issue40945] TKinter.Tk.geometry(Tk.winfo_geometry()) should be idempotent In-Reply-To: <1591819450.72.0.638106419632.issue40945@roundup.psfhosted.org> Message-ID: <1591819458.36.0.728625486197.issue40945@roundup.psfhosted.org> Change by Ben Li-Sauerwine : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:04:10 2020 From: report at bugs.python.org (Ben Li-Sauerwine) Date: Wed, 10 Jun 2020 20:04:10 +0000 Subject: [issue40945] TKinter.Tk.geometry(Tk.winfo_geometry()) should be idempotent Message-ID: <1591819450.72.0.638106419632.issue40945@roundup.psfhosted.org> New submission from Ben Li-Sauerwine : One would expect that calling TKinter.Tk.geometry(tk.winfo_geometry()) would be idempotent. However, based on the system window frame, it is not and doing so moves the window down the screen. Running the example below reproduces the issue. ---------- components: Tkinter files: tkinter_ex.py messages: 371236 nosy: Ben Li-Sauerwine priority: normal severity: normal status: open title: TKinter.Tk.geometry(Tk.winfo_geometry()) should be idempotent versions: Python 3.6 Added file: https://bugs.python.org/file49225/tkinter_ex.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:06:43 2020 From: report at bugs.python.org (Michael Felt) Date: Wed, 10 Jun 2020 20:06:43 +0000 Subject: [issue40878] Use c99 on the aixtools bot In-Reply-To: <1591385655.5.0.64244490428.issue40878@roundup.psfhosted.org> Message-ID: Michael Felt added the comment: Actually, iirc - xlc is c99 plus a few extra settings. The configuration files for xlc are, traditionally, in /etc (the later versions of the compiler have moved them into /opt/show/where so that multiple versions of the compiler can be installed. buildbot at x064:[/home/buildbot]ls -l /etc/*vac* -rw-r--r--??? 1 bin????? bin?????????? 37731 Aug 02 2018? /etc/vac.cfg.53 -rw-r--r--??? 1 bin????? bin?????????? 39672 Aug 02 2018? /etc/vac.cfg.61 -rw-r--r--??? 1 bin????? bin?????????? 39681 Aug 02 2018? /etc/vac.cfg.71 -rw-r--r--??? 1 bin????? bin?????????? 39611 Aug 02 2018? /etc/vac.cfg.72 Herein I see that xlc is "extc99" and some extras: * -qlanglvl=extc99 C compiler with common extensions, UNIX headers xlc:??? use??????? = DEFLT_C ??????? crt??????? = /lib/crt0.o ??????? mcrt?????? = /lib/mcrt0.o ??????? gcrt?????? = /lib/gcrt0.o ??????? libraries? = -L/usr/vac/lib,-lxlopt,-lxlipa,-lxl,-lc ??????? proflibs?? = -L/lib/profiled,-L/usr/lib/profiled ??????? options??? = -qlanglvl=extc99,-qcpluscmt,-qkeyword=inline,-qalias=ansi I have chosen the xlc_r variant - for thread_safe additions: * standard c compiler aliased as xlc_r (61 Threads) xlc_r:? use??????? = DEFLT_C ??????? crt??????? = /lib/crt0.o ??????? mcrt?????? = /lib/mcrt0.o ??????? gcrt?????? = /lib/gcrt0.o ??????? libraries? = -L/usr/vac/lib,-lxlopt,-lxlipa,-lxl,-lpthreads,-lc ??????? proflibs?? = -L/lib/profiled,-L/usr/lib/profiled ??????? hdlibs???? = -L/usr/vac/lib,-lhmd ??????? options??? = -qlanglvl=extc99,-qcpluscmt,-qkeyword=inline,-qalias=ansi,-qthreaded,-D_THREAD_SAFE,-D__VACPP_MULTI__ So, what is c99 then? -> focus on it is 'stdc99' rather than 'extc99' * Strict ANSI compiler, ANSI headers c99:??? use??????? = DEFLT_C ??????? crt??????? = /lib/crt0.o ??????? mcrt?????? = /lib/mcrt0.o ??????? gcrt?????? = /lib/gcrt0.o ??????? libraries? = -L/usr/vac/lib,-lxlopt,-lxlipa,-lxl,-lc ??????? proflibs?? = -L/lib/profiled,-L/usr/lib/profiled ??????? options??? = -qlanglvl=stdc99,-D_ANSI_C_SOURCE,-D_ISOC99_SOURCE,-qalias=ansi,-qstrict_induction Hope this helps clarify that both xlc and c99 are "c99" based. Regards, Michael On 05/06/2020 21:34, Stefan Krah wrote: > New submission from Stefan Krah : > > There appears to be an xlc buildbot with libmpdec failures. > > libmpdec uses C99 extern inline semantics. From the brief period that I had access to xlc I remember that xlc was quite picky about C99. > > Actually all of Python uses C99. So I think xlc_r needs to be invoked as c99_r. > > ---------- > messages: 370779 > nosy: Michael.Felt, skrah > priority: normal > severity: normal > status: open > title: Use c99 on the aixtools bot > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:11:53 2020 From: report at bugs.python.org (Michael Felt) Date: Wed, 10 Jun 2020 20:11:53 +0000 Subject: [issue40680] thread_cputime isn't supported by AIX5 In-Reply-To: <1589889464.32.0.526668819348.issue40680@roundup.psfhosted.org> Message-ID: <3e4ce76a-3880-aae2-7136-9e528f3b0e25@felt.demon.nl> Michael Felt added the comment: No, it is not supported - asin there are no new patches - but there are organizations that use it. imho - those organizations are not likely to be using the latest Python - but I have been packaging Python on AIX 5.3 and AIX 6.1 - as these packages run unmodified on AIX 7.1 and AIX 7.2 (AIX binary compatibility). FYI. On 19/05/2020 13:57, Batuhan Taskaya wrote: > 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 > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:13:01 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 20:13:01 +0000 Subject: [issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1591819981.56.0.574693571904.issue40826@roundup.psfhosted.org> STINNER Victor added the comment: > Why doesn't SuppressCrashReport suppress the hard error dialog (i.e. SEM_FAILCRITICALERRORS)? This dialog gets created by the NtRaiseHardError system call. Would you mind to open a separated issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:14:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 20:14:49 +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: <1591820089.7.0.154958705429.issue30064@roundup.psfhosted.org> STINNER Victor added the comment: Another kind of failure on x86 Gentoo Installed with X 3.x: https://buildbot.python.org/all/#/builders/128/builds/1030 ERROR: test_sock_client_racing (test.test_asyncio.test_sock_lowlevel.EPollEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.10/test/test_asyncio/test_sock_lowlevel.py", line 200, in _basetest_sock_send_racing await self.loop.sock_sendall(sock, b'world') File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.10/asyncio/selector_events.py", line 460, in sock_sendall return await fut asyncio.exceptions.CancelledError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.10/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 "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.10/test/test_asyncio/test_sock_lowlevel.py", line 256, in test_sock_client_racing self.loop.run_until_complete(asyncio.wait_for( File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.10/asyncio/base_events.py", line 642, in run_until_complete return future.result() File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.10/asyncio/tasks.py", line 509, in wait_for raise exceptions.TimeoutError() from exc asyncio.exceptions.TimeoutError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:26:57 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 10 Jun 2020 20:26:57 +0000 Subject: [issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation In-Reply-To: <1591485787.87.0.566129309531.issue40895@roundup.psfhosted.org> Message-ID: <1591820817.77.0.238495586056.issue40895@roundup.psfhosted.org> miss-islington added the comment: New changeset 1642c0ef750f96664a98cadb09301d492098d2fb by Daniel Fortunov in branch 'master': bpo-40895: Update weakref documentation to remove old warnings (GH-20687) https://github.com/python/cpython/commit/1642c0ef750f96664a98cadb09301d492098d2fb ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:27:19 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 10 Jun 2020 20:27:19 +0000 Subject: [issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation In-Reply-To: <1591485787.87.0.566129309531.issue40895@roundup.psfhosted.org> Message-ID: <1591820839.95.0.110221301637.issue40895@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19987 pull_request: https://github.com/python/cpython/pull/20791 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:30:20 2020 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 10 Jun 2020 20:30:20 +0000 Subject: [issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation In-Reply-To: <1591485787.87.0.566129309531.issue40895@roundup.psfhosted.org> Message-ID: <1591821020.94.0.824264662341.issue40895@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- nosy: +pitrou nosy_count: 3.0 -> 4.0 pull_requests: +19988 pull_request: https://github.com/python/cpython/pull/20792 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:31:25 2020 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 10 Jun 2020 20:31:25 +0000 Subject: [issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation In-Reply-To: <1591485787.87.0.566129309531.issue40895@roundup.psfhosted.org> Message-ID: <1591821085.81.0.023962136062.issue40895@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- pull_requests: +19989 pull_request: https://github.com/python/cpython/pull/20793 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:34:05 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 10 Jun 2020 20:34:05 +0000 Subject: [issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation In-Reply-To: <1591485787.87.0.566129309531.issue40895@roundup.psfhosted.org> Message-ID: <1591821245.9.0.233196771191.issue40895@roundup.psfhosted.org> miss-islington added the comment: New changeset 18e07ba931c68eb5ab5262d4e57fe58c302686de by Miss Islington (bot) in branch '3.9': bpo-40895: Update weakref documentation to remove old warnings (GH-20687) https://github.com/python/cpython/commit/18e07ba931c68eb5ab5262d4e57fe58c302686de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:35:18 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 10 Jun 2020 20:35:18 +0000 Subject: [issue40680] thread_cputime isn't supported by AIX5 In-Reply-To: <1589888991.61.0.317317587375.issue40680@roundup.psfhosted.org> Message-ID: <1591821318.15.0.5259719618.issue40680@roundup.psfhosted.org> Batuhan Taskaya added the comment: @vstinner what are your thoughts on this? I can propose a patch that introduces a build value to generate this conditionally depending on if the system has it or not. But I am not sure about if our motivation behind this is going to be supporting (very) old versions of AIX. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:35:51 2020 From: report at bugs.python.org (Steve Dower) Date: Wed, 10 Jun 2020 20:35:51 +0000 Subject: [issue40906] Unable to import module due to python unable to resolve dependecies In-Reply-To: <1591595444.88.0.936758108882.issue40906@roundup.psfhosted.org> Message-ID: <1591821351.78.0.381256771456.issue40906@roundup.psfhosted.org> Steve Dower added the comment: add_dll_directory can be safely used within your library, so if you have any .py files that will be imported first (such as your package __init__.py), you can add it then. The safest way is to use something like: with os.add_dll_directory(THE_DIR): import the_module As this won't leave your directory on the search path for anyone else's DLLs. The most correct fix is to put your DLL alongside your .pyd file. But I suspect in your case, the DLLs can't be moved, so using the search directory is likely best. (Or you could put your .pyd with the DLLs and update sys.path for when you import it.) Presumably in the past, you were relying on the DLLs being on the user's PATH, which makes your application vulnerable to DLL hijacking (malicious or accidental, we've seen both). Not having to worry about that is a good thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:37:25 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 10 Jun 2020 20:37:25 +0000 Subject: [issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation In-Reply-To: <1591485787.87.0.566129309531.issue40895@roundup.psfhosted.org> Message-ID: <1591821445.3.0.0438028246513.issue40895@roundup.psfhosted.org> miss-islington added the comment: New changeset 049039832da3d02592d680cebf71ab8a665a6564 by Antoine Pitrou in branch '3.7': [3.7] bpo-40895: Update weakref documentation to remove old warnings (GH-20687) (GH-20793) https://github.com/python/cpython/commit/049039832da3d02592d680cebf71ab8a665a6564 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:38:46 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 10 Jun 2020 20:38:46 +0000 Subject: [issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation In-Reply-To: <1591485787.87.0.566129309531.issue40895@roundup.psfhosted.org> Message-ID: <1591821526.21.0.914712302654.issue40895@roundup.psfhosted.org> miss-islington added the comment: New changeset 972aba86ede0bf254e16a760639a1ff8df298578 by Antoine Pitrou in branch '3.8': [3.8] bpo-40895: Update weakref documentation to remove old warnings (GH-20687) (GH-20792) https://github.com/python/cpython/commit/972aba86ede0bf254e16a760639a1ff8df298578 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:39:29 2020 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 10 Jun 2020 20:39:29 +0000 Subject: [issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation In-Reply-To: <1591485787.87.0.566129309531.issue40895@roundup.psfhosted.org> Message-ID: <1591821569.38.0.886951947354.issue40895@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior versions: +Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:40:42 2020 From: report at bugs.python.org (Fantix King) Date: Wed, 10 Jun 2020 20:40:42 +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: <1591821642.96.0.0443303643409.issue30064@roundup.psfhosted.org> Fantix King added the comment: I'm checking now ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:50:27 2020 From: report at bugs.python.org (hai shi) Date: Wed, 10 Jun 2020 20:50:27 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1591822227.39.0.469488176562.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19990 pull_request: https://github.com/python/cpython/pull/20794 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:52:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 20:52:55 +0000 Subject: [issue40680] thread_cputime isn't supported by AIX5 In-Reply-To: <1589888991.61.0.317317587375.issue40680@roundup.psfhosted.org> Message-ID: <1591822375.18.0.593728772977.issue40680@roundup.psfhosted.org> STINNER Victor added the comment: AIX 5 was released 16 years ago, do you we really care? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 16:58:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 20:58:49 +0000 Subject: [issue40680] thread_cputime isn't supported by AIX5 In-Reply-To: <1589888991.61.0.317317587375.issue40680@roundup.psfhosted.org> Message-ID: <1591822729.18.0.174077340185.issue40680@roundup.psfhosted.org> STINNER Victor added the comment: According to https://www.ibm.com/support/pages/aix-support-lifecycle-information I suggest to require AIX 7.1 and newer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 17:06:08 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Jun 2020 21:06:08 +0000 Subject: [issue40902] Speed up PEG parser by using operator precedence for binary operators In-Reply-To: <1591567609.56.0.0913110799919.issue40902@roundup.psfhosted.org> Message-ID: <1591823168.21.0.301906925609.issue40902@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 17:06:04 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Jun 2020 21:06:04 +0000 Subject: [issue40902] Speed up PEG parser by using operator precedence for binary operators In-Reply-To: <1591567609.56.0.0913110799919.issue40902@roundup.psfhosted.org> Message-ID: <1591823164.17.0.623076887453.issue40902@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> postponed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 18:02:27 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 10 Jun 2020 22:02:27 +0000 Subject: [issue39385] Add an assertNoLogs context manager to unittest TestCase In-Reply-To: <1579379123.37.0.908861475494.issue39385@roundup.psfhosted.org> Message-ID: <1591826547.12.0.854282786047.issue39385@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 18:05:47 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 10 Jun 2020 22:05:47 +0000 Subject: [issue29847] Path takes and ignores **kwargs In-Reply-To: <1489850567.46.0.646194395205.issue29847@psf.upfronthosting.co.za> Message-ID: <1591826747.58.0.0716837948163.issue29847@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 18:13:59 2020 From: report at bugs.python.org (Stefan Krah) Date: Wed, 10 Jun 2020 22:13:59 +0000 Subject: [issue40878] Use c99 on the aixtools bot In-Reply-To: <1591385655.5.0.64244490428.issue40878@roundup.psfhosted.org> Message-ID: <1591827239.42.0.908144998122.issue40878@roundup.psfhosted.org> Stefan Krah added the comment: Thanks for this information. The buildbot, however, fails to compile C99 extern inline functions. Example: ld: 0711-317 ERROR: Undefined symbol: .mpd_issnan I understand the C99 extern inline feature like in this explanation: https://www.greenend.org.uk/rjk/tech/inline.html """ In this example, one of the declarations does not mention inline: // a declaration not mentioning inline int max(int a, int b); // a definition mentioning inline inline int max(int a, int b) { return a > b ? a : b; } In either example, the function will be callable from other files. """ This is the scheme that libmpdec uses and that compilers understood at the time I wrote it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 18:37:05 2020 From: report at bugs.python.org (Stefan Krah) Date: Wed, 10 Jun 2020 22:37:05 +0000 Subject: [issue40878] Use c99 on the aixtools bot In-Reply-To: <1591385655.5.0.64244490428.issue40878@roundup.psfhosted.org> Message-ID: <1591828625.5.0.0812253185046.issue40878@roundup.psfhosted.org> Stefan Krah added the comment: So it would still be interesting to see what happens if you compile libmpdec with c99_r (emphasis mine): """ This command supports all ISO C99 language features, but does not support IBM language extensions. Use this invocation for *strict* conformance to the C99 standard. """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 19:03:07 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 10 Jun 2020 23:03:07 +0000 Subject: [issue40924] Recent importlib change breaks most recent certifi == 2020.4.5.2 In-Reply-To: <1591682388.65.0.686796854093.issue40924@roundup.psfhosted.org> Message-ID: <1591830187.83.0.86145531158.issue40924@roundup.psfhosted.org> ?ukasz Langa added the comment: I thought about this all day. Given the scope of the change you made I think no option looks ideal. If we revert the entire feature, it's a big bummer for everybody involved and it might be an overreaction. If we keep the feature at the state of Beta 1, it might become a maintenance nightmare for third-party users. If we agree to a the big change you now see necessary, we are reintroducing the same risk that I highlighted in previous comments. Please note that this is in no way intended to make you feel terrible. Don't beat yourself up about it. Now, think as the core developer you are: if you are 100% sure the change is worth pushing to 3.9, the best course of action at this point seems to be: find a champion within core who will work with you to quickly reassess the situation and give us an action plan as a team. Say, Barry seems like the perfect candidate. If such champion shares your opinion about it being important for 3.9, and is willing to work with you on finishing what you need changing (incl. review), *and* to ensure the existing users of importlib.resources don't see any breakage not documented as of Beta 1, then we can talk about an exceptional late inclusion in 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 19:51:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jun 2020 23:51:22 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1591833082.33.0.45835496354.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 7f888c7ef905842bf7739cc03bd20398329951b5 by Hai Shi in branch 'master': bpo-40275: Add import_helper submodule in test.support (GH-20794) https://github.com/python/cpython/commit/7f888c7ef905842bf7739cc03bd20398329951b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 19:56:12 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Jun 2020 23:56:12 +0000 Subject: [issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't In-Reply-To: <1591124614.71.0.196427498662.issue40847@roundup.psfhosted.org> Message-ID: <1591833372.15.0.284814201965.issue40847@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 896f4cf63f9ab93e30572d879a5719d5aa2499fb by Lysandros Nikolaou in branch 'master': bpo-40847: Consider a line with only a LINECONT a blank line (GH-20769) https://github.com/python/cpython/commit/896f4cf63f9ab93e30572d879a5719d5aa2499fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 19:56:22 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 10 Jun 2020 23:56:22 +0000 Subject: [issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't In-Reply-To: <1591124614.71.0.196427498662.issue40847@roundup.psfhosted.org> Message-ID: <1591833382.96.0.00145965520184.issue40847@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +19991 pull_request: https://github.com/python/cpython/pull/20795 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 19:56:48 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Jun 2020 23:56:48 +0000 Subject: [issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't In-Reply-To: <1591124614.71.0.196427498662.issue40847@roundup.psfhosted.org> Message-ID: <1591833408.03.0.0283006545391.issue40847@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 Wed Jun 10 20:14:24 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jun 2020 00:14:24 +0000 Subject: [issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't In-Reply-To: <1591124614.71.0.196427498662.issue40847@roundup.psfhosted.org> Message-ID: <1591834464.28.0.958886019193.issue40847@roundup.psfhosted.org> miss-islington added the comment: New changeset e3ce3bba9277a7c4cfde5aaf6269b6c68f334176 by Miss Islington (bot) in branch '3.9': bpo-40847: Consider a line with only a LINECONT a blank line (GH-20769) https://github.com/python/cpython/commit/e3ce3bba9277a7c4cfde5aaf6269b6c68f334176 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 20:46:06 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 11 Jun 2020 00:46:06 +0000 Subject: [issue40924] Recent importlib change breaks most recent certifi == 2020.4.5.2 In-Reply-To: <1591830187.83.0.86145531158.issue40924@roundup.psfhosted.org> Message-ID: <71225218-0D3E-4DC1-82EB-06E335FBC072@jaraco.com> Jason R. Coombs added the comment: Thanks for the thorough and considerate response. I do think your original recommendation of reverting the broken feature is the best approach at this point. That is, keep resources.files with the fallback shim and eliminate support for loaders supplying that behavior. That will avoid users relying on that protocol but enable the files feature for Source and Zip importers. That will buy time for the remaining functionality, mainly the provider interface, to mature and possibly evolve further, for eventual adoption in a future Python release. Some planning will need to be dialed back, but I don?t have confidence in the implementation to say that it?s the best one. Better to defer that effort. I?ll put together a patch for 3.9 to remove the loader support (backward incompatible with b1/2 but compatible with 3.8 but only for custom loaders), and put together a hot fix for master so it?s no longer broken. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 10 22:16:52 2020 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 11 Jun 2020 02:16:52 +0000 Subject: [issue31082] reduce takes iterable, not just sequence In-Reply-To: <1501448787.5.0.80084797494.issue31082@psf.upfronthosting.co.za> Message-ID: <1591841812.36.0.414708673059.issue31082@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 6.0 -> 7.0 pull_requests: +19992 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20796 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 00:37:44 2020 From: report at bugs.python.org (hai shi) Date: Thu, 11 Jun 2020 04: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: <1591850264.6.0.271130593214.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19993 pull_request: https://github.com/python/cpython/pull/20797 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 02:08:46 2020 From: report at bugs.python.org (Eryk Sun) Date: Thu, 11 Jun 2020 06:08:46 +0000 Subject: [issue40946] SuppressCrashReport should set SEM_FAILCRITICALERRORS in Windows Message-ID: <1591855726.1.0.173183308432.issue40946@roundup.psfhosted.org> New submission from Eryk Sun : In test.support, suppress_msvcrt_asserts sets the process error mode to include SEM_FAILCRITICALERRORS, SEM_NOGPFAULTERRORBOX, SEM_NOALIGNMENTFAULTEXCEPT, and SEM_NOOPENFILEERRORBOX. In contrast, the SuppressCrashReport context manager in the same module only sets SEM_NOGPFAULTERRORBOX. It should also set SEM_FAILCRITICALERRORS (i.e. do not display the critical-error-handler message box). Including SEM_NOOPENFILEERRORBOX wouldn't hurt, but it's not of much value since it only affects the deprecated OpenFile function. SEM_NOALIGNMENTFAULTEXCEPT may not be appropriate in a context manager, since it's a one-time setting that can't be reverted, plus x86 and x64 processors aren't even configured by default to generate alignment exceptions; they do fixups in hardware. --- Discussion SEM_FAILCRITICALERRORS suppresses normal "hard error" reports sent by the NtRaiseHardError system call -- or by ExRaiseHardError or IoRaiseHardError in the kernel. If reporting a hard error isn't prevented by the error mode, the report gets sent to the ExceptionPort of the process. Normally this is the session's API port (e.g. "\Sessions\1\Windows\ApiPort"). A thread in the session server process (csrss.exe) handles requests sent to this port. In the case of a hard error, ultimately it creates a message box via user32!MessageBoxTimeoutW. For example: NtRaiseHardError = ctypes.windll.ntdll.NtRaiseHardError response = (ctypes.c_ulong * 1)() With the default process error mode, the following raises a hard error dialog for STATUS_UNSUCCESSFUL (0xC0000001), with abort/retry/ignore options: >>> NtRaiseHardError(0xC000_0001, 0, 0, None, 0, response) 0 >>> response[0] 2 The normal response value for the above call is limited to abort (2), retry (7), and ignore (4). The response is 0 if the process is set to fail critical errors: >>> msvcrt.SetErrorMode(msvcrt.SEM_FAILCRITICALERRORS) 0 >>> NtRaiseHardError(0xC000_0001, 0, 0, None, 0, response) 0 >>> response[0] 0 SEM_FAILCRITICALERRORS doesn't suppress all hard-error reporting. The system also checks for an override flag (0x1000_0000) in the status code. This flag is used in many cases, such as WinAPI FatalAppExitW. For example, the following will report a hard error regardless of the process error mode: >>> NtRaiseHardError(0xC000_0001 | 0x1000_0000, 0, 0, None, 0, response) 0 >>> response[0] 2 A common case that doesn't use the override flag is when the loader fails to initialize a process. For the release build of Python 3.10, for example, if "python310.dll" can't be found, the loader tries to raise a hard error with the status code STATUS_DLL_NOT_FOUND (0xC0000135). If the process error mode allows this, the NtRaiseHardError system call won't return until the user clicks on the "OK" button. >>> os.rename('amd64/python310.dll', 'amd64/python310.dll.bak') >>> # the following returns after clicking OK >>> hex(subprocess.call('python')) '0xc0000135' With SEM_FAILCRITICALERRORS set, which by default gets inherited by a child process, sending the hard error report is suppressed (i.e. NtRaiseHardError returns immediately with a response of 0), and the failed child process terminates immediately with the status code STATUS_DLL_NOT_FOUND. >>> msvcrt.SetErrorMode(msvcrt.SEM_FAILCRITICALERRORS) 0 >>> # the following returns immediately >>> hex(subprocess.call('python')) '0xc0000135' ---------- messages: 371257 nosy: eryksun priority: normal severity: normal stage: needs patch status: open title: SuppressCrashReport should set SEM_FAILCRITICALERRORS in Windows type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 02:09:16 2020 From: report at bugs.python.org (Eryk Sun) Date: Thu, 11 Jun 2020 06:09:16 +0000 Subject: [issue40946] SuppressCrashReport should set SEM_FAILCRITICALERRORS in Windows In-Reply-To: <1591855726.1.0.173183308432.issue40946@roundup.psfhosted.org> Message-ID: <1591855756.85.0.566574516025.issue40946@roundup.psfhosted.org> Change by Eryk Sun : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 02:47:06 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 11 Jun 2020 06:47:06 +0000 Subject: [issue40937] Remove deprecated functions marked for removal in 3.10 In-Reply-To: <1591785839.81.0.272297043685.issue40937@roundup.psfhosted.org> Message-ID: <1591858026.35.0.509833756324.issue40937@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 04:18:55 2020 From: report at bugs.python.org (Michael Felt) Date: Thu, 11 Jun 2020 08:18:55 +0000 Subject: [issue40424] AIX: parallel build and ld WARNINGS In-Reply-To: <1588090800.25.0.961976947202.issue40424@roundup.psfhosted.org> Message-ID: <1591863535.18.0.225092525356.issue40424@roundup.psfhosted.org> Michael Felt added the comment: specifically, makexp_aix - from 1998-1999 - did not consider parallelization. make -j2 is sufficient to create the following issue - that frequently leads to a failed compile/build. ./Modules/makexp_aix Modules/python.exp . libpython3.9d.a; gcc -pthread -Wl,-bE:Modules/python.exp -lld -o python Programs/python.o libpython3.9d.a -lintl -ldl -lm -lm ./Modules/makexp_aix Modules/python.exp . libpython3.9d.a; gcc -pthread -Wl,-bE:Modules/python.exp -lld -o Programs/_testembed Programs/_testembed.o libpython3.9d.a -lintl -ldl -lm -lm ld: 0711-418 ERROR: Import or export file Modules/python.exp at line 2: A symbol name may only be followed by an export attribute or an address. The line is being ignored. ld: 0711-415 WARNING: Symbol PyAST_Check is already exported. ld: 0711-415 WARNING: Symbol PyAST_Compile is already exported. ld: 0711-415 WARNING: Symbol PyAST_CompileEx is already exported. ld: 0711-415 WARNING: Symbol PyAST_CompileObject is already exported. ... Over 4000 lines of warnings later: ld: 0711-415 WARNING: Symbol _Py_write is already exported. ld: 0711-415 WARNING: Symbol _Py_write_noraise is already exported. collect2: error: ld returned 8 exit status Makefile:598: recipe for target 'python' failed make: *** [python] Error 1 program finished with exit code 2 Explanation: makexp_aix is running in parallel - and writing to python.exp in parallel. The patch/PR "tames" this - and, hopefully, multiple "fails" per day, of the AIX bots will cease. p.s. needed in 3.8, 3.9 and the new master (3.10) ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 04:19:46 2020 From: report at bugs.python.org (Michael Felt) Date: Thu, 11 Jun 2020 08:19:46 +0000 Subject: [issue40424] AIX: makexp_aix, parallel build (failures) and ld WARNINGS In-Reply-To: <1588090800.25.0.961976947202.issue40424@roundup.psfhosted.org> Message-ID: <1591863586.4.0.997919716654.issue40424@roundup.psfhosted.org> Change by Michael Felt : ---------- title: AIX: parallel build and ld WARNINGS -> AIX: makexp_aix, parallel build (failures) and ld WARNINGS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 05:39:24 2020 From: report at bugs.python.org (Mark Shannon) Date: Thu, 11 Jun 2020 09:39:24 +0000 Subject: [issue40925] Remove redundant macros used for stack manipulation in interpreter In-Reply-To: <1591697620.81.0.981270573583.issue40925@roundup.psfhosted.org> Message-ID: <1591868364.73.0.38153910938.issue40925@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 33faf5c4f43e24766cf567bec89ad4c7f1491ff7 by Dong-hee Na in branch 'master': bpo-40925: Remove unused stack macro SET_VALUE (GH-20783) https://github.com/python/cpython/commit/33faf5c4f43e24766cf567bec89ad4c7f1491ff7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 06:06:46 2020 From: report at bugs.python.org (Sandro Mani) Date: Thu, 11 Jun 2020 10:06:46 +0000 Subject: [issue40947] Replace PLATLIBDIR macro with config->platlibdir Message-ID: <1591870006.36.0.733271971459.issue40947@roundup.psfhosted.org> New submission from Sandro Mani : Followup of bpo-40854, there is one remaining usage of PLATLIBDIR which should be replaced by config->platlibdir. ---------- components: Interpreter Core messages: 371260 nosy: smani priority: normal severity: normal status: open title: Replace PLATLIBDIR macro with config->platlibdir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 06:07:02 2020 From: report at bugs.python.org (Sandro Mani) Date: Thu, 11 Jun 2020 10:07:02 +0000 Subject: [issue40947] Replace PLATLIBDIR macro with config->platlibdir In-Reply-To: <1591870006.36.0.733271971459.issue40947@roundup.psfhosted.org> Message-ID: <1591870022.42.0.741631029648.issue40947@roundup.psfhosted.org> Change by Sandro Mani : ---------- keywords: +patch pull_requests: +19994 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20799 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 06:07:02 2020 From: report at bugs.python.org (Sandro Mani) Date: Thu, 11 Jun 2020 10:07:02 +0000 Subject: [issue40854] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591870022.48.0.658699538552.issue40854@roundup.psfhosted.org> Change by Sandro Mani : ---------- pull_requests: +19995 pull_request: https://github.com/python/cpython/pull/20799 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 07:02:44 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 11 Jun 2020 11:02:44 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591873364.94.0.143972081381.issue40939@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19996 pull_request: https://github.com/python/cpython/pull/20800 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 07:08:00 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Jun 2020 11:08:00 +0000 Subject: [issue40253] Fix .py(w) file association with Python 3 Windows installer In-Reply-To: <1586590189.16.0.270400617976.issue40253@roundup.psfhosted.org> Message-ID: <1591873680.66.0.725917134939.issue40253@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: Fix .py(w) file association with Pyhon 3 Windows installer -> Fix .py(w) file association with Python 3 Windows installer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 07:15:22 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Jun 2020 11:15:22 +0000 Subject: [issue29633] MSI installer does not pass values as SecureProperty from UI In-Reply-To: <1487864774.78.0.845992185721.issue29633@psf.upfronthosting.co.za> Message-ID: <1591874122.84.0.879939707082.issue29633@roundup.psfhosted.org> Terry J. Reedy added the comment: Steve, etc., is this of any current relevance or should it be closed? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 07:22:07 2020 From: report at bugs.python.org (Matti) Date: Thu, 11 Jun 2020 11:22:07 +0000 Subject: [issue40855] statistics.stdev ignore xbar argument In-Reply-To: <1591187481.58.0.119061539675.issue40855@roundup.psfhosted.org> Message-ID: <1591874527.46.0.568889624551.issue40855@roundup.psfhosted.org> Matti added the comment: Hi Raymond and Steven! I'm happy that you are solving this issue but do you have any comment on my previous answer? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 08:04:15 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Jun 2020 12:04:15 +0000 Subject: [issue40948] Better identify Windows installer as installer only, not runner Message-ID: <1591877055.43.0.578200145114.issue40948@roundup.psfhosted.org> New submission from Terry J. Reedy : Some beginners on Windows think that python-3.8.3-amd64.exe, for instance, is for running python-3.8.3, leading to repeated and now tiresome questions on python-list and probably elsewhere. The latest example is "repair modify uninstall" with the core complaint that "after downloading and trying to launch it keeps saying repair modify uninstall". (Actually, 'modify' comes first.) In response, Grant Edwards suggested adding run instructions to the initial screen and asked a "Is the file name not clear that it's an installer?" For the naive, the answer, as is traditional, is 'no'. How about adding 'setup' or 'install', as I have seen occasionally. python-3.8.3-amd64-setup.exe The initial screen is different according to whether an installed binary is absent or present. For the latter, add something like Python 3.8.3 {n} bit is installed for {who}. To run it, {directions} To change it, click one of the buttons below. An optional add-on would be a button to open the doc page on using python on Windows. (I an not suggesting a button to actually run python.exe from the installer. Users should really learn how to start it properly according to platform and python-specific conventions and their particular needs.) Does the final screen after installation say anything about running the new install? (I cannot remember.) Ned: I don't think that this issue afficts Mac newbies. Perhaps python-xyz.pkg is more clearly not for running. But something you might watch for. ---------- components: Windows messages: 371263 nosy: ned.deily, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Better identify Windows installer as installer only, not runner versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 08:45:22 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 11 Jun 2020 12:45:22 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591879522.29.0.90061350046.issue40939@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 9727694f08cad4b019d2939224e3416312b1c0e1 by Lysandros Nikolaou in branch 'master': bpo-40939: Generate keyword.py using the new parser (GH-20800) https://github.com/python/cpython/commit/9727694f08cad4b019d2939224e3416312b1c0e1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 08:45:33 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jun 2020 12:45:33 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591879533.03.0.444283027833.issue40939@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19997 pull_request: https://github.com/python/cpython/pull/20801 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 08:50:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 12:50:42 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591879842.0.0.313285905944.issue40939@roundup.psfhosted.org> STINNER Victor added the comment: >>> __new_parser__ File "", line 1 __new_parser__ ^ SyntaxError: You found it! "new", "ex" or "ng" are not really future proof names. Can we rename the keyword to "__peg_parser__"? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 08:59:54 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 11 Jun 2020 12:59:54 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591880394.9.0.894779340165.issue40939@roundup.psfhosted.org> Lysandros Nikolaou added the comment: > Can we rename the keyword to "__peg_parser__"? I guess we could just remove this, as soon as the old parser is out. We were only using this to differentiate between the two parsers, when we were testing enabling/disabling the old one. I could get a PR ready to be merged after GH-20768 is there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:01:07 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 11 Jun 2020 13:01:07 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591880467.29.0.646293752007.issue40939@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > I guess we could just remove this, as soon as the old parser is out. We were only using this to differentiate between the two parsers, when we were testing enabling/disabling the old one. I could get a PR ready to be merged after GH-20768 is there. I would personally would like to keep the easter egg, but I assume is better to rename it to "__peg_parser__". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:02:40 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jun 2020 13:02:40 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591880560.98.0.520026981654.issue40939@roundup.psfhosted.org> miss-islington added the comment: New changeset 961edf7979ca34d6fe104a1cce005aa8cac35821 by Miss Islington (bot) in branch '3.9': bpo-40939: Generate keyword.py using the new parser (GH-20800) https://github.com/python/cpython/commit/961edf7979ca34d6fe104a1cce005aa8cac35821 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:07:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 13:07:35 +0000 Subject: [issue40746] test_gdb failing on Raspbian on 3.9, regression from 3.8 In-Reply-To: <1590258625.25.0.246740749681.issue40746@roundup.psfhosted.org> Message-ID: <1591880855.98.0.350626066839.issue40746@roundup.psfhosted.org> STINNER Victor added the comment: Some data from a recent build: https://buildbot.python.org/all/#/builders/645/builds/480 That's 32-bit ARM, armv7l ABI with GCC 8.3 and GDB 8.2. Python is built with -Og optimization level. In my experience, gdb fails to read debug symbols when Python is optimized at -Og level. Last time I asked a gdb developer, he told me that he always use -O0, so do I. test.pythoninfo: platform.architecture: 32bit ELF platform.libc_ver: glibc 2.28 platform.platform: Linux-4.19.97-v7l+-armv7l-with-glibc2.28 platform.python_implementation: CPython CC.version: gcc (Raspbian 8.3.0-6+rpi1) 8.3.0 sysconfig[PY_CFLAGS]: -Wno-unused-result -Wsign-compare -g -Og -Wall sysconfig[PY_CFLAGS_NODIST]: -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal sysconfig[PY_STDMODULE_CFLAGS]: -Wno-unused-result -Wsign-compare -g -Og -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I. -I./Include gdb_version: GNU gdb (Raspbian 8.2.1-2) 8.2.1 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:08:00 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 11 Jun 2020 13:08:00 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591880880.07.0.19812544301.issue40939@roundup.psfhosted.org> Lysandros Nikolaou added the comment: > I would personally would like to keep the easter egg, but I assume is better to rename it to "__peg_parser__". Ok then! On it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:13:24 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 11 Jun 2020 13:13:24 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591881204.93.0.420041357904.issue40939@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19998 pull_request: https://github.com/python/cpython/pull/20802 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:17:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 13:17:38 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591881458.65.0.394657655397.issue40939@roundup.psfhosted.org> STINNER Victor added the comment: I did'nt ask to remove the easter egg. I'm just asking to avoid the "new" name. In my experience, each time that a "new" thing happens, later we have to use "new extended", "new_v2" or worse name :-) Oh, if the name changes, please change it in 3.9 as well. Look at this amazing names of the 5 flavors of functions parsing a string: PyParser_ParseString() PyParser_ParseStringFlags() PyParser_ParseStringFlagsFilename() PyParser_ParseStringFlagsFilenameEx() <= public! PyParser_ParseStringObject() Same for parsing a file: PyParser_ParseFile() PyParser_ParseFileFlags() PyParser_ParseFileFlagsEx() <= public! PyParser_ParseFileObject() Or PyRun functions: PyRun_String() PyRun_AnyFile() PyRun_AnyFileEx() <= public! PyRun_AnyFileFlags() PyRun_SimpleString() PyRun_SimpleFile() PyRun_SimpleFileEx() <= public! PyRun_InteractiveOne() PyRun_InteractiveLoop() PyRun_File() PyRun_FileEx() <= public! PyRun_FileFlags() ceval.c: PyEval_EvalCode() PyEval_EvalCodeEx() <= public! _PyEval_EvalCodeWithName() _PyEval_EvalCode() I cannot count the number of "Ex" functions that we have :-) Py_Finalize() -> :Py_FinalizeEx() <= public! PyErr_Print() -> PyErr_PrintEx() <= public! PySys_SetArgv() -> PySys_SetArgvEx() <= public! PyErr_WarnEx() <= public! _PyBytes_FormatEx() _PyDict_MergeEx() _Py_DecodeLocaleEx(), _Py_EncodeLocaleEx() struct PyMemAllocatorEx _Py_DecodeUTF8Ex(), _Py_EncodeUTF8Ex() etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:18:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 13:18:54 +0000 Subject: [issue40746] test_gdb failing on 32-bit armv7l when built with GCC -Og (fail on Raspbian on 3.9, regression from 3.8) In-Reply-To: <1590258625.25.0.246740749681.issue40746@roundup.psfhosted.org> Message-ID: <1591881534.95.0.82961561873.issue40746@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: test_gdb failing on Raspbian on 3.9, regression from 3.8 -> test_gdb failing on 32-bit armv7l when built with GCC -Og (fail on Raspbian on 3.9, regression from 3.8) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:20:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 13:20:17 +0000 Subject: [issue40746] test_gdb failing on 32-bit armv7l when built with GCC -Og (fail on Raspbian on 3.9, regression from 3.8) In-Reply-To: <1590258625.25.0.246740749681.issue40746@roundup.psfhosted.org> Message-ID: <1591881617.05.0.937720311258.issue40746@roundup.psfhosted.org> STINNER Victor added the comment: > Marking release blocker as this isn't present in 3.8 or earlier, we've got a regression here. FYI we have issue with test_gdb on Fedora for at least 5 years. Most issues come from -Og optimization level of test_gdb. Recently, I modified test_gdb to skip tests when we detect that gdb fails to read debug symbols, which happens often when using -Og: bpo-40019. commit 7bf069b6110278102c8f4719975a5eb5a5af25f9 Author: Victor Stinner Date: Fri Mar 20 08:23:26 2020 +0100 bpo-40019: Skip test_gdb if Python was optimized (GH-19081) test_gdb now skips tests if it detects that gdb failed to read debug information because the Python binary is optimized. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:21:15 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 13:21:15 +0000 Subject: [issue17737] test_gdb fails on armv7hl In-Reply-To: <1366033268.62.0.309892862388.issue17737@psf.upfronthosting.co.za> Message-ID: <1591881675.67.0.869033653138.issue17737@roundup.psfhosted.org> STINNER Victor added the comment: Python 3.4 and Fedora 20 are no longer maintained. See bpo-40746 for a more recent test_gdb issue on armv7l. ---------- nosy: +vstinner resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:21:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 13:21:32 +0000 Subject: [issue40746] test_gdb failing on 32-bit armv7l when built with GCC -Og (fail on Raspbian on 3.9, regression from 3.8) In-Reply-To: <1590258625.25.0.246740749681.issue40746@roundup.psfhosted.org> Message-ID: <1591881692.1.0.726531497777.issue40746@roundup.psfhosted.org> STINNER Victor added the comment: I closed bpo-17737 "test_gdb fails on armv7hl" as out of date. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:22:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 13:22:55 +0000 Subject: [issue29685] test_gdb failed In-Reply-To: <1488382954.54.0.564501434146.issue29685@psf.upfronthosting.co.za> Message-ID: <1591881775.83.0.213814591559.issue29685@roundup.psfhosted.org> STINNER Victor added the comment: I believe that this issue is a duplicated of bpo-40436 which was fixed by: commit ec9bea4a3766bd815148a27f61eb24e7dd459ac7 Author: Victor Stinner Date: Wed Apr 29 17:11:48 2020 +0200 bpo-40436: Fix code parsing gdb version (GH-19792) test_gdb and test.pythoninfo now check gdb command exit code. If it's not the case, please provide more information, as requested. ---------- nosy: +vstinner resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> pythoninfo collect_gdb() blows up when gdb fails to run _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:23:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 13:23:37 +0000 Subject: [issue40436] pythoninfo collect_gdb() blows up when gdb fails to run In-Reply-To: <1588160205.58.0.824942554925.issue40436@roundup.psfhosted.org> Message-ID: <1591881817.45.0.718203870651.issue40436@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-29685 "test_gdb failed" as duplicate of this issue. Extract: (...) File "/home/studio/Python-3.6.0/Lib/test/test_gdb.py", line 46, in gdb_version, gdb_major_version, gdb_minor_version = get_gdb_version() File "/home/studio/Python-3.6.0/Lib/test/test_gdb.py", line 43, in get_gdb_version raise Exception("unable to parse GDB version: %r" % version) Exception: unable to parse GDB version: '' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:27:24 2020 From: report at bugs.python.org (Mark Shannon) Date: Thu, 11 Jun 2020 13:27:24 +0000 Subject: [issue40941] Merge generator.gi_running and frame executing flag into single frame state In-Reply-To: <1591795992.13.0.468529987519.issue40941@roundup.psfhosted.org> Message-ID: <1591882044.52.0.325483570174.issue40941@roundup.psfhosted.org> Mark Shannon added the comment: This change combines the explicit state in `PyFrameObject.f_excuting` and `PyGenObject.gi_running`, and the implicit state in `PyFrameObject.f_stacktop == NULL` and `PyFrameObject.f_last == -1` into a single enum field in `PyFrameObject`. Since we no longer need to test `PyFrameObject.f_stacktop == NULL` , The `f_stacktop` pointer can be replaced with a `f_stackdepth` integer, which make for simpler code when iterating over the stack and avoids the potential hazard of NULL pointers. There are three benefits to these changes: 1. The code is more robust and, IMO, easier to understand, as all state is now explicit. 2. It carries additional information about the state of the frame. Information about whether a frame exiting by `return` or by `raise` is available. 3. A modest reduction in size of frame and generator objects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:27:42 2020 From: report at bugs.python.org (Mark Shannon) Date: Thu, 11 Jun 2020 13:27:42 +0000 Subject: [issue40941] Merge generator.gi_running and frame executing flag into single frame state In-Reply-To: <1591795992.13.0.468529987519.issue40941@roundup.psfhosted.org> Message-ID: <1591882062.83.0.393468127441.issue40941@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +19999 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20803 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:28:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 13:28:50 +0000 Subject: [issue34401] Make test_gdb work on HP-UX In-Reply-To: <1534247656.08.0.56676864532.issue34401@psf.upfronthosting.co.za> Message-ID: <1591882130.5.0.594470830558.issue34401@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner nosy_count: 2.0 -> 3.0 pull_requests: +20000 pull_request: https://github.com/python/cpython/pull/20804 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:33:05 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 13:33:05 +0000 Subject: [issue18822] poor proxyval() coverage in test_gdb In-Reply-To: <1377282599.12.0.212974297013.issue18822@psf.upfronthosting.co.za> Message-ID: <1591882385.04.0.204382264653.issue18822@roundup.psfhosted.org> STINNER Victor added the comment: No activity for 7 years, 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 Jun 11 09:41:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 13:41:00 +0000 Subject: [issue26788] test_gdb fails all tests on a profile-opt build configured --with-lto In-Reply-To: <1460874599.33.0.6029536171.issue26788@psf.upfronthosting.co.za> Message-ID: <1591882860.11.0.999744806442.issue26788@roundup.psfhosted.org> STINNER Victor added the comment: I fail to reproduce the issue on the master branch of Python on Fedora 32: * Python master at commit 9727694f08cad4b019d2939224e3416312b1c0e1 * Fedora 32 * gcc (GCC) 10.1.1 * GNU gdb (GDB) Fedora 9.1-5.fc32 Notice that multiple tests are skipped: $ ./configure --with-lto && make && ./python -m test -v test_gdb (...) gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -std=c99 (...) (...) == CPython 3.10.0a0 (heads/master:9727694f08, Jun 11 2020, 15:31:25) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] == Linux-5.6.16-300.fc32.x86_64-x86_64-with-glibc2.31 little-endian == cwd: /home/vstinner/python/master/build/test_python_139705 == CPU count: 8 == encodings: locale=UTF-8, FS=utf-8 0:00:00 load avg: 2.77 Run tests sequentially 0:00:00 load avg: 2.77 [1/1] test_gdb GDB version 9.1: GNU gdb (GDB) Fedora 9.1-5.fc32 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. test_NULL_ob_type (test.test_gdb.PrettyPrintTests) Ensure that a PyObject* with NULL ob_type is handled gracefully ... ok test_NULL_ptr (test.test_gdb.PrettyPrintTests) Ensure that a NULL PyObject* is handled gracefully ... ok test_builtin_method (test.test_gdb.PrettyPrintTests) ... ok test_builtins_help (test.test_gdb.PrettyPrintTests) Ensure that the new-style class _Helper in site.py can be handled ... ok test_bytes (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of bytes ... ok test_corrupt_ob_type (test.test_gdb.PrettyPrintTests) Ensure that a PyObject* with a corrupt ob_type is handled gracefully ... ok test_corrupt_tp_flags (test.test_gdb.PrettyPrintTests) Ensure that a PyObject* with a type with corrupt tp_flags is handled ... ok test_corrupt_tp_name (test.test_gdb.PrettyPrintTests) Ensure that a PyObject* with a type with corrupt tp_name is handled ... ok test_dicts (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of dictionaries ... ok test_exceptions (test.test_gdb.PrettyPrintTests) ... ok test_frames (test.test_gdb.PrettyPrintTests) ... ok test_frozensets (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of frozensets ... ok test_getting_backtrace (test.test_gdb.PrettyPrintTests) ... ok test_int (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of various int values ... ok test_lists (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of lists ... ok test_modern_class (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of new-style class instances ... ok test_selfreferential_dict (test.test_gdb.PrettyPrintTests) Ensure that a reference loop involving a dict doesn't lead proxyval ... ok test_selfreferential_list (test.test_gdb.PrettyPrintTests) Ensure that a reference loop involving a list doesn't lead proxyval ... ok test_selfreferential_new_style_instance (test.test_gdb.PrettyPrintTests) ... ok test_selfreferential_old_style_instance (test.test_gdb.PrettyPrintTests) ... ok test_sets (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of sets ... ok test_singletons (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of True, False and None ... ok test_strings (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of unicode strings ... ok test_subclassing_list (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of an instance of a list subclass ... ok test_subclassing_tuple (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of an instance of a tuple subclass ... ok test_truncation (test.test_gdb.PrettyPrintTests) Verify that very long output is truncated ... ok 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 ... skipped 'Python was compiled with optimizations' test_bt_full (test.test_gdb.PyBtTests) Verify that the "py-bt-full" command works ... skipped 'Python was compiled with optimizations' test_gc (test.test_gdb.PyBtTests) Verify that "py-bt" indicates if a thread is garbage-collecting ... skipped 'Python was compiled with optimizations' test_pycfunction (test.test_gdb.PyBtTests) Verify that "py-bt" displays invocations of PyCFunction instances ... skipped 'Python was compiled with optimizations' test_threads (test.test_gdb.PyBtTests) Verify that "py-bt" indicates threads that are waiting for the GIL ... ok test_wrapper_call (test.test_gdb.PyBtTests) ... skipped 'Python was compiled with optimizations' test_basic_command (test.test_gdb.PyListTests) Verify that the "py-list" command works ... skipped 'Python was compiled with optimizations' test_one_abs_arg (test.test_gdb.PyListTests) Verify the "py-list" command with one absolute argument ... skipped 'Python was compiled with optimizations' test_two_abs_args (test.test_gdb.PyListTests) Verify the "py-list" command with two absolute arguments ... skipped 'Python was compiled with optimizations' test_basic_command (test.test_gdb.PyLocalsTests) ... skipped 'Python was compiled with optimizations' test_locals_after_up (test.test_gdb.PyLocalsTests) ... skipped 'Python was compiled with optimizations' test_basic_command (test.test_gdb.PyPrintTests) Verify that the "py-print" command works ... skipped 'Python was compiled with optimizations' test_print_after_up (test.test_gdb.PyPrintTests) ... skipped 'Python was compiled with optimizations' test_printing_builtin (test.test_gdb.PyPrintTests) ... skipped 'Python was compiled with optimizations' test_printing_global (test.test_gdb.PyPrintTests) ... skipped 'Python was compiled with optimizations' test_down_at_bottom (test.test_gdb.StackNavigationTests) Verify handling of "py-down" at the bottom of the stack ... ok test_pyup_command (test.test_gdb.StackNavigationTests) Verify that the "py-up" command works ... skipped 'Python was compiled with optimizations' test_up_at_top (test.test_gdb.StackNavigationTests) Verify handling of "py-up" at the top of the stack ... ok test_up_then_down (test.test_gdb.StackNavigationTests) Verify "py-up" followed by "py-down" ... skipped 'Python was compiled with optimizations' ---------------------------------------------------------------------- Ran 46 tests in 84.636s OK (skipped=16) test_gdb passed in 1 min 25 sec == Tests result: SUCCESS == 1 test OK. Total duration: 1 min 25 sec Tests result: SUCCESS ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:47:30 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 13:47:30 +0000 Subject: [issue32834] test_gdb fails with Posix locale in 3.7 In-Reply-To: <1518464593.71.0.467229070634.issue32834@psf.upfronthosting.co.za> Message-ID: <1591883250.0.0.81530495457.issue32834@roundup.psfhosted.org> STINNER Victor added the comment: I close the issue. I cannot reproduce the issue on Fedora 32. Please open it if you can still reproduce it on the master branch. In this case, please mention your GDB version, Python version used by GDB and tested Python version. * Python master at commit 9727694f08cad4b019d2939224e3416312b1c0e1 * gcc (GCC) 10.1.1 20200507 (Red Hat 10.1.1-1) * GNU gdb (GDB) Fedora 9.1-5.fc32 On Fedora 32, GDB is linked to Python 3.8: $ gdb GNU gdb (GDB) Fedora 9.1-5.fc32 (gdb) python import sys; print(sys.version) 3.8.3 (default, May 15 2020, 00:00:00) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] test_gdb: vstinner at apu$ LC_ALL=C ./python -We -m test -vuall -m test_strings test_gdb == CPython 3.10.0a0 (heads/master:9727694f08, Jun 11 2020, 15:44:14) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] == Linux-5.6.16-300.fc32.x86_64-x86_64-with-glibc2.31 little-endian == cwd: /home/vstinner/python/master/build/test_python_151860 == CPU count: 8 == encodings: locale=UTF-8, FS=utf-8 0:00:00 load avg: 1.68 Run tests sequentially 0:00:00 load avg: 1.68 [1/1] test_gdb GDB version 9.1: GNU gdb (GDB) Fedora 9.1-5.fc32 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. test_strings (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of unicode strings ... ok ---------------------------------------------------------------------- Ran 1 test in 1.834s OK == Tests result: SUCCESS == 1 test OK. Total duration: 2.4 sec Tests result: SUCCESS ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:48:07 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 13:48:07 +0000 Subject: [issue34401] Make test_gdb work on HP-UX In-Reply-To: <1534247656.08.0.56676864532.issue34401@psf.upfronthosting.co.za> Message-ID: <1591883287.44.0.709484558545.issue34401@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b2dca49ca3769cb60713f5c2b43e5d5bbdc1f9c7 by Victor Stinner in branch 'master': bpo-34401: Fix test_gdb for HP GDB version string (GH-20804) https://github.com/python/cpython/commit/b2dca49ca3769cb60713f5c2b43e5d5bbdc1f9c7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:48:26 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jun 2020 13:48:26 +0000 Subject: [issue34401] Make test_gdb work on HP-UX In-Reply-To: <1534247656.08.0.56676864532.issue34401@psf.upfronthosting.co.za> Message-ID: <1591883306.05.0.764038733351.issue34401@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20002 pull_request: https://github.com/python/cpython/pull/20806 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:48:21 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jun 2020 13:48:21 +0000 Subject: [issue34401] Make test_gdb work on HP-UX In-Reply-To: <1534247656.08.0.56676864532.issue34401@psf.upfronthosting.co.za> Message-ID: <1591883301.09.0.679697481894.issue34401@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +20001 pull_request: https://github.com/python/cpython/pull/20805 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 09:52:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 13:52:12 +0000 Subject: [issue34401] Make test_gdb work on HP-UX In-Reply-To: <1534247656.08.0.56676864532.issue34401@psf.upfronthosting.co.za> Message-ID: <1591883532.56.0.922986881038.issue34401@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Michael Osipov for the fix! It's already merged into the master branch and will be merged into 3.8 and 3.9 branches as soon as the CI tests pass on the two backport PRs. I don't think that it's worth it to backport the fix to 3.7: this branch is close to move to security fixes only. I prefer to reduce any risk of regression. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.9 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:07:43 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jun 2020 14:07:43 +0000 Subject: [issue34401] Make test_gdb work on HP-UX In-Reply-To: <1534247656.08.0.56676864532.issue34401@psf.upfronthosting.co.za> Message-ID: <1591884463.58.0.382712519802.issue34401@roundup.psfhosted.org> miss-islington added the comment: New changeset 5b8e3a533560c39eb40b2fb950d2b14caacfaf6a by Miss Islington (bot) in branch '3.8': bpo-34401: Fix test_gdb for HP GDB version string (GH-20804) https://github.com/python/cpython/commit/5b8e3a533560c39eb40b2fb950d2b14caacfaf6a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:08:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 14:08:33 +0000 Subject: [issue40947] Replace PLATLIBDIR macro with config->platlibdir In-Reply-To: <1591870006.36.0.733271971459.issue40947@roundup.psfhosted.org> Message-ID: <1591884513.5.0.196994682152.issue40947@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner nosy_count: 1.0 -> 2.0 pull_requests: +20003 pull_request: https://github.com/python/cpython/pull/20807 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:08:34 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jun 2020 14:08:34 +0000 Subject: [issue34401] Make test_gdb work on HP-UX In-Reply-To: <1534247656.08.0.56676864532.issue34401@psf.upfronthosting.co.za> Message-ID: <1591884514.48.0.477922969463.issue34401@roundup.psfhosted.org> miss-islington added the comment: New changeset 2f46c65071c5528ce143bd02786f8fe94fe65d1f by Miss Islington (bot) in branch '3.9': bpo-34401: Fix test_gdb for HP GDB version string (GH-20804) https://github.com/python/cpython/commit/2f46c65071c5528ce143bd02786f8fe94fe65d1f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:08:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 14:08:33 +0000 Subject: [issue40854] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591884513.74.0.46569480543.issue40854@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20004 pull_request: https://github.com/python/cpython/pull/20807 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:09:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 14:09:42 +0000 Subject: [issue40947] Replace PLATLIBDIR macro with config->platlibdir In-Reply-To: <1591870006.36.0.733271971459.issue40947@roundup.psfhosted.org> Message-ID: <1591884582.71.0.769079834369.issue40947@roundup.psfhosted.org> Change by STINNER Victor : ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:11:15 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 14:11:15 +0000 Subject: [issue40854] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591884675.72.0.726273247448.issue40854@roundup.psfhosted.org> STINNER Victor added the comment: Follow-up: bpo-40947 "Replace PLATLIBDIR macro with config->platlibdir". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:14:45 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 11 Jun 2020 14:14:45 +0000 Subject: [issue28557] error message for bad raw readinto In-Reply-To: <1477760845.01.0.230790209004.issue28557@psf.upfronthosting.co.za> Message-ID: <1591884885.82.0.266826219008.issue28557@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:23:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 14:23:37 +0000 Subject: [issue36560] test_functools leaks randomly 1 memory block In-Reply-To: <1554733336.52.0.331530875309.issue36560@roundup.psfhosted.org> Message-ID: <1591885417.92.0.205072846856.issue36560@roundup.psfhosted.org> STINNER Victor added the comment: AMD64 Fedora Rawhide Refleaks 3.8: https://buildbot.python.org/all/#/builders/79/builds/196 test_functools leaked [1, 1, 1] memory blocks, sum=3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:27:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 14:27:23 +0000 Subject: [issue40949] test_socket: threading_cleanup() failed to cleanup 0 threads (count: 0, dangling: 5) Message-ID: <1591885643.11.0.227802495041.issue40949@roundup.psfhosted.org> New submission from STINNER Victor : aarch64 RHEL8 Refleaks 3.x: https://buildbot.python.org/all/#/builders/563/builds/127 The system load was quite high (9.95) for "CPU count: 8". 0:22:19 load avg: 9.95 [406/426/2] test_socket failed (env changed) (2 min 41 sec) -- running: test_pydoc (20 min 35 sec), test_asyncio (11 min 56 sec), test_faulthandler (39.2 sec), test_concurrent_futures (20 min 7 sec), test_venv (1 min 17 sec), test_peg_generator (15 min 51 sec), test_multiprocessing_spawn (54.4 sec), test_signal (9 min 26 sec) beginning 6 repetitions 123456 ....Warning -- threading_cleanup() failed to cleanup 0 threads (count: 0, dangling: 5) Warning -- Dangling thread: Warning -- Dangling thread: Warning -- Dangling thread: Warning -- Dangling thread: Warning -- Dangling thread: <_MainThread(MainThread, started 281473770473840)> .. It may be related to bpo-36750: "test_socket leaks file descriptors on macOS". ---------- components: Tests messages: 371287 nosy: vstinner priority: normal severity: normal status: open title: test_socket: threading_cleanup() failed to cleanup 0 threads (count: 0, dangling: 5) versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:27:17 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 11 Jun 2020 14:27:17 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1591885637.03.0.870105056081.issue1635741@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +20005 pull_request: https://github.com/python/cpython/pull/20808 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:27:44 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 11 Jun 2020 14:27:44 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591885664.67.0.291460407882.issue40939@roundup.psfhosted.org> Guido van Rossum added the comment: Honestly I see no reason to keep that easter egg. Can we remove it please? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:28:20 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 11 Jun 2020 14:28:20 +0000 Subject: [issue40949] test_socket: threading_cleanup() failed to cleanup 0 threads (count: 0, dangling: 5) In-Reply-To: <1591885643.11.0.227802495041.issue40949@roundup.psfhosted.org> Message-ID: <1591885700.27.0.528029861424.issue40949@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:28:55 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 11 Jun 2020 14:28:55 +0000 Subject: [issue40424] AIX: makexp_aix, parallel build (failures) and ld WARNINGS In-Reply-To: <1588090800.25.0.961976947202.issue40424@roundup.psfhosted.org> Message-ID: <1591885735.11.0.805769506507.issue40424@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:29:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 14:29:04 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591885744.35.0.341678891074.issue40939@roundup.psfhosted.org> STINNER Victor added the comment: > New changeset 961edf7979ca34d6fe104a1cce005aa8cac35821 by Miss Islington (bot) in branch '3.9': > bpo-40939: Generate keyword.py using the new parser (GH-20800) This change broke this buildbot: AMD64 Arch Linux VintageParser 3.9: https://buildbot.python.org/all/#/builders/765/builds/67 1 test failed: test_keyword ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:32:28 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 11 Jun 2020 14:32:28 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591885948.1.0.369975519941.issue40939@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Ok, let's remove it. Lysandros can you modify PR 20802 to remove it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:48:46 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 11 Jun 2020 14:48:46 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591886926.51.0.682217007088.issue40939@roundup.psfhosted.org> Lysandros Nikolaou added the comment: > Lysandros can you modify PR 20802 to remove it? Yup! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:51:56 2020 From: report at bugs.python.org (kernc) Date: Thu, 11 Jun 2020 14:51:56 +0000 Subject: [issue27578] inspect.findsource raises exception with empty __init__.py In-Reply-To: <1469016358.37.0.125453636257.issue27578@psf.upfronthosting.co.za> Message-ID: <1591887116.35.0.0402636774774.issue27578@roundup.psfhosted.org> Change by kernc : ---------- nosy: +kernc versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:55:17 2020 From: report at bugs.python.org (kernc) Date: Thu, 11 Jun 2020 14:55:17 +0000 Subject: [issue27578] inspect.findsource raises exception with empty __init__.py In-Reply-To: <1469016358.37.0.125453636257.issue27578@psf.upfronthosting.co.za> Message-ID: <1591887317.04.0.83910798888.issue27578@roundup.psfhosted.org> Change by kernc : ---------- keywords: +patch pull_requests: +20006 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20809 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 10:55:52 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 11 Jun 2020 14:55:52 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591887352.38.0.25855917332.issue40939@roundup.psfhosted.org> Lysandros Nikolaou added the comment: > This change broke this buildbot: GH-20802 fixes this breakage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 11:04:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 15:04:34 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1591887874.64.0.980580963257.issue40275@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20007 pull_request: https://github.com/python/cpython/pull/20810 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 11:09:43 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 11 Jun 2020 15:09:43 +0000 Subject: [issue40950] PEP 3121 applied to nis module Message-ID: <1591888183.85.0.936951063464.issue40950@roundup.psfhosted.org> Change by Dong-hee Na : ---------- assignee: corona10 components: Extension Modules nosy: corona10 priority: normal severity: normal status: open title: PEP 3121 applied to nis module type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 11:22:19 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 11 Jun 2020 15:22:19 +0000 Subject: [issue40950] PEP 3121 applied to nis module Message-ID: <1591888939.15.0.0737898408906.issue40950@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +20008 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20811 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 11:29:01 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 15:29:01 +0000 Subject: [issue40947] Replace PLATLIBDIR macro with config->platlibdir In-Reply-To: <1591870006.36.0.733271971459.issue40947@roundup.psfhosted.org> Message-ID: <1591889341.29.0.0741523408846.issue40947@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d72b9644a3e6eec83be48b1ebc2ec6ca776134d3 by Victor Stinner in branch 'master': bpo-40947: getpath.c uses PyConfig.platlibdir (GH-20807) https://github.com/python/cpython/commit/d72b9644a3e6eec83be48b1ebc2ec6ca776134d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 11:29:01 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 15:29:01 +0000 Subject: [issue40854] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591889341.15.0.133958060395.issue40854@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d72b9644a3e6eec83be48b1ebc2ec6ca776134d3 by Victor Stinner in branch 'master': bpo-40947: getpath.c uses PyConfig.platlibdir (GH-20807) https://github.com/python/cpython/commit/d72b9644a3e6eec83be48b1ebc2ec6ca776134d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 11:31:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 15:31:04 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1591889464.67.0.302618110687.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: New changeset bdfe9b633a171522bc6cdb7c8aa1215cbd119b59 by Victor Stinner in branch 'master': bpo-40275: test.supports imports lazily fnmatch, glob, struct (GH-20810) https://github.com/python/cpython/commit/bdfe9b633a171522bc6cdb7c8aa1215cbd119b59 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 11:33:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 15:33:46 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1591889626.02.0.406794286674.issue40275@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20009 pull_request: https://github.com/python/cpython/pull/20812 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 11:36:10 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 15:36:10 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1591889770.21.0.912373047861.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 10e6506aa8261aacc89b49e629ae1c927fa5151c by Hai Shi in branch 'master': bpo-40275: Add warnings_helper submodule in test.support (GH-20797) https://github.com/python/cpython/commit/10e6506aa8261aacc89b49e629ae1c927fa5151c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 11:43:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 15:43:45 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1591890225.46.0.66617588886.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: I'm no longer sure that it's worth it to create support.process_helper. I only see these functions which would be untroversial for process_helper: * wait_process() * reap_children() * args_from_interpreter_flags() * optim_args_from_interpreter_flags() PythonSymlink might be moved to support.script_helper instead. For now, I suggest to leave all these functions in support/__init__.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 11:47:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 15:47:54 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1591890474.98.0.174633700816.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: I propose to start updating tests to use directly support.import_helper and support.os_helper. Hai: do you want to work on that? Maybe start by focusing on import_helper (but if you modify a test, check for also symbols imported from os_helper). When you modify tests, I suggest to remove "from .import_helper import ..." and "from .os_helper import ..." in support/__init__.py and then run tests, to ensure that you updated all imports of the modified tests. Try to not create giant PRs modifying 100+ files. For example, limit a PR to 20 test files. When PR 20812 will be merged and import_helper and os_helper will no longer be imported by support, "import test.support" done after "import unittest" will only import 17 modules which is way better than the situation in April! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 11:49:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 15:49:33 +0000 Subject: [issue40854] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591890573.51.0.279298737684.issue40854@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20011 pull_request: https://github.com/python/cpython/pull/20813 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 11:49:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 15:49:33 +0000 Subject: [issue40947] Replace PLATLIBDIR macro with config->platlibdir In-Reply-To: <1591870006.36.0.733271971459.issue40947@roundup.psfhosted.org> Message-ID: <1591890573.43.0.790756379228.issue40947@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20010 pull_request: https://github.com/python/cpython/pull/20813 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 12:01:38 2020 From: report at bugs.python.org (hai shi) Date: Thu, 11 Jun 2020 16:01:38 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1591891298.5.0.278580454133.issue40275@roundup.psfhosted.org> hai shi added the comment: I propose to start updating tests to use directly support.import_helper and support.os_helper. Hai: do you want to work on that? Maybe start by focusing on import_helper (but if you modify a test, check for also symbols imported from os_helper). > of course, I will do it. Try to not create giant PRs modifying 100+ files. For example, limit a PR to 20 test files. > forgive me again. I will create some PRs of appropriate size. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 12:06:57 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 11 Jun 2020 16:06:57 +0000 Subject: [issue29633] MSI installer does not pass values as SecureProperty from UI In-Reply-To: <1487864774.78.0.845992185721.issue29633@psf.upfronthosting.co.za> Message-ID: <1591891617.08.0.302682746263.issue29633@roundup.psfhosted.org> Steve Dower added the comment: We can close it. bdist_msi isn't recommended for any reason, and cx_Freeze isn't ours. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 12:09:24 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 11 Jun 2020 16:09:24 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591891764.95.0.620711418309.issue40939@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset bcd7deed9118e365c1225de2a2e1a81bf988c6ab by Lysandros Nikolaou in branch 'master': bpo-40939: Remove PEG parser easter egg (__new_parser__) (#20802) https://github.com/python/cpython/commit/bcd7deed9118e365c1225de2a2e1a81bf988c6ab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 12:16:22 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 11 Jun 2020 16:16:22 +0000 Subject: [issue40948] Better identify Windows installer as installer only, not runner In-Reply-To: <1591877055.43.0.578200145114.issue40948@roundup.psfhosted.org> Message-ID: <1591892182.88.0.349554456565.issue40948@roundup.psfhosted.org> Steve Dower added the comment: The current "using" doc page is way too in-depth, but I'm actually okay with the idea of having a "Did you mean to launch Python? Press 'Start' and type 'Python' to find it" message on the Modify page of the installer. Perhaps the people hitting this problem would read the final page of the installer, but I suspect they're just like everyone else and don't read instructions until just-in-time. So if they're reaching the Modify page, that's the place to put them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 12:26:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 16:26:28 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1591892788.8.0.647226228637.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 311110abcd8ab648dbf1803e36a8ba5d93fa019b by Victor Stinner in branch 'master': bpo-40275: Move TransientResource to test_urllib2net (GH-20812) https://github.com/python/cpython/commit/311110abcd8ab648dbf1803e36a8ba5d93fa019b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 12:27:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 16:27:04 +0000 Subject: [issue40947] Replace PLATLIBDIR macro with config->platlibdir In-Reply-To: <1591870006.36.0.733271971459.issue40947@roundup.psfhosted.org> Message-ID: <1591892824.68.0.031501022098.issue40947@roundup.psfhosted.org> STINNER Victor added the comment: New changeset dc40105c88b968a50c3458e10e1d732e957ef0a3 by Victor Stinner in branch '3.9': bpo-40947: getpath.c uses PyConfig.platlibdir (GH-20807) (GH-20813) https://github.com/python/cpython/commit/dc40105c88b968a50c3458e10e1d732e957ef0a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 12:27:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 16:27:04 +0000 Subject: [issue40854] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var In-Reply-To: <1591182025.1.0.356419479186.issue40854@roundup.psfhosted.org> Message-ID: <1591892824.63.0.599786027966.issue40854@roundup.psfhosted.org> STINNER Victor added the comment: New changeset dc40105c88b968a50c3458e10e1d732e957ef0a3 by Victor Stinner in branch '3.9': bpo-40947: getpath.c uses PyConfig.platlibdir (GH-20807) (GH-20813) https://github.com/python/cpython/commit/dc40105c88b968a50c3458e10e1d732e957ef0a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 12:27:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 16:27:28 +0000 Subject: [issue40947] Replace PLATLIBDIR macro with config->platlibdir In-Reply-To: <1591870006.36.0.733271971459.issue40947@roundup.psfhosted.org> Message-ID: <1591892848.33.0.612757116652.issue40947@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Sandro! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 12:30:50 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 11 Jun 2020 16:30:50 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591893050.36.0.385111146017.issue40939@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 1ed83adb0e95305af858bd41af531e487f54fee7 by Pablo Galindo in branch 'master': bpo-40939: Remove the old parser (GH-20768) https://github.com/python/cpython/commit/1ed83adb0e95305af858bd41af531e487f54fee7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 12:36:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jun 2020 16:36:39 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591893399.02.0.343255800651.issue40939@roundup.psfhosted.org> STINNER Victor added the comment: A few remaining references to the good old times of the old parser: Programs/_testembed.c:488: putenv("PYTHONOLDPARSER=1"); Programs/_testembed.c:676: putenv("PYTHONOLDPARSER=1"); Tools/scripts/run_tests.py:29: if 'PYTHONOLDPARSER' not in os.environ: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 12:43:27 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 11 Jun 2020 16:43:27 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591893807.24.0.394819959538.issue40939@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +20012 pull_request: https://github.com/python/cpython/pull/20814 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 12:43:17 2020 From: report at bugs.python.org (E. Paine) Date: Thu, 11 Jun 2020 16:43:17 +0000 Subject: [issue40945] TKinter.Tk.geometry(Tk.winfo_geometry()) should be idempotent In-Reply-To: <1591819450.72.0.638106419632.issue40945@roundup.psfhosted.org> Message-ID: <1591893797.52.0.751309209446.issue40945@roundup.psfhosted.org> E. Paine added the comment: This is interesting as it works fine on Windows but does the behaviour you describe on Linux. I presume the difference is due to how Tcl/Tk handles the title-bar, in which case this isn't really a tkinter issue and there isn't much that can be done (from a tkinter perspective anyway). When tested (on Linux), however, calling tk.geometry() returned a different value to tk.winfo_geometry(). Calling tk.geometry(tk.geometry()) did not change the window position and everything worked as expected (weird!). I am not sure, though, if this behaviour should be changed. Looking at the Tk man page (https://www.tcl.tk/man/tcl8.6/TkCmd/wm.htm#M42), it says: "Note that this is related to winfo geometry, but not the same. That [...] always reflects Tk's current understanding of the actual size and location of window, whereas wm geometry allows [...] querying of the window manager's understanding of the size and location of the window. This can vary significantly, for example to reflect the addition of decorative elements to window such as title bars, and window managers are not required to precisely follow the requests made through this command." ---------- nosy: +epaine, gpolo, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 12:46:24 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 11 Jun 2020 16:46:24 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591893984.85.0.809993336999.issue40939@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +20013 pull_request: https://github.com/python/cpython/pull/20815 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 12:46:54 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 11 Jun 2020 16:46:54 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591894014.82.0.688940562277.issue40939@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > A few remaining references to the good old times of the old parser: Thanks Victor, opened https://github.com/python/cpython/pull/20815 to address those. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 13:08:13 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jun 2020 17:08:13 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591895293.09.0.696455696596.issue40939@roundup.psfhosted.org> miss-islington added the comment: New changeset 436b648910c27baf8164a6d46d746d36d8a93478 by Pablo Galindo in branch 'master': bpo-40939: Remove some extra references to PYTHONOLDPARSER (GH-20815) https://github.com/python/cpython/commit/436b648910c27baf8164a6d46d746d36d8a93478 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 13:11:03 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 11 Jun 2020 17:11:03 +0000 Subject: [issue40940] How to update pip permanently for new venv? In-Reply-To: <1591792003.17.0.226692929121.issue40940@roundup.psfhosted.org> Message-ID: <1591895463.04.0.766762832339.issue40940@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report. I have to agree that the behavior is a little bit counterintuitive but I believe everything is working as designed and documented. It all comes down to the fact that the ensurepip module is only concerned with the version of pip bundled with the python release; ensurepip deliberately does not check PyPI for a newer version of pip. As documented, venv calls ensurepip after creating a new venv so the pip that is installed there is the one released with ensurepip. To get the latest version of pip, you would need to run (in the activated venv): python3 -m pip install --upgrade pip just as you needed to do to upgrade the system-wide instance of python3 to the latest pip. https://docs.python.org/3/library/venv.html#creating-virtual-environments "Unless the --without-pip option is given, ensurepip will be invoked to bootstrap pip into the virtual environment." https://docs.python.org/3/library/venv.html#creating-virtual-environments "Note: This module does not access the internet [...]" ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 13:17:39 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Jun 2020 17:17:39 +0000 Subject: [issue40855] statistics.stdev ignore xbar argument In-Reply-To: <1591187481.58.0.119061539675.issue40855@roundup.psfhosted.org> Message-ID: <1591895859.24.0.354113391589.issue40855@roundup.psfhosted.org> Raymond Hettinger added the comment: > do you have any comment on my previous answer? I see what you're trying to do but think that interpretation is surprising and is at odds with the existing and intended uses of the *xbar* argument. The goals were to allow the mean to be precomputed (common case) or to be recentered (uncommon). Neither case should have the effect of changing the divisor. We can't break existing code that assumes that stdev(data) is equal to stdev(data, xbar=mean(data)). >>> data = [1, 2] >>> stdev(data) 0.7071067811865476 >>> stdev(data, xbar=mean(data)) 0.7071067811865476 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 13:18:01 2020 From: report at bugs.python.org (Brandt Bucher) Date: Thu, 11 Jun 2020 17:18:01 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591895881.79.0.922424509971.issue40939@roundup.psfhosted.org> Change by Brandt Bucher : ---------- nosy: +brandtbucher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 13:21:05 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 11 Jun 2020 17:21:05 +0000 Subject: [issue40940] How to update pip permanently for new venv? In-Reply-To: <1591792003.17.0.226692929121.issue40940@roundup.psfhosted.org> Message-ID: <1591896065.23.0.352437408942.issue40940@roundup.psfhosted.org> Ned Deily added the comment: Also, this issue has come up before and is discussed in more detail in Issue37107, so let's continue any further discussion there. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> ensurepip --upgrade doesn't change the version of pip used by venv _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 14:03:36 2020 From: report at bugs.python.org (A.M. Kuchling) Date: Thu, 11 Jun 2020 18:03:36 +0000 Subject: [issue29620] unittest.TestCase.assertWarns raises RuntimeEror if sys.modules changes size In-Reply-To: <1487780571.93.0.503711972358.issue29620@psf.upfronthosting.co.za> Message-ID: <1591898616.46.0.234181248262.issue29620@roundup.psfhosted.org> A.M. Kuchling added the comment: New changeset 46398fba4d66ad342cf2504ef947b5fb857423b2 by kernc in branch 'master': bpo-29620: iterate over a copy of sys.modules (GH-4800) https://github.com/python/cpython/commit/46398fba4d66ad342cf2504ef947b5fb857423b2 ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 14:03:49 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jun 2020 18:03:49 +0000 Subject: [issue29620] unittest.TestCase.assertWarns raises RuntimeEror if sys.modules changes size In-Reply-To: <1487780571.93.0.503711972358.issue29620@psf.upfronthosting.co.za> Message-ID: <1591898629.91.0.0151706835778.issue29620@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +20014 pull_request: https://github.com/python/cpython/pull/20816 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 14:03:58 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jun 2020 18:03:58 +0000 Subject: [issue29620] unittest.TestCase.assertWarns raises RuntimeEror if sys.modules changes size In-Reply-To: <1487780571.93.0.503711972358.issue29620@psf.upfronthosting.co.za> Message-ID: <1591898638.65.0.321428556595.issue29620@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20015 pull_request: https://github.com/python/cpython/pull/20817 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 14:29:20 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 11 Jun 2020 18:29:20 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591900160.74.0.170619663573.issue40939@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 3782497cc22e70b41e32ac09cb06d3948074d8a7 by Pablo Galindo in branch '3.9': [3.9] bpo-40939: Fix test_keyword for the old parser (GH-20814) https://github.com/python/cpython/commit/3782497cc22e70b41e32ac09cb06d3948074d8a7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 14:31:55 2020 From: report at bugs.python.org (A.M. Kuchling) Date: Thu, 11 Jun 2020 18:31:55 +0000 Subject: [issue29620] unittest.TestCase.assertWarns raises RuntimeEror if sys.modules changes size In-Reply-To: <1487780571.93.0.503711972358.issue29620@psf.upfronthosting.co.za> Message-ID: <1591900315.28.0.151910464049.issue29620@roundup.psfhosted.org> A.M. Kuchling added the comment: New changeset 3e499cda47afe2282ca3f1d04151e2c86f2e7e09 by Miss Islington (bot) in branch '3.8': bpo-29620: iterate over a copy of sys.modules (GH-4800) (GH-20816) https://github.com/python/cpython/commit/3e499cda47afe2282ca3f1d04151e2c86f2e7e09 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 14:34:49 2020 From: report at bugs.python.org (A.M. Kuchling) Date: Thu, 11 Jun 2020 18:34:49 +0000 Subject: [issue29620] unittest.TestCase.assertWarns raises RuntimeEror if sys.modules changes size In-Reply-To: <1487780571.93.0.503711972358.issue29620@psf.upfronthosting.co.za> Message-ID: <1591900489.75.0.33066655711.issue29620@roundup.psfhosted.org> A.M. Kuchling added the comment: New changeset f881c869753fb2b1b7aef353416893190251c539 by Miss Islington (bot) in branch '3.7': bpo-29620: iterate over a copy of sys.modules (GH-4800) (GH-20817) https://github.com/python/cpython/commit/f881c869753fb2b1b7aef353416893190251c539 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 14:36:06 2020 From: report at bugs.python.org (A.M. Kuchling) Date: Thu, 11 Jun 2020 18:36:06 +0000 Subject: [issue29620] unittest.TestCase.assertWarns raises RuntimeEror if sys.modules changes size In-Reply-To: <1487780571.93.0.503711972358.issue29620@psf.upfronthosting.co.za> Message-ID: <1591900566.91.0.482803505431.issue29620@roundup.psfhosted.org> A.M. Kuchling added the comment: Changes applied to master, 3.8, and 3.7. Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 15:04:21 2020 From: report at bugs.python.org (A.M. Kuchling) Date: Thu, 11 Jun 2020 19:04:21 +0000 Subject: [issue40626] application/x-hdf5 mime type missing from mimetypes library In-Reply-To: <1589467626.22.0.421412195691.issue40626@roundup.psfhosted.org> Message-ID: <1591902261.43.0.693124869771.issue40626@roundup.psfhosted.org> A.M. Kuchling added the comment: New changeset 60c2a810e37994fc640c58d0ef45b6843354b770 by MARK SCHWAB in branch 'master': bpo-40626: Support HDF5 in mimetypes (GH-20042) https://github.com/python/cpython/commit/60c2a810e37994fc640c58d0ef45b6843354b770 ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 15:04:27 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jun 2020 19:04:27 +0000 Subject: [issue40626] application/x-hdf5 mime type missing from mimetypes library In-Reply-To: <1589467626.22.0.421412195691.issue40626@roundup.psfhosted.org> Message-ID: <1591902267.15.0.29740120585.issue40626@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +20016 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20818 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 15:32:46 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jun 2020 19:32:46 +0000 Subject: [issue40626] application/x-hdf5 mime type missing from mimetypes library In-Reply-To: <1589467626.22.0.421412195691.issue40626@roundup.psfhosted.org> Message-ID: <1591903966.16.0.892299244326.issue40626@roundup.psfhosted.org> miss-islington added the comment: New changeset a3d6d23a923d62a713b9e4536d5f7ce7313d99c7 by Miss Islington (bot) in branch '3.8': bpo-40626: Support HDF5 in mimetypes (GH-20042) https://github.com/python/cpython/commit/a3d6d23a923d62a713b9e4536d5f7ce7313d99c7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 15:37:25 2020 From: report at bugs.python.org (A.M. Kuchling) Date: Thu, 11 Jun 2020 19:37:25 +0000 Subject: [issue40626] application/x-hdf5 mime type missing from mimetypes library In-Reply-To: <1589467626.22.0.421412195691.issue40626@roundup.psfhosted.org> Message-ID: <1591904245.58.0.483152641924.issue40626@roundup.psfhosted.org> A.M. Kuchling added the comment: MIME type added to master and 3.8 branches. Thanks for your patch! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 16:23:39 2020 From: report at bugs.python.org (Leonard Richardson) Date: Thu, 11 Jun 2020 20:23:39 +0000 Subject: [issue37747] _markupbase.py fails with TypeError on invalid keyword in marked section In-Reply-To: <1564771107.73.0.664658859343.issue37747@roundup.psfhosted.org> Message-ID: <1591907019.85.0.106132500798.issue37747@roundup.psfhosted.org> Leonard Richardson added the comment: This was also recently filed as a bug against Beautiful Soup, a package I maintain, using Python 3.8. (https://bugs.launchpad.net/beautifulsoup/+bug/1883104) The attached script reproduces the problem without using external packages. ---------- nosy: +leonardr versions: +Python 3.8 Added file: https://bugs.python.org/file49226/test_issue37747.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 17:05:42 2020 From: report at bugs.python.org (Jesse Farnham) Date: Thu, 11 Jun 2020 21:05:42 +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: <1591909542.5.0.88653960111.issue6721@roundup.psfhosted.org> Change by Jesse Farnham : ---------- nosy: +jesse.farnham _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 17:48:55 2020 From: report at bugs.python.org (Ethan Furman) Date: Thu, 11 Jun 2020 21:48:55 +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: <1591912135.53.0.267899536955.issue40025@roundup.psfhosted.org> Ethan Furman added the comment: New changeset ebd44003c9e206755e5e28716242ed8941495a62 by Miss Islington (bot) in branch '3.7': bpo-40025: Require _generate_next_value_ to be defined before members (GH-19762) https://github.com/python/cpython/commit/ebd44003c9e206755e5e28716242ed8941495a62 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 18:28:38 2020 From: report at bugs.python.org (Rudolfo Munguia) Date: Thu, 11 Jun 2020 22:28:38 +0000 Subject: [issue40951] csv skipinitialspace no longer working Message-ID: <1591914518.12.0.392827187881.issue40951@roundup.psfhosted.org> New submission from Rudolfo Munguia : This was non-obvious at first. Code had written 1 month ago making use of csv.reader to strip leading spaces is failing when I ran it today. My company had updated my installation of python from 3.6 to 3.7 a few weeks back. I have skipinitialspace=True set, but all output still contains leading spaces. I have even checked around several places on the internet where they have "example" code to demonstrate this function -> but all of their examples are now also broken (?)! and contain the leading spaces as well :: https://www.w3resource.com/python-exercises/csv/python-csv-exercise-6.php ---------- components: Build messages: 371325 nosy: Rudolfo Munguia priority: normal severity: normal status: open title: csv skipinitialspace no longer working type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 19:39:38 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 11 Jun 2020 23:39:38 +0000 Subject: [issue40924] Recent importlib change breaks most recent certifi == 2020.4.5.2 In-Reply-To: <1591682388.65.0.686796854093.issue40924@roundup.psfhosted.org> Message-ID: <1591918778.45.0.877657777681.issue40924@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +20017 pull_request: https://github.com/python/cpython/pull/20820 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 20:25:28 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 00:25:28 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591921528.86.0.000471583383465.issue40939@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +20018 pull_request: https://github.com/python/cpython/pull/20822 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 20:32:54 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Jun 2020 00:32:54 +0000 Subject: [issue40948] Better identify Windows installer as installer only, not runner In-Reply-To: <1591877055.43.0.578200145114.issue40948@roundup.psfhosted.org> Message-ID: <1591921974.43.0.407689262725.issue40948@roundup.psfhosted.org> Terry J. Reedy added the comment: Simple is fine. How about If you want to run Python, press Start and find 'Python 3.x' under 'P', or enter 'python' in the "Search for anything" box on the taskbar. If you don't have the time right now, where should this go? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 20:55:41 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 00:55:41 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1591923341.85.0.331637585153.issue40939@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 756180b4bfa09bb77394a2b3754d331181d4f28c by Pablo Galindo in branch 'master': bpo-40939: Clean and adapt the peg_generator directory after deleting the old parser (GH-20822) https://github.com/python/cpython/commit/756180b4bfa09bb77394a2b3754d331181d4f28c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 22:00:02 2020 From: report at bugs.python.org (Toshio Kuratomi) Date: Fri, 12 Jun 2020 02:00:02 +0000 Subject: [issue40917] pickle exceptions with mandatory keyword args will traceback In-Reply-To: <1591659970.45.0.239988250333.issue40917@roundup.psfhosted.org> Message-ID: <1591927202.13.0.784307284147.issue40917@roundup.psfhosted.org> Toshio Kuratomi added the comment: Thanks! I confirm that your PR https://github.com/python/cpython/pull/11580 for https://bugs.python.org/issue27015 fixes this problem. Closing this one. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 22:26:09 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 12 Jun 2020 02:26:09 +0000 Subject: [issue40950] PEP 3121 applied to nis module Message-ID: <1591928769.3.0.532311615598.issue40950@roundup.psfhosted.org> New submission from Dong-hee Na : New changeset ddef3bdc7b254a7e1129a52c17d79cb7c73a88f5 by Dong-hee Na in branch 'master': bpo-40950: Port nis module to multiphase initialization (GH-20811) https://github.com/python/cpython/commit/ddef3bdc7b254a7e1129a52c17d79cb7c73a88f5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 11 22:26:21 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 12 Jun 2020 02:26:21 +0000 Subject: [issue40950] PEP 3121 applied to nis module In-Reply-To: <1591928769.3.0.532311615598.issue40950@roundup.psfhosted.org> Message-ID: <1591928781.33.0.692517880112.issue40950@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 Fri Jun 12 00:12:00 2020 From: report at bugs.python.org (Inada Naoki) Date: Fri, 12 Jun 2020 04:12:00 +0000 Subject: [issue35019] Allow ipaddres.IPv4/v6Address in asyncio.create_server In-Reply-To: <1539880104.22.0.788709270274.issue35019@psf.upfronthosting.co.za> Message-ID: <1591935120.05.0.0634400844429.issue35019@roundup.psfhosted.org> Inada Naoki added the comment: I feel ABC is too much for just single dunder method. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 01:06:28 2020 From: report at bugs.python.org (hai shi) Date: Fri, 12 Jun 2020 05:06:28 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1591938388.09.0.988820558517.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +20019 pull_request: https://github.com/python/cpython/pull/20824 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 01:20:42 2020 From: report at bugs.python.org (tillus) Date: Fri, 12 Jun 2020 05:20:42 +0000 Subject: [issue40940] How to update pip permanently for new venv? In-Reply-To: <1591792003.17.0.226692929121.issue40940@roundup.psfhosted.org> Message-ID: <1591939242.06.0.801199782229.issue40940@roundup.psfhosted.org> tillus added the comment: If it is not a bug, then I would strongly suggest it as a feature request! Allright we can track it on the other issue! Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 01:21:19 2020 From: report at bugs.python.org (Saba Kauser) Date: Fri, 12 Jun 2020 05:21:19 +0000 Subject: [issue40906] Unable to import module due to python unable to resolve dependecies In-Reply-To: <1591595444.88.0.936758108882.issue40906@roundup.psfhosted.org> Message-ID: <1591939279.3.0.895411691955.issue40906@roundup.psfhosted.org> Saba Kauser added the comment: Thanks Steve! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 01:41:43 2020 From: report at bugs.python.org (Tim Golden) Date: Fri, 12 Jun 2020 05:41:43 +0000 Subject: [issue40913] time.sleep ignores errors on Windows In-Reply-To: <1591641616.51.0.015066290777.issue40913@roundup.psfhosted.org> Message-ID: <1591940503.74.0.265895171455.issue40913@roundup.psfhosted.org> Tim Golden added the comment: Thanks, Eryk. I've had a couple of casts at this (and also with an eye to https://bugs.python.org/issue40912 in a very similar area). Trouble is I can't come up with a way of adding a set.. function which doesn't seem wholly artificial, given that it's basically creating an anonymous event and checking its return. I can't come up with a non-testing scenario where the ability to override would be useful. If I understand your proposal, a tentative "set..." function would have to take a HANDLE parameter so that it could be overridden by a test? That means its normal use would be something like: setSigintEvent(CreateEvent(NULL, ....)); so either the error checking for that would be inside the function, which feels weird, or would happen outside, which feels like the functions not doing anything. (I appreciate I may be overthinking here). I'm very much open to suggestions here, but it seems to me that either: We make the (simple) change without tests; or we add a setSigintEvent function as above whose only purpose is to be overridden -- and then only for testing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 01:42:05 2020 From: report at bugs.python.org (Tim Golden) Date: Fri, 12 Jun 2020 05:42:05 +0000 Subject: [issue40913] time.sleep ignores errors on Windows In-Reply-To: <1591641616.51.0.015066290777.issue40913@roundup.psfhosted.org> Message-ID: <1591940525.94.0.464990647629.issue40913@roundup.psfhosted.org> Change by Tim Golden : ---------- assignee: -> tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 01:42:10 2020 From: report at bugs.python.org (Tim Golden) Date: Fri, 12 Jun 2020 05:42:10 +0000 Subject: [issue40912] _PyOS_SigintEvent is never closed on Windows In-Reply-To: <1591641593.68.0.465410581538.issue40912@roundup.psfhosted.org> Message-ID: <1591940530.83.0.0110558044847.issue40912@roundup.psfhosted.org> Change by Tim Golden : ---------- assignee: -> tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 02:20:20 2020 From: report at bugs.python.org (Inada Naoki) Date: Fri, 12 Jun 2020 06:20:20 +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: <1591942820.7.0.307877268711.issue33944@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 2145c8c9724287a310bc77a2760d4f1c0ca9eb0c by native-api in branch 'master': bpo-33944: site: Add site-packages tracing in verbose mode (GH-12110) https://github.com/python/cpython/commit/2145c8c9724287a310bc77a2760d4f1c0ca9eb0c ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 03:14:45 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Jun 2020 07:14:45 +0000 Subject: [issue40952] GCC overflow warnings (format-overflow, stringop-overflow) Message-ID: <1591946085.85.0.775000698536.issue40952@roundup.psfhosted.org> New submission from Christian Heimes : I'm getting a couple of compiler warnings with gcc-10.1.1 (Fedora 32) with an asan and ubsan build: Parser/string_parser.c: In function ?decode_unicode_with_escapes?: Parser/string_parser.c:100:17: warning: null destination pointer [-Wformat-overflow=] 100 | sprintf(p, "\\U%08x", chr); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Parser/string_parser.c:100:17: warning: null destination pointer [-Wformat-overflow=] Parser/string_parser.c:100:17: warning: null destination pointer [-Wformat-overflow=] Objects/unicodeobject.c: In function ?xmlcharrefreplace?: Objects/unicodeobject.c:849:16: warning: null destination pointer [-Wformat-overflow=] 849 | str += sprintf(str, "&#%d;", PyUnicode_READ(kind, data, i)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Objects/unicodeobject.c:849:16: warning: null destination pointer [-Wformat-overflow=] Objects/unicodeobject.c:849:16: warning: null destination pointer [-Wformat-overflow=] In function ?assemble_lnotab?, inlined from ?assemble_emit? at Python/compile.c:5697:25, inlined from ?assemble? at Python/compile.c:6036:18: Python/compile.c:5651:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 5651 | *lnotab++ = k; | ~~~~~~~~~~^~~ ---------- components: Build messages: 371335 nosy: christian.heimes priority: normal severity: normal status: open title: GCC overflow warnings (format-overflow, stringop-overflow) type: compile error versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 03:30:34 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Jun 2020 07:30:34 +0000 Subject: [issue40953] _PyWideStringList_Copy breaks asan builds Message-ID: <1591947034.46.0.994029214013.issue40953@roundup.psfhosted.org> New submission from Christian Heimes : It's not possible to build Python with address sanitizer and memory leak checker asan. $ ./configure --with-address-sanitizer --with-undefined-behavior-sanitizer $ make ... ./python -E -S -m sysconfig --generate-posix-vars ;\ if test $? -ne 0 ; then \ echo "generate-posix-vars failed" ; \ rm -f ./pybuilddir.txt ; \ exit 1 ; \ fi ================================================================= ==1585722==ERROR: LeakSanitizer: detected memory leaks Direct leak of 48 byte(s) in 1 object(s) allocated from: #0 0x7fa404ea9667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667) #1 0x9ab398 in _PyWideStringList_Copy Python/initconfig.c:315 #2 0x9b48bd in _PyConfig_Copy Python/initconfig.c:857 #3 0xa20b4c in _PyInterpreterState_SetConfig Python/pystate.c:1834 #4 0xa07a14 in pycore_create_interpreter Python/pylifecycle.c:554 #5 0xa07a14 in pyinit_config Python/pylifecycle.c:759 #6 0xa07a14 in pyinit_core Python/pylifecycle.c:926 #7 0xa09b17 in Py_InitializeFromConfig Python/pylifecycle.c:1136 #8 0x4766c2 in pymain_init Modules/main.c:66 #9 0x47bd12 in pymain_main Modules/main.c:653 #10 0x47bd12 in Py_BytesMain Modules/main.c:686 #11 0x7fa404173041 in __libc_start_main (/lib64/libc.so.6+0x27041) Direct leak of 48 byte(s) in 1 object(s) allocated from: #0 0x7fa404ea9667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667) #1 0x9ab398 in _PyWideStringList_Copy Python/initconfig.c:315 #2 0x9b8ee8 in PyConfig_Read Python/initconfig.c:2506 #3 0xa07282 in pyinit_core Python/pylifecycle.c:920 #4 0xa09b17 in Py_InitializeFromConfig Python/pylifecycle.c:1136 #5 0x4766c2 in pymain_init Modules/main.c:66 #6 0x47bd12 in pymain_main Modules/main.c:653 #7 0x47bd12 in Py_BytesMain Modules/main.c:686 #8 0x7fa404173041 in __libc_start_main (/lib64/libc.so.6+0x27041) Indirect leak of 200 byte(s) in 6 object(s) allocated from: #0 0x7fa404ea9667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667) #1 0x63351c in PyMem_RawMalloc Objects/obmalloc.c:572 #2 0x63351c in _PyMem_RawWcsdup Objects/obmalloc.c:644 #3 0x9ab457 in _PyWideStringList_Copy Python/initconfig.c:321 #4 0x9b48bd in _PyConfig_Copy Python/initconfig.c:857 #5 0xa20b4c in _PyInterpreterState_SetConfig Python/pystate.c:1834 #6 0xa07a14 in pycore_create_interpreter Python/pylifecycle.c:554 #7 0xa07a14 in pyinit_config Python/pylifecycle.c:759 #8 0xa07a14 in pyinit_core Python/pylifecycle.c:926 #9 0xa09b17 in Py_InitializeFromConfig Python/pylifecycle.c:1136 #10 0x4766c2 in pymain_init Modules/main.c:66 #11 0x47bd12 in pymain_main Modules/main.c:653 #12 0x47bd12 in Py_BytesMain Modules/main.c:686 #13 0x7fa404173041 in __libc_start_main (/lib64/libc.so.6+0x27041) Indirect leak of 200 byte(s) in 6 object(s) allocated from: #0 0x7fa404ea9667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667) #1 0x63351c in PyMem_RawMalloc Objects/obmalloc.c:572 #2 0x63351c in _PyMem_RawWcsdup Objects/obmalloc.c:644 #3 0x9ab457 in _PyWideStringList_Copy Python/initconfig.c:321 #4 0x9b8ee8 in PyConfig_Read Python/initconfig.c:2506 #5 0xa07282 in pyinit_core Python/pylifecycle.c:920 #6 0xa09b17 in Py_InitializeFromConfig Python/pylifecycle.c:1136 #7 0x4766c2 in pymain_init Modules/main.c:66 #8 0x47bd12 in pymain_main Modules/main.c:653 #9 0x47bd12 in Py_BytesMain Modules/main.c:686 #10 0x7fa404173041 in __libc_start_main (/lib64/libc.so.6+0x27041) Workaround: $ cat Misc/asan-suppression.txt leak:_PyWideStringList_Copy $ LSAN_OPTIONS="suppressions=Misc/asan-suppression.txt" make ---------- components: Build messages: 371336 nosy: christian.heimes priority: normal severity: normal status: open title: _PyWideStringList_Copy breaks asan builds type: compile error versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 04:05:32 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Fri, 12 Jun 2020 08:05:32 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591949132.08.0.030515848527.issue40890@roundup.psfhosted.org> Dennis Sweeney added the comment: Would it be better to have a dictview.mapping() method rather than an attribute, since it constructs a new object of a different type and since that's what keys(), values(), and items() are? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 04:30:36 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Jun 2020 08:30:36 +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: <1591950636.24.0.716922428732.issue36225@roundup.psfhosted.org> Ned Deily added the comment: I note this is marked as a 3.7regression and still open. Since the cutoff for the final 3.7 bugfix mode release is in a few days, I'm assuming this means that 3.7 users will have to live with this regression. If you feel that is a problem, speak up now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 04:31:26 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Jun 2020 08:31:26 +0000 Subject: [issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn In-Reply-To: <1559908419.41.0.390422965351.issue37193@roundup.psfhosted.org> Message-ID: <1591950686.09.0.0185206855975.issue37193@roundup.psfhosted.org> Ned Deily added the comment: I note this is marked as a 3.7regression and still open. Since the cutoff for the final 3.7 bugfix mode release is in a few days, I'm assuming this means that 3.7 users will have to live with this regression. If you feel that is a problem, speak up now. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 04:32:17 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Jun 2020 08:32:17 +0000 Subject: [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 In-Reply-To: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> Message-ID: <1591950737.14.0.944443899474.issue34226@roundup.psfhosted.org> Ned Deily added the comment: I note this is marked as a 3.7regression and still open. Since the cutoff for the final 3.7 bugfix mode release is in a few days, I'm assuming this means that 3.7 users will have to live with this regression. If you feel that is a problem, speak up now. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 04:32:55 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Jun 2020 08:32:55 +0000 Subject: [issue36403] AsyncIterator on 3.7: __aiter__ no longer honors finally blocks In-Reply-To: <1553300107.21.0.160175909039.issue36403@roundup.psfhosted.org> Message-ID: <1591950775.24.0.898532929526.issue36403@roundup.psfhosted.org> Ned Deily added the comment: I note this is marked as a 3.7regression and still open. Since the cutoff for the final 3.7 bugfix mode release is in a few days, I'm assuming this means that 3.7 users will have to live with this regression. If you feel that is a problem, speak up now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 04:37:31 2020 From: report at bugs.python.org (=?utf-8?b?5bCP5pys5YGl5Y+4?=) Date: Fri, 12 Jun 2020 08:37:31 +0000 Subject: [issue40954] freeze.py aborts on macOS Message-ID: <1591951051.78.0.0676119565993.issue40954@roundup.psfhosted.org> New submission from ???? : freeze.py (in cpython/Tools/freeze) fails with the folloing error. ``` $ ~/.pyenv/versions/3.8.0/bin/python freeze.py Error: needed directory /Users/k-omoto/.pyenv/versions/3.8.0/lib/python3.8/config-3.8 not found Use ``freeze.py -h'' for help ``` ---------- components: Demos and Tools messages: 371342 nosy: ???? priority: normal severity: normal status: open title: freeze.py aborts on macOS versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 04:37:44 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Jun 2020 08:37:44 +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: <1591951064.04.0.892432579511.issue40164@roundup.psfhosted.org> Ned Deily added the comment: Any chance of getting the Windows builds using 1.1.1g for the upcoming 3.7.8? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 05:14:56 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Jun 2020 09:14:56 +0000 Subject: [issue28068] Error in freeze.py due to unguarded sys.abiflags usage under Windows In-Reply-To: <1473536745.18.0.842895640725.issue28068@psf.upfronthosting.co.za> Message-ID: <1591953296.41.0.533613752482.issue28068@roundup.psfhosted.org> Ned Deily added the comment: This appears to be a duplicate of Issue32217 which was fixed in 3.7.4 and 3.8.0. If that doesn't solve the problem, please reopen with a current failure. ---------- nosy: +ned.deily resolution: -> duplicate stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 05:21:52 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Jun 2020 09:21:52 +0000 Subject: [issue40954] freeze.py aborts on macOS In-Reply-To: <1591951051.78.0.0676119565993.issue40954@roundup.psfhosted.org> Message-ID: <1591953712.84.0.342367043323.issue40954@roundup.psfhosted.org> Ned Deily added the comment: Thank you for the report. At first glance, it looks like this might be a duplicate of languishing Issue24871 for which a patch exists. Perhaps you could try applying the patch there to freeze.py and see whether that helps. Unfortunately, freeze.py does not get a lot of attention here. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 05:54:50 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Jun 2020 09:54:50 +0000 Subject: [issue40955] subprocess_fork_exec leaks memory Message-ID: <1591955690.55.0.160305225118.issue40955@roundup.psfhosted.org> New submission from Christian Heimes : asan has detected a minor memory leak in subprocess_fork_exec: Direct leak of 8 byte(s) in 1 object(s) allocated from: #0 0x7f008bf19667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667) #1 0x7f007a0bee4a in subprocess_fork_exec /home/heimes/dev/python/cpython/Modules/_posixsubprocess.c:774 #2 0xe0305b in cfunction_call Objects/methodobject.c:546 #3 0x4bdd0c in _PyObject_MakeTpCall Objects/call.c:191 #4 0x462fd0 in _PyObject_VectorcallTstate Include/cpython/abstract.h:112 #5 0x462fd0 in _PyObject_VectorcallTstate Include/cpython/abstract.h:99 #6 0x462fd0 in PyObject_Vectorcall Include/cpython/abstract.h:123 #7 0x462fd0 in call_function Python/ceval.c:5110 #8 0x462fd0 in _PyEval_EvalFrameDefault Python/ceval.c:3510 #9 0x8c1c1d in _PyEval_EvalFrame Include/internal/pycore_ceval.h:40 #10 0x8c1c1d in _PyEval_EvalCode Python/ceval.c:4365 ---------- components: FreeBSD messages: 371346 nosy: christian.heimes, gregory.p.smith, koobs priority: normal severity: normal status: open title: subprocess_fork_exec leaks memory type: resource usage versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 06:00:52 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Jun 2020 10:00:52 +0000 Subject: [issue40955] subprocess_fork_exec leaks memory In-Reply-To: <1591955690.55.0.160305225118.issue40955@roundup.psfhosted.org> Message-ID: <1591956052.52.0.458158037645.issue40955@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +20020 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20825 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 06:05:35 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 12 Jun 2020 10:05:35 +0000 Subject: [issue40956] Use Argument Clinic in sqlite3 Message-ID: <1591956335.72.0.553737405887.issue40956@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : Use Argument Clinic in sqlite3. ---------- components: Library (Lib) messages: 371347 nosy: erlendaasland priority: normal severity: normal status: open title: Use Argument Clinic in sqlite3 type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 06:10:15 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 12 Jun 2020 10:10:15 +0000 Subject: [issue40956] Use Argument Clinic in sqlite3 In-Reply-To: <1591956335.72.0.553737405887.issue40956@roundup.psfhosted.org> Message-ID: <1591956615.51.0.47821863541.issue40956@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +20021 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20826 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 06:14:22 2020 From: report at bugs.python.org (E. Paine) Date: Fri, 12 Jun 2020 10:14:22 +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: <1591956862.24.0.306416641797.issue40498@roundup.psfhosted.org> E. Paine added the comment: I agree this is a Windows issue (though I haven't tested on MacOS), but I don't think it is a tkinter issue. Running 'wish' on the following, behaves exactly the same: pack [button .button1 -text {click me}] Thank you for reporting this, but unless this behaviour is shown to be a tkinter issue (rather than Tk), I am of the opinion that this issue should be closed as 3rd party. ---------- nosy: +epaine, gpolo, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 06:20:16 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Jun 2020 10:20:16 +0000 Subject: [issue40957] _Py_fopen_obj leaks reference on audit error Message-ID: <1591957216.36.0.726588708522.issue40957@roundup.psfhosted.org> New submission from Christian Heimes : Direct leak of 50 byte(s) in 1 object(s) allocated from: #0 0x7f429c681667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667) #1 0x487496 in _PyBytes_FromSize Objects/bytesobject.c:81 #2 0x487496 in PyBytes_FromStringAndSize Objects/bytesobject.c:112 #3 0x487496 in PyBytes_FromStringAndSize Objects/bytesobject.c:97 #4 0x75f140 in unicode_encode_utf8 Objects/unicodeobject.c:5425 #5 0x7f2052 in PyUnicode_EncodeFSDefault Objects/unicodeobject.c:3660 #6 0x7f28a7 in PyUnicode_FSConverter Objects/unicodeobject.c:3947 #7 0xab48ab in _Py_fopen_obj Python/fileutils.c:1459 #8 0x7f428a713cc5 in _ssl__SSLContext_load_dh_params /home/heimes/dev/python/cpython/Modules/_ssl.c:4293 #9 0xe03e0c in cfunction_vectorcall_O Objects/methodobject.c:510 #10 0x4c166a in PyVectorcall_Call Objects/call.c:230 ---------- assignee: christian.heimes components: Interpreter Core messages: 371349 nosy: christian.heimes, steve.dower priority: normal severity: normal status: open title: _Py_fopen_obj leaks reference on audit error type: resource usage versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 06:23:38 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Jun 2020 10:23:38 +0000 Subject: [issue40957] _Py_fopen_obj leaks reference on audit error In-Reply-To: <1591957216.36.0.726588708522.issue40957@roundup.psfhosted.org> Message-ID: <1591957418.01.0.416155703569.issue40957@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +20022 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20827 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 06:33:47 2020 From: report at bugs.python.org (Niklas Sombert) Date: Fri, 12 Jun 2020 10:33:47 +0000 Subject: [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 In-Reply-To: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> Message-ID: <1591958027.83.0.602596869003.issue34226@roundup.psfhosted.org> Niklas Sombert added the comment: Since there's the easy workaround of just setting pdict["CONTENT-LENGTH"] I personally don't have a problem with this staying the way it is. But it would be really nice if this were documented somewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 06:42:31 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Jun 2020 10:42:31 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c Message-ID: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> New submission from Christian Heimes : ASAN/UBSAN has detected a heap-buffer-overflow in pegen.c ==1625693==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x606000026b71 at pc 0x00000073574d bp 0x7fff297284f0 sp 0x7fff297284e0 READ of size 1 at 0x606000026b71 thread T0 #0 0x73574c in ascii_decode Objects/unicodeobject.c:4941 #1 0x82bd0f in unicode_decode_utf8 Objects/unicodeobject.c:4999 #2 0xf35859 in byte_offset_to_character_offset Parser/pegen.c:148 #3 0xf35859 in _PyPegen_raise_error_known_location Parser/pegen.c:412 #4 0xf36482 in _PyPegen_raise_error Parser/pegen.c:373 #5 0xf39e1d in tokenizer_error Parser/pegen.c:321 #6 0xf39e1d in _PyPegen_fill_token Parser/pegen.c:638 #7 0xf3ca0f in _PyPegen_expect_token Parser/pegen.c:753 #8 0xf4cc7a in _tmp_15_rule Parser/parser.c:16184 #9 0xf3c799 in _PyPegen_lookahead (/home/heimes/dev/python/cpython/python+0xf3c799) #10 0xfafb4a in compound_stmt_rule Parser/parser.c:1860 #11 0xfb7fc2 in statement_rule Parser/parser.c:1224 #12 0xfb7fc2 in _loop1_11_rule Parser/parser.c:15954 #13 0xfb7fc2 in statements_rule Parser/parser.c:1183 #14 0xfbbce7 in file_rule Parser/parser.c:716 #15 0xfbbce7 in _PyPegen_parse Parser/parser.c:24401 #16 0xf3f868 in _PyPegen_run_parser Parser/pegen.c:1077 #17 0xf4044f in _PyPegen_run_parser_from_file_pointer Parser/pegen.c:1137 #18 0xa27f36 in PyRun_FileExFlags Python/pythonrun.c:1057 #19 0xa2826a in PyRun_SimpleFileExFlags Python/pythonrun.c:400 #20 0x479b1b in pymain_run_file Modules/main.c:369 #21 0x479b1b in pymain_run_python Modules/main.c:553 #22 0x47bd59 in Py_RunMain Modules/main.c:632 #23 0x47bd59 in pymain_main Modules/main.c:662 #24 0x47bd59 in Py_BytesMain Modules/main.c:686 #25 0x7f59aa5cd041 in __libc_start_main (/lib64/libc.so.6+0x27041) #26 0x47643d in _start (/home/heimes/dev/python/cpython/python+0x47643d) 0x606000026b71 is located 0 bytes to the right of 49-byte region [0x606000026b40,0x606000026b71) allocated by thread T0 here: #0 0x7f59ab303667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667) #1 0x749c7d in PyUnicode_New Objects/unicodeobject.c:1437 #2 0x872f15 in _PyUnicode_Init Objects/unicodeobject.c:15535 #3 0x9fe0ab in pycore_init_types Python/pylifecycle.c:599 #4 0x9fe0ab in pycore_interp_init Python/pylifecycle.c:724 #5 0xa07c69 in pyinit_config Python/pylifecycle.c:765 #6 0xa07c69 in pyinit_core Python/pylifecycle.c:926 #7 0xa09b17 in Py_InitializeFromConfig Python/pylifecycle.c:1136 #8 0x4766c2 in pymain_init Modules/main.c:66 #9 0x47bd12 in pymain_main Modules/main.c:653 #10 0x47bd12 in Py_BytesMain Modules/main.c:686 #11 0x7f59aa5cd041 in __libc_start_main (/lib64/libc.so.6+0x27041) SUMMARY: AddressSanitizer: heap-buffer-overflow Objects/unicodeobject.c:4941 in ascii_decode Shadow bytes around the buggy address: 0x0c0c7fffcd10: fa fa fa fa 00 00 00 00 00 00 00 00 fa fa fa fa 0x0c0c7fffcd20: 00 00 00 00 00 00 00 07 fa fa fa fa 00 00 00 00 0x0c0c7fffcd30: 00 00 00 00 fa fa fa fa 00 00 00 00 00 00 00 05 0x0c0c7fffcd40: fa fa fa fa 00 00 00 00 00 00 00 00 fa fa fa fa 0x0c0c7fffcd50: 00 00 00 00 00 00 00 00 fa fa fa fa 00 00 00 00 =>0x0c0c7fffcd60: 00 00 00 01 fa fa fa fa 00 00 00 00 00 00[01]fa 0x0c0c7fffcd70: fa fa fa fa 00 00 00 00 00 00 00 00 fa fa fa fa 0x0c0c7fffcd80: 00 00 00 00 00 00 05 fa fa fa fa fa 00 00 00 00 0x0c0c7fffcd90: 00 00 00 fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c0c7fffcda0: fa fa fa fa fd fd fd fd fd fd fd fd fa fa fa fa 0x0c0c7fffcdb0: fd fd fd fd fd fd fd fd fa fa fa fa 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==1625693==ABORTING ---------- components: Interpreter Core messages: 371351 nosy: christian.heimes, pablogsal priority: high severity: normal status: open title: ASAN/UBSAN: heap-buffer-overflow in pegen.c type: security versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 06:52:17 2020 From: report at bugs.python.org (E. Paine) Date: Fri, 12 Jun 2020 10:52:17 +0000 Subject: [issue40219] ttk LabeledScale: label covered by hidden element In-Reply-To: <1586292175.49.0.452846630354.issue40219@roundup.psfhosted.org> Message-ID: <1591959137.65.0.481947811545.issue40219@roundup.psfhosted.org> E. Paine added the comment: This is indeed a tkinter issue and is caused by the placeholder label. As the main label is added to the frame using the place manager, this placeholder is required to make the frame the correct height. I have attached a small diff which lowers this placeholder, fixing the problem (raising the main label does the same thing). ---------- keywords: +patch nosy: +epaine Added file: https://bugs.python.org/file49227/lbscl.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 07:21:57 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 12 Jun 2020 11:21:57 +0000 Subject: [issue40959] Remove unused and unneeded function declaration from sqlite3 header files Message-ID: <1591960917.09.0.191201794303.issue40959@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : The following function declarations can safely be removed because they're either unused or unneeded. In Modules/_sqlite/cache.h: pysqlite_node_init() // unused; no function definition pysqlite_node_dealloc() // unneeded; file scope pysqlite_cache_init() // unneeded; file scope pysqlite_cache_dealloc() // unneeded; file scope In Modules/_sqlite/connection.h: pysqlite_connection_alloc() // unused; no function definition pysqlite_connection_dealloc() // unneeded; file scope pysqlite_connection_cursor() // unneeded; file scope pysqlite_connection_close() // unneeded; file scope pysqlite_connection_rollback() // unneeded; file scope pysqlite_connection_new() // unused; no function definition pysqlite_connection_init() // unneeded; file scope In Modules/_sqlite/cursor.h: pysqlite_cursor_execute() // unneeded; file scope pysqlite_cursor_executemany() // unneeded; file scope pysqlite_cursor_getiter() // unused; no function definition pysqlite_cursor_iternext() // unneeded; file scope pysqlite_cursor_fetchone() // unneeded; file scope pysqlite_cursor_fetchmany() // unneeded; file scope pysqlite_cursor_fetchall() // unneeded; file scope pysqlite_noop() // unneeded; file scope pysqlite_cursor_close() // unneeded; file scope In Modules/_sqlite/prepare_protocol.h: pysqlite_prepare_protocol_init() // unneeded; file scope pysqlite_prepare_protocol_dealloc() // unneeded; file scope In Modules/_sqlite/statement.h: pysqlite_statement_dealloc() // unneeded; file scope ---------- components: Library (Lib) messages: 371353 nosy: erlendaasland priority: normal severity: normal status: open title: Remove unused and unneeded function declaration from sqlite3 header files type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 07:24:44 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 12 Jun 2020 11:24:44 +0000 Subject: [issue40959] Remove unused and unneeded function declaration from sqlite3 header files In-Reply-To: <1591960917.09.0.191201794303.issue40959@roundup.psfhosted.org> Message-ID: <1591961084.65.0.565065612288.issue40959@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +20023 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20828 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 07:36:43 2020 From: report at bugs.python.org (Marcelo) Date: Fri, 12 Jun 2020 11:36:43 +0000 Subject: [issue40960] Fix the example in hashlib documentarion Message-ID: <1591961803.74.0.363372588689.issue40960@roundup.psfhosted.org> New submission from Marcelo : The documentation found in https://docs.python.org/2/library/hashlib.html give us the following example: ``` More condensed: >>> hashlib.sha224("Nobody inspects the spammish repetition").hexdigest() 'a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2' ``` Although, we get the error if not encode the string: ``` Traceback (most recent call last): File "", line 1, in TypeError: Unicode-objects must be encoded before hashing ``` So the example should be (string to bytes): `hashlib.sha224(b"Nobody inspects the spammish repetition").hexdigest()` ---------- assignee: docs at python components: Documentation messages: 371354 nosy: docs at python, marcelogrsp at gmail.com priority: normal severity: normal status: open title: Fix the example in hashlib documentarion type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 07:48:23 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 12 Jun 2020 11:48:23 +0000 Subject: [issue40960] Fix the example in hashlib documentarion In-Reply-To: <1591961803.74.0.363372588689.issue40960@roundup.psfhosted.org> Message-ID: <1591962503.89.0.243239428741.issue40960@roundup.psfhosted.org> Cheryl Sabella added the comment: Hi Marcelo, Thanks for the report. The version of the documentation that you linked to is for Python 2. At the top of that page, there is a redirect to the Python 3 documentation at https://docs.python.org/3/library/hashlib.html. You'll see that the Python 3 documentation does use bytes for that example. ---------- nosy: +cheryl.sabella resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 08:00:51 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 12 Jun 2020 12:00:51 +0000 Subject: [issue33881] dataclasses should use NFKC to find duplicate members In-Reply-To: <1529172128.32.0.56676864532.issue33881@psf.upfronthosting.co.za> Message-ID: <1591963251.97.0.111121601045.issue33881@roundup.psfhosted.org> Cheryl Sabella added the comment: The pull request that was opened for this has been closed due to inactivity, so this issue is available for anyone to work on. ---------- nosy: +cheryl.sabella versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 08:01:44 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Jun 2020 12:01:44 +0000 Subject: [issue38905] venv python reports wrong sys.executable in a subprocess on Windows In-Reply-To: <1574583460.3.0.94905817038.issue38905@roundup.psfhosted.org> Message-ID: <1591963304.53.0.599494423279.issue38905@roundup.psfhosted.org> Steve Dower added the comment: Thanks for confirming that reality aligns with the documentation. > when doing the same and passing `shell=True` to the POpen() call, there is no such initial folder in the lookup Correct, because a fully qualified path to cmd.exe is used, and cmd.exe's application folder is not Python's. Ultimately, the above behaviour could have occurred anyway, so all that has really happened is that it is now more obvious. This is what always happens when you include support for other platforms - you find out which of your previous assumptions were incorrect (same principle applies to all of life if you think about it). If someone wants to update subprocess to manually search PATH when just provided with a filename, I'm okay with that. It would be a new enhancement though. For earlier versions, updating the docs to clarify that subprocess does not do a PATH search but relies on operating system behaviour for relative paths is probably the most helpful way to raise awareness. ---------- components: -Library (Lib) versions: +Python 3.10 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 08:31:01 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 12:31:01 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591965061.84.0.158773786672.issue40958@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 08:34:49 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 12:34:49 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591965289.61.0.879083104302.issue40958@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Lysandros, could you take a look? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 08:38:15 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 12:38:15 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591965495.51.0.283444338645.issue40958@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Christian, what test are you running to get the error? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 08:51:59 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 12 Jun 2020 12:51:59 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591966319.92.0.0938755343481.issue40958@roundup.psfhosted.org> Lysandros Nikolaou added the comment: > Lysandros, could you take a look? Yup, I'm on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 08:56:09 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 12:56:09 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591966569.15.0.701248124191.issue40958@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Note that although we could just exit if the length of the line is smaller than the column offset before calling https://github.com/python/cpython/blob/master/Parser/pegen.c#L148 (I assume that is the problem) is more important to understand how are we reaching that situation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 09:04:14 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 12 Jun 2020 13:04:14 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591967054.05.0.00694232036147.issue40958@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Agreed. For that I'd probably need the input Christian is getting the error with. I'm currently trying things out, but haven't gotten the error yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 09:05:00 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 13:05:00 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591967100.07.0.190855522666.issue40958@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Seems that just this (at top level): >> yield from is able to produce a situation where the column offset is bigger than the line length: Col offset is 11 and line is 10 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 09:08:22 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 13:08:22 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591967302.0.0.765761290176.issue40958@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: You can get an assert failure without ASAN with this patch: diff --git a/Parser/pegen.c b/Parser/pegen.c index e29910bf86..65fa44921f 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -145,6 +145,9 @@ byte_offset_to_character_offset(PyObject *line, int col_offset) if (!str) { return 0; } + assert(col_offset <= PyUnicode_GET_LENGTH(line) + 1); PyObject *text = PyUnicode_DecodeUTF8(str, col_offset, "replace"); if (!text) { return 0; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 09:08:36 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 13:08:36 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591967316.18.0.502700406381.issue40958@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg371364 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 09:08:51 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 13:08:51 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591967331.12.0.426265290394.issue40958@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Correcting my previous post (deleted): You can get an assert failure without ASAN with this patch: diff --git a/Parser/pegen.c b/Parser/pegen.c index e29910bf86..65fa44921f 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -145,6 +145,9 @@ byte_offset_to_character_offset(PyObject *line, int col_offset) if (!str) { return 0; } + assert(col_offset <= PyUnicode_GET_LENGTH(line)); PyObject *text = PyUnicode_DecodeUTF8(str, col_offset, "replace"); if (!text) { return 0; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 09:12:57 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 13:12:57 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591967577.77.0.113194126878.issue40958@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I theorize that this happens when the error points to the end of the line. I assume that the difference between col_offset and PyUnicode_GET_LENGTH(line) may be still bigger than 1 if the line contains some Unicode stuff like with: >> "??????" + but I think that would be the same situation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 09:27:16 2020 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 12 Jun 2020 13:27:16 +0000 Subject: [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 In-Reply-To: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> Message-ID: <1591968436.07.0.712067666308.issue34226@roundup.psfhosted.org> Senthil Kumaran added the comment: I will spend time on this on 12-June or 13-June, 2020. At the very least, if no changes are required, I will document this for 3.7 and higher versions. ---------- assignee: docs at python -> orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 09:53:26 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Jun 2020 13:53:26 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591970006.29.0.0453051324742.issue40958@roundup.psfhosted.org> Christian Heimes added the comment: I'm using an ASAN UBSAN build of Python: $ make clean $ ./configure --with-address-sanitizer --with-undefined-behavior-sanitizer $ cat > asan-suppression.txt << EOF # Python/initconfig.c leak:_PyWideStringList_Copy EOF $ LSAN_OPTIONS="suppressions=asan-suppression.txt,print_suppressions=0" make $ LSAN_OPTIONS="suppressions=asan-suppression.txt,print_suppressions=0" ./python -m test test_eof ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 10:03:39 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 12 Jun 2020 14:03:39 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591970619.3.0.17292687467.issue40958@roundup.psfhosted.org> Lysandros Nikolaou added the comment: I cannot reproduce this on my Ubuntu 20.04: ? cpython git:(master) ? LSAN_OPTIONS="suppressions=asan-suppression.txt,print_suppressions=0" ./python -m test -v test_eof Modules/posixmodule.c:14682:9: runtime error: left shift of 34 by 26 places cannot be represented in type 'int' == CPython 3.10.0a0 (heads/master:e2fb8a2c42, Jun 12 2020, 16:59:27) [GCC 9.3.0] == Linux-5.4.0-33-generic-x86_64-with-glibc2.31 little-endian == cwd: /home/lysnikolaou/repos/cpython/build/test_python_71258 == CPU count: 4 == encodings: locale=UTF-8, FS=utf-8 0:00:00 load avg: 2.11 Run tests sequentially 0:00:00 load avg: 2.11 [1/1] test_eof test_EOFC (test.test_eof.EOFTestCase) ... ok test_EOFS (test.test_eof.EOFTestCase) ... ok test_eof_with_line_continuation (test.test_eof.EOFTestCase) ... ok test_line_continuation_EOF (test.test_eof.EOFTestCase) A continuation at the end of input must be an error; bpo2180. ... ok test_line_continuation_EOF_from_file_bpo2180 (test.test_eof.EOFTestCase) Ensure tok_nextc() does not add too many ending newlines. ... Modules/posixmodule.c:14682:9: runtime error: left shift of 34 by 26 places cannot be represented in type 'int' ok ---------------------------------------------------------------------- Ran 5 tests in 0.413s OK == Tests result: SUCCESS == 1 test OK. Total duration: 654 ms Tests result: SUCCESS ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 10:05:52 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 12 Jun 2020 14:05:52 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591970752.87.0.0356422472199.issue40958@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Running Pablo's examples in the REPL does not reproduce the errors either: ? cpython git:(master) ? LSAN_OPTIONS="suppressions=asan-suppression.txt,print_suppressions=0" ./python Modules/posixmodule.c:14682:9: runtime error: left shift of 34 by 26 places cannot be represented in type 'int' Python 3.10.0a0 (heads/master:e2fb8a2c42, Jun 12 2020, 16:59:27) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> "??????" + File "", line 1 "??????" + ^ SyntaxError: invalid syntax >>> yield from File "", line 1 yield from ^ SyntaxError: invalid syntax >>> ^D ? cpython git:(master) ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 10:07:04 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Jun 2020 14:07:04 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591970824.85.0.828882700964.issue40958@roundup.psfhosted.org> Christian Heimes added the comment: Did you clean and compile with asan/ubsan? Older compilers may not detect the issue. My system has GCC 10: libubsan-10.1.1-1.fc32.x86_64 gcc-10.1.1-1.fc32.x86_64 libasan-10.1.1-1.fc32.x86_64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 10:12:32 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 14:12:32 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591971152.99.0.325041274296.issue40958@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Lysandros, are you using a debug build? The assert() won't trigger if you don't have run configure with --with-pydebug. I would recommend to: make distclean && ./configure --with-pydebug && make ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 10:15:51 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 12 Jun 2020 14:15:51 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591971351.37.0.657147630284.issue40958@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Let me try that. I'm currently using gcc 9.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 10:17:10 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 12 Jun 2020 14:17:10 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591971430.73.0.600775524254.issue40958@roundup.psfhosted.org> Lysandros Nikolaou added the comment: I now configured Python with ./configure --with-pydebug --with-address-sanitizer --with-undefined-behavior-sanitizer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 10:18:14 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 12 Jun 2020 14:18:14 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591971494.06.0.792004330601.issue40958@roundup.psfhosted.org> Lysandros Nikolaou added the comment: > Lysandros, are you using a debug build? The assert() won't trigger if you don't have run configure with --with-pydebug. BTW I'm not talking about the assert not triggering. I'm only saying that ASAN/UBSAN do not report an error when running `yield from` in the REPL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 10:32:04 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 14:32:04 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591972324.83.0.9654884341.issue40958@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Oh, I was confused by this: > Running Pablo's examples in the REPL does not reproduce the errors either: I thought you meant that you could not reproduce the crash also with my patch. For the ASAN, you may need the newer gcc and other stuff. I was not able to reproduce this on my work macOS but will try on my Arch Linux today at night that has the same versions as Christian ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 10:36:10 2020 From: report at bugs.python.org (Daniel Martin) Date: Fri, 12 Jun 2020 14:36:10 +0000 Subject: [issue40961] os.putenv should be documented as not affecting os.getenv's return value Message-ID: <1591972570.31.0.396945912462.issue40961@roundup.psfhosted.org> New submission from Daniel Martin : I find this behavior extremely surprising: $ ABC=def python Python 3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.getenv('ABC') 'def' >>> os.putenv('ABC', 'xyz') >>> os.getenv('ABC') 'def' Although the documentation for the os module does say in the documentation for putenv that > "When putenv() is supported, assignments to items in os.environ > are automatically translated into corresponding calls to putenv(); > however, calls to putenv() don?t update os.environ, so it is > actually preferable to assign to items of os.environ" , there is absolutely nothing in the documentation to give the impression that os.putenv WILL NOT affect the result of os.getenv in the same process, as it is completely undocumented that os.getenv is a wrapper around os.environ.get(). The documentation for os.environ is careful to note that the copy of the environment stored in os.environ is read only once at startup, and has a note specifically about putenv; however, given this care the lack of any similar language in the os.getenv documentation gives the impression that os.getenv behaves differently. Ideally, the documentation of both os.getenv and os.putenv would be modified. The getenv documentation should note that it pulls from a mapping captured at first import and does not, as the name may imply, result in a call to the C function getenv. The putenv documentation should note that calls to putenv don?t update os.environ, and therefore do not affect the result of os.getenv. Possibly, given the thread safety issues, direct calls to os.getenv and os.putenv should be deprecated in favor of os.environ use. ---------- assignee: docs at python components: Documentation messages: 371377 nosy: Daniel Martin, docs at python priority: normal severity: normal status: open title: os.putenv should be documented as not affecting os.getenv's return value 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 Fri Jun 12 10:36:48 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 12 Jun 2020 14:36:48 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591972608.81.0.00289346797412.issue40958@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Is the only way to get gcc-10.1 to build from source? Because currently my internet connection is too slow to get all of gcc downloaded and `apt install gcc-10` installs 10.0.1, which I'm getting totally unrelated erros with. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 10:41:32 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 14:41:32 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591972892.85.0.909926934632.issue40958@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Is the only way to get gcc-10.1 to build from source? Because currently my internet connection is too slow to get all of gcc downloaded and `apt install gcc-10` installs 10.0.1, which I'm getting totally unrelated erros with. If your package manager does not have one package or you cannot find a PPA, you would need to do it from source or maybe use Docker with s distribution that has GCC 10 like Arch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 10:46:51 2020 From: report at bugs.python.org (Larry Hastings) Date: Fri, 12 Jun 2020 14:46:51 +0000 Subject: [issue39035] Travis CI fail on backports: pyvenv not installed In-Reply-To: <1576232931.72.0.607976145841.issue39035@roundup.psfhosted.org> Message-ID: <1591973211.83.0.456587179272.issue39035@roundup.psfhosted.org> Larry Hastings added the comment: New changeset f88b578949a034f511dd1b4c1c161351b3ee0db8 by Inada Naoki in branch '3.5': bpo-39035: travis: Update image to xenial (#17623) https://github.com/python/cpython/commit/f88b578949a034f511dd1b4c1c161351b3ee0db8 ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 11:01:48 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 12 Jun 2020 15:01:48 +0000 Subject: [issue40955] subprocess_fork_exec leaks memory when extra_groups are supplied In-Reply-To: <1591955690.55.0.160305225118.issue40955@roundup.psfhosted.org> Message-ID: <1591974108.69.0.645094525673.issue40955@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- title: subprocess_fork_exec leaks memory -> subprocess_fork_exec leaks memory when extra_groups are supplied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 11:04:54 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 12 Jun 2020 15:04:54 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591974294.51.0.0210412979279.issue40958@roundup.psfhosted.org> Lysandros Nikolaou added the comment: > Note that although we could just exit if the length of the line is smaller than the column offset before calling https://github.com/python/cpython/blob/master/Parser/pegen.c#L148 (I assume that is the problem) is more important to understand how are we reaching that situation. That's because of https://github.com/python/cpython/blob/e2fb8a2c42ee60c72a40d93da69e9efc4e359023/Parser/pegen.c#L404, which decreases the size of the string to be decoded by 1 if the last character is a newline (or, equivalently, if the error offset points past the end of the line). Thus, PyUnicode_DecodeUTF8 returns an object that is one character shorter than the col_offset and that's how we get to the situation you mentioned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 11:11:28 2020 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Jun 2020 15:11:28 +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: <1591974688.5.0.239417608558.issue40670@roundup.psfhosted.org> Change by Roundup Robot : ---------- nosy: +python-dev nosy_count: 6.0 -> 7.0 pull_requests: +20024 pull_request: https://github.com/python/cpython/pull/20830 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 11:15:38 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 15:15:38 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591974938.85.0.731137337549.issue40958@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > returns an object that is one character shorter than the col_offset and that's how we get to the situation you mentioned. What happens with: >>> "??????" + ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 11:22:19 2020 From: report at bugs.python.org (Ben Li-Sauerwine) Date: Fri, 12 Jun 2020 15:22:19 +0000 Subject: [issue40945] TKinter.Tk.geometry(Tk.winfo_geometry()) should be idempotent In-Reply-To: <1591819450.72.0.638106419632.issue40945@roundup.psfhosted.org> Message-ID: <1591975339.42.0.503190521222.issue40945@roundup.psfhosted.org> Ben Li-Sauerwine added the comment: Thanks for clarifying. Using Tk.geometry() instead of Tk.winfo_geometry() does indeed resolve the issue on Linux. Weird that using Tk.winfo_geometry() is idempotent under Windows, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 11:29:33 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 12 Jun 2020 15:29:33 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591975773.68.0.7290707029.issue40958@roundup.psfhosted.org> Lysandros Nikolaou added the comment: > What happens with: >>> "??????" + Exact same thing. The offset is 16 at the start and gets decreased to 15 in the line I linked to in my previous post. And then col_offset gets converted to col_number which is 9, which seems correct. Although it is correct, it feels correct by accident, since the if-branch on https://github.com/python/cpython/blob/e2fb8a2c42ee60c72a40d93da69e9efc4e359023/Parser/pegen.c#L154 only evaluates to false due to the decrease of size and I don't know if that was intended. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 11:30:32 2020 From: report at bugs.python.org (Edison Abahurire) Date: Fri, 12 Jun 2020 15:30:32 +0000 Subject: [issue40935] Links to Python3 docs for some libs return 404 In-Reply-To: <1591756890.13.0.690147132201.issue40935@roundup.psfhosted.org> Message-ID: <1591975832.17.0.757922094684.issue40935@roundup.psfhosted.org> Edison Abahurire added the comment: @Ned, I'm going to search through the docs for any links that may need redirecting, and provide their python3 alternatives. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 11:33:26 2020 From: report at bugs.python.org (Larry Hastings) Date: Fri, 12 Jun 2020 15:33:26 +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: <1591976006.9.0.807832345226.issue39073@roundup.psfhosted.org> Larry Hastings added the comment: New changeset f91a0b6df14d6c5133fe3d5889fad7d84fc0c046 by Victor Stinner in branch '3.5': bpo-39073: validate Address parts to disallow CRLF (#19007) (#20450) https://github.com/python/cpython/commit/f91a0b6df14d6c5133fe3d5889fad7d84fc0c046 ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 11:42:17 2020 From: report at bugs.python.org (Eugene Huang) Date: Fri, 12 Jun 2020 15:42:17 +0000 Subject: [issue40962] Add documentation for asyncio._set_running_loop() Message-ID: <1591976537.41.0.345001271187.issue40962@roundup.psfhosted.org> New submission from Eugene Huang : In the pull request https://github.com/python/asyncio/pull/452#issue-92245081 the linked comment says that `asyncio._set_running_loop()` is part of the public asyncio API and will be documented, but I couldn't find any references to this function in https://docs.python.org/3/library/asyncio-eventloop.html or anywhere else (tried quick searching for it) in the docs. ---------- assignee: docs at python components: Documentation messages: 371387 nosy: docs at python, eugenhu priority: normal severity: normal status: open title: Add documentation for asyncio._set_running_loop() versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 11:47:44 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 15:47:44 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591976864.61.0.16565745397.issue40958@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Well, I think the solution here is to clip the col_offset to the line length and maybe adding assert that the difference is not bigger than 1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 12:01:55 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 12 Jun 2020 16:01:55 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591977715.95.0.533686553983.issue40958@roundup.psfhosted.org> Lysandros Nikolaou added the comment: I'm guessing that some parts of the conversion code were only there to circumvent issues in displaying the error messages that weren't pegen's fault. These were fixed by Guido in GH-20072, so I think we can delete some of them. For example, this patch works just fine for me. diff --git a/Parser/pegen.c b/Parser/pegen.c index e29910bf86..2c348178fb 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -150,10 +150,6 @@ byte_offset_to_character_offset(PyObject *line, int col_offset) return 0; } Py_ssize_t size = PyUnicode_GET_LENGTH(text); - str = PyUnicode_AsUTF8(text); - if (str != NULL && (int)strlen(str) == col_offset) { - size = strlen(str); - } Py_DECREF(text); return size; } @@ -400,9 +396,6 @@ _PyPegen_raise_error_known_location(Parser *p, PyObject *errtype, if (!error_line) { Py_ssize_t size = p->tok->inp - p->tok->buf; - if (size && p->tok->buf[size-1] == '\n') { - size--; - } error_line = PyUnicode_DecodeUTF8(p->tok->buf, size, "replace"); if (!error_line) { goto error; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 12:05:17 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Jun 2020 16:05:17 +0000 Subject: [issue40219] ttk LabeledScale: label covered by hidden element In-Reply-To: <1586292175.49.0.452846630354.issue40219@roundup.psfhosted.org> Message-ID: <1591977917.58.0.675760082509.issue40219@roundup.psfhosted.org> Terry J. Reedy added the comment: Right. LabelScale is a tkinter.ttk extension, like OptionMenu. If I do the PR, I would call the placeholder 'dummy' since it is permanent (not removed after initialization). I'd like to see what happens without it and expand the comment to a line like # Dummy needed to ... . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 12:14:55 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 16:14:55 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591978495.54.0.693834312294.issue40958@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Can you run the test suite before/after of pyflakes to make sure we don't introduce any regression to double check? If everything looks fine, open a PR :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 12:18:51 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Jun 2020 16:18:51 +0000 Subject: [issue40955] subprocess_fork_exec leaks memory when extra_groups are supplied In-Reply-To: <1591955690.55.0.160305225118.issue40955@roundup.psfhosted.org> Message-ID: <1591978731.3.0.46890422196.issue40955@roundup.psfhosted.org> miss-islington added the comment: New changeset 0d3350daa8123a3e16d4a534b6e873eb12c10d7c by Christian Heimes in branch 'master': bpo-40955: Fix memory leak in subprocess module (GH-20825) https://github.com/python/cpython/commit/0d3350daa8123a3e16d4a534b6e873eb12c10d7c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 12:18:59 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Jun 2020 16:18:59 +0000 Subject: [issue40955] subprocess_fork_exec leaks memory when extra_groups are supplied In-Reply-To: <1591955690.55.0.160305225118.issue40955@roundup.psfhosted.org> Message-ID: <1591978739.7.0.808222840167.issue40955@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20025 pull_request: https://github.com/python/cpython/pull/20831 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 12:19:09 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Jun 2020 16:19:09 +0000 Subject: [issue40955] subprocess_fork_exec leaks memory when extra_groups are supplied In-Reply-To: <1591955690.55.0.160305225118.issue40955@roundup.psfhosted.org> Message-ID: <1591978749.4.0.869699126851.issue40955@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20026 pull_request: https://github.com/python/cpython/pull/20832 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 12:19:18 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Jun 2020 16:19:18 +0000 Subject: [issue40955] subprocess_fork_exec leaks memory when extra_groups are supplied In-Reply-To: <1591955690.55.0.160305225118.issue40955@roundup.psfhosted.org> Message-ID: <1591978758.55.0.337651355555.issue40955@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20027 pull_request: https://github.com/python/cpython/pull/20833 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 12:28:22 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 12 Jun 2020 16:28:22 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591979302.43.0.8998487185.issue40958@roundup.psfhosted.org> Lysandros Nikolaou added the comment: > Can you run the test suite before/after of pyflakes to make sure we don't introduce any regression to double check? If everything looks fine, open a PR :) The exact same errors before and after! I'll wait on the PR though till someone has checked if this indeed solves the heap-buffer-overflow. I'm not at all confident that is does and I can't test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 12:35:37 2020 From: report at bugs.python.org (E. Paine) Date: Fri, 12 Jun 2020 16:35:37 +0000 Subject: [issue39827] setting a locale that uses comma as decimal separator breaks tkinter.DoubleVar In-Reply-To: <1583161890.16.0.234726594776.issue39827@roundup.psfhosted.org> Message-ID: <1591979737.25.0.747722187196.issue39827@roundup.psfhosted.org> E. Paine added the comment: Is this a problem exclusive to tkinter? I ran the following code, and it appears to be an issue with the builtin 'float' method: >>> import locale >>> locale.setlocale(locale.LC_NUMERIC, 'de_DE.utf8') 'de_DE.utf8' >>> float("1,2") ValueError: could not convert string to float: '1,2' I have somehow managed to corrupt my locales so I would appreciate if you could try on your machine as well (is it just me?!). ---------- nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 12:41:10 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 16:41:10 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591980070.83.0.249005538099.issue40958@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Ok, I was able to reproduce: ? gcc --version gcc (GCC) 10.1.0 Copyright (C) 2020 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. make distclean ./configure --with-address-sanitizer --with-undefined-behavior-sanitizer LSAN_OPTIONS="suppressions=asan-suppression.txt,print_suppressions=0" make -j ? LSAN_OPTIONS="suppressions=asan-suppression.txt,print_suppressions=0" ./python -m test test_eof 0:00:00 load avg: 1.82 Run tests sequentially 0:00:00 load avg: 1.82 [1/1] test_eof test test_eof failed -- Traceback (most recent call last): File "/home/pablogsal/github/python/master/Lib/test/test_eof.py", line 54, in test_line_continuation_EOF_from_file_bpo2180 self.assertIn(b'unexpected EOF while parsing', err) AssertionError: b'unexpected EOF while parsing' not found in b'Parser/tokenizer.c:978:50: runtime error: pointer index expression with base 0x625000016900 overflowed to 0xbebebebebebee6be\n===================== ============================================\n==27549==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x606000027c51 at pc 0x5612210ca7d4 bp 0x7fffe6e9ff70 sp 0x7fffe6e9ff60\nREAD of size 1 at 0x60600 0027c51 thread T0\n #0 0x5612210ca7d3 in ascii_decode Objects/unicodeobject.c:4941\n #1 0x5612211c9f4a in unicode_decode_utf8 Objects/unicodeobject.c:4999\n #2 0x5612219201bd in byte_offset_to_characte r_offset Parser/pegen.c:148\n #3 0x5612219201bd in _PyPegen_raise_error_known_location Parser/pegen.c:412\n #4 0x561221920e4d in _PyPegen_raise_error Parser/pegen.c:373\n #5 0x561221924981 in tokenizer _error Parser/pegen.c:321\n #6 0x561221924981 in _PyPegen_fill_token Parser/pegen.c:638\n #7 0x56122192777f in _PyPegen_expect_token Parser/pegen.c:753\n #8 0x56122193817a in _tmp_15_rule Parser/parser .c:16184\n #9 0x5612219274f9 in _PyPegen_lookahead (/home/pablogsal/github/python/master/python+0x1c344f9)\n #10 0x56122199de2c in compound_stmt_rule Parser/parser.c:1860\n #11 0x5612219a65c2 in statem ent_rule Parser/parser.c:1224\n #12 0x5612219a65c2 in _loop1_11_rule Parser/parser.c:15954\n #13 0x5612219a65c2 in statements_rule Parser/parser.c:1183\n #14 0x5612219aa4b7 in file_rule Parser/parser.c :716\n #15 0x5612219aa4b7 in _PyPegen_parse Parser/parser.c:24401\n #16 0x56122192a768 in _PyPegen_run_parser Parser/pegen.c:1077\n #17 0x56122192b3ef in _PyPegen_run_parser_from_file_pointer Parser/pe gen.c:1137\n #18 0x5612213da3c6 in PyRun_FileExFlags Python/pythonrun.c:1057\n #19 0x5612213da72c in PyRun_SimpleFileExFlags Python/pythonrun.c:400\n #20 0x561220df0dbb in pymain_run_file Modules/main. c:369\n #21 0x561220df0dbb in pymain_run_python Modules/main.c:553\n #22 0x561220df3154 in Py_RunMain Modules/main.c:632\n #23 0x561220df3154 in pymain_main Modules/main.c:662\n #24 0x561220df3154 i n Py_BytesMain Modules/main.c:686\n #25 0x7f981bf9a001 in __libc_start_main (/usr/lib/libc.so.6+0x27001)\n #26 0x561220ded48d in _start (/home/pablogsal/github/python/master/python+0x10fa48d)\n\n0x6060000 27c51 is located 0 bytes to the right of 49-byte region [0x606000027c20,0x606000027c51)\nallocated by thread T0 here:\n #0 0x7f981ccce459 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_mal loc_linux.cpp:145\n #1 0x5612210dfa1d in PyUnicode_New Objects/unicodeobject.c:1437\n #2 0x56122121324b in _PyUnicode_Init Objects/unicodeobject.c:15535\n #3 0x5612213ae5c3 in pycore_init_types Python/ pylifecycle.c:599\n #4 0x5612213ae5c3 in pycore_interp_init Python/pylifecycle.c:724\n #5 0x5612213b8b4b in pyinit_config Python/pylifecycle.c:765\n #6 0x5612213b8b4b in pyinit_core Python/pylifecycle. c:926\n #7 0x5612213bab6c in Py_InitializeFromConfig Python/pylifecycle.c:1136\n #8 0x561220ded752 in pymain_init Modules/main.c:66\n #9 0x561220df310a in pymain_main Modules/main.c:653\n #10 0x5612 20df310a in Py_BytesMain Modules/main.c:686\n #11 0x7f981bf9a001 in __libc_start_main (/usr/lib/libc.so.6+0x27001)\n\nSUMMARY: AddressSanitizer: heap-buffer-overflow Objects/unicodeobject.c:4941 in ascii_dec ode\nShadow bytes around the buggy address:\n 0x0c0c7fffcf30: 00 00 00 00 00 00 00 00 fa fa fa fa 00 00 00 00\n 0x0c0c7fffcf40: 00 00 00 07 fa fa fa fa 00 00 00 00 00 00 00 00\n 0x0c0c7fffcf50: fa fa fa fa 0 0 00 00 00 00 00 00 05 fa fa fa fa\n 0x0c0c7fffcf60: 00 00 00 00 00 00 00 00 fa fa fa fa 00 00 00 00\n 0x0c0c7fffcf70: 00 00 00 00 fa fa fa fa 00 00 00 00 00 00 00 01\n=>0x0c0c7fffcf80: fa fa fa fa 00 00 00 0 0 00 00[01]fa fa fa fa fa\n 0x0c0c7fffcf90: 00 00 00 00 00 00 00 00 fa fa fa fa 00 00 00 00\n 0x0c0c7fffcfa0: 00 00 05 fa fa fa fa fa 00 00 00 00 00 00 00 fa\n 0x0c0c7fffcfb0: fa fa fa fa 00 00 00 00 00 00 0 0 00 fa fa fa fa\n 0x0c0c7fffcfc0: fd fd fd fd fd fd fd fd fa fa fa fa fd fd fd fd\n 0x0c0c7fffcfd0: fd fd fd fd fa fa fa fa 00 00 00 00 00 00 00 fa\nShadow byte legend (one shadow byte represents 8 applicati on bytes):\n Addressable: 00\n Partially addressable: 01 02 03 04 05 06 07 \n Heap left redzone: fa\n Freed heap region: fd\n Stack left redzone: f1\n Stack mid redzone: f 2\n Stack right redzone: f3\n Stack after return: f5\n Stack use after scope: f8\n Global redzone: f9\n Global init order: f6\n Poisoned by user: f7\n Container overflow: fc\n Array cookie: ac\n Intra object redzone: bb\n ASan internal: fe\n Left alloca redzone: ca\n Right alloca redzone: cb\n Shadow gap: cc\n==27549==ABORT ING\n' test_eof failed == Tests result: FAILURE == 1 test failed: test_eof Total duration: 359 ms Tests result: FAILURE ---------- With this patch diff --git a/Parser/pegen.c b/Parser/pegen.c index e29910bf86..a9f24ca5fa 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -145,15 +145,15 @@ byte_offset_to_character_offset(PyObject *line, int col_offset) if (!str) { return 0; } + Py_ssize_t linesize = PyUnicode_GET_LENGTH(line); + if (col_offset > linesize) { + col_offset = (int)linesize; + } PyObject *text = PyUnicode_DecodeUTF8(str, col_offset, "replace"); if (!text) { return 0; } Py_ssize_t size = PyUnicode_GET_LENGTH(text); - str = PyUnicode_AsUTF8(text); - if (str != NULL && (int)strlen(str) == col_offset) { - size = strlen(str); - } Py_DECREF(text); return size; } @@ -400,9 +400,6 @@ _PyPegen_raise_error_known_location(Parser *p, PyObject *errtype, if (!error_line) { Py_ssize_t size = p->tok->inp - p->tok->buf; - if (size && p->tok->buf[size-1] == '\n') { - size--; - } error_line = PyUnicode_DecodeUTF8(p->tok->buf, size, "replace"); if (!error_line) { goto error; ? LSAN_OPTIONS="suppressions=asan-suppression.txt,print_suppressions=0" ./python -m test test_eof 0:00:00 load avg: 1.39 Run tests sequentially 0:00:00 load avg: 1.39 [1/1] test_eof == Tests result: SUCCESS == 1 test OK. Total duration: 500 ms Tests result: SUCCESS ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 13:02:49 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Jun 2020 17:02:49 +0000 Subject: [issue40955] subprocess_fork_exec leaks memory when extra_groups are supplied In-Reply-To: <1591955690.55.0.160305225118.issue40955@roundup.psfhosted.org> Message-ID: <1591981369.58.0.865533155246.issue40955@roundup.psfhosted.org> miss-islington added the comment: New changeset ee3f7fee94915ab4f34c92d6c89b211de476660d by Miss Islington (bot) in branch '3.9': bpo-40955: Fix memory leak in subprocess module (GH-20825) https://github.com/python/cpython/commit/ee3f7fee94915ab4f34c92d6c89b211de476660d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 13:09:12 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Jun 2020 17:09:12 +0000 Subject: [issue40955] subprocess_fork_exec leaks memory when extra_groups are supplied In-Reply-To: <1591955690.55.0.160305225118.issue40955@roundup.psfhosted.org> Message-ID: <1591981752.8.0.301864699822.issue40955@roundup.psfhosted.org> Christian Heimes added the comment: 3.8 and 3.7 don't have the code path and are not affected. ---------- components: +Extension Modules -FreeBSD 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 Jun 12 13:19:29 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jun 2020 17:19:29 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591982369.01.0.0591798784369.issue40890@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 3ee0e48b0376a710c08eec6f30e4181563b192a2 by Dennis Sweeney in branch 'master': bpo-40890: Add `mapping` property to dict views (GH-20749) https://github.com/python/cpython/commit/3ee0e48b0376a710c08eec6f30e4181563b192a2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 13:20:04 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jun 2020 17:20:04 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1591982404.16.0.117682252283.issue40890@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 Jun 12 13:28:31 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 12 Jun 2020 17:28:31 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591982911.13.0.201659722975.issue40958@roundup.psfhosted.org> Lysandros Nikolaou added the comment: > + Py_ssize_t linesize = PyUnicode_GET_LENGTH(line); This line is wrong though, since PyUnicode_GET_LENGTH returns the length in code points and PyUnicode_DecodeUTF8 expects the number of bytes. For non-ascii input this would push the caret further to the left. For example: $ ./python.exe Python 3.10.0a0 (heads/master-dirty:e2fb8a2c42, Jun 12 2020, 20:22:52) [Clang 11.0.0 (clang-1100.0.33.8)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> "??????" + File "", line 1 "??????" + ^ SyntaxError: invalid syntax ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 13:30:20 2020 From: report at bugs.python.org (ghost43) Date: Fri, 12 Jun 2020 17:30:20 +0000 Subject: [issue40963] distutils make_zipfile uses random order Message-ID: <1591983020.96.0.753934283459.issue40963@roundup.psfhosted.org> New submission from ghost43 : I am trying to generate .zip sdists for a project in a reproducible manner, using setuptoools. The generated zips differ in the order of packed files. The root cause of the non-determinicity is using os.walk() in make_zipfile here: https://github.com/python/cpython/blob/0d3350daa8123a3e16d4a534b6e873eb12c10d7c/Lib/distutils/archive_util.py#L174 For a potential fix, see https://github.com/pypa/setuptools/commit/29688821b381268a0d59c0d26317d88ad518f966 I guess https://bugs.python.org/issue30693 is sort of related. The change made there is necessary, and was sufficient to make the tars reproducible but not the zips. (sidenote: Is it acceptable to sign the PSF CLA with a pseudonym?) ---------- components: Distutils messages: 371400 nosy: dstufft, eric.araujo, ghost43 priority: normal severity: normal status: open title: distutils make_zipfile uses random order type: behavior versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 13:43:04 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Jun 2020 17:43:04 +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: <1591983784.9.0.420014691706.issue40164@roundup.psfhosted.org> Steve Dower added the comment: Yeah, I'll get onto it now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 14:05:47 2020 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Fri, 12 Jun 2020 18:05:47 +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: <1591985147.37.0.812999951989.issue40164@roundup.psfhosted.org> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- nosy: +thatiparthy nosy_count: 9.0 -> 10.0 pull_requests: +20028 pull_request: https://github.com/python/cpython/pull/20834 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 14:12:22 2020 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Fri, 12 Jun 2020 18:12:22 +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: <1591985542.08.0.00480737366336.issue40164@roundup.psfhosted.org> Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) added the comment: Steve, I have done it. And I didn't see your reply. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 14:30:10 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jun 2020 18:30:10 +0000 Subject: [issue40855] statistics.stdev ignore xbar argument In-Reply-To: <1591187481.58.0.119061539675.issue40855@roundup.psfhosted.org> Message-ID: <1591986610.86.0.422345410242.issue40855@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +20029 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20835 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 14:43:06 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Jun 2020 18:43:06 +0000 Subject: [issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs Message-ID: <1591987386.88.0.623611449873.issue40964@roundup.psfhosted.org> New submission from Christian Heimes : All buildbots and tests are currently failing because connections cyrus.andrew.cmu.edu:143 (IMAP) and cyrus.andrew.cmu.edu:993 (IMAPS) are hanging. ---------- components: Tests messages: 371403 nosy: christian.heimes, lukasz.langa, ned.deily priority: release blocker severity: normal status: open title: Connection to IMAP server cyrus.andrew.cmu.edu hangs versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 14:45:29 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Jun 2020 18:45:29 +0000 Subject: [issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs In-Reply-To: <1591987386.88.0.623611449873.issue40964@roundup.psfhosted.org> Message-ID: <1591987529.55.0.155237526598.issue40964@roundup.psfhosted.org> Change by Christian Heimes : ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 14:46:58 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Jun 2020 18:46:58 +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: <1591987618.41.0.49885002134.issue40164@roundup.psfhosted.org> Steve Dower added the comment: Thanks. Your PR will start to work once I've done the updated build, so don't worry about the failure right now. OpenSSL updates require build manager involvement, so it's blocked on me :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 14:48:35 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Jun 2020 18:48:35 +0000 Subject: [issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs In-Reply-To: <1591987386.88.0.623611449873.issue40964@roundup.psfhosted.org> Message-ID: <1591987715.86.0.965087873456.issue40964@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +20030 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20836 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 14:49:29 2020 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Fri, 12 Jun 2020 18:49:29 +0000 Subject: [issue33881] dataclasses should use NFKC to find duplicate members In-Reply-To: <1529172128.32.0.56676864532.issue33881@psf.upfronthosting.co.za> Message-ID: <1591987769.71.0.587865632212.issue33881@roundup.psfhosted.org> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- nosy: +thatiparthy nosy_count: 4.0 -> 5.0 pull_requests: +20031 pull_request: https://github.com/python/cpython/pull/20837 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 14:50:14 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 18:50:14 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591987814.83.0.61605812516.issue40958@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > This line is wrong though, since PyUnicode_GET_LENGTH returns the length in code points Whoops! Thanks for pointing that out. In any case, the patch still shows that the ASAN error goes away by limiting the access to the string so I suppose that we could transform it into a proper patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 14:54:11 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Jun 2020 18:54:11 +0000 Subject: [issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs In-Reply-To: <1591987386.88.0.623611449873.issue40964@roundup.psfhosted.org> Message-ID: <1591988051.47.0.366160032908.issue40964@roundup.psfhosted.org> Ned Deily added the comment: New changeset 08b1bbab6bfa1ff726db13a9fc3885329f73dca4 by Christian Heimes in branch 'master': bpo-40964: disable remote IMAP tests (GH-20836) https://github.com/python/cpython/commit/08b1bbab6bfa1ff726db13a9fc3885329f73dca4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 14:56:07 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Jun 2020 18:56:07 +0000 Subject: [issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs In-Reply-To: <1591987386.88.0.623611449873.issue40964@roundup.psfhosted.org> Message-ID: <1591988167.67.0.0684639964402.issue40964@roundup.psfhosted.org> Christian Heimes added the comment: The remote server is having intermittent issues. Sometimes all three servers behind the host are gone, sometimes they block all packages. # nmap -vv cyrus.andrew.cmu.edu Starting Nmap 7.80 ( https://nmap.org ) at 2020-06-12 20:52 CEST Warning: Hostname cyrus.andrew.cmu.edu resolves to 3 IPs. Using 128.2.157.16. Initiating Ping Scan at 20:52 Scanning cyrus.andrew.cmu.edu (128.2.157.16) [4 ports] Completed Ping Scan at 20:52, 0.13s elapsed (1 total hosts) Initiating Parallel DNS resolution of 1 host. at 20:52 Completed Parallel DNS resolution of 1 host. at 20:52, 0.12s elapsed Initiating SYN Stealth Scan at 20:52 Scanning cyrus.andrew.cmu.edu (128.2.157.16) [1000 ports] Completed SYN Stealth Scan at 20:52, 2.88s elapsed (1000 total ports) Nmap scan report for cyrus.andrew.cmu.edu (128.2.157.16) Host is up, received reset ttl 239 (0.11s latency). Other addresses for cyrus.andrew.cmu.edu (not scanned): 128.2.157.15 128.2.157.14 rDNS record for 128.2.157.16: CYRUS.ANDREW.CMU.EDU Scanned at 2020-06-12 20:52:35 CEST for 3s Not shown: 979 closed ports Reason: 979 resets PORT STATE SERVICE REASON 23/tcp filtered telnet no-response 110/tcp filtered pop3 no-response 135/tcp filtered msrpc no-response 139/tcp filtered netbios-ssn no-response 143/tcp filtered imap no-response 445/tcp filtered microsoft-ds no-response 515/tcp filtered printer no-response 631/tcp filtered ipp no-response 993/tcp filtered imaps no-response 995/tcp filtered pop3s no-response 1433/tcp filtered ms-sql-s no-response 2000/tcp filtered cisco-sccp no-response 2003/tcp filtered finger no-response 2967/tcp filtered symantec-av no-response 3389/tcp filtered ms-wbt-server no-response 5555/tcp filtered freeciv no-response 5900/tcp filtered vnc no-response 5901/tcp filtered vnc-1 no-response 5902/tcp filtered vnc-2 no-response 5903/tcp filtered vnc-3 no-response 9100/tcp filtered jetdirect no-response Read data files from: /usr/bin/../share/nmap Nmap done: 1 IP address (1 host up) scanned in 3.42 seconds Raw packets sent: 1025 (45.076KB) | Rcvd: 980 (39.200KB) # nmap -vv 128.2.157.16 128.2.157.14 128.2.157.15 Starting Nmap 7.80 ( https://nmap.org ) at 2020-06-12 20:54 CEST Initiating Ping Scan at 20:54 Scanning 3 hosts [4 ports/host] Completed Ping Scan at 20:55, 5.03s elapsed (3 total hosts) Nmap scan report for 128.2.157.16 [host down, received no-response] Nmap scan report for 128.2.157.14 [host down, received no-response] Nmap scan report for 128.2.157.15 [host down, received no-response] Read data files from: /usr/bin/../share/nmap Nmap done: 3 IP addresses (0 hosts up) scanned in 5.10 seconds Raw packets sent: 24 (912B) | Rcvd: 0 (0B) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 14:57:00 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Jun 2020 18:57:00 +0000 Subject: [issue40913] time.sleep ignores errors on Windows In-Reply-To: <1591641616.51.0.015066290777.issue40913@roundup.psfhosted.org> Message-ID: <1591988220.55.0.882581916389.issue40913@roundup.psfhosted.org> Steve Dower added the comment: ... equally happy without an explicit test in anything that's only prerelease right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 14:56:42 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Jun 2020 18:56:42 +0000 Subject: [issue40913] time.sleep ignores errors on Windows In-Reply-To: <1591641616.51.0.015066290777.issue40913@roundup.psfhosted.org> Message-ID: <1591988202.85.0.962313032833.issue40913@roundup.psfhosted.org> Steve Dower added the comment: You could test this by getting the event and CloseHandle-ing it. A function to do this could be added to _testcapimodule. It'd have to run in its own process, but we have (a few) helpers around for this. Given the concerns, I don't think we should change this in any maintenance releases, so I removed 3.7 and 3.8 from the versions list. I'd be equally happy without an explicit test in ---------- versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 14:58:41 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Jun 2020 18:58:41 +0000 Subject: [issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs In-Reply-To: <1591987386.88.0.623611449873.issue40964@roundup.psfhosted.org> Message-ID: <1591988321.37.0.272599252408.issue40964@roundup.psfhosted.org> Change by Christian Heimes : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 15:08:12 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Jun 2020 19:08:12 +0000 Subject: [issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs In-Reply-To: <1591987386.88.0.623611449873.issue40964@roundup.psfhosted.org> Message-ID: <1591988892.57.0.8210586104.issue40964@roundup.psfhosted.org> Ned Deily added the comment: New changeset f91917908749cb595113f8d8428ae1d6241f0392 by Ned Deily (Christian Heimes) in branch '3.9': bpo-40964: disable remote IMAP tests (GH-20836) https://github.com/python/cpython/commit/f91917908749cb595113f8d8428ae1d6241f0392 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 15:09:35 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Jun 2020 19:09:35 +0000 Subject: [issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs In-Reply-To: <1591987386.88.0.623611449873.issue40964@roundup.psfhosted.org> Message-ID: <1591988975.14.0.530290524722.issue40964@roundup.psfhosted.org> Ned Deily added the comment: New changeset adce133378be75bcac4d61fd62a151852555000f by Ned Deily (Christian Heimes) in branch '3.8': bpo-40964: disable remote IMAP tests (GH-20836) https://github.com/python/cpython/commit/adce133378be75bcac4d61fd62a151852555000f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 15:11:55 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Jun 2020 19:11:55 +0000 Subject: [issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs In-Reply-To: <1591987386.88.0.623611449873.issue40964@roundup.psfhosted.org> Message-ID: <1591989115.33.0.280750527023.issue40964@roundup.psfhosted.org> Ned Deily added the comment: New changeset 0abb70ec93bfc6724199b7dd6c89294ce7d83072 by Ned Deily (Christian Heimes) in branch '3.7': bpo-40964: disable remote IMAP tests (GH-20836) https://github.com/python/cpython/commit/0abb70ec93bfc6724199b7dd6c89294ce7d83072 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 15:50:09 2020 From: report at bugs.python.org (Eryk Sun) Date: Fri, 12 Jun 2020 19:50:09 +0000 Subject: [issue40913] time.sleep ignores errors on Windows In-Reply-To: <1591641616.51.0.015066290777.issue40913@roundup.psfhosted.org> Message-ID: <1591991409.33.0.500698214841.issue40913@roundup.psfhosted.org> Eryk Sun added the comment: If WaitForSingleObjectEx fails, do you think the system error code should be raised as an OSError? Probably an invalid-handle or access-denied error is too cryptic here. It may be better to raise something like RuntimeError('time.sleep(): invalid SIGINT event handle'). > You could test this by getting the event and CloseHandle-ing it. Yes, that's a simpler approach. It should work in a child process that's well controlled. I was thinking of a less controlled environment, in which there's a chance that another waitable object will reuse the handle, such as a file object. The test would be reliable regardless of process context (but only in the main thread, of course) if there were a _PyOS_SetSigintEvent function -- or if sigint_event were directly accessible in _testcapimodule. It could just temporarily set a duplicate handle with no access. For example: >>> h1 = CreateEvent(None, True, True, None) >>> WaitForSingleObject(h1, 0) 0 >>> hp = GetCurrentProcess() >>> h2 = DuplicateHandle(hp, h1, hp, 0, False, 0) >>> WaitForSingleObject(h2, 0) Traceback (most recent call last): File "", line 1, in pywintypes.error: (5, 'WaitForSingleObject', 'Access is denied.') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 16:03:23 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Jun 2020 20:03:23 +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: <1591992203.39.0.946622222314.issue40164@roundup.psfhosted.org> Steve Dower added the comment: Okay, new sources and build are up, so I retriggered the PR. If it's all good, I'll merge and backport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 16:28:19 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jun 2020 20:28:19 +0000 Subject: [issue37910] argparse wrapping fails with metavar="" (no metavar) In-Reply-To: <1566425299.96.0.375120843288.issue37910@roundup.psfhosted.org> Message-ID: <1591993699.96.0.639007160645.issue37910@roundup.psfhosted.org> Raymond Hettinger added the comment: Paul, what do you think about the PR? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 16:28:45 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jun 2020 20:28:45 +0000 Subject: [issue37910] argparse wrapping fails with metavar="" (no metavar) In-Reply-To: <1566425299.96.0.375120843288.issue37910@roundup.psfhosted.org> Message-ID: <1591993725.2.0.567657373345.issue37910@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- versions: +Python 3.10 -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 16:45:34 2020 From: report at bugs.python.org (Marcelo) Date: Fri, 12 Jun 2020 20:45:34 +0000 Subject: [issue40960] Fix the example in hashlib documentarion In-Reply-To: <1591961803.74.0.363372588689.issue40960@roundup.psfhosted.org> Message-ID: <1591994734.81.0.71221505048.issue40960@roundup.psfhosted.org> Marcelo added the comment: ooops, thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 16:46:45 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Jun 2020 20:46:45 +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: <1591994805.05.0.142227080274.issue40164@roundup.psfhosted.org> Steve Dower added the comment: New changeset 80d827c3cb041ae72b9b0572981c50bdd1fe2cab by Srinivas Reddy Thatiparthy (?????????? ?????? ?????????) in branch 'master': bpo-40164: Update Windows OpenSSL to 1.1.1g (GH-20834) https://github.com/python/cpython/commit/80d827c3cb041ae72b9b0572981c50bdd1fe2cab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 16:46:53 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Jun 2020 20:46:53 +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: <1591994813.49.0.927138509673.issue40164@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20032 pull_request: https://github.com/python/cpython/pull/20839 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 16:56:04 2020 From: report at bugs.python.org (Leonard Richardson) Date: Fri, 12 Jun 2020 20:56:04 +0000 Subject: [issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section In-Reply-To: <1535045437.7.0.56676864532.issue34480@psf.upfronthosting.co.za> Message-ID: <1591995364.72.0.866465626575.issue34480@roundup.psfhosted.org> Leonard Richardson added the comment: I'm the maintainer of Beautiful Soup. I learned about this issue when one of my users filed a bug for it against Beautiful Soup (https://bugs.launchpad.net/beautifulsoup/+bug/1883264). BeautifulSoupHTMLParser (my subclass of html.parser.HTMLParser) implements error() only to prevent the NotImplementedError raised by ParserBase.error(). The docstring for my error() implementation says: "this method is called only on very strange markup and our best strategy is to pretend it didn't happen and keep going." It shouldn't affect Beautiful Soup if, in a future version of Python, HTMLParser.error is never called and ParserBase is removed. ---------- nosy: +leonardr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 16:57:27 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Jun 2020 20:57:27 +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: <1591995447.08.0.376564102026.issue40164@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +20034 pull_request: https://github.com/python/cpython/pull/20841 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 16:57:26 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Jun 2020 20:57:26 +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: <1591995446.11.0.80276314919.issue40164@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +20033 pull_request: https://github.com/python/cpython/pull/20840 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 17:00:12 2020 From: report at bugs.python.org (jakirkham) Date: Fri, 12 Jun 2020 21:00:12 +0000 Subject: [issue39645] Expand concurrent.futures.Future's public API In-Reply-To: <1581838685.03.0.542500965222.issue39645@roundup.psfhosted.org> Message-ID: <1591995612.56.0.233906680934.issue39645@roundup.psfhosted.org> Change by jakirkham : ---------- nosy: +jakirkham _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 17:06:56 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Jun 2020 21:06:56 +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: <1591996016.1.0.0233507560192.issue40164@roundup.psfhosted.org> miss-islington added the comment: New changeset 166d7234b5ae07f78feb5ddfb3026fbd2a1a36e2 by Miss Islington (bot) in branch '3.9': bpo-40164: Update Windows OpenSSL to 1.1.1g (GH-20834) https://github.com/python/cpython/commit/166d7234b5ae07f78feb5ddfb3026fbd2a1a36e2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 17:08:35 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Jun 2020 21:08:35 +0000 Subject: [issue40913] time.sleep ignores errors on Windows In-Reply-To: <1591641616.51.0.015066290777.issue40913@roundup.psfhosted.org> Message-ID: <1591996115.77.0.879163183794.issue40913@roundup.psfhosted.org> Steve Dower added the comment: > If WaitForSingleObjectEx fails, do you think the system error code should be raised as an OSError? It's invalid (and unfixable) internal state, so perhaps SystemError makes the most sense? There's no point catching it in most cases. Or since we don't want to worry too much about formatting the message, why not raise the OSError with the helper function and then immediately chain it with a fixed SystemError? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 17:15:00 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Jun 2020 21:15:00 +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: <1591996500.52.0.744399027934.issue40164@roundup.psfhosted.org> Steve Dower added the comment: New changeset 7e57c367d65f3d0219978b465dc00da15ae3724c by Steve Dower in branch '3.8': bpo-40164: Update Windows OpenSSL to 1.1.1g (GH-20834) https://github.com/python/cpython/commit/7e57c367d65f3d0219978b465dc00da15ae3724c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 17:15:31 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Jun 2020 21:15:31 +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: <1591996531.22.0.116384271521.issue40164@roundup.psfhosted.org> Steve Dower added the comment: New changeset 617af99312ca36ad5a08db764858caf11c92a2c0 by Steve Dower in branch '3.7': bpo-40164: Update Windows OpenSSL to 1.1.1g (GH-20834) https://github.com/python/cpython/commit/617af99312ca36ad5a08db764858caf11c92a2c0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 17:18:12 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jun 2020 21:18:12 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1591996692.63.0.818183252372.issue40958@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +20035 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20842 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 17:20:39 2020 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Jun 2020 21:20:39 +0000 Subject: [issue40896] Missing links to Source Code in Documentation pages In-Reply-To: <1591489206.64.0.663736660712.issue40896@roundup.psfhosted.org> Message-ID: <1591996839.64.0.329528055879.issue40896@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 7.0 -> 8.0 pull_requests: +20036 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20843 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 17:22:14 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Jun 2020 21:22:14 +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: <1591996934.71.0.853359916286.issue40164@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 Jun 12 17:30:50 2020 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 12 Jun 2020 21:30:50 +0000 Subject: [issue27729] Provide a better error message when the file path is too long on Windows In-Reply-To: <1470869995.82.0.0225093644584.issue27729@psf.upfronthosting.co.za> Message-ID: <1591997450.34.0.612957860905.issue27729@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 6.0 -> 7.0 pull_requests: +20037 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/20844 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 18:16:26 2020 From: report at bugs.python.org (Sam Bull) Date: Fri, 12 Jun 2020 22:16:26 +0000 Subject: [issue33315] Allow queue.Queue to be used in type annotations In-Reply-To: <1524139376.68.0.682650639539.issue33315@psf.upfronthosting.co.za> Message-ID: <1592000186.65.0.106649711385.issue33315@roundup.psfhosted.org> Change by Sam Bull : ---------- nosy: +dreamsorcerer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 18:16:30 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Fri, 12 Jun 2020 22:16:30 +0000 Subject: [issue40925] Remove redundant macros used for stack manipulation in interpreter In-Reply-To: <1591697620.81.0.981270573583.issue40925@roundup.psfhosted.org> Message-ID: <1592000190.56.0.757685079456.issue40925@roundup.psfhosted.org> Change by Dennis Sweeney : ---------- nosy: +Dennis Sweeney nosy_count: 3.0 -> 4.0 pull_requests: +20038 pull_request: https://github.com/python/cpython/pull/20845 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 18:18:33 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Fri, 12 Jun 2020 22:18:33 +0000 Subject: [issue40925] Remove redundant macros used for stack manipulation in interpreter In-Reply-To: <1591697620.81.0.981270573583.issue40925@roundup.psfhosted.org> Message-ID: <1592000313.74.0.948536158715.issue40925@roundup.psfhosted.org> Dennis Sweeney added the comment: I just added PR 20845, but I'm concerned about performance. I'm attaching the results of a run of pyperformance before and after PR 20845. ---------- Added file: https://bugs.python.org/file49228/pushpop_perf.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 18:19:13 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Fri, 12 Jun 2020 22:19:13 +0000 Subject: [issue40925] Remove redundant macros used for stack manipulation in interpreter In-Reply-To: <1591697620.81.0.981270573583.issue40925@roundup.psfhosted.org> Message-ID: <1592000353.3.0.736554761766.issue40925@roundup.psfhosted.org> Change by Dennis Sweeney : Added file: https://bugs.python.org/file49229/master_perf.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 18:19:45 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jun 2020 22:19:45 +0000 Subject: [issue33881] dataclasses should use NFKC to find duplicate members In-Reply-To: <1529172128.32.0.56676864532.issue33881@psf.upfronthosting.co.za> Message-ID: <1592000385.29.0.486801239987.issue33881@roundup.psfhosted.org> Raymond Hettinger added the comment: I recommend leaving the code as-is. AFAICT, the situation almost never arises in practice, and if it did, the existing SyntaxError is clear. Given that the rest of that language uses a SyntaxError, there isn't a net benefit for switching to TypeError: >>> def f(?=1, ?=2): pass SyntaxError: duplicate argument '?' in function definition >>> def f(**kwds): return kwds >>> f(?=1, ?=2) SyntaxError: keyword argument repeated ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 18:30:49 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 12 Jun 2020 22:30:49 +0000 Subject: [issue37556] Launcher help does not mention configuration options In-Reply-To: <1562822280.29.0.253272841298.issue37556@roundup.psfhosted.org> Message-ID: <1592001049.26.0.217592176758.issue37556@roundup.psfhosted.org> Cheryl Sabella added the comment: @steve.dower, please re-review this PR when you get a chance. Thank you! ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 18:35:11 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Jun 2020 22:35:11 +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: <1592001311.61.0.152517866065.issue40164@roundup.psfhosted.org> Ned Deily added the comment: Thanks, Steve and Srinivas! ---------- priority: deferred blocker -> versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 18:37:53 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 12 Jun 2020 22:37:53 +0000 Subject: [issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn In-Reply-To: <1559908419.41.0.390422965351.issue37193@roundup.psfhosted.org> Message-ID: <1592001473.58.0.929355876888.issue37193@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 19:19:41 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Jun 2020 23:19:41 +0000 Subject: [issue37556] Launcher help does not mention configuration options In-Reply-To: <1562822280.29.0.253272841298.issue37556@roundup.psfhosted.org> Message-ID: <1592003981.46.0.978546207003.issue37556@roundup.psfhosted.org> miss-islington added the comment: New changeset b3e6783423f58597419abae343dd1d5dcc02a7e3 by Steve (Gadget) Barnes in branch 'master': bpo-37556 Extend help to include latest overrides (GH-14701) https://github.com/python/cpython/commit/b3e6783423f58597419abae343dd1d5dcc02a7e3 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 19:19:58 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Jun 2020 23:19:58 +0000 Subject: [issue37556] Launcher help does not mention configuration options In-Reply-To: <1562822280.29.0.253272841298.issue37556@roundup.psfhosted.org> Message-ID: <1592003998.01.0.926656717349.issue37556@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20039 pull_request: https://github.com/python/cpython/pull/20846 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 20:00:23 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 13 Jun 2020 00:00:23 +0000 Subject: [issue40925] Remove redundant macros used for stack manipulation in interpreter In-Reply-To: <1591697620.81.0.981270573583.issue40925@roundup.psfhosted.org> Message-ID: <1592006423.32.0.875418033784.issue40925@roundup.psfhosted.org> Change by Dennis Sweeney : Added file: https://bugs.python.org/file49230/perf_diff.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 20:00:32 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 13 Jun 2020 00:00:32 +0000 Subject: [issue40925] Remove redundant macros used for stack manipulation in interpreter In-Reply-To: <1591697620.81.0.981270573583.issue40925@roundup.psfhosted.org> Message-ID: <1592006432.13.0.830705838723.issue40925@roundup.psfhosted.org> Change by Dennis Sweeney : Removed file: https://bugs.python.org/file49229/master_perf.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 20:00:44 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 13 Jun 2020 00:00:44 +0000 Subject: [issue40925] Remove redundant macros used for stack manipulation in interpreter In-Reply-To: <1591697620.81.0.981270573583.issue40925@roundup.psfhosted.org> Message-ID: <1592006444.72.0.71489450774.issue40925@roundup.psfhosted.org> Change by Dennis Sweeney : Removed file: https://bugs.python.org/file49228/pushpop_perf.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 20:08:42 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 13 Jun 2020 00:08:42 +0000 Subject: [issue39666] IDLE: Factor out similar code in editor and hyperparser In-Reply-To: <1581963120.77.0.85896962977.issue39666@roundup.psfhosted.org> Message-ID: <1592006922.91.0.603538785561.issue39666@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +20040 pull_request: https://github.com/python/cpython/pull/20847 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 20:09:42 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 13 Jun 2020 00:09:42 +0000 Subject: [issue39666] IDLE: Factor out similar code in editor and hyperparser In-Reply-To: <1581963120.77.0.85896962977.issue39666@roundup.psfhosted.org> Message-ID: <1592006982.61.0.466455206105.issue39666@roundup.psfhosted.org> Cheryl Sabella added the comment: PR20847 is an implementation with the parser function in hyperparser instead of EditorWindow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 20:13:26 2020 From: report at bugs.python.org (Eryk Sun) Date: Sat, 13 Jun 2020 00:13:26 +0000 Subject: [issue27729] Provide a better error message when the file path is too long on Windows In-Reply-To: <1470869995.82.0.0225093644584.issue27729@psf.upfronthosting.co.za> Message-ID: <1592007206.24.0.379092587289.issue27729@roundup.psfhosted.org> Eryk Sun added the comment: Thanks for working on a PR, Zackery. Note that we can't rely on GetLastError() in PyErr_SetFromErrnoWithFilenameObjects. It may be called in contexts where the thread's LastErrorValue is no longer related to the C errno value. My suggestion in msg272427 was intended for _io_FileIO___init___impl in Modules/_io/fileio.c. Actually, a more useful change would be to modify this function to use the CRT _doserrno value [1]. Set _doserrno = 0 prior to calling _wopen. If it fails, set the exception via PyErr_SetExcFromWindowsErrWithFilenameObject(PyExc_OSError, _doserrno, nameobj). This will improve cases in which several system error codes are mapped to a single errno value such as ENOENT. In theory, I like the idea of clarifying the error message for ERROR_PATH_NOT_FOUND (3) in PyErr_SetExcFromWindowsErrWithFilenameObjects. One concern I have is that this ignores the localization of the error message just for this single error code. It could extend the localized message with an English sentence, but is this too awkward? For example: El sistema no puede encontrar la ruta especificada. The path may exceed the maximum allowed length. [1]: https://docs.microsoft.com/en-us/cpp/c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr?view=vs-2019 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 21:28:36 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Jun 2020 01:28:36 +0000 Subject: [issue40925] Remove redundant macros used for stack manipulation in interpreter In-Reply-To: <1591697620.81.0.981270573583.issue40925@roundup.psfhosted.org> Message-ID: <1592011716.89.0.267935609084.issue40925@roundup.psfhosted.org> Raymond Hettinger added the comment: I don't see any advantage to making this change. The current code is readable and the macros have an obvious interpretation. We also know that they generate clean code on every compiler we've come across and on 32 bits. Also, this should be marked as type, "performance". If performance changes at all, it will likely be a net detriment. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 21:36:55 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 13 Jun 2020 01:36:55 +0000 Subject: [issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn In-Reply-To: <1559908419.41.0.390422965351.issue37193@roundup.psfhosted.org> Message-ID: <1592012215.76.0.666442229783.issue37193@roundup.psfhosted.org> Jason R. Coombs added the comment: Thanks for the notice Ned. I've revived the PR and addressed all the comments from Victor. Any chance this can get into Python 3.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 21:47:21 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 13 Jun 2020 01:47:21 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1592012841.53.0.534154866152.issue1635741@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +20041 pull_request: https://github.com/python/cpython/pull/20848 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 22:29:55 2020 From: report at bugs.python.org (The Comet) Date: Sat, 13 Jun 2020 02:29:55 +0000 Subject: [issue40965] Segfault when importing unittest module Message-ID: <1592015395.95.0.70978961228.issue40965@roundup.psfhosted.org> New submission from The Comet : The following program will segfault the interpreter: #include int main() { Py_Initialize(); PyRun_SimpleString("import unittest"); Py_Finalize(); Py_Initialize(); PyRun_SimpleString("import unittest"); /* segfault here */ Py_Finalize(); } This only seems to happen with the unittest module. This is something that used to work but broke somewhere between python 3.7 and 3.8. The code above can also be found on github as a cmake project for your convenience: https://github.com/TheComet/python3.8-unittest-broken ---------- messages: 371432 nosy: The Comet priority: normal severity: normal status: open title: Segfault when importing unittest module type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 12 23:53:46 2020 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Jun 2020 03:53:46 +0000 Subject: [issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn In-Reply-To: <1559908419.41.0.390422965351.issue37193@roundup.psfhosted.org> Message-ID: <1592020426.22.0.642209377918.issue37193@roundup.psfhosted.org> Ned Deily added the comment: > Any chance this can get into Python 3.7? Perhaps but there's a lot that needs to be done yet. Like any bugfix, it needs to be reviewed, merged to master, and get some buildbot exposure first before it is backported anywhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 00:05:53 2020 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Jun 2020 04:05:53 +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: <1592021153.2.0.0517003310063.issue40498@roundup.psfhosted.org> Ned Deily added the comment: I agree that, if the problem is reproducible with wish, it's not a tkinter issue (which is just a wrapper around Tk calls). You may want to pursue it with the Tk project: https://core.tcl-lang.org/index.html ---------- nosy: +ned.deily resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 00:28:47 2020 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Sat, 13 Jun 2020 04:28:47 +0000 Subject: [issue33881] dataclasses should use NFKC to find duplicate members In-Reply-To: <1529172128.32.0.56676864532.issue33881@psf.upfronthosting.co.za> Message-ID: <1592022527.12.0.193712341242.issue33881@roundup.psfhosted.org> Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) added the comment: I am convinced by Raymond?s argument. Hence closing the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 00:52:24 2020 From: report at bugs.python.org (Caleb Hattingh) Date: Sat, 13 Jun 2020 04:52:24 +0000 Subject: [issue40894] asyncio.gather() cancelled() always False In-Reply-To: <1591481631.01.0.634103349075.issue40894@roundup.psfhosted.org> Message-ID: <1592023944.77.0.594453429219.issue40894@roundup.psfhosted.org> Caleb Hattingh added the comment: Kyle is correct. By analogy with Kyle's example, the following example has no gather, only two nested futures: ``` # childfut.py import asyncio async def f(fut): await fut async def g(t): await asyncio.sleep(t) async def main(): fut_g = asyncio.create_task(g(1)) fut_f = asyncio.create_task(f(fut_g)) try: # Cancel the "child" future fut_g.cancel() await fut_f except asyncio.CancelledError as e: pass print(f'fut_f done? {fut_f.done()} fut_f cancelled? {fut_f.cancelled()}') print(f'fut_g done? {fut_g.done()} fut_g cancelled? {fut_g.cancelled()}') asyncio.run(main()) ``` It produces: ``` $ python childfut.py fut_f done? True fut_f cancelled? True fut_g done? True fut_g cancelled? True ``` The outer future f, has f.cancelled() == True even though it was the inner future got cancelled. I think `gather()` should work the same. It would be confusing if `future_gather.cancelled()` is false if a child is cancelled, while a plain old outer future returns `future.cancelled() == true` if futures that it waits on are cancelled. ---------- nosy: +cjrh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 01:14:06 2020 From: report at bugs.python.org (hai shi) Date: Sat, 13 Jun 2020 05:14:06 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1592025246.17.0.713186115567.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +20042 pull_request: https://github.com/python/cpython/pull/20849 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 01:14:55 2020 From: report at bugs.python.org (Mark Hammond) Date: Sat, 13 Jun 2020 05:14:55 +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: <1592025295.95.0.678688546698.issue40740@roundup.psfhosted.org> Mark Hammond added the comment: Can we get this mentioned somewhere? Eg, https://www.python.org/downloads/release/python-390b3/ doesn't mention anything about minimum versions. https://www.python.org/downloads/windows/ also has prominent notices like "Note that Python 3.8.3rc1 cannot be used on Windows XP or earlier." but nothing for 3.9 (This threw me for some time - I still have a win7 VM I used for testing and figured there was something broken in the VM before finding this) ---------- nosy: +mhammond _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 01:30:56 2020 From: report at bugs.python.org (hai shi) Date: Sat, 13 Jun 2020 05:30:56 +0000 Subject: [issue40925] Remove redundant macros used for stack manipulation in interpreter In-Reply-To: <1591697620.81.0.981270573583.issue40925@roundup.psfhosted.org> Message-ID: <1592026256.94.0.442441197079.issue40925@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 01:35:23 2020 From: report at bugs.python.org (hai shi) Date: Sat, 13 Jun 2020 05:35:23 +0000 Subject: [issue40966] Remove redundant var in PyErr_NewException Message-ID: <1592026523.77.0.455360135659.issue40966@roundup.psfhosted.org> New submission from hai shi : Looks like `classname` in PyErr_NewException() is redundant: https://github.com/python/cpython/blob/master/Python/errors.c#L1082 ---------- components: Interpreter Core messages: 371438 nosy: shihai1991 priority: normal severity: normal status: open title: Remove redundant var in PyErr_NewException versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 01:37:25 2020 From: report at bugs.python.org (hai shi) Date: Sat, 13 Jun 2020 05:37:25 +0000 Subject: [issue40966] Remove redundant var in PyErr_NewException In-Reply-To: <1592026523.77.0.455360135659.issue40966@roundup.psfhosted.org> Message-ID: <1592026645.51.0.441485224227.issue40966@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +20043 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20850 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 01:59:33 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 13 Jun 2020 05:59:33 +0000 Subject: [issue40894] asyncio.gather() cancelled() always False In-Reply-To: <1591481631.01.0.634103349075.issue40894@roundup.psfhosted.org> Message-ID: <1592027973.8.0.0606707939482.issue40894@roundup.psfhosted.org> Kyle Stanley added the comment: Thanks for the additional feedback, Caleb. > I think `gather()` should work the same. It would be confusing if `future_gather.cancelled()` is false if a child is cancelled, while a plain old outer future returns `future.cancelled() == true` if futures that it waits on are cancelled. Agreed, I think it would make the most sense IMO for the behavior of .cancelled() to be similar for tasks, futures, and for gather itself. So, I'm still inclined towards checking the exception to see if CancelledError occurred for _GatheringFuture.cancelled(), as I think that would result in the most similar behavior. Currently waiting on feedback from Yury and/or Andrew about the current long-term plans for asyncio.gather(), and their general thoughts on this issue. Unless it is realistically going to be deprecated and effectively replaced with task groups in 3.10, I think the change would make sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 02:59:11 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 13 Jun 2020 06:59:11 +0000 Subject: [issue40966] Remove redundant var in PyErr_NewException In-Reply-To: <1592026523.77.0.455360135659.issue40966@roundup.psfhosted.org> Message-ID: <1592031551.88.0.583697837779.issue40966@roundup.psfhosted.org> Dong-hee Na added the comment: Merged! Thanks for the contribution! ---------- nosy: +corona10 resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 03:55:59 2020 From: report at bugs.python.org (Timm Wagener) Date: Sat, 13 Jun 2020 07:55:59 +0000 Subject: [issue40894] asyncio.gather() cancelled() always False In-Reply-To: <1591481631.01.0.634103349075.issue40894@roundup.psfhosted.org> Message-ID: <1592034959.73.0.650618144086.issue40894@roundup.psfhosted.org> Timm Wagener added the comment: Ok, seems reasonable as well. I'll change it as proposed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 04:23:20 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jun 2020 08:23:20 +0000 Subject: [issue1721083] Add File - Reload Message-ID: <1592036600.75.0.187322788563.issue1721083@roundup.psfhosted.org> Terry J. Reedy added the comment: #1175686 was not a dependency, but a duplicate closed in favor of this issue, because gpolo attached the diff here. This is obviously not a high priority, but I still want to consider it. The addition would no longer be an extension, but likely a method in iomenu. ---------- assignee: roger.serwy -> terry.reedy nosy: -Nashev, gpolo, kbk, roger.serwy versions: +Python 3.10 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 04:27:41 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jun 2020 08:27:41 +0000 Subject: [issue1178] IDLE - add "paste code" functionality In-Reply-To: <1190153010.77.0.038299898053.issue1178@psf.upfronthosting.co.za> Message-ID: <1592036861.82.0.219431861723.issue1178@roundup.psfhosted.org> Terry J. Reedy added the comment: I would like to add 'Save code' to the Shell menu, but this would still be needed. A strip_noncode function could be shared. ---------- assignee: -> terry.reedy nosy: -THRlWiTi, gpolo, ronaldoussoren versions: +Python 3.10 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 04:29:53 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jun 2020 08:29:53 +0000 Subject: [issue22893] Idle: __future__ does not work in startup code. In-Reply-To: <1416261777.24.0.465929106454.issue22893@psf.upfronthosting.co.za> Message-ID: <1592036993.72.0.372939273212.issue22893@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 04:50:13 2020 From: report at bugs.python.org (hai shi) Date: Sat, 13 Jun 2020 08:50:13 +0000 Subject: [issue40966] Remove redundant var in PyErr_NewException In-Reply-To: <1592026523.77.0.455360135659.issue40966@roundup.psfhosted.org> Message-ID: <1592038213.91.0.46411503392.issue40966@roundup.psfhosted.org> hai shi added the comment: Thanks, Dong-hee Na. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 05:22:26 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jun 2020 09:22:26 +0000 Subject: [issue40893] tkinter integrate TkDND support In-Reply-To: <1591474190.65.0.383574909158.issue40893@roundup.psfhosted.org> Message-ID: <1592040146.95.0.367806621008.issue40893@roundup.psfhosted.org> Terry J. Reedy added the comment: Easiest is to install 'blurb' and use that to write news entries. See https://docs.python.org/3/whatsnew/changelog.html#changelog for examples. The coredev who merges may changes whatever you propose. I don't think that this needs a PEP, unless Serhiy decides otherwise. I don't think that there are very many details to thrash out. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 05:52:26 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jun 2020 09:52:26 +0000 Subject: [issue40905] IDLE relabel Save-on-close buttons In-Reply-To: <1591573904.32.0.951896364407.issue40905@roundup.psfhosted.org> Message-ID: <1592041946.28.0.816123875062.issue40905@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: IDLE relabel Save on close -> IDLE relabel Save-on-close buttons _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 06:04:22 2020 From: report at bugs.python.org (hai shi) Date: Sat, 13 Jun 2020 10:04:22 +0000 Subject: [issue37910] argparse wrapping fails with metavar="" (no metavar) In-Reply-To: <1566425299.96.0.375120843288.issue37910@roundup.psfhosted.org> Message-ID: <1592042662.22.0.727166057369.issue37910@roundup.psfhosted.org> hai shi added the comment: LGTM. It's a lightweight patch :) ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 06:24:02 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jun 2020 10:24:02 +0000 Subject: [issue40925] Remove redundant macros used for stack manipulation in interpreter In-Reply-To: <1591697620.81.0.981270573583.issue40925@roundup.psfhosted.org> Message-ID: <1592043842.08.0.729182569797.issue40925@roundup.psfhosted.org> Terry J. Reedy added the comment: I could understand wanting to replace TOP,...,FOURTH with PEEK(n) and the SET_XYZs with the now deleted SET(_VALUE)(n, v), but to me, replacing PEEK-SET with POPs and PUSHes (in different orders) that directly mean something different but that compilers (all?) optimize to mean the same thing makes the code initially harder to read. In particular, the old version of TARGET(ROT_FOUR) is initially clearer without thinking through the effect of the particular order of pushes in the new version. It depends on what one is accustomed to. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 06:29:41 2020 From: report at bugs.python.org (Timm Wagener) Date: Sat, 13 Jun 2020 10:29:41 +0000 Subject: [issue40894] asyncio.gather() cancelled() always False In-Reply-To: <1591481631.01.0.634103349075.issue40894@roundup.psfhosted.org> Message-ID: <1592044181.5.0.232616433558.issue40894@roundup.psfhosted.org> Timm Wagener added the comment: Proposed changes are done and test coverage is extended. I had to change one previous test slightly *(test_one_cancellation())*, which seems in line though, with the proposed behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 06:48:02 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 13 Jun 2020 10:48:02 +0000 Subject: [issue40967] asyncio.Task.all_tasks() and asyncio.Task.current_task() must be removed in 3.9 Message-ID: <1592045282.09.0.91488246101.issue40967@roundup.psfhosted.org> New submission from R?mi Lapeyre : The documentation says: .. deprecated-removed:: 3.7 3.9 Do not call this as a task method. Use the :func:`asyncio.all_tasks` function instead. I don't know if it's still possible to merge this in 3.9 and if so, if it should be a release blocker. Anyway I'm working on a PR for this. ---------- components: asyncio messages: 371449 nosy: asvetlov, remi.lapeyre, yselivanov priority: normal severity: normal status: open title: asyncio.Task.all_tasks() and asyncio.Task.current_task() must be removed in 3.9 versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 07:10:14 2020 From: report at bugs.python.org (Paul Menzel) Date: Sat, 13 Jun 2020 11:10:14 +0000 Subject: [issue40968] urllib is unable to deal with TURN server infront Message-ID: <1592046614.41.0.0652918856783.issue40968@roundup.psfhosted.org> New submission from Paul Menzel : Having the TURN server Coturn [1] set up in a Jitsi Meet installation, Python?s urllib requests fail, while it works with cURL and browsers. ``` $ curl -I https://jitsi.molgen.mpg.de HTTP/2 200 server: nginx/1.14.2 date: Sat, 13 Jun 2020 11:09:19 GMT content-type: text/html vary: Accept-Encoding strict-transport-security: max-age=63072000 ``` ``` >>> import urllib.request >>> response = urllib.request.urlopen('https://jitsi.molgen.mpg.de') Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.8/urllib/request.py", line 525, in open response = self._open(req, data) File "/usr/lib/python3.8/urllib/request.py", line 542, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1393, in https_open return self.do_open(http.client.HTTPSConnection, req, File "/usr/lib/python3.8/urllib/request.py", line 1354, in do_open r = h.getresponse() File "/usr/lib/python3.8/http/client.py", line 1332, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 303, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 272, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response ``` [1]: https://github.com/coturn/coturn/ ---------- components: Library (Lib) messages: 371450 nosy: pmenzel priority: normal severity: normal status: open title: urllib is unable to deal with TURN server infront type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 07:25:07 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 13 Jun 2020 11:25:07 +0000 Subject: [issue40967] asyncio.Task.all_tasks() and asyncio.Task.current_task() must be removed in 3.9 In-Reply-To: <1592045282.09.0.91488246101.issue40967@roundup.psfhosted.org> Message-ID: <1592047507.06.0.796699103251.issue40967@roundup.psfhosted.org> Kyle Stanley added the comment: Thanks for bringing attention to this R?mi. I'm a bit concerned that it might be a bit late into the 3.9 beta to incorporate a removal and that we might need to consider delaying to 3.10, but I'll leave that up to Lukasz. Feel free to open a PR in the meantime since it will need to be removed either way, the only main difference is whether or not it gets backported to 3.9. (I elevated the priority to "release blocker", as I think it should be a blocker for 3.10 if it's not for 3.9. The version should be updated accordingly.) ---------- nosy: +aeros, lukasz.langa priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 08:03:19 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 13 Jun 2020 12:03:19 +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: <1592049799.02.0.576108787555.issue39710@roundup.psfhosted.org> Cheryl Sabella added the comment: @Chitrank-Dixit, thank you for your interest in contributing to CPython. When looking for an issue to work on, please check that a pull request isn't already open against it. If there is an open PR, you can contribute by doing a code review. Please refer to this[1] section of the devguide for tips on reviewing a pull request. [1] https://devguide.python.org/pullrequest/?highlight=review#leaving-a-pull-request-review-on-github ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 08:26:27 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jun 2020 12:26:27 +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: <1592051187.2.0.221081363751.issue40834@roundup.psfhosted.org> miss-islington added the comment: New changeset 29c117202e386bad1d66ae336e2fefa1a1809ee0 by An Long in branch 'master': bpo-40834: Fix truncate when sending str object with channel (GH-20555) https://github.com/python/cpython/commit/29c117202e386bad1d66ae336e2fefa1a1809ee0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 08:26:26 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jun 2020 12:26:26 +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: <1592051186.15.0.788472076161.issue40834@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +20044 pull_request: https://github.com/python/cpython/pull/20852 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 08:26:35 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jun 2020 12:26:35 +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: <1592051195.5.0.500041786502.issue40834@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20045 pull_request: https://github.com/python/cpython/pull/20853 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 08:30:13 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 13 Jun 2020 12:30:13 +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: <1592051413.51.0.119485844576.issue40834@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 08:44:42 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jun 2020 12:44:42 +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: <1592052282.24.0.30855548287.issue40834@roundup.psfhosted.org> miss-islington added the comment: New changeset 94bb4b7db2a4eadd299acede204b087aca30c9a2 by Miss Islington (bot) in branch '3.9': bpo-40834: Fix truncate when sending str object with channel (GH-20555) https://github.com/python/cpython/commit/94bb4b7db2a4eadd299acede204b087aca30c9a2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 08:44:54 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jun 2020 12:44:54 +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: <1592052294.29.0.247908742591.issue40834@roundup.psfhosted.org> miss-islington added the comment: New changeset 26db10a431bf5b55340f4427bf015719e384d306 by Miss Islington (bot) in branch '3.8': bpo-40834: Fix truncate when sending str object with channel (GH-20555) https://github.com/python/cpython/commit/26db10a431bf5b55340f4427bf015719e384d306 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 09:09:54 2020 From: report at bugs.python.org (Mark Shannon) Date: Sat, 13 Jun 2020 13:09:54 +0000 Subject: [issue40925] Remove redundant macros used for stack manipulation in interpreter In-Reply-To: <1591697620.81.0.981270573583.issue40925@roundup.psfhosted.org> Message-ID: <1592053794.56.0.892213167042.issue40925@roundup.psfhosted.org> Mark Shannon added the comment: Dennis, thanks for doing the benchmarking. You seem to have removed rather more macros than I suggested, but it probably won't make much difference to the results. Since this may have a negative effect on performance and doesn't seem to be popular, let's drop it. For the record, my motivation for this change is for tooling. Instructions that only use POP, PEEK and PUSH, are much easier to analyze for tools like verifiers and optimizers. Such "nice to have" features aren't worth the slowdown. ---------- resolution: -> wont fix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 09:10:03 2020 From: report at bugs.python.org (Mark Shannon) Date: Sat, 13 Jun 2020 13:10:03 +0000 Subject: [issue40925] Remove redundant macros used for stack manipulation in interpreter In-Reply-To: <1591697620.81.0.981270573583.issue40925@roundup.psfhosted.org> Message-ID: <1592053803.02.0.456653932565.issue40925@roundup.psfhosted.org> Change by Mark Shannon : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 10:55:23 2020 From: report at bugs.python.org (Mats Wichmann) Date: Sat, 13 Jun 2020 14:55:23 +0000 Subject: [issue40948] Better identify Windows installer as installer only, not runner In-Reply-To: <1591877055.43.0.578200145114.issue40948@roundup.psfhosted.org> Message-ID: <1592060123.48.0.128589451258.issue40948@roundup.psfhosted.org> Mats Wichmann added the comment: "on python-list and probably elsewhere"... I can confirm these questions get mailed to webmaster at python.org :) A couple of comments since I see these fairly frequently: The "using" doc page may have too much information for beginner tastes, but at least it answers a lot of questions. but it's hard to find... it would be nice if the OS-specific installation page actually pointed to it - or to a more concise alternative if that's preferred. Applies to Mac as well, as most people who install on Mac seem to have some surprise with it not launching the way they expect. Proposed text: "If you want to run Python, press Start and find 'Python 3.x' under 'P', or enter 'python' in the "Search for anything" box on the taskbar." - why not mention the Python Launcher here? Isn't that the preferred approach now for the pydotorg installer? ---------- nosy: +mwichmann _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 11:36:05 2020 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Jun 2020 15:36:05 +0000 Subject: [issue33393] update config.guess and config.sub In-Reply-To: <1525108484.46.0.682650639539.issue33393@psf.upfronthosting.co.za> Message-ID: <1592062565.92.0.274120643516.issue33393@roundup.psfhosted.org> Change by Roundup Robot : ---------- nosy: +python-dev nosy_count: 2.0 -> 3.0 pull_requests: +20046 pull_request: https://github.com/python/cpython/pull/20854 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 11:57:40 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jun 2020 15:57:40 +0000 Subject: [issue40957] _Py_fopen_obj leaks reference on audit error In-Reply-To: <1591957216.36.0.726588708522.issue40957@roundup.psfhosted.org> Message-ID: <1592063860.59.0.230320511663.issue40957@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +20047 pull_request: https://github.com/python/cpython/pull/20855 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 11:57:30 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 13 Jun 2020 15:57:30 +0000 Subject: [issue40957] _Py_fopen_obj leaks reference on audit error In-Reply-To: <1591957216.36.0.726588708522.issue40957@roundup.psfhosted.org> Message-ID: <1592063850.02.0.0410890157356.issue40957@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 9672912e8f90374fd31b37ca0fb7cefbc6f4c555 by Christian Heimes in branch 'master': bpo-40957: Fix refleak in _Py_fopen_obj() (GH-20827) https://github.com/python/cpython/commit/9672912e8f90374fd31b37ca0fb7cefbc6f4c555 ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 11:57:52 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jun 2020 15:57:52 +0000 Subject: [issue40957] _Py_fopen_obj leaks reference on audit error In-Reply-To: <1591957216.36.0.726588708522.issue40957@roundup.psfhosted.org> Message-ID: <1592063872.38.0.60042056278.issue40957@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20048 pull_request: https://github.com/python/cpython/pull/20856 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 12:03:38 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 13 Jun 2020 16:03:38 +0000 Subject: [issue40924] Recent importlib change breaks most recent certifi == 2020.4.5.2 In-Reply-To: <1591682388.65.0.686796854093.issue40924@roundup.psfhosted.org> Message-ID: <1592064218.31.0.634868127327.issue40924@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +20049 pull_request: https://github.com/python/cpython/pull/20857 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 12:15:12 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jun 2020 16:15:12 +0000 Subject: [issue40957] _Py_fopen_obj leaks reference on audit error In-Reply-To: <1591957216.36.0.726588708522.issue40957@roundup.psfhosted.org> Message-ID: <1592064912.91.0.416693265001.issue40957@roundup.psfhosted.org> miss-islington added the comment: New changeset a8936fa5c09c039ad457dda8bdf733be6cc182e3 by Miss Islington (bot) in branch '3.8': bpo-40957: Fix refleak in _Py_fopen_obj() (GH-20827) https://github.com/python/cpython/commit/a8936fa5c09c039ad457dda8bdf733be6cc182e3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 12:19:01 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jun 2020 16:19:01 +0000 Subject: [issue40957] _Py_fopen_obj leaks reference on audit error In-Reply-To: <1591957216.36.0.726588708522.issue40957@roundup.psfhosted.org> Message-ID: <1592065141.0.0.825474998518.issue40957@roundup.psfhosted.org> miss-islington added the comment: New changeset c932f5c1e531f5a3cbf0ce664e4bcd22aa04994d by Miss Islington (bot) in branch '3.9': bpo-40957: Fix refleak in _Py_fopen_obj() (GH-20827) https://github.com/python/cpython/commit/c932f5c1e531f5a3cbf0ce664e4bcd22aa04994d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 12:19:54 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 13 Jun 2020 16:19:54 +0000 Subject: [issue40957] _Py_fopen_obj leaks reference on audit error In-Reply-To: <1591957216.36.0.726588708522.issue40957@roundup.psfhosted.org> Message-ID: <1592065194.61.0.874187420935.issue40957@roundup.psfhosted.org> Dong-hee Na added the comment: Thanks for the work! Christian Heimes ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 12:22:39 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 13 Jun 2020 16:22:39 +0000 Subject: [issue32631] IDLE: revise zzdummy.py In-Reply-To: <1516690644.63.0.467229070634.issue32631@psf.upfronthosting.co.za> Message-ID: <1592065359.88.0.911206860707.issue32631@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- versions: +Python 3.10, Python 3.9 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 12:39:40 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jun 2020 16:39:40 +0000 Subject: [issue40948] Better identify Windows installer as installer only, not runner In-Reply-To: <1591877055.43.0.578200145114.issue40948@roundup.psfhosted.org> Message-ID: <1592066380.9.0.490872207415.issue40948@roundup.psfhosted.org> Terry J. Reedy added the comment: Mats, thank you for chiming in. py.exe is preferred *if* one starts python from a command line. Some beginners have never seen one or know what it is. This is most likely to be true of people who don't know 'installer' from 'launcher'. The installer is usually launched from a browswer or possibly Explorer, not a console. That said, I would not mind also linking to whatever page, but I agree now with Steve about starting with something minimal that works, at least if the default 'install icons' was left checked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 12:42:00 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 13 Jun 2020 16:42:00 +0000 Subject: [issue33881] dataclasses should use NFKC to find duplicate members In-Reply-To: <1529172128.32.0.56676864532.issue33881@psf.upfronthosting.co.za> Message-ID: <1592066520.87.0.0760922410975.issue33881@roundup.psfhosted.org> Eric V. Smith added the comment: I agree with Raymond. There's no real harm being caused here. ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 12:53:22 2020 From: report at bugs.python.org (Keith Spitz) Date: Sat, 13 Jun 2020 16:53:22 +0000 Subject: [issue40969] Python 3.8.3 And Now For Something CompletelyDifferent Message-ID: <1592067202.36.0.876883862148.issue40969@roundup.psfhosted.org> New submission from Keith Spitz : For the totally unimportant list... On the Python 3.8.3 release page (https://www.python.org/downloads/release/python-383/), Mr. Anemone was actually played by Graham Chapman and not John Cleese (https://montypython.fandom.com/wiki/Flying_Lessons). ---------- assignee: docs at python components: Documentation messages: 371464 nosy: Keith Spitz, docs at python priority: normal severity: normal status: open title: Python 3.8.3 And Now For Something CompletelyDifferent versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 13:12:44 2020 From: report at bugs.python.org (Mats Wichmann) Date: Sat, 13 Jun 2020 17:12:44 +0000 Subject: [issue40948] Better identify Windows installer as installer only, not runner In-Reply-To: <1591877055.43.0.578200145114.issue40948@roundup.psfhosted.org> Message-ID: <1592068364.91.0.15922453448.issue40948@roundup.psfhosted.org> Mats Wichmann added the comment: > py.exe is preferred *if* one starts python from a command line. I'm not a habitual Windows user (a certain project is making me spend way more time there than usual), but if I start typing python to a Windows search, after the first two letters the launcher is usually the highlighted match ("Best match" it says on Win10), so it's not *just* from the command line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 13:35:15 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jun 2020 17:35:15 +0000 Subject: [issue37674] Is imp module deprecated or pending deprecation? In-Reply-To: <1564006542.59.0.779053208257.issue37674@roundup.psfhosted.org> Message-ID: <1592069715.46.0.212258241904.issue37674@roundup.psfhosted.org> miss-islington added the comment: New changeset dea3223740127ac13f984c1d38f127ab6701af44 by Zackery Spytz in branch 'master': bpo-37674: Tweak imp module deprecation note in the docs (GH-20480) https://github.com/python/cpython/commit/dea3223740127ac13f984c1d38f127ab6701af44 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 13:35:40 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jun 2020 17:35:40 +0000 Subject: [issue37674] Is imp module deprecated or pending deprecation? In-Reply-To: <1564006542.59.0.779053208257.issue37674@roundup.psfhosted.org> Message-ID: <1592069740.22.0.932053613683.issue37674@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20051 pull_request: https://github.com/python/cpython/pull/20860 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 13:35:29 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jun 2020 17:35:29 +0000 Subject: [issue37674] Is imp module deprecated or pending deprecation? In-Reply-To: <1564006542.59.0.779053208257.issue37674@roundup.psfhosted.org> Message-ID: <1592069729.54.0.196319437674.issue37674@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20050 pull_request: https://github.com/python/cpython/pull/20859 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 13:35:51 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jun 2020 17:35:51 +0000 Subject: [issue37674] Is imp module deprecated or pending deprecation? In-Reply-To: <1564006542.59.0.779053208257.issue37674@roundup.psfhosted.org> Message-ID: <1592069751.8.0.502589357122.issue37674@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20052 pull_request: https://github.com/python/cpython/pull/20861 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 13:37:15 2020 From: report at bugs.python.org (Brett Cannon) Date: Sat, 13 Jun 2020 17:37:15 +0000 Subject: [issue37674] Is imp module deprecated or pending deprecation? In-Reply-To: <1564006542.59.0.779053208257.issue37674@roundup.psfhosted.org> Message-ID: <1592069835.63.0.57519353737.issue37674@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 15:10:24 2020 From: report at bugs.python.org (E. Paine) Date: Sat, 13 Jun 2020 19:10:24 +0000 Subject: [issue40893] tkinter integrate TkDND support In-Reply-To: <1591474190.65.0.383574909158.issue40893@roundup.psfhosted.org> Message-ID: <1592075424.95.0.820769131026.issue40893@roundup.psfhosted.org> Change by E. Paine : ---------- nosy: +ned.deily, steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 15:38:46 2020 From: report at bugs.python.org (Fantix King) Date: Sat, 13 Jun 2020 19:38:46 +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: <1592077126.77.0.814850128249.issue30064@roundup.psfhosted.org> Fantix King added the comment: I've been testing on local VMs with Gentoo and Ubuntu, but the issue cannot be reproduced. The error log is not really revealing anything useful, other than that the send was blocked when it was supposed to be successful. As it is not constantly failing on buildbot (https://buildbot.python.org/all/#/builders/128), I don't know if it is worth it to add some more debug code to this test in master and wait for the next hang. Please kindly advise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 16:55:45 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jun 2020 20:55:45 +0000 Subject: [issue37674] Is imp module deprecated or pending deprecation? In-Reply-To: <1564006542.59.0.779053208257.issue37674@roundup.psfhosted.org> Message-ID: <1592081745.88.0.25705014305.issue37674@roundup.psfhosted.org> miss-islington added the comment: New changeset bda4cc82de06490d982e199e5e49aaed390461ba by Miss Islington (bot) in branch '3.9': [3.9] bpo-37674: Tweak imp module deprecation note in the docs (GH-20480) (GH-20859) https://github.com/python/cpython/commit/bda4cc82de06490d982e199e5e49aaed390461ba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 16:55:59 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jun 2020 20:55:59 +0000 Subject: [issue37674] Is imp module deprecated or pending deprecation? In-Reply-To: <1564006542.59.0.779053208257.issue37674@roundup.psfhosted.org> Message-ID: <1592081759.63.0.799683230854.issue37674@roundup.psfhosted.org> miss-islington added the comment: New changeset f8c05bb3a6f25224d7767561ec6a36a737e17779 by Miss Islington (bot) in branch '3.8': [3.8] bpo-37674: Tweak imp module deprecation note in the docs (GH-20480) (GH-20860) https://github.com/python/cpython/commit/f8c05bb3a6f25224d7767561ec6a36a737e17779 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 16:56:14 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jun 2020 20:56:14 +0000 Subject: [issue37674] Is imp module deprecated or pending deprecation? In-Reply-To: <1564006542.59.0.779053208257.issue37674@roundup.psfhosted.org> Message-ID: <1592081774.41.0.139942906515.issue37674@roundup.psfhosted.org> miss-islington added the comment: New changeset e1ca0c530104bd1e9fa61c167f267e6ca58a798a by Miss Islington (bot) in branch '3.7': [3.7] bpo-37674: Tweak imp module deprecation note in the docs (GH-20480) (GH-20861) https://github.com/python/cpython/commit/e1ca0c530104bd1e9fa61c167f267e6ca58a798a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 18:55:56 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Jun 2020 22:55:56 +0000 Subject: [issue40855] statistics.stdev ignore xbar argument In-Reply-To: <1591187481.58.0.119061539675.issue40855@roundup.psfhosted.org> Message-ID: <1592088956.83.0.847884380948.issue40855@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset d71ab4f73887a6e2b380ddbbfe35b600d236fd4a by Raymond Hettinger in branch 'master': bpo-40855: Fix ignored mu and xbar parameters (GH-20835) https://github.com/python/cpython/commit/d71ab4f73887a6e2b380ddbbfe35b600d236fd4a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 18:56:12 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jun 2020 22:56:12 +0000 Subject: [issue40855] statistics.stdev ignore xbar argument In-Reply-To: <1591187481.58.0.119061539675.issue40855@roundup.psfhosted.org> Message-ID: <1592088972.76.0.872678750052.issue40855@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +20053 pull_request: https://github.com/python/cpython/pull/20862 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 18:56:19 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jun 2020 22:56:19 +0000 Subject: [issue40855] statistics.stdev ignore xbar argument In-Reply-To: <1591187481.58.0.119061539675.issue40855@roundup.psfhosted.org> Message-ID: <1592088979.99.0.848235330721.issue40855@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20054 pull_request: https://github.com/python/cpython/pull/20863 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 19:03:24 2020 From: report at bugs.python.org (Tiago Illipronti Girardi) Date: Sat, 13 Jun 2020 23:03:24 +0000 Subject: [issue40900] uuid module build fix on FreeBSD proposal In-Reply-To: <1591544143.85.0.748554475357.issue40900@roundup.psfhosted.org> Message-ID: <1592089404.96.0.626566413361.issue40900@roundup.psfhosted.org> Tiago Illipronti Girardi added the comment: The problem isn't exclusive to FreeBSD. There are at least 3 problems here (see also: issue 32627). -First is that there are 2 low-level uuid interfaces (3 if you count Windows but that is isolated and not a problem here) supposed to be declared on the headers below: 1) uuid/uuid.h which is supposed to maybe declare uuid_generate_time_safe and declare uuid_generate_time, and probably must be linked with '-luuid'. 2) uuid.h: which is supposed to declare uuid_create and maybe uuid_enc_be (which as I understand is libc on FreeBSD an some others). The way it currently works (I guess, 'configure' conspicuously doesn't end in '.py'), 'configure' tries to find uuid/uuid.h, if it succeeds, it `#define HAVE_UUID_UUID_H 1`, then it tries to find 'uuid.h', which on success `#define HAVE_UUID_H 1`. Then it tries to compile with `#include ` and getting the address of `uuid_generate_time_safe`. On success, `#define HAVE_UUID_GENERATE_TIME_SAFE 1.` Next, `#include ` and first tries to compile a code that gets `uuid_create`'s adress (on success `#define HAVE_UUID_CREATE 1`), then compile to get `uuid_enc_be` adress (on success `#define HAVE_UUID_ENC_BE 1`). The last two ignores header detection information. -The second problem is on `make build` and 'setup.py': Then 'setup.py' proceeds to ignore all that and tries to find 'uuid.h' on `Py_build_ext(dist).inc_dirs` or in '/usr/include/uuid', which doesn't work if the user has 'uuid/uuid.h' in `inc_dirs` but not in '/usr/include/uuid'. (It should get the macros from sysconfig and see which header it is looking for and not put '/usr/include/uuid' on the search path, 'configure' already found or not and already disabled the include if not.) If it finds it, it tries to find the uuid library, and adds it to linking on success, else assumes it doesn't need to do anything else and succeeds. If it doesn't find the header (which it may not, even if 'configure' did it), it gives up on the module and warns the user in the end of `make build`. -Third, Modules/_uuidmodule.c (see issue 32627): Inspect the `#includes` and `py_uuid_generate_time_safe()` and you can probably guess how this happens, and you can probably see another bug waiting to to happen: neither 'configure', nor 'setup.py' actually do what '_uuidmodule.c' is expecting, and `py_uuid_generate_time_safe()` will fallback to `uuid_generate_time()` which may not be declared (which gives you another bug, but on linking time, because you may not have passed '-luuid'). At least on Linux (CentOS) on a custom --prefix, with custom libuuid.so, this proccess fails on Python 3.8.3. I edited 'setup.py' to correctly find the header and the library (for my case, anyway, I have no idea on FreeBSD) and it worked. (You don't support this use case, but that's another issue, just adding more info.) OP's patch (which appears to be to check the functions only on detection of the respective modules) may work for his specific case, but I suspect that for a more stable solution we need to change _uuidmodule.c and at least one of 'configure(.ac)' and 'setup.py': - the module directives should behave as 'configure' tests; - which should ideally test for `uuid_generate_time()`; -'setup.py' should listen to 'configure' the same way the module directives do. (and by 'we' I mean I'm volunteering to help, but I will need help on that). Maybe what I'm saying should be another issue entirely, though I'm adding build to components (and I think we should include 3.8 and 3.9 too). Please advise. ---------- components: +Build nosy: +TIGirardi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 19:37:57 2020 From: report at bugs.python.org (Christopher Yeh) Date: Sat, 13 Jun 2020 23:37:57 +0000 Subject: [issue40970] Error in Python Datamodel Documentation Message-ID: <1592091477.81.0.850962820237.issue40970@roundup.psfhosted.org> New submission from Christopher Yeh : The documentation says the following: > A built-in function object is a wrapper around a C function. Examples of built-in functions are `len` and `math.sin` (`math` is a standard built-in module). However, `math` is not always a built-in module, as can be seen in on my own Python installation (Windows 10, WSL 1, Python 3.7.7 installed via conda). >>> import sys >>> sys.builtin_module_names ('_abc', '_ast', '_codecs', '_collections', '_functools', '_imp', '_io', '_locale', '_operator', '_signal', '_sre', '_stat', '_string', '_symtable', '_thread', '_tracemalloc', '_warnings', '_weakref', 'atexit', 'builtins', 'errno', 'faulthandler', 'gc', 'itertools', 'marshal', 'posix', 'pwd', 'sys', 'time', 'xxsubtype', 'zipimport') Therefore, I have submitted a pull request to remove the statement "(`math` is a standard built-in module)" from the documentation. ---------- assignee: docs at python components: Documentation messages: 371473 nosy: chrisyeh, docs at python priority: normal pull_requests: 20055 severity: normal status: open title: Error in Python Datamodel Documentation 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 Jun 13 19:47:49 2020 From: report at bugs.python.org (Gordon P. Hemsley) Date: Sat, 13 Jun 2020 23:47:49 +0000 Subject: [issue40971] Documentation still mentions 'u' string formatting option Message-ID: <1592092069.64.0.724839327789.issue40971@roundup.psfhosted.org> New submission from Gordon P. Hemsley : https://docs.python.org/3/library/stdtypes.html#old-string-formatting still lists the 'u' string formatting option, described as "Obsolete type ? it is identical to 'd'." and linking to PEP 237. However, testing indicates that Python 3 does not support a 'u' option and my archaeology suggests that such support was removed in Python 2.4. It seems this has flown under the radar for quite some time. ---------- assignee: docs at python components: Documentation messages: 371474 nosy: alexandre.vassalotti, benjamin.peterson, berker.peksag, christian.heimes, docs at python, eli.bendersky, ezio.melotti, georg.brandl, gphemsley, martin.panter, ncoghlan, rhettinger priority: normal severity: normal status: open title: Documentation still mentions 'u' string formatting option 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 Jun 13 19:56:23 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Jun 2020 23:56:23 +0000 Subject: [issue40855] statistics.stdev ignore xbar argument In-Reply-To: <1591187481.58.0.119061539675.issue40855@roundup.psfhosted.org> Message-ID: <1592092583.49.0.259826862557.issue40855@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 55c1d21761e2e5feda5665065ea9e2280fa76113 by Miss Islington (bot) in branch '3.9': bpo-40855: Fix ignored mu and xbar parameters (GH-20835) (#GH-20862) https://github.com/python/cpython/commit/55c1d21761e2e5feda5665065ea9e2280fa76113 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 19:57:24 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Jun 2020 23:57:24 +0000 Subject: [issue40855] statistics.stdev ignore xbar argument In-Reply-To: <1591187481.58.0.119061539675.issue40855@roundup.psfhosted.org> Message-ID: <1592092644.87.0.761951157455.issue40855@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 811e040b6e0241339545c2f055db8259b408802f by Miss Islington (bot) in branch '3.8': bpo-40855: Fix ignored mu and xbar parameters (GH-20835) (GH-20863) https://github.com/python/cpython/commit/811e040b6e0241339545c2f055db8259b408802f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 19:58:57 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Jun 2020 23:58:57 +0000 Subject: [issue40855] statistics.stdev ignore xbar argument In-Reply-To: <1591187481.58.0.119061539675.issue40855@roundup.psfhosted.org> Message-ID: <1592092737.57.0.981133871875.issue40855@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for the bug report ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 20:17:45 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 14 Jun 2020 00:17:45 +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: <1592093865.92.0.408773761662.issue30064@roundup.psfhosted.org> Kyle Stanley added the comment: I was able to replicate the failure locally by running the large number of jobs in parallel. We typically use this to test for tricky race conditions, to simulate maximum load: [aeros:~/repos/cpython]$ ./python -m test test_asyncio.test_sock_lowlevel --match test_sock_client_racing -j100 -F -v # [snip] ====================================================================== ERROR: test_sock_client_racing (test.test_asyncio.test_sock_lowlevel.EPollEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/aeros/repos/cpython/Lib/test/test_asyncio/test_sock_lowlevel.py", line 200, in _basetest_sock_send_racing await self.loop.sock_sendall(sock, b'world') File "/home/aeros/repos/cpython/Lib/asyncio/selector_events.py", line 460, in sock_sendall return await fut asyncio.exceptions.CancelledError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/aeros/repos/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 "/home/aeros/repos/cpython/Lib/test/test_asyncio/test_sock_lowlevel.py", line 256, in test_sock_client_racing self.loop.run_until_complete(asyncio.wait_for( File "/home/aeros/repos/cpython/Lib/asyncio/base_events.py", line 642, in run_until_complete return future.result() File "/home/aeros/repos/cpython/Lib/asyncio/tasks.py", line 509, in wait_for raise exceptions.TimeoutError() from exc asyncio.exceptions.TimeoutError ====================================================================== ERROR: test_sock_client_racing (test.test_asyncio.test_sock_lowlevel.PollEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/aeros/repos/cpython/Lib/test/test_asyncio/test_sock_lowlevel.py", line 200, in _basetest_sock_send_racing await self.loop.sock_sendall(sock, b'world') File "/home/aeros/repos/cpython/Lib/asyncio/selector_events.py", line 460, in sock_sendall return await fut asyncio.exceptions.CancelledError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/aeros/repos/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 "/home/aeros/repos/cpython/Lib/test/test_asyncio/test_sock_lowlevel.py", line 256, in test_sock_client_racing self.loop.run_until_complete(asyncio.wait_for( File "/home/aeros/repos/cpython/Lib/asyncio/base_events.py", line 642, in run_until_complete return future.result() File "/home/aeros/repos/cpython/Lib/asyncio/tasks.py", line 509, in wait_for raise exceptions.TimeoutError() from exc asyncio.exceptions.TimeoutError ====================================================================== ERROR: test_sock_client_racing (test.test_asyncio.test_sock_lowlevel.SelectEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/aeros/repos/cpython/Lib/test/test_asyncio/test_sock_lowlevel.py", line 256, in test_sock_client_racing self.loop.run_until_complete(asyncio.wait_for( File "/home/aeros/repos/cpython/Lib/asyncio/base_events.py", line 629, in run_until_complete self.run_forever() File "/home/aeros/repos/cpython/Lib/asyncio/base_events.py", line 596, in run_forever self._run_once() File "/home/aeros/repos/cpython/Lib/asyncio/base_events.py", line 1854, in _run_once event_list = self._selector.select(timeout) File "/home/aeros/repos/cpython/Lib/selectors.py", line 323, in select r, w, _ = self._select(self._readers, self._writers, [], timeout) OSError: [Errno 9] Bad file descriptor I'll try to add some debug lugs to find the source of the failure(s). This one might be a bit tricky to assess though. @Fantix I'd recommend trying to run the local test with the above command, and increasing the parallel job count until it occurs. If it takes more than a minute or two for the tests to run, slowly lower the number. At the moment, the failure has only occurred once in the buildbots, but we might need to temporarily disable it if it occurs repeatedly or find some form of workaround (as it will potentially mask other bugs). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 21:14:40 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 14 Jun 2020 01:14: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: <1592097280.85.0.419527265307.issue30064@roundup.psfhosted.org> Kyle Stanley added the comment: I believe that I might have identified a simple fix for the issue, but first I'd like to clarify on something: What exactly is the reason that we need to use asyncio.wait_for() with a timeout of 10 seconds in these tests? We typically avoid using short duration timeouts on individual tests, largely because we don't want them to fail based on the performance of the device they're ran on. This can be a concern for slower devices running the test suite w/ parallel jobs. If asyncio.wait_for() is necessary in this case, I'd advise increasing the timeout substantially. I didn't experiment with a wide variety of numbers, but increasing the duration from 10 to 60 seconds seems to have fixed the failure locally, so that might be a decent starting point. If it's not necessary, I'd prefer to simply remove the asyncio.wait_for()s in test_sock_client_racing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 23:14:46 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 14 Jun 2020 03:14:46 +0000 Subject: [issue40970] Error in Python Datamodel Documentation In-Reply-To: <1592091477.81.0.850962820237.issue40970@roundup.psfhosted.org> Message-ID: <1592104486.11.0.0226675197365.issue40970@roundup.psfhosted.org> Raymond Hettinger added the comment: What happens when you type, "import math" and "print(type(math))"? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 23:34:54 2020 From: report at bugs.python.org (Christopher Yeh) Date: Sun, 14 Jun 2020 03:34:54 +0000 Subject: [issue40970] Error in Python Datamodel Documentation In-Reply-To: <1592091477.81.0.850962820237.issue40970@roundup.psfhosted.org> Message-ID: <1592105694.36.0.933742597878.issue40970@roundup.psfhosted.org> Christopher Yeh added the comment: Here's the output from my terminal comparing the `math` standard library module (not always built-in) against the `sys` standard library module (always built-in). On Windows 10 x64, WSL 1, Ubuntu 18.04.02 LTS, Python 3.7.7 installed via conda: math is not a built-in module. $ python Python 3.7.7 (default, Mar 26 2020, 15:48:22) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> import math >>> print(math) >>> print(type(math)) >>> import sys >>> print(sys) >>> print(type(sys)) On Windows 10 x64, Python installed directly from Python.org: math is a built-in module. C:\>python Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import math >>> print(math) >>> print(type(math)) >>> import sys >>> print(sys) >>> print(type(sys)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 23:48:13 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 14 Jun 2020 03:48:13 +0000 Subject: [issue40970] Error in Python Datamodel Documentation In-Reply-To: <1592091477.81.0.850962820237.issue40970@roundup.psfhosted.org> Message-ID: <1592106493.48.0.607380265812.issue40970@roundup.psfhosted.org> Raymond Hettinger added the comment: FWIW, the word "built-in" is being used in two different ways here. It is used in a strict sense for sys.builtin_module_names and in a general sense in the datamodel docs. The former only includes modules compiled into the core exe or dll file. The latter includes anything in compiled extension such as the math module. The latter is part of the standard build in the sense that it is included in setup.py and parts of the library depend on it being present: ~ $ python3.8 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 sys >>> 'math' in sys.builtin_module_names >>> False >>> import math >>> type(math.sin) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 13 23:58:33 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 14 Jun 2020 03:58:33 +0000 Subject: [issue33315] Allow queue.Queue to be used in type annotations In-Reply-To: <1524139376.68.0.682650639539.issue33315@psf.upfronthosting.co.za> Message-ID: <1592107113.12.0.529839616751.issue33315@roundup.psfhosted.org> Raymond Hettinger added the comment: Can this can now be handled with "__class_getitem__ = classmethod(GenericAlias)"? ---------- type: -> 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 Sun Jun 14 00:03:16 2020 From: report at bugs.python.org (Ethan Smith) Date: Sun, 14 Jun 2020 04:03:16 +0000 Subject: [issue33315] Allow queue.Queue to be used in type annotations In-Reply-To: <1592107113.12.0.529839616751.issue33315@roundup.psfhosted.org> Message-ID: Ethan Smith added the comment: This was done in https://github.com/python/cpython/pull/19423 The implementation is as Raymond suggests: https://github.com/python/cpython/blame/5aad027db9618f22f6fa2274e05dd50f928d2ed7/Lib/queue.py#L220 On Sat, Jun 13, 2020 at 8:58 PM Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > Can this can now be handled with "__class_getitem__ = > classmethod(GenericAlias)"? > > ---------- > type: -> behavior > versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7, Python 3.8 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 00:06:58 2020 From: report at bugs.python.org (Fantix King) Date: Sun, 14 Jun 2020 04:06:58 +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: <1592107618.3.0.00906333628476.issue30064@roundup.psfhosted.org> Fantix King added the comment: Oh thank you for the clue, that's super helpful! Let me try locally. This fix PR was originally done to solve a hanging call in a race condition, so the test would hang forever if the fix is not working as expected. The 10 seconds wait_for() is to make sure that we don't end up with a test hanging forever. If enlarging the timeout works in some of your cases, that really inspires me on a potential cause of the issue in the test. To simulate the race condition specifically for loop.sock_sendall(), I needed a connected socket with a full send buffer so that the next sock_sendall() call would block. To achieve this, I wrote something like this: with self.assertRaises(BlockingIOError): while True: sock.send(b' ' * 5) And another loop in a subtask to consume the data: while not data: data = await self.loop.sock_recv(server, 1024) data = data.strip() It might be that it cost too much time in these loops (especially the 2nd one because the logs showed that it was blocked on calling sock_sendall()). But that's just a guess yet, let me add some more debug logs and test locally. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 00:21:59 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 14 Jun 2020 04:21:59 +0000 Subject: [issue33315] Allow queue.Queue to be used in type annotations In-Reply-To: <1524139376.68.0.682650639539.issue33315@psf.upfronthosting.co.za> Message-ID: <1592108519.95.0.769649855986.issue33315@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 00:23:29 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 14 Jun 2020 04:23:29 +0000 Subject: [issue33315] Allow queue.Queue to be used in type annotations In-Reply-To: <1524139376.68.0.682650639539.issue33315@psf.upfronthosting.co.za> Message-ID: <1592108609.89.0.882242351576.issue33315@roundup.psfhosted.org> Raymond Hettinger added the comment: Leaving this for Guido or Ivan to decide whether this feature request is fully satisfied now. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 00:28:24 2020 From: report at bugs.python.org (Charles Machalow) Date: Sun, 14 Jun 2020 04:28:24 +0000 Subject: [issue40972] Add a recurse flag to Path.rmdir() Message-ID: <1592108904.89.0.703350475052.issue40972@roundup.psfhosted.org> New submission from Charles Machalow : I think it would make sense to add a recurse flag to the Path.rmdir() method. It would default to False (to allow for current behavior). If set to True, the method would act very similarly to shutil.rmtree() in that it would delete all files in the directory and then delete the directory itself. I understand that this behavior doesn't really line up with os.rmdir(), though I think it makes sense to allow this type of method to appear on the Path object for easy deletion of a directory with things still inside (while looking more object-oriented at the same time) If people think this makes sense, I may be able to provide a PR to just delegate to shutil.rmtree for the recurse=True operation. Thanks for thoughts. ---------- components: Library (Lib) messages: 371487 nosy: Charles Machalow priority: normal severity: normal status: open title: Add a recurse flag to Path.rmdir() type: enhancement versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 01:26:44 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 14 Jun 2020 05:26:44 +0000 Subject: [issue33315] Allow queue.Queue to be used in type annotations In-Reply-To: <1524139376.68.0.682650639539.issue33315@psf.upfronthosting.co.za> Message-ID: <1592112404.82.0.36840647206.issue33315@roundup.psfhosted.org> Change by Guido van Rossum : ---------- resolution: -> fixed status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 01:38:50 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 14 Jun 2020 05:38:50 +0000 Subject: [issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided. In-Reply-To: <1553860338.68.0.823118501948.issue36470@roundup.psfhosted.org> Message-ID: <1592113130.45.0.913006699419.issue36470@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz nosy_count: 4.0 -> 5.0 pull_requests: +20056 pull_request: https://github.com/python/cpython/pull/20867 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 01:51:01 2020 From: report at bugs.python.org (Ben Du) Date: Sun, 14 Jun 2020 05:51:01 +0000 Subject: [issue40973] platform.platform() in Python 3.8 does not report detailed Linux platform information Message-ID: <1592113861.51.0.223662192335.issue40973@roundup.psfhosted.org> New submission from Ben Du : The function platform.platform() does not report detailed Linux platform information (Ubuntu, Debain, CentOS, etc). This information is reported in Python 3.7 and earlier. ---------- components: Library (Lib) messages: 371488 nosy: legendu priority: normal severity: normal status: open title: platform.platform() in Python 3.8 does not report detailed Linux platform information type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 02:20:47 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 14 Jun 2020 06:20: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: <1592115647.17.0.980000261603.issue30064@roundup.psfhosted.org> Kyle Stanley added the comment: No problem at all, and thanks for clarifying. > If enlarging the timeout works in some of your cases, that really inspires me on a potential cause of the issue in the test. To simulate the race condition specifically for loop.sock_sendall(), I needed a connected socket with a full send buffer so that the next sock_sendall() call would block. To achieve this, I wrote something like this: > It might be that it cost too much time in these loops (especially the 2nd one because the logs showed that it was blocked on calling sock_sendall()). But that's just a guess yet, let me add some more debug logs and test locally. That seems reasonable to me and would make the most sense at a glance. If this is confirmed to be the source of the issue, we should be able to just reduce the size of the socket's send buffer via SO_SNDBUF before sending to it so that it fills up much more quickly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 02:31:21 2020 From: report at bugs.python.org (Fantix King) Date: Sun, 14 Jun 2020 06:31:21 +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: <1592116281.47.0.434434779546.issue30064@roundup.psfhosted.org> Fantix King added the comment: OK I think I solved the problem by improving the two loops using smarter buffer sizes: # fill the buffer until sending 5 chars would block size = 8192 while size > 5: with self.assertRaises(BlockingIOError): while True: sock.send(b' ' * size) size = int(size / 2) and # receive everything that is not a space async def recv_all(): rv = b'' while True: buf = await self.loop.sock_recv(server, 8192) if not buf: return rv rv += buf.strip() This test is now running ~25x faster, and the load test crashed my laptop a few times before it hits a timeout. Last question before PR pls: given the fact that this test is to cover a fixed case when loop.sock_*() was hanging forever, should I keep the wait_for(..., timeout=10)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 02:41:45 2020 From: report at bugs.python.org (Fantix King) Date: Sun, 14 Jun 2020 06:41:45 +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: <1592116905.26.0.25170531643.issue30064@roundup.psfhosted.org> Fantix King added the comment: and yes, updated the SO_SNDBUF too ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 02:45:04 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 14 Jun 2020 06:45: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: <1592117104.52.0.725272536213.issue30064@roundup.psfhosted.org> Kyle Stanley added the comment: > Last question before PR pls: given the fact that this test is to cover a fixed case when loop.sock_*() was hanging forever, should I keep the wait_for(..., timeout=10)? For now, I think we can keep the asyncio.wait_for() w/ 10 the sec timeout. I'll have to run the tests locally though w/ the patch to double check (once the PR is opened), and it may still end up needing to be increased if the test fails again in the future. It should be okay though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 02:50:46 2020 From: report at bugs.python.org (Christopher Yeh) Date: Sun, 14 Jun 2020 06:50:46 +0000 Subject: [issue40970] Error in Python Datamodel Documentation In-Reply-To: <1592091477.81.0.850962820237.issue40970@roundup.psfhosted.org> Message-ID: <1592117446.27.0.73919666296.issue40970@roundup.psfhosted.org> Christopher Yeh added the comment: I understand the two uses of the phrase "built-in": 1) to refer to things included with the Python interpreter (e.g. modules in sys.builtin_module_names, and built-in functions like len() and ord()) 2) to refer to things included with Python that are written in C However, I find it fairly difficult to distinguish between the two uses in the context presented: > A built-in function object is a wrapper around a C function. Examples of built-in functions are `len` and `math.sin` (`math` is a standard built-in module). Within the Python Language Reference (docs.python.org/3/reference), this is actually the only case where definition (2) applies, as far as I can tell: https://www.google.com/search?q="built-in+module"+site%3Ahttps%3A%2F%2Fdocs.python.org%2F3%2Freference%2F Also, I am not sure that the parenthetical about `math` being a module written in C adds any additional clarity. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 03:02:15 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jun 2020 07:02:15 +0000 Subject: [issue40972] Add a recurse flag to Path.rmdir() In-Reply-To: <1592108904.89.0.703350475052.issue40972@roundup.psfhosted.org> Message-ID: <1592118135.63.0.757531219797.issue40972@roundup.psfhosted.org> Serhiy Storchaka added the comment: This is virtually a duplicate of issue33498. shutil.rmtree() is very complex function. It is not trivial task to remove directories and files recursively in safe and efficient way. It needs also a way to customize errors handling. We do not want to duplicate all this code in pathlib if shutil.rmtree() already supports path-like objects. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> pathlib.Path wants an rmtree method _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 03:05:37 2020 From: report at bugs.python.org (Fantix King) Date: Sun, 14 Jun 2020 07:05: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: <1592118337.83.0.798545431731.issue30064@roundup.psfhosted.org> Change by Fantix King : ---------- pull_requests: +20057 pull_request: https://github.com/python/cpython/pull/20868 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 03:08:34 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 14 Jun 2020 07:08:34 +0000 Subject: [issue40973] platform.platform() in Python 3.8 does not report detailed Linux platform information In-Reply-To: <1592113861.51.0.223662192335.issue40973@roundup.psfhosted.org> Message-ID: <1592118514.82.0.233794972888.issue40973@roundup.psfhosted.org> Change by Kyle Stanley : ---------- nosy: +jaraco, lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 03:09:21 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 14 Jun 2020 07:09:21 +0000 Subject: [issue40973] platform.platform() in Python 3.8 does not report detailed Linux platform information In-Reply-To: <1592113861.51.0.223662192335.issue40973@roundup.psfhosted.org> Message-ID: <1592118561.82.0.135137731416.issue40973@roundup.psfhosted.org> Change by Kyle Stanley : ---------- nosy: +aeros _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 03:44:10 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jun 2020 07:44: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: <1592120650.81.0.840294411221.issue30064@roundup.psfhosted.org> miss-islington added the comment: New changeset 8f04a84755babe516ebb5304904ea7c15b865c80 by Fantix King in branch 'master': bpo-30064: Fix slow asyncio sock test (GH-20868) https://github.com/python/cpython/commit/8f04a84755babe516ebb5304904ea7c15b865c80 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 03:45:38 2020 From: report at bugs.python.org (SilentGhost) Date: Sun, 14 Jun 2020 07:45:38 +0000 Subject: [issue40973] platform.platform() in Python 3.8 does not report detailed Linux platform information In-Reply-To: <1592113861.51.0.223662192335.issue40973@roundup.psfhosted.org> Message-ID: <1592120738.24.0.312928324092.issue40973@roundup.psfhosted.org> SilentGhost added the comment: This is the result of removal of platform.linux_distribution() in #28167. Which was deprecated since 3.5. As far as I understand, suggested replacement is distro package on pypi (https://pypi.org/project/distro/). ---------- nosy: +SilentGhost, petr.viktorin resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 03:47:10 2020 From: report at bugs.python.org (SilentGhost) Date: Sun, 14 Jun 2020 07:47:10 +0000 Subject: [issue40968] urllib is unable to deal with TURN server infront In-Reply-To: <1592046614.41.0.0652918856783.issue40968@roundup.psfhosted.org> Message-ID: <1592120830.01.0.612542659077.issue40968@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 03:48:31 2020 From: report at bugs.python.org (Charles Machalow) Date: Sun, 14 Jun 2020 07:48:31 +0000 Subject: [issue33498] pathlib.Path wants an rmtree method In-Reply-To: <1526308235.34.0.682650639539.issue33498@psf.upfronthosting.co.za> Message-ID: <1592120911.47.0.835248683166.issue33498@roundup.psfhosted.org> Charles Machalow added the comment: I'm disappointed to see this closed. For new (and old) users, it makes complete sense to have an rmtree method on the Path object itself. If I'm using pathlib, I try not to delegate to os. for file operations, since it also tends to seem more OO and clean to stick with the object methods. Same thought process for shutil for rmtree. We already have things like owner() and group() that explicitly go import grp, pwd to do their job on Path objects. Why is shutil special with regards to using another piece of the standard library from pathlib? To me this request falls in the same boat as those functions; they were likely added for convenience and since it made sense. I believe the very same holds true for the request to add rmtree(). ---------- nosy: +Charles Machalow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 03:49:04 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jun 2020 07:49: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: <1592120944.1.0.568789659117.issue30064@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20058 pull_request: https://github.com/python/cpython/pull/20869 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 04:08:29 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jun 2020 08:08:29 +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: <1592122109.86.0.441084570117.issue30064@roundup.psfhosted.org> miss-islington added the comment: New changeset 83cd968f5cc59ad60b665080087f50fefac17a07 by Miss Islington (bot) in branch '3.9': bpo-30064: Fix slow asyncio sock test (GH-20868) https://github.com/python/cpython/commit/83cd968f5cc59ad60b665080087f50fefac17a07 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 04:13:38 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 14 Jun 2020 08:13:38 +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: <1592122418.21.0.668921300705.issue30064@roundup.psfhosted.org> Kyle Stanley added the comment: Thanks again for working on this @Fantix, and for the continued vigilance on the issue after the test failures occurred in the buildbots. I think this recent PR-20868 will do the trick. At the very least, it will make the failure much more rare than before, which is definitely an improvement. ---------- stage: patch review -> commit review versions: +Python 3.10, Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 07:23:50 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 14 Jun 2020 11:23:50 +0000 Subject: [issue38252] Use 8-byte step to detect ASCII sequence in 64bit Windows builds In-Reply-To: <1569153002.15.0.915285235862.issue38252@roundup.psfhosted.org> Message-ID: <1592133830.22.0.389087757033.issue38252@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +steve.dower, zach.ware versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 08:06:35 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 14 Jun 2020 12:06:35 +0000 Subject: [issue31844] HTMLParser: undocumented not implemented method In-Reply-To: <1508747243.44.0.213398074469.issue31844@psf.upfronthosting.co.za> Message-ID: <1592136395.44.0.0941130205177.issue31844@roundup.psfhosted.org> Cheryl Sabella added the comment: @berker.peksag's last comment was he closed the PR on 23 August 2018. However, he reopened it on 6 January 2020 as @ezio.melotti mentioned that they are both needed. The PR for this issue is waiting to be re-reviewed by Ezio. ---------- nosy: +cheryl.sabella versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 08:08:18 2020 From: report at bugs.python.org (SHRINK_STACK) Date: Sun, 14 Jun 2020 12:08:18 +0000 Subject: [issue40974] possible optimization: SHRINK_STACK(n) Message-ID: <1592136498.04.0.523354391069.issue40974@roundup.psfhosted.org> New submission from SHRINK_STACK : context managers and except blocks generates multiple POP_TOPS constantly and maybe other cases which might lead generation of multiple POP_TOPS. A SHRINK_STACK(n) opcode would make things better (improvement on pyc size, less opcodes = faster evaluation). A possible patch: (to peephole.c) + + case POP_TOP: + h = i + 1; + while (h < codelen && _Py_OPCODE(codestr[h]) == POP_TOP) { + h++; + } + if (h > i + 1) { + codestr[i] = PACKOPARG(SHRINK_STACK, h - i); + fill_nops(codestr, i + 1, h); + nexti = h; + } + break; (to ceval.c) + case TARGET(SHRINK_STACK): { + for (int i = 0; i < oparg; i++) { + PyObject *value = POP(); + Py_DECREF(value); + } + FAST_DISPATCH(); + } + and some other minor things for opcode.py and magic number ---------- messages: 371501 nosy: shrink_stack priority: normal severity: normal status: open title: possible optimization: SHRINK_STACK(n) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 08:12:24 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sun, 14 Jun 2020 12:12:24 +0000 Subject: [issue40924] Recent importlib change breaks most recent certifi == 2020.4.5.2 In-Reply-To: <1591682388.65.0.686796854093.issue40924@roundup.psfhosted.org> Message-ID: <1592136744.15.0.631148009885.issue40924@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 8a3469047c3c7b68f434ed244ef3ae4292dd8cbc by Jason R. Coombs in branch '3.9': [3.9] bpo-40924: Remove protocol for supplying Traversable objects from loaders (GH-20820) https://github.com/python/cpython/commit/8a3469047c3c7b68f434ed244ef3ae4292dd8cbc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 08:26:51 2020 From: report at bugs.python.org (Naglis Jonaitis) Date: Sun, 14 Jun 2020 12:26:51 +0000 Subject: [issue40975] contextlib.AsyncExitStack enter_async_context and aclose should be labeled as coroutine methods Message-ID: <1592137610.97.0.667816309601.issue40975@roundup.psfhosted.org> New submission from Naglis Jonaitis : enter_async_context[1] and aclose[2] are coroutine methods. 1: https://github.com/python/cpython/blob/8f04a84755babe516ebb5304904ea7c15b865c80/Lib/contextlib.py#L548 2: https://github.com/python/cpython/blob/8f04a84755babe516ebb5304904ea7c15b865c80/Lib/contextlib.py#L591 ---------- assignee: docs at python components: Documentation messages: 371503 nosy: docs at python, naglis priority: normal severity: normal status: open title: contextlib.AsyncExitStack enter_async_context and aclose should be labeled as coroutine methods versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 08:28:26 2020 From: report at bugs.python.org (Naglis Jonaitis) Date: Sun, 14 Jun 2020 12:28:26 +0000 Subject: [issue40975] contextlib.AsyncExitStack enter_async_context and aclose should be labeled as coroutine methods In-Reply-To: <1592137610.97.0.667816309601.issue40975@roundup.psfhosted.org> Message-ID: <1592137706.4.0.629832024322.issue40975@roundup.psfhosted.org> Change by Naglis Jonaitis : ---------- keywords: +patch pull_requests: +20059 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20870 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 08:46:16 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 14 Jun 2020 12:46:16 +0000 Subject: [issue40976] Clarify motivation for `chain.from_iterable` Message-ID: <1592138776.38.0.041174641716.issue40976@roundup.psfhosted.org> Change by Ram Rachum : ---------- components: Library (Lib) nosy: cool-RR priority: normal severity: normal status: open title: Clarify motivation for `chain.from_iterable` type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 08:47:15 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 14 Jun 2020 12:47:15 +0000 Subject: [issue40976] Clarify motivation for `chain.from_iterable` Message-ID: <1592138835.02.0.64151434333.issue40976@roundup.psfhosted.org> Change by Ram Rachum : ---------- keywords: +patch pull_requests: +20060 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20871 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 09:22:03 2020 From: report at bugs.python.org (SilentGhost) Date: Sun, 14 Jun 2020 13:22:03 +0000 Subject: [issue40976] Clarify motivation for `chain.from_iterable` Message-ID: <1592140923.25.0.392456854479.issue40976@roundup.psfhosted.org> Change by SilentGhost : ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 09:25:14 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 14 Jun 2020 13:25:14 +0000 Subject: [issue40977] asyncio.trsock.TransportSocket says some APIs will be prohibited in 3.9 Message-ID: <1592141114.24.0.475548647885.issue40977@roundup.psfhosted.org> New submission from Ronald Oussoren : The implementation for asyncio.trsock.TransportSocket says that a number of methods will be prohibited in 3.9 (https://github.com/python/cpython/blob/8f04a84755babe516ebb5304904ea7c15b865c80/Lib/asyncio/trsock.py#L19), but merely warns in both 3.9 and 3.10. It is too late to change this in 3.9, other than updating the warning message. ---------- components: asyncio messages: 371504 nosy: asvetlov, ronaldoussoren, yselivanov priority: normal severity: normal status: open title: asyncio.trsock.TransportSocket says some APIs will be prohibited in 3.9 type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 10:06:28 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 14 Jun 2020 14:06:28 +0000 Subject: [issue40975] contextlib.AsyncExitStack enter_async_context and aclose should be labeled as coroutine methods In-Reply-To: <1592137610.97.0.667816309601.issue40975@roundup.psfhosted.org> Message-ID: <1592143588.32.0.456747897957.issue40975@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +asyncio nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 10:40:23 2020 From: report at bugs.python.org (E. Paine) Date: Sun, 14 Jun 2020 14:40:23 +0000 Subject: [issue40945] TKinter.Tk.geometry(Tk.winfo_geometry()) should be idempotent In-Reply-To: <1591819450.72.0.638106419632.issue40945@roundup.psfhosted.org> Message-ID: <1592145623.21.0.842765126801.issue40945@roundup.psfhosted.org> E. Paine added the comment: I am glad I was able to help. To be consistent with Tk, I don't think the tkinter behaviour should be changed. If you agree, I would really appreciate if you could close the issue as "not a bug" (to give the core devs one less issue they need to look through!). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 10:46:05 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 14 Jun 2020 14:46:05 +0000 Subject: [issue40974] possible optimization: SHRINK_STACK(n) In-Reply-To: <1592136498.04.0.523354391069.issue40974@roundup.psfhosted.org> Message-ID: <1592145965.18.0.310369648363.issue40974@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +Mark.Shannon, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 10:55:24 2020 From: report at bugs.python.org (E. Paine) Date: Sun, 14 Jun 2020 14:55:24 +0000 Subject: [issue39171] Missing default root in tkinter simpledialog.py In-Reply-To: <1577780147.06.0.429247944585.issue39171@roundup.psfhosted.org> Message-ID: <1592146524.52.0.789834626699.issue39171@roundup.psfhosted.org> Change by E. Paine : ---------- nosy: +epaine versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 11:09:38 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jun 2020 15:09:38 +0000 Subject: [issue40945] TKinter.Tk.geometry(Tk.winfo_geometry()) should be idempotent In-Reply-To: <1591819450.72.0.638106419632.issue40945@roundup.psfhosted.org> Message-ID: <1592147378.1.0.209824025688.issue40945@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 Jun 14 11:29:45 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jun 2020 15:29:45 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1592148585.5.0.235750869208.issue40890@roundup.psfhosted.org> Serhiy Storchaka added the comment: There is a tiny portability issue. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 11:35:25 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 14 Jun 2020 15:35:25 +0000 Subject: [issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section In-Reply-To: <1535045437.7.0.56676864532.issue34480@psf.upfronthosting.co.za> Message-ID: <1592148925.26.0.375752108291.issue34480@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 12:03:51 2020 From: report at bugs.python.org (Manuel Kaufmann) Date: Sun, 14 Jun 2020 16:03:51 +0000 Subject: [issue39229] library/functions.rst causes translated builds to fail In-Reply-To: <1578289110.04.0.11997957012.issue39229@roundup.psfhosted.org> Message-ID: <1592150631.66.0.302636616608.issue39229@roundup.psfhosted.org> Manuel Kaufmann added the comment: We are having a similar issue in python-docs-es translation. cpython/Doc/library/ctypes.rst:: WARNING: inconsistent term references in translated message. original: [], translated: [':ref:`evento de auditor?a `'] https://travis-ci.org/github/python/python-docs-es/builds/698122676 Note that the WARNING does not mention a line number in the RST file. From what I could find, this is because the source English sentence is not in the .rst file, but it's a RST directive and the sentence comes from Python code: https://github.com/python/cpython/blob/6f8c8320e9eac9bc7a7f653b43506e75916ce8e8/Doc/tools/extensions/pyspecific.py#L135-L139 The original RST file, uses the directive here: https://github.com/python/cpython/blob/6f8c8320e9eac9bc7a7f653b43506e75916ce8e8/Doc/library/ctypes.rst#L1510 The PO file we are translating, does not have a header with line numbers for this paragraph: https://github.com/python/python-docs-es/blob/c51c38134ba74e26f73732ed96584325536141d3/library/ctypes.po#L1456-L1459 ---------- nosy: +humitos _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 12:17:20 2020 From: report at bugs.python.org (E. Paine) Date: Sun, 14 Jun 2020 16:17:20 +0000 Subject: [issue39756] Event sequence "KeyRelease-Shift_R" not being fired In-Reply-To: <1582699212.15.0.411870257552.issue39756@roundup.psfhosted.org> Message-ID: <1592151440.96.0.910310464429.issue39756@roundup.psfhosted.org> E. Paine added the comment: This is strange, as the release of the right-shift key triggers the binding for the left-shift release. This issue, however, is not a tkinter issue (which just passes the calls onto Tcl/Tk), as running the following in 'wish' prints "R shift down L shift up": bind . {puts {L shift down}} bind . {puts {L shift up}} bind . {puts {R shift down}} bind . {puts {R shift up}} You can take this issue up with the Tcl team if you want (https://core.tcl-lang.org/index.html), however, I ask that you close this issue as third party. ---------- nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 12:37:01 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 14 Jun 2020 16:37:01 +0000 Subject: [issue39756] Event sequence "KeyRelease-Shift_R" not being fired In-Reply-To: <1582699212.15.0.411870257552.issue39756@roundup.psfhosted.org> Message-ID: <1592152621.92.0.513089913022.issue39756@roundup.psfhosted.org> Cheryl Sabella added the comment: @Devin Morgan, thank you for the report and @epaine, thank you for researching the cause. I'll close this as third party. ---------- nosy: +cheryl.sabella resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 12:58:40 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 14 Jun 2020 16:58:40 +0000 Subject: [issue40969] Python 3.8.3 And Now For Something CompletelyDifferent In-Reply-To: <1592067202.36.0.876883862148.issue40969@roundup.psfhosted.org> Message-ID: <1592153920.76.0.534082629035.issue40969@roundup.psfhosted.org> Cheryl Sabella added the comment: Good catch! Please open an issue for this on the pythondotorg repo at https://github.com/python/pythondotorg/issues. Thanks! ---------- nosy: +cheryl.sabella resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 13:23:52 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 14 Jun 2020 17:23:52 +0000 Subject: [issue40974] possible optimization: SHRINK_STACK(n) In-Reply-To: <1592136498.04.0.523354391069.issue40974@roundup.psfhosted.org> Message-ID: <1592155432.0.0.996699668285.issue40974@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > less opcodes = faster evaluation Unfortunately, that is not always true as opcodes can have arbitrary complexity and there are very low-level effects that are relevant in the eval loop. Even if it is better, the improvement may not be worth burning another opcode, especially since the new opcode won't replace POP_TOP (so we need to deal with both). Without evaluating the tradeoffs and how it plays into the current status quo I have some initial questions: - What is the performance improvement of the patch that you propose? Could you run the pyperformance benchmark suite to have some numbers? - How many opcodes less are we talking about? What is the size before and after the suggested change in the stdlib pyc files? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 13:29:50 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 14 Jun 2020 17:29:50 +0000 Subject: [issue40974] possible optimization: SHRINK_STACK(n) In-Reply-To: <1592136498.04.0.523354391069.issue40974@roundup.psfhosted.org> Message-ID: <1592155790.1.0.707381916357.issue40974@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 13:51:00 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jun 2020 17:51:00 +0000 Subject: [issue40974] possible optimization: SHRINK_STACK(n) In-Reply-To: <1592136498.04.0.523354391069.issue40974@roundup.psfhosted.org> Message-ID: <1592157060.24.0.113130133201.issue40974@roundup.psfhosted.org> Serhiy Storchaka added the comment: It increases the size of the eval loop. It can break optimizations which is performed by the C compiler only when the code size does not exceed some limits, and it can exceed the size of processor caches which can make execution less efficient. So there are possible negative effects. We should have evidence that this change actually improves performance. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 15:43:07 2020 From: report at bugs.python.org (ramalho) Date: Sun, 14 Jun 2020 19:43:07 +0000 Subject: [issue40978] Document that typing.SupportsXXX protocols are runtime checkable Message-ID: <1592163787.83.0.523481527574.issue40978@roundup.psfhosted.org> New submission from ramalho : The typing module documentation (https://docs.python.org/3/library/typing.html#typing.SupportsInt) does not mention that the protocols listed below are all decorated with `@runtime_checkable`. This should mentioned in the entry for each protocol and also in the entry for `@runtime_checkable` * SupportsAbs * SupportsBytes * SupportsComplex * SupportsFloat * SupportsIndex * SupportsInt * SupportsRound ---------- assignee: docs at python components: Documentation messages: 371513 nosy: docs at python, ramalho priority: normal severity: normal status: open title: Document that typing.SupportsXXX protocols are runtime checkable versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 15:56:11 2020 From: report at bugs.python.org (ramalho) Date: Sun, 14 Jun 2020 19:56:11 +0000 Subject: [issue40979] typing module docs: keep text, add subsections Message-ID: <1592164571.1.0.235029301981.issue40979@roundup.psfhosted.org> New submission from ramalho : The typing module documentation page has a very long section "Classes, functions, and decorators" (https://docs.python.org/3/library/typing.html#classes-functions-and-decorators) that should be split in subsections. The ordering of the entries seems haphazard: it's not alphabetical. Its grouped according to invisible categories. The categories appear as comments in the source code of typing.py: the `__all__` global lists the API split into categories (see below). We should add these categories to the page as subsections of "Classes, functions, and decorators" - Super-special typing primitives. - ABCs (from collections.abc). - Structural checks, a.k.a. protocols. - Concrete collection types. ---------- assignee: docs at python components: Documentation messages: 371514 nosy: docs at python, ramalho priority: normal severity: normal status: open title: typing module docs: keep text, add subsections versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 16:27:54 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 14 Jun 2020 20:27:54 +0000 Subject: [issue40963] distutils make_zipfile uses random order In-Reply-To: <1591983020.96.0.753934283459.issue40963@roundup.psfhosted.org> Message-ID: <1592166474.48.0.980902523195.issue40963@roundup.psfhosted.org> Raymond Hettinger added the comment: +1 for sorting filenames prior to insertion ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 16:54:40 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 14 Jun 2020 20:54:40 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1592168080.33.0.606456149345.issue40890@roundup.psfhosted.org> Change by Dennis Sweeney : ---------- pull_requests: +20061 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/20873 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 17:03:34 2020 From: report at bugs.python.org (Quentin Wenger) Date: Sun, 14 Jun 2020 21:03:34 +0000 Subject: [issue40980] group names of bytes regexes are strings Message-ID: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> New submission from Quentin Wenger : I noticed that match.groupdict() returns string keys, even for a bytes regex: ``` >>> import re >>> re.match(b"(?P)", b"").groupdict() {'a': b''} ``` This seems somewhat strange, because string and bytes matching in re are kind of two separate parts, cf. doc: > Both patterns and strings to be searched can be Unicode strings (str) as well as 8-bit strings (bytes). However, Unicode strings and 8-bit strings cannot be mixed: that is, you cannot match a Unicode string with a byte pattern or vice-versa; similarly, when asking for a substitution, the replacement string must be of the same type as both the pattern and the search string. ---------- components: Regular Expressions messages: 371516 nosy: ezio.melotti, matpi, mrabarnett priority: normal severity: normal status: open title: group names of bytes regexes are strings type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 18:16:45 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 14 Jun 2020 22:16:45 +0000 Subject: [issue40967] asyncio.Task.all_tasks() and asyncio.Task.current_task() must be removed in 3.9 In-Reply-To: <1592045282.09.0.91488246101.issue40967@roundup.psfhosted.org> Message-ID: <1592173005.49.0.791025600672.issue40967@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +20062 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20874 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 18:26:53 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Sun, 14 Jun 2020 22:26:53 +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: <1592173613.82.0.821003858599.issue40548@roundup.psfhosted.org> Change by Jakub Stasiak : ---------- nosy: +jstasiak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 20:30:46 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Jun 2020 00:30:46 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1592181046.92.0.808072754446.issue40958@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +20063 pull_request: https://github.com/python/cpython/pull/20875 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 20:41:24 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Jun 2020 00:41:24 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1592181684.74.0.318529199579.issue40890@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal nosy_count: 5.0 -> 6.0 pull_requests: +20064 pull_request: https://github.com/python/cpython/pull/20876 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 21:05:26 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Jun 2020 01:05:26 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1592183126.83.0.425197203098.issue40890@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 10c3b2120afa01b2c310ac50e99d8b98c943b0a2 by Pablo Galindo in branch 'master': bpo-40890: Fix compiler warning in dictobject.c (GH-20876) https://github.com/python/cpython/commit/10c3b2120afa01b2c310ac50e99d8b98c943b0a2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 21:15:16 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 15 Jun 2020 01:15:16 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1592183716.59.0.559003920479.issue36346@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +20065 pull_request: https://github.com/python/cpython/pull/20878 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 21:18:10 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 15 Jun 2020 01:18:10 +0000 Subject: [issue40978] Document that typing.SupportsXXX protocols are runtime checkable In-Reply-To: <1592163787.83.0.523481527574.issue40978@roundup.psfhosted.org> Message-ID: <1592183890.7.0.197024411771.issue40978@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +gvanrossum, levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 21:46:48 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 15 Jun 2020 01:46:48 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1592185608.17.0.51581694856.issue36346@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +20066 pull_request: https://github.com/python/cpython/pull/20879 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 14 23:18:12 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 15 Jun 2020 03:18:12 +0000 Subject: [issue40976] Clarify motivation for `chain.from_iterable` Message-ID: <1592191092.42.0.093658027219.issue40976@roundup.psfhosted.org> New submission from Raymond Hettinger : Thank you for the suggestion, but we're going to decline for the reasons mentioned in the PR. Feel free to submit other ideas. ---------- nosy: +rhettinger resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 01:36:56 2020 From: report at bugs.python.org (mike stern) Date: Mon, 15 Jun 2020 05:36:56 +0000 Subject: [issue40981] increment is wrong in 3.7 Message-ID: <1592199416.39.0.0193524951936.issue40981@roundup.psfhosted.org> New submission from mike stern : I noticed i big problem making a simple increment of .1 in python 3.7 using while the result is wrong i=0 while i < 1.2: i += 0.1 print(i) result == RESTART: C:/Users/icosf/AppData/Local/Programs/Python/Python37-32/bb.py == 0.1 0.2 0.30000000000000004 0.4 0.5 0.6 0.7 0.7999999999999999 0.8999999999999999 0.9999999999999999 1.0999999999999999 1.2 what the heck is going on, can someone explain to me ---------- assignee: terry.reedy components: IDLE messages: 371519 nosy: rskiredj at hotmail.com, terry.reedy priority: normal severity: normal status: open title: increment is wrong in 3.7 type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 01:50:31 2020 From: report at bugs.python.org (Sumit Jaiswal) Date: Mon, 15 Jun 2020 05:50:31 +0000 Subject: [issue36144] Dictionary union. (PEP 584) In-Reply-To: <1551327538.36.0.964853059958.issue36144@roundup.psfhosted.org> Message-ID: <1592200231.05.0.859055695159.issue36144@roundup.psfhosted.org> Sumit Jaiswal added the comment: First off, thanks for adding the feature, it's much appreciated. But it'd be great if you guys can enable list merge for the dict having list as its value, in current form I believe it's handling only "key: value" merge. for e.g.: >>> d1 = {'spam': [1, 2, 3]} >>> d2 = {'spam': [2, 3, 4]} >>> d1 | d2 >>> {'spam': [1, 2, 3, 4]} ---------- nosy: +justjais _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 01:53:58 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Jun 2020 05:53:58 +0000 Subject: [issue40981] increment is wrong in 3.7 In-Reply-To: <1592199416.39.0.0193524951936.issue40981@roundup.psfhosted.org> Message-ID: <1592200438.42.0.855233902511.issue40981@roundup.psfhosted.org> Serhiy Storchaka added the comment: https://docs.python.org/3/faq/design.html#why-are-floating-point-calculations-so-inaccurate This is not Python 3.7 specific issue, and is not even Python issue. It is how floating-point numbers work. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 01:55:24 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Jun 2020 05:55:24 +0000 Subject: [issue40890] Dict views should be introspectable In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org> Message-ID: <1592200524.2.0.614584446798.issue40890@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 02:03:07 2020 From: report at bugs.python.org (mike stern) Date: Mon, 15 Jun 2020 06:03:07 +0000 Subject: [issue40981] increment is wrong in 3.7 In-Reply-To: <1592199416.39.0.0193524951936.issue40981@roundup.psfhosted.org> Message-ID: <1592200987.92.0.753977512036.issue40981@roundup.psfhosted.org> mike stern added the comment: problem actually more serious, it is here print(0.7+0.1) , which gives .799999999999 same thing when adding the .1 increment to 4.8 , 5.1 etc ... I am not sure of the pattern but it is acting up with some numbers who will fix this , this is serious I wouldn't trust a language behaving crazy like this the problem is not there in 2.7 why you closed the ticket , who are you ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 02:13:00 2020 From: report at bugs.python.org (SilentGhost) Date: Mon, 15 Jun 2020 06:13:00 +0000 Subject: [issue40981] increment is wrong in 3.7 In-Reply-To: <1592199416.39.0.0193524951936.issue40981@roundup.psfhosted.org> Message-ID: <1592201580.08.0.643875068932.issue40981@roundup.psfhosted.org> SilentGhost added the comment: This isn't a problem, this is how floating number implemented in Python and many other languages. Please read the linked detailed explanation and do not re-open the ticket. ---------- nosy: +SilentGhost status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 02:15:30 2020 From: report at bugs.python.org (mike stern) Date: Mon, 15 Jun 2020 06:15:30 +0000 Subject: [issue40981] increment is wrong in 3.7 In-Reply-To: <1592199416.39.0.0193524951936.issue40981@roundup.psfhosted.org> Message-ID: <1592201730.82.0.860580443711.issue40981@roundup.psfhosted.org> mike stern added the comment: so anybody can close a ticket ? anybody can say their point of view and close a ticket, is that how it goes? this is not serious who is managing this ? is this how we can trust a programming language? it sounds like we are dealing with irresponsible kids here please don't close this ticket until we understand that there is actually this problem in 3.7 and that the problem is fixed ---------- nosy: -SilentGhost status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 02:25:45 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Jun 2020 06:25:45 +0000 Subject: [issue40981] increment is wrong in 3.7 In-Reply-To: <1592199416.39.0.0193524951936.issue40981@roundup.psfhosted.org> Message-ID: <1592202345.66.0.563748922949.issue40981@roundup.psfhosted.org> Change by Christian Heimes : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 02:27:59 2020 From: report at bugs.python.org (mike stern) Date: Mon, 15 Jun 2020 06:27:59 +0000 Subject: [issue40981] increment is wrong in 3.7 In-Reply-To: <1592199416.39.0.0193524951936.issue40981@roundup.psfhosted.org> Message-ID: <1592202479.37.0.0939206847232.issue40981@roundup.psfhosted.org> mike stern added the comment: Christian Heimes why did you close it ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 02:28:52 2020 From: report at bugs.python.org (mike stern) Date: Mon, 15 Jun 2020 06:28:52 +0000 Subject: [issue40981] increment is wrong in 3.7 but not in 2.7 In-Reply-To: <1592199416.39.0.0193524951936.issue40981@roundup.psfhosted.org> Message-ID: <1592202532.48.0.262427164019.issue40981@roundup.psfhosted.org> Change by mike stern : ---------- nosy: -serhiy.storchaka, terry.reedy title: increment is wrong in 3.7 -> increment is wrong in 3.7 but not in 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 02:29:56 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Jun 2020 06:29:56 +0000 Subject: [issue40981] increment is wrong in 3.7 but not in 2.7 In-Reply-To: <1592199416.39.0.0193524951936.issue40981@roundup.psfhosted.org> Message-ID: <1592202596.61.0.0820909312193.issue40981@roundup.psfhosted.org> Christian Heimes added the comment: Multiple people already told you that it is not a bug. It's how floating point standard IEEE 754 works. ---------- nosy: +christian.heimes status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 02:31:54 2020 From: report at bugs.python.org (mike stern) Date: Mon, 15 Jun 2020 06:31:54 +0000 Subject: [issue40981] increment is wrong in 3.7 but not in 2.7 In-Reply-To: <1592199416.39.0.0193524951936.issue40981@roundup.psfhosted.org> Message-ID: <1592202714.8.0.968553495732.issue40981@roundup.psfhosted.org> mike stern added the comment: Christian Heimes you haven't tried it on 2.7 did you ? ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 02:40:32 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Jun 2020 06:40:32 +0000 Subject: [issue40981] increment is wrong in 3.7 but not in 2.7 In-Reply-To: <1592199416.39.0.0193524951936.issue40981@roundup.psfhosted.org> Message-ID: <1592203232.19.0.491906136749.issue40981@roundup.psfhosted.org> Christian Heimes added the comment: Python's float are IEE 754 floats for over 25 years and since Python 1.x, maybe earlier. IIRC standard is from 1985. It's how CPUs have dealt with floats for over 35 years. By the way it's is incredible rude to keep re-opening a bug and responding on a closed bug. Do not reopen the bug again. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 02:45:27 2020 From: report at bugs.python.org (mike stern) Date: Mon, 15 Jun 2020 06:45:27 +0000 Subject: [issue40981] increment is wrong in 3.7 but not in 2.7 In-Reply-To: <1592203232.19.0.491906136749.issue40981@roundup.psfhosted.org> Message-ID: mike stern added the comment: what is rude is to talk to me in an autoritative way like you do you haven't even checked what I said , I said it working in Python 2.7 and it is not in 3.7 and you want to just read me an article. ________________________________ From: report=bugs.python.org at roundup.psfhosted.org on behalf of Christian Heimes Sent: Monday, June 15, 2020 2:40 AM To: rskiredj at hotmail.com Subject: [issue40981] increment is wrong in 3.7 but not in 2.7 Christian Heimes added the comment: Python's float are IEE 754 floats for over 25 years and since Python 1.x, maybe earlier. IIRC standard is from 1985. It's how CPUs have dealt with floats for over 35 years. By the way it's is incredible rude to keep re-opening a bug and responding on a closed bug. Do not reopen the bug again. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 02:47:48 2020 From: report at bugs.python.org (mike stern) Date: Mon, 15 Jun 2020 06:47:48 +0000 Subject: [issue40981] increment is wrong in 3.7 but not in 2.7 In-Reply-To: Message-ID: mike stern added the comment: you can at least try it and see for yourself that what I am saying is actually true but never mind I will keep on opening tickets until someone tries it on 2.7 and see what I am talking about ________________________________ From: Redwane Freedom Is-to-Be-With-God Sent: Monday, June 15, 2020 2:45 AM To: Python tracker Subject: Re: [issue40981] increment is wrong in 3.7 but not in 2.7 what is rude is to talk to me in an autoritative way like you do you haven't even checked what I said , I said it working in Python 2.7 and it is not in 3.7 and you want to just read me an article. ________________________________ From: report=bugs.python.org at roundup.psfhosted.org on behalf of Christian Heimes Sent: Monday, June 15, 2020 2:40 AM To: rskiredj at hotmail.com Subject: [issue40981] increment is wrong in 3.7 but not in 2.7 Christian Heimes added the comment: Python's float are IEE 754 floats for over 25 years and since Python 1.x, maybe earlier. IIRC standard is from 1985. It's how CPUs have dealt with floats for over 35 years. By the way it's is incredible rude to keep re-opening a bug and responding on a closed bug. Do not reopen the bug again. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 02:48:21 2020 From: report at bugs.python.org (mike stern) Date: Mon, 15 Jun 2020 06:48:21 +0000 Subject: [issue40981] increment is wrong in 3.7 but not in 2.7 In-Reply-To: Message-ID: mike stern added the comment: you can at least try it and see for yourself that what I am saying is actually true but never mind I will keep on opening tickets until someone tries it on 2.7 and see what I am talking about ________________________________ From: Redwane Freedom Is-to-Be-With-God Sent: Monday, June 15, 2020 2:45 AM To: Python tracker Subject: Re: [issue40981] increment is wrong in 3.7 but not in 2.7 what is rude is to talk to me in an autoritative way like you do you haven't even checked what I said , I said it working in Python 2.7 and it is not in 3.7 and you want to just read me an article. ________________________________ From: report=bugs.python.org at roundup.psfhosted.org on behalf of Christian Heimes Sent: Monday, June 15, 2020 2:40 AM To: rskiredj at hotmail.com Subject: [issue40981] increment is wrong in 3.7 but not in 2.7 Christian Heimes added the comment: Python's float are IEE 754 floats for over 25 years and since Python 1.x, maybe earlier. IIRC standard is from 1985. It's how CPUs have dealt with floats for over 35 years. By the way it's is incredible rude to keep re-opening a bug and responding on a closed bug. Do not reopen the bug again. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 02:51:20 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 15 Jun 2020 06:51:20 +0000 Subject: [issue40981] increment is wrong in 3.7 but not in 2.7 In-Reply-To: <1592199416.39.0.0193524951936.issue40981@roundup.psfhosted.org> Message-ID: <1592203880.96.0.538047669893.issue40981@roundup.psfhosted.org> Steven D'Aprano added the comment: > I wouldn't trust a language behaving crazy like this I guess then you won't trust C, Java, C++, Swift, Javascript, Ruby, Cobol, Fortran, and pretty much every programming language in existence. The only ones that escape this are ones that don't have floating point numbers at all. > you haven't tried it on 2.7 did you ? We know how Python 2.7 works. Some of us have been using Python for 25 years, since version 1.5 or older. Do you think you are the first person to have noticed this? There are hundreds of thousands of Python programmers, believe me you're not the first, or even the ten-thousandth person to have noticed. Python 2.7 rounds off the default display of floats to make them look "pretty" instead of displaying their actual value. Try this in 2.7 and see what happens: i=0 while i < 1.2: i += 0.1 print "default:", i, "actual: %.24f" % i The calculations are *precisely* the same, only the display is different. Honestly Mike, this is not a Python issue, it is universal to all languages with fixed-size floating point numbers. This is not a bug, it is how numeric computing works *everywhere*. People write peer reviewed scientific papers about this: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.22.6768 https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html If you want to educate yourself on the issue, rather than just rant about not trusting the language and abuse people who have been using the language for decades, you could do a lot worse than to start here: https://randomascii.wordpress.com/2012/05/20/thats-not-normalthe-performance-of-odd-floats/ https://randomascii.wordpress.com/2012/04/05/floating-point-complexities/ and take careful note that the author talks about C, probably the most common, fundamental and trusted programming language in the world. (Also remember that when Bruce Dawson talks about floats in C, they are half the precision of Python floats, which are C doubles.) The bottom line is that floats are not the infinitely precise exact mathematical numbers we learn about in school, they are more like the numbers you get on a calculator. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 03:40:37 2020 From: report at bugs.python.org (mike stern) Date: Mon, 15 Jun 2020 07:40:37 +0000 Subject: [issue40981] increment is wrong in 3.7 but not in 2.7 In-Reply-To: <1592203880.96.0.538047669893.issue40981@roundup.psfhosted.org> Message-ID: mike stern added the comment: I appreciate taking the time to explain , I just wished the other guys did that instead of just closing the ticket on my face. I wished at least they suggested me to use round() without any aggravations but thanks anyway ________________________________ From: report=bugs.python.org at roundup.psfhosted.org on behalf of Steven D'Aprano Sent: Monday, June 15, 2020 2:51 AM To: rskiredj at hotmail.com Subject: [issue40981] increment is wrong in 3.7 but not in 2.7 Steven D'Aprano added the comment: > I wouldn't trust a language behaving crazy like this I guess then you won't trust C, Java, C++, Swift, Javascript, Ruby, Cobol, Fortran, and pretty much every programming language in existence. The only ones that escape this are ones that don't have floating point numbers at all. > you haven't tried it on 2.7 did you ? We know how Python 2.7 works. Some of us have been using Python for 25 years, since version 1.5 or older. Do you think you are the first person to have noticed this? There are hundreds of thousands of Python programmers, believe me you're not the first, or even the ten-thousandth person to have noticed. Python 2.7 rounds off the default display of floats to make them look "pretty" instead of displaying their actual value. Try this in 2.7 and see what happens: i=0 while i < 1.2: i += 0.1 print "default:", i, "actual: %.24f" % i The calculations are *precisely* the same, only the display is different. Honestly Mike, this is not a Python issue, it is universal to all languages with fixed-size floating point numbers. This is not a bug, it is how numeric computing works *everywhere*. People write peer reviewed scientific papers about this: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.22.6768 https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html If you want to educate yourself on the issue, rather than just rant about not trusting the language and abuse people who have been using the language for decades, you could do a lot worse than to start here: https://randomascii.wordpress.com/2012/05/20/thats-not-normalthe-performance-of-odd-floats/ https://randomascii.wordpress.com/2012/04/05/floating-point-complexities/ and take careful note that the author talks about C, probably the most common, fundamental and trusted programming language in the world. (Also remember that when Bruce Dawson talks about floats in C, they are half the precision of Python floats, which are C doubles.) The bottom line is that floats are not the infinitely precise exact mathematical numbers we learn about in school, they are more like the numbers you get on a calculator. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 04:03:24 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 08:03:24 +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: <1592208204.8.0.467678545997.issue40836@roundup.psfhosted.org> miss-islington added the comment: New changeset 25f38d7044a3a47465edd851c4e04f337b2c4b9b by R?mi Lapeyre in branch 'master': bpo-40836: Add docstring to logging.fatal() and logging.Logger.fatal() (GH-20563) https://github.com/python/cpython/commit/25f38d7044a3a47465edd851c4e04f337b2c4b9b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 04:32:34 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Jun 2020 08:32:34 +0000 Subject: [issue40953] _PyWideStringList_Copy breaks asan builds In-Reply-To: <1591947034.46.0.994029214013.issue40953@roundup.psfhosted.org> Message-ID: <1592209954.51.0.735759347481.issue40953@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +vstinner stage: -> needs patch type: compile error -> resource usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 05:18:48 2020 From: report at bugs.python.org (=?utf-8?q?Alberto_Torres_Barr=C3=A1n?=) Date: Mon, 15 Jun 2020 09:18:48 +0000 Subject: [issue40982] copytree example in shutil Message-ID: <1592212728.34.0.101904144419.issue40982@roundup.psfhosted.org> New submission from Alberto Torres Barr?n : The copytree example in https://docs.python.org/3/library/shutil.html#copytree-example does not match the source code, even removing docstrings. In particular is missing parameters and the exceptions are in the wrong order (Error will never be reachable since it is n instance of OSError). ---------- assignee: docs at python components: Documentation messages: 371535 nosy: Alberto Torres Barr?n, docs at python priority: normal severity: normal status: open title: copytree example in shutil versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 06:36:14 2020 From: report at bugs.python.org (E. Paine) Date: Mon, 15 Jun 2020 10:36:14 +0000 Subject: [issue39093] tkinter objects garbage collected from non-tkinter thread cause panic and core dump In-Reply-To: <1576724216.68.0.395572121912.issue39093@roundup.psfhosted.org> Message-ID: <1592217374.72.0.587861063151.issue39093@roundup.psfhosted.org> E. Paine added the comment: My initial thoughts were just to give the standard lecture on why "tkinter + threads = bad". However, looking again at the problem, the async handler error causes the Python interpreter to crash, which, no matter how frowned upon the code is, shouldn't happen. Ultimately, the issue is that a Tkapp object is being deleted in any thread other than the one it was created in. I believe there are two parts to the solution, both of which are for the Tkapp object in the _tkinter module (as there is no guarantee that the user will go through the standard tkinter module): 1. If a Tkapp object is created in a thread other than the main and it is made global, it is deleted in the main thread as part of the interpreter finalisation, not when the thread is finalising. I propose that the Tkapp object can only be created in the main thread, helping with part 2. 2. The Tkapp object 'refuses' to delete in a thread other than main, and instead gets collected on interpreter finalisation if needed (in the main thread). I don't know how to implement this, but if someone has some ideas, I am more than willing to help solidify them into a PR. Antoine, I hope you are the right person to add to the nosy for this (apologies if not). ---------- nosy: +epaine, pitrou versions: +Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 07:23:42 2020 From: report at bugs.python.org (Manuel Jacob) Date: Mon, 15 Jun 2020 11:23:42 +0000 Subject: =?utf-8?q?=5Bissue40983=5D_Can=E2=80=99t_configure_encoding_used_by_urlli?= =?utf-8?q?b=2Erequest=2Eurl2pathname=28=29?= Message-ID: <1592220222.29.0.529443110739.issue40983@roundup.psfhosted.org> New submission from Manuel Jacob : On Python 2, it was possible to recover a percent-encoded byte: >>> from urllib import url2pathname >>> url2pathname('%ff') '\xff' On Python 3, the byte is decoded using the utf-8 encoding and the "replace" error handler (therefore there?s no way to recover the byte): >>> from urllib.request import url2pathname >>> url2pathname('%ff') '?' For my use case (getting the pathname as bytes), it would be sufficient to specify a different encoding (e.g. latin-1) or a different error handler (e.g. surrogateescape) that makes it possible to recover the byte by encoding the result of url2pathname() such that it roundtrips with the encoding and error handler internally used by url2pathname() for percent-encoded bytes. I?m not simply sending a patch, because this might point to a deeper issue. Suppose there?s the following script: import sys from pathlib import Path from urllib.request import urlopen path = Path(sys.argv[1]) path.write_text('Hello, World!') with urlopen(path.as_uri()) as resp: print(resp.read()) If I call this script with b'/tmp/\xff' as the argument, it fails with the following traceback: Traceback (most recent call last): File "/usr/lib/python3.8/urllib/request.py", line 1507, in open_local_file stats = os.stat(localfile) FileNotFoundError: [Errno 2] No such file or directory: '/tmp/?' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "test_url2pathname.py", line 6, in with urlopen(path.as_uri()) as resp: File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.8/urllib/request.py", line 525, in open response = self._open(req, data) File "/usr/lib/python3.8/urllib/request.py", line 542, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1485, in file_open return self.open_local_file(req) File "/usr/lib/python3.8/urllib/request.py", line 1524, in open_local_file raise URLError(exp) urllib.error.URLError: So maybe urllib.request.url2pathname() should use the same encoding and error handler as os.fsencode() / os.fsdecode(). ---------- components: Library (Lib) messages: 371537 nosy: mjacob priority: normal severity: normal status: open title: Can?t configure encoding used by urllib.request.url2pathname() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 08:18:37 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 15 Jun 2020 12:18:37 +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: <1592223517.39.0.279695642105.issue40836@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 08:31:25 2020 From: report at bugs.python.org (E. Paine) Date: Mon, 15 Jun 2020 12:31:25 +0000 Subject: [issue38783] the window size is bigger than the specific size when create a window with a fix size in Windows platform In-Reply-To: <1573630441.73.0.71709021905.issue38783@roundup.psfhosted.org> Message-ID: <1592224285.46.0.620515559736.issue38783@roundup.psfhosted.org> E. Paine added the comment: I have not tested with tcl/tk 8.4, however it does not appear to be a problem with the tcl/tk 8.6. I don't know when the last release of Python packaged with tcl/tk 8.4 was, however the last release of 8.4 itself was in June 2013. I agree with Terry that this should be closed, probably as "out-of-date". ---------- nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 08:33:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 12:33:52 +0000 Subject: [issue29782] Use __builtin_clzl for bits_in_digit if available In-Reply-To: <1489143237.03.0.753738364063.issue29782@psf.upfronthosting.co.za> Message-ID: <1592224432.24.0.300057118594.issue29782@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 794e7d1ab2d7afe70fe0dd87ca8174ac860413e4 by Niklas Fiekas in branch 'master': bpo-29782: Consolidate _Py_Bit_Length() (GH-20739) https://github.com/python/cpython/commit/794e7d1ab2d7afe70fe0dd87ca8174ac860413e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 08:44:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 12:44:55 +0000 Subject: [issue29782] Use __builtin_clzl for bits_in_digit if available In-Reply-To: <1489143237.03.0.753738364063.issue29782@psf.upfronthosting.co.za> Message-ID: <1592225095.1.0.0942734569864.issue29782@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed status: open -> closed versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 08:50:39 2020 From: report at bugs.python.org (Yaroslav Halchenko) Date: Mon, 15 Jun 2020 12:50:39 +0000 Subject: [issue40634] Ignored "BlockingIOError: [Errno 11] Resource temporarily unavailable" are still haunting us In-Reply-To: <1589556602.37.0.773453748753.issue40634@roundup.psfhosted.org> Message-ID: <1592225439.43.0.80691008961.issue40634@roundup.psfhosted.org> Yaroslav Halchenko added the comment: any feedback/ideas/fixes would still be highly appreciated. Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 09:05:48 2020 From: report at bugs.python.org (hai shi) Date: Mon, 15 Jun 2020 13:05:48 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1592226348.58.0.289746011112.issue15494@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 nosy_count: 12.0 -> 13.0 pull_requests: +20067 pull_request: https://github.com/python/cpython/pull/20824 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 09:29:52 2020 From: report at bugs.python.org (Quentin Wenger) Date: Mon, 15 Jun 2020 13:29:52 +0000 Subject: [issue40984] re.compile's repr truncates patterns at 199 characters Message-ID: <1592227791.99.0.0594724563571.issue40984@roundup.psfhosted.org> New submission from Quentin Wenger : This seems somewhat arbitrary and yields unusable results, going against the doc: > repr(object) > Return a string containing a printable representation of an object. For many types, this function makes an attempt to return a string that would yield an object with the same value when passed to eval(), otherwise the representation is a string enclosed in angle brackets that contains the name of the type of the object together with additional information often including the name and address of the object. A class can control what this function returns for its instances by defining a __repr__() method. The truncated representation neither "yields an object with the same value" (it raises a SyntaxError, of course, due to the missing quote and closing parenthesis), nor is "enclosed in angle brackets". ``` >>> import re >>> re.compile("()"*99) re.compile('()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()') >>> re.compile("()"*100) re.compile('()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()() ``` ---------- components: Regular Expressions messages: 371541 nosy: ezio.melotti, matpi, mrabarnett priority: normal severity: normal status: open title: re.compile's repr truncates patterns at 199 characters type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 09:33:13 2020 From: report at bugs.python.org (Quentin Wenger) Date: Mon, 15 Jun 2020 13:33:13 +0000 Subject: [issue40984] re.compile's repr truncates patterns at 199 characters In-Reply-To: <1592227791.99.0.0594724563571.issue40984@roundup.psfhosted.org> Message-ID: <1592227993.11.0.2397795738.issue40984@roundup.psfhosted.org> Quentin Wenger added the comment: Note: it actually truncates at 200 characters, counting the initial quote of the argument's repr. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 09:33:51 2020 From: report at bugs.python.org (Quentin Wenger) Date: Mon, 15 Jun 2020 13:33:51 +0000 Subject: [issue40984] re.compile's repr truncates patterns at 200 characters In-Reply-To: <1592227791.99.0.0594724563571.issue40984@roundup.psfhosted.org> Message-ID: <1592228031.39.0.835931797024.issue40984@roundup.psfhosted.org> Change by Quentin Wenger : ---------- title: re.compile's repr truncates patterns at 199 characters -> re.compile's repr truncates patterns at 200 characters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 09:40:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 13:40:04 +0000 Subject: [issue29782] Use __builtin_clzl for bits_in_digit if available In-Reply-To: <1489143237.03.0.753738364063.issue29782@psf.upfronthosting.co.za> Message-ID: <1592228404.22.0.475423697405.issue29782@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Niklas Fiekas for your tenacity :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 09:45:35 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 15 Jun 2020 13:45:35 +0000 Subject: [issue40985] PEG Parser: SyntaxError text empty when last line has a LINECONT Message-ID: <1592228734.99.0.539504567081.issue40985@roundup.psfhosted.org> New submission from Lysandros Nikolaou : While investigating bpo-40958, the following came up: When a file ends with a line that contains a line continuation character the text of the emitted SyntaxError is empty, contrary to the old parser, where the error text contained the text of the last line. Here is an example: cpython git:(master)$ cat t.py x = 6\% cpython git:(master)$ ./python t.py File "/home/lysnikolaou/repos/cpython/t.py", line 2 ^ SyntaxError: unexpected EOF while parsing cpython git:(master)$ python3.9 -X oldparser t.py File "/home/lysnikolaou/repos/cpython/t.py", line 2 x = 6\ ^ SyntaxError: unexpected EOF while parsing ---------- components: Interpreter Core messages: 371544 nosy: lys.nikolaou priority: normal severity: normal status: open title: PEG Parser: SyntaxError text empty when last line has a LINECONT type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 09:49:07 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 13:49:07 +0000 Subject: [issue40910] Py_GetArgcArgv() is no longer exported by the C API In-Reply-To: <1591622562.08.0.803364056725.issue40910@roundup.psfhosted.org> Message-ID: <1592228947.42.0.0668024059307.issue40910@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20068 pull_request: https://github.com/python/cpython/pull/20886 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 09:50:22 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 15 Jun 2020 13:50:22 +0000 Subject: [issue40985] PEG Parser: SyntaxError text empty when last line has a LINECONT In-Reply-To: <1592228734.99.0.539504567081.issue40985@roundup.psfhosted.org> Message-ID: <1592229022.88.0.633686566639.issue40985@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Copying and pasting the example messed the formatting up. Here it is again. [16:49:16] lysnikolaou:cpython git:(master*) $ cat t.py x = 6\% [16:49:23] lysnikolaou:cpython git:(master*) $ ./python t.py File "/home/lysnikolaou/repos/cpython/t.py", line 2 ^ SyntaxError: unexpected EOF while parsing [16:49:56] lysnikolaou:cpython git:(master*) $ python3.9 -X oldparser t.py File "/home/lysnikolaou/repos/cpython/t.py", line 2 x = 6\ ^ SyntaxError: unexpected EOF while parsing ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 09:50:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 13:50:31 +0000 Subject: [issue40953] _PyWideStringList_Copy breaks asan builds In-Reply-To: <1591947034.46.0.994029214013.issue40953@roundup.psfhosted.org> Message-ID: <1592229031.24.0.382378606761.issue40953@roundup.psfhosted.org> STINNER Victor added the comment: Regression introduced by commit e81f6e687d0f04a45f2389d0b43fafd6d8491624 in bpo-40910. I wrote PR 20886 to fix it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 09:50:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 13:50:52 +0000 Subject: [issue40953] PyConfig_Clear() doesn't clear _orig_argv member (_PyWideStringList_Copy breaks asan builds) In-Reply-To: <1591947034.46.0.994029214013.issue40953@roundup.psfhosted.org> Message-ID: <1592229052.28.0.129162614114.issue40953@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: _PyWideStringList_Copy breaks asan builds -> PyConfig_Clear() doesn't clear _orig_argv member (_PyWideStringList_Copy breaks asan builds) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 09:53:32 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 15 Jun 2020 13:53:32 +0000 Subject: [issue40985] PEG Parser: SyntaxError text empty when last line has a LINECONT In-Reply-To: <1592228734.99.0.539504567081.issue40985@roundup.psfhosted.org> Message-ID: <1592229212.13.0.81726742724.issue40985@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- nosy: +gvanrossum, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 09:53:55 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 15 Jun 2020 13:53:55 +0000 Subject: [issue40985] PEG Parser: SyntaxError text empty when last line has a LINECONT In-Reply-To: <1592228734.99.0.539504567081.issue40985@roundup.psfhosted.org> Message-ID: <1592229235.8.0.526654738198.issue40985@roundup.psfhosted.org> Lysandros Nikolaou added the comment: I keep doing something wrong. I hope it is clean by now what the difference is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:16:12 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 15 Jun 2020 14:16:12 +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: <1592230572.42.0.845194467602.issue40740@roundup.psfhosted.org> Steve Dower added the comment: ?ukasz can add a note to the release page, I believe. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:24:34 2020 From: report at bugs.python.org (Brandt Bucher) Date: Mon, 15 Jun 2020 14:24:34 +0000 Subject: [issue36144] Dictionary union. (PEP 584) In-Reply-To: <1551327538.36.0.964853059958.issue36144@roundup.psfhosted.org> Message-ID: <1592231074.43.0.0848175514044.issue36144@roundup.psfhosted.org> Brandt Bucher added the comment: Similar behavior was considered and ultimately rejected by the PEP as being too specialized: https://www.python.org/dev/peps/pep-0584/#concatenate-values-in-a-list What you're asking for it subtly different, and even *more* specialized than that. I'd recommend just subclassing dict and overriding the operator, as the PEP suggests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:27:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 14:27:54 +0000 Subject: [issue40910] Py_GetArgcArgv() is no longer exported by the C API In-Reply-To: <1591622562.08.0.803364056725.issue40910@roundup.psfhosted.org> Message-ID: <1592231274.76.0.965789624315.issue40910@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e2d47a0568c6da9229580829917fd6aa702133b3 by Victor Stinner in branch 'master': bpo-40910: PyConfig_Clear() clears _orig_argv (GH-20886) https://github.com/python/cpython/commit/e2d47a0568c6da9229580829917fd6aa702133b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:27:50 2020 From: report at bugs.python.org (Vytautas Liuolia) Date: Mon, 15 Jun 2020 14:27:50 +0000 Subject: [issue40986] Async generators are not garbage collected Message-ID: <1592231270.66.0.0853044039719.issue40986@roundup.psfhosted.org> New submission from Vytautas Liuolia : Hello! I am having issues with asynchronous generators not being garbage collected at least until the current loop has completed. In the attached test case (test.py), one starts iterating over an asynchronous generator, then breaks and returns the first element. After each call, gc.collect() is invoked for illustration purposes. It seems that no memory is freed until the whole test() coroutine is done. The for-loop could obviously be extended to more iterations, or swapped out to a while-loop to easily run out of available memory. I have then removed all async stuff, producing test_sync.py (also attached). In the sync case, everything is garbage-collected as I would expect. ---------- components: asyncio files: test.py messages: 371550 nosy: asvetlov, vytas, yselivanov priority: normal severity: normal status: open title: Async generators are not garbage collected type: resource usage versions: Python 3.8 Added file: https://bugs.python.org/file49231/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:27:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 14:27:54 +0000 Subject: [issue40953] PyConfig_Clear() doesn't clear _orig_argv member (_PyWideStringList_Copy breaks asan builds) In-Reply-To: <1591947034.46.0.994029214013.issue40953@roundup.psfhosted.org> Message-ID: <1592231274.7.0.984809184436.issue40953@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e2d47a0568c6da9229580829917fd6aa702133b3 by Victor Stinner in branch 'master': bpo-40910: PyConfig_Clear() clears _orig_argv (GH-20886) https://github.com/python/cpython/commit/e2d47a0568c6da9229580829917fd6aa702133b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:28:03 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 14:28:03 +0000 Subject: [issue40953] PyConfig_Clear() doesn't clear _orig_argv member (_PyWideStringList_Copy breaks asan builds) In-Reply-To: <1591947034.46.0.994029214013.issue40953@roundup.psfhosted.org> Message-ID: <1592231283.35.0.585258915848.issue40953@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +20070 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20887 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:28:03 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 14:28:03 +0000 Subject: [issue40910] Py_GetArgcArgv() is no longer exported by the C API In-Reply-To: <1591622562.08.0.803364056725.issue40910@roundup.psfhosted.org> Message-ID: <1592231283.24.0.373366769503.issue40910@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +20069 pull_request: https://github.com/python/cpython/pull/20887 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:28:27 2020 From: report at bugs.python.org (Vytautas Liuolia) Date: Mon, 15 Jun 2020 14:28:27 +0000 Subject: [issue40986] Async generators are not garbage collected In-Reply-To: <1592231270.66.0.0853044039719.issue40986@roundup.psfhosted.org> Message-ID: <1592231307.39.0.350690858157.issue40986@roundup.psfhosted.org> Change by Vytautas Liuolia : Added file: https://bugs.python.org/file49232/test_sync.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:34:19 2020 From: report at bugs.python.org (Kevin) Date: Mon, 15 Jun 2020 14:34:19 +0000 Subject: [issue40424] AIX: makexp_aix, parallel build (failures) and ld WARNINGS In-Reply-To: <1588090800.25.0.961976947202.issue40424@roundup.psfhosted.org> Message-ID: <1592231659.77.0.466116483811.issue40424@roundup.psfhosted.org> Kevin added the comment: This seems to be a duplicate of https://bugs.python.org/issue19521 The PR for that one seems a little less hacky since it uses make rules to prevent duplication instead of lock files. ---------- nosy: +kadler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:35:11 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 15 Jun 2020 14:35:11 +0000 Subject: [issue40985] PEG Parser: SyntaxError text empty when last line has a LINECONT In-Reply-To: <1592228734.99.0.539504567081.issue40985@roundup.psfhosted.org> Message-ID: <1592231711.55.0.175806754705.issue40985@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- keywords: +patch pull_requests: +20071 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20888 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:36:35 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 15 Jun 2020 14:36:35 +0000 Subject: [issue40893] tkinter integrate TkDND support In-Reply-To: <1591474190.65.0.383574909158.issue40893@roundup.psfhosted.org> Message-ID: <1592231795.95.0.413818342213.issue40893@roundup.psfhosted.org> Steve Dower added the comment: Is there any reason for TkDND to be optional apart from the rest of Tkinter? If not, your installer changes are probably fine, but why not combine the two and just treat it as part of the Tcl/Tk build? (Primarily for Windows, I'd guess. Not sure how that'd work for macOS.) Submitting a PR helps by running checks, and you can mark it as draft to prevent anyone from merging it. Though since it needs to pull down prebuilt binaries, it's not going to work until we sort out how to build the separate pieces. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:38:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 14:38:14 +0000 Subject: [issue40953] PyConfig_Clear() doesn't clear _orig_argv member (_PyWideStringList_Copy breaks asan builds) In-Reply-To: <1591947034.46.0.994029214013.issue40953@roundup.psfhosted.org> Message-ID: <1592231894.14.0.717752629016.issue40953@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:43:00 2020 From: report at bugs.python.org (Doug Hellmann) Date: Mon, 15 Jun 2020 14:43:00 +0000 Subject: [issue37857] Setting logger.level directly has no effect due to caching in 3.7+ In-Reply-To: <1565811970.47.0.529067236549.issue37857@roundup.psfhosted.org> Message-ID: <1592232180.98.0.572408126515.issue37857@roundup.psfhosted.org> Change by Doug Hellmann : ---------- nosy: +doughellmann _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:48:33 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Jun 2020 14:48:33 +0000 Subject: [issue40953] PyConfig_Clear() doesn't clear _orig_argv member (_PyWideStringList_Copy breaks asan builds) In-Reply-To: <1591947034.46.0.994029214013.issue40953@roundup.psfhosted.org> Message-ID: <1592232513.39.0.314511659624.issue40953@roundup.psfhosted.org> Christian Heimes added the comment: Works for me, thanks for the quick fix! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:53:38 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 15 Jun 2020 14:53:38 +0000 Subject: [issue40984] re.compile's repr truncates patterns at 200 characters In-Reply-To: <1592227791.99.0.0594724563571.issue40984@roundup.psfhosted.org> Message-ID: <1592232818.85.0.28606656916.issue40984@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This seems similar to https://bugs.python.org/issue39949 ---------- nosy: +serhiy.storchaka, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:54:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 14:54:13 +0000 Subject: [issue36020] HAVE_SNPRINTF and MSVC std::snprintf support In-Reply-To: <1550485106.18.0.506219958256.issue36020@roundup.psfhosted.org> Message-ID: <1592232853.29.0.243454524879.issue36020@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner nosy_count: 6.0 -> 7.0 pull_requests: +20072 pull_request: https://github.com/python/cpython/pull/20889 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:57:39 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Jun 2020 14:57:39 +0000 Subject: [issue38783] the window size is bigger than the specific size when create a window with a fix size in Windows platform In-Reply-To: <1573630441.73.0.71709021905.issue38783@roundup.psfhosted.org> Message-ID: <1592233059.03.0.549986712092.issue38783@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:59:02 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 14:59:02 +0000 Subject: [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 In-Reply-To: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> Message-ID: <1592233142.59.0.412748735942.issue34226@roundup.psfhosted.org> miss-islington added the comment: New changeset d8cf3514dd4682419a66f6e834bb384ee34afc95 by roger in branch 'master': bpo-34226: fix cgi.parse_multipart without content_length (GH-8530) https://github.com/python/cpython/commit/d8cf3514dd4682419a66f6e834bb384ee34afc95 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:59:08 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 14:59:08 +0000 Subject: [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 In-Reply-To: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> Message-ID: <1592233148.7.0.0397210435331.issue34226@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20073 pull_request: https://github.com/python/cpython/pull/20890 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:59:16 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 14:59:16 +0000 Subject: [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 In-Reply-To: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> Message-ID: <1592233156.81.0.073244259688.issue34226@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20074 pull_request: https://github.com/python/cpython/pull/20891 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 10:59:24 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 14:59:24 +0000 Subject: [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 In-Reply-To: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> Message-ID: <1592233164.87.0.249621904007.issue34226@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20075 pull_request: https://github.com/python/cpython/pull/20892 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 11:00:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 15:00:06 +0000 Subject: [issue36020] HAVE_SNPRINTF and MSVC std::snprintf support In-Reply-To: <1550485106.18.0.506219958256.issue36020@roundup.psfhosted.org> Message-ID: <1592233206.03.0.559929852514.issue36020@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 20889 which removes "snprintf" and "vsnprintf" macros from pyerrors.h. I propose to backport the change to 3.9, but leave 3.8 unchanged. On Python 3.8 and older, the workaround is to manually undefine the macros: --- #include // Undefine macros to work around https://bugs.python.org/issue36020 #undef snprintf #undef vsnprintf --- ---------- versions: +Python 3.10, Python 3.9 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 11:02:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 15:02:28 +0000 Subject: [issue36020] HAVE_SNPRINTF and MSVC std::snprintf support In-Reply-To: <1550485106.18.0.506219958256.issue36020@roundup.psfhosted.org> Message-ID: <1592233348.0.0.563716661399.issue36020@roundup.psfhosted.org> STINNER Victor added the comment: In April, the issue was discussed on the capi-sig mailing list: https://mail.python.org/archives/list/capi-sig at python.org/thread/5NXBZWKBMAPJJLNIXASSAYRIAP2OHJ53/ This issue was also mention in: https://github.com/jupyter-xeus/xeus-python/issues/283 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 11:14:28 2020 From: report at bugs.python.org (Vytautas Liuolia) Date: Mon, 15 Jun 2020 15:14:28 +0000 Subject: [issue40986] Async generators are not garbage collected In-Reply-To: <1592231270.66.0.0853044039719.issue40986@roundup.psfhosted.org> Message-ID: <1592234068.47.0.559141848948.issue40986@roundup.psfhosted.org> Vytautas Liuolia added the comment: Just for the heck of it, I've tried running my test case with Trio (FWIW, I've never used trio before), and it does seem to work as expected. ---------- Added file: https://bugs.python.org/file49233/test_trio.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 11:19:10 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 15:19:10 +0000 Subject: [issue40953] PyConfig_Clear() doesn't clear _orig_argv member (_PyWideStringList_Copy breaks asan builds) In-Reply-To: <1591947034.46.0.994029214013.issue40953@roundup.psfhosted.org> Message-ID: <1592234350.18.0.33154285576.issue40953@roundup.psfhosted.org> miss-islington added the comment: New changeset bab0833d49f8d38488ff1469edcec9b47db0dc5c by Miss Islington (bot) in branch '3.9': bpo-40910: PyConfig_Clear() clears _orig_argv (GH-20886) https://github.com/python/cpython/commit/bab0833d49f8d38488ff1469edcec9b47db0dc5c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 11:19:10 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 15:19:10 +0000 Subject: [issue40910] Py_GetArgcArgv() is no longer exported by the C API In-Reply-To: <1591622562.08.0.803364056725.issue40910@roundup.psfhosted.org> Message-ID: <1592234350.27.0.575945771141.issue40910@roundup.psfhosted.org> miss-islington added the comment: New changeset bab0833d49f8d38488ff1469edcec9b47db0dc5c by Miss Islington (bot) in branch '3.9': bpo-40910: PyConfig_Clear() clears _orig_argv (GH-20886) https://github.com/python/cpython/commit/bab0833d49f8d38488ff1469edcec9b47db0dc5c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 11:33:39 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 15:33:39 +0000 Subject: [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 In-Reply-To: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> Message-ID: <1592235219.55.0.849752623188.issue34226@roundup.psfhosted.org> miss-islington added the comment: New changeset aa83935a56d1fd4d72d4de5f0278a240a2d6844d by Miss Islington (bot) in branch '3.7': [3.7] bpo-34226: fix cgi.parse_multipart without content_length (GH-8530) (GH-20892) https://github.com/python/cpython/commit/aa83935a56d1fd4d72d4de5f0278a240a2d6844d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 11:46:19 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 Jun 2020 15:46:19 +0000 Subject: [issue40981] increment is wrong in 3.7 but not in 2.7 In-Reply-To: <1592199416.39.0.0193524951936.issue40981@roundup.psfhosted.org> Message-ID: <1592235979.92.0.513262474941.issue40981@roundup.psfhosted.org> Terry J. Reedy added the comment: Mike, when you respond by email, delete the text you are responding to. Your email is posted below the already posted text and the quote is useless noise that makes it harder to see what you wrote. Newcomers to Python who think they have seen a bug should best post to python-list or similar forums asking "Is this a bug? If not, please explain.". ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 11:51:37 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 15:51:37 +0000 Subject: [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 In-Reply-To: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> Message-ID: <1592236297.8.0.840704692594.issue34226@roundup.psfhosted.org> miss-islington added the comment: New changeset b87453f94fd391e6700eb25dd91de2e56aeeb98f by Miss Islington (bot) in branch '3.9': bpo-34226: fix cgi.parse_multipart without content_length (GH-8530) https://github.com/python/cpython/commit/b87453f94fd391e6700eb25dd91de2e56aeeb98f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 11:51:39 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 15:51:39 +0000 Subject: [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 In-Reply-To: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> Message-ID: <1592236299.39.0.808295728137.issue34226@roundup.psfhosted.org> miss-islington added the comment: New changeset c72b7f703eec45c1f4006bf5f65092daedaec46e by Miss Islington (bot) in branch '3.8': bpo-34226: fix cgi.parse_multipart without content_length (GH-8530) https://github.com/python/cpython/commit/c72b7f703eec45c1f4006bf5f65092daedaec46e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 11:53:04 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 Jun 2020 15:53:04 +0000 Subject: [issue38783] the window size is bigger than the specific size when create a window with a fix size in Windows platform In-Reply-To: <1573630441.73.0.71709021905.issue38783@roundup.psfhosted.org> Message-ID: <1592236384.26.0.425355297605.issue38783@roundup.psfhosted.org> Terry J. Reedy added the comment: IDLE will not even run with tk 8.4, and anything but the last release of 8.5, 8.5.18 I believe, is not a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 12:04:52 2020 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 15 Jun 2020 16:04:52 +0000 Subject: [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 In-Reply-To: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> Message-ID: <1592237092.51.0.57296814615.issue34226@roundup.psfhosted.org> Change by Senthil Kumaran : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 12:06:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 16:06:29 +0000 Subject: [issue40987] Add tests to test_interpreters to import C extension modules converted to PEP 489 multiphase initialization Message-ID: <1592237189.15.0.645985819824.issue40987@roundup.psfhosted.org> New submission from STINNER Victor : In bpo-1635741, many C extension modules were ported to the new PEP 489 multiphase initialization. Some of these changes suddenly make old bugs visible. I mean that bugs were there for years, but nobody noticed them previously. * _weakref in importlib: bpo-40050 (commit 83d46e0622d2efdf5f3bf8bf8904d0dcb55fc322) * leak in _testcapi: commit 310e2d25170a88ef03f6fd31efcc899fe062da2c (bpo-36854) * Reference leak in select: bpo-32604 (commit 18a90248fdd92b27098cc4db773686a2d10a4d24) * test_threading vs the garbage collector: bpo-40217 "The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type"... This issue has a controversial history... Read bpo-40217 discussion. * etc. The problem is that these issues are discovered afterwards, usually when "Refleaks" buildbots complete. I propose to add a new test case to test_interpreters which would run "import xxx" in _testcapi.run_in_subinterp() on the 34 C extensions already ported to PyModuleDef_Init(): $ grep -l PyModuleDef_Init Modules/*.c Modules/_abc.c Modules/arraymodule.c Modules/atexitmodule.c Modules/audioop.c Modules/binascii.c Modules/_bz2module.c Modules/_codecsmodule.c Modules/_collectionsmodule.c Modules/_contextvarsmodule.c Modules/_cryptmodule.c Modules/errnomodule.c Modules/fcntlmodule.c Modules/_functoolsmodule.c Modules/_heapqmodule.c Modules/itertoolsmodule.c Modules/_json.c Modules/_localemodule.c Modules/mathmodule.c Modules/mmapmodule.c Modules/nismodule.c Modules/_operator.c Modules/posixmodule.c Modules/resource.c Modules/_stat.c Modules/_statisticsmodule.c Modules/syslogmodule.c Modules/_testmultiphase.c Modules/timemodule.c Modules/_uuidmodule.c Modules/_weakref.c Modules/xxlimited.c Modules/xxmodule.c Modules/xxsubtype.c Modules/_zoneinfo.c The test case should explain the purpose of these tests: * ensure that the import doesn't crash * help to discover reference leaks when running "python -m test test_interpreters -R 3:3" Maybe later we could elaborate these tests to ensure that the sub interpreter module is unrelated to the module in the main interpreter. For example, add a specific attribute in the subinterpreter, and then check that it doesn't exist in the main interpreter. But I'm not sure if it's a good idea to import 34 modules in test_interpreters. ---------- components: Tests messages: 371568 nosy: corona10, vstinner priority: normal severity: normal status: open title: Add tests to test_interpreters to import C extension modules converted to PEP 489 multiphase initialization versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 12:21:03 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 15 Jun 2020 16:21:03 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1592238063.57.0.806732237306.issue1635741@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset bf69a8f99f1b0e19a59509c6c4d7015a31d881a1 by Dong-hee Na in branch 'master': bpo-1635741: Port _dbm module to multiphase initialization (GH-20848) https://github.com/python/cpython/commit/bf69a8f99f1b0e19a59509c6c4d7015a31d881a1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 12:23:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 16:23:50 +0000 Subject: [issue40953] PyConfig_Clear() doesn't clear _orig_argv member (_PyWideStringList_Copy breaks asan builds) In-Reply-To: <1591947034.46.0.994029214013.issue40953@roundup.psfhosted.org> Message-ID: <1592238230.01.0.404627504585.issue40953@roundup.psfhosted.org> STINNER Victor added the comment: > Works for me, thanks for the quick fix! I'm surprised that libasan doesn't allow to run an application which leaks memory :-) I understand that it's the intented behavior. At least in this case, it was a real bug and hopefully it was trivial to fix it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 12:36:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 16:36:19 +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: <1592238979.93.0.569973840859.issue36225@roundup.psfhosted.org> STINNER Victor added the comment: I would not qualify the new Python 3.7 behavior (call Py_FatalError()) as a regression, so I remove "3.7regression" keyword. Also, I don't think that we can easily fix this issue in a stable branch, I would prefer to start working on implementation this issue in the master branch, and only later consider to *maybe* backport the change. So I changed the Python version to "3.10". I see multiple non trivial problems: * To finalize the subinterpreter A, Py_Finalize() may switch the current Python thread state from the main interpreter to a Python thread in the subintrepeter A. It can lead to new funny issues. * A subinterpreter can be stuck for whatever reason and refuse to stop. For example, the subinterpreter A may wait for an even from subinterpreter B. If we don't run two interpreters "in parallel" (in threads), it may be stuck forever. * Python 3.10 still has weird code to allow daemon threads to continue to run after Py_Finalize() complete. Maybe we need to add such hacks for subinterpreter which fail to be finalized? For example, kill them (exit) as soon as they attempt to acquire the GIL. Search for tstate_must_exit() in Python/ceval_gil.h. By the way, currently Py_Finalize() calls PyInterpreterState_Clear() which call object finalizers in the main thread of the main interpreter, whereas these finalizers might expect to be called from the thread which created them. I don't know if we must change anything else. Again, all these problems are very complex :-( The simple option, which is sadly a backward incompatible change, is to raise a fatal error in Py_Finalize() if a subinterpreter is still running. Maybe we can start by logging a warning into stderr for now, before introducing the backward incompatible change. Maybe even only emit it when -X dev is used? https://docs.python.org/dev/library/devmode.html ---------- keywords: -3.7regression versions: +Python 3.10 -Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 12:37:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 16:37:16 +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: <1592239036.86.0.715900739678.issue30064@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 12:38:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 16:38:44 +0000 Subject: [issue36020] HAVE_SNPRINTF and MSVC std::snprintf support In-Reply-To: <1550485106.18.0.506219958256.issue36020@roundup.psfhosted.org> Message-ID: <1592239124.75.0.122187436826.issue36020@roundup.psfhosted.org> STINNER Victor added the comment: > On Python 3.8 and older, the workaround is to manually undefine the macros: (...) pybind11 implemented a different workaround: --- /* Don't let Python.h #define (v)snprintf as macro because they are implemented properly in Visual Studio since 2015. */ #if defined(_MSC_VER) && _MSC_VER >= 1900 # define HAVE_SNPRINTF 1 #endif --- https://github.com/pybind/pybind11/pull/2238/files ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 12:50:41 2020 From: report at bugs.python.org (Michael Felt) Date: Mon, 15 Jun 2020 16:50:41 +0000 Subject: [issue40424] AIX: makexp_aix, parallel build (failures) and ld WARNINGS In-Reply-To: <1592231659.77.0.466116483811.issue40424@roundup.psfhosted.org> Message-ID: <706f7a5b-0d05-ec1e-b37f-832019c04d26@felt.demon.nl> Michael Felt added the comment: Yes, it is less hacky - and something to pursue later - as a better solution. Even the idea of perhaps no longer needing makexp_aix and/or ld_so_aix and python.exp is much better solution. However, the goal of this PR is to have something now - that removes the pain (e.g., false bot failures and bot report storage impact) asap. Many thanks for looking - and commenting! On 15/06/2020 16:34, Kevin wrote: > Kevin added the comment: > > This seems to be a duplicate of https://bugs.python.org/issue19521 > > The PR for that one seems a little less hacky since it uses make rules to prevent duplication instead of lock files. > > ---------- > nosy: +kadler > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 12:55:19 2020 From: report at bugs.python.org (Michael Felt) Date: Mon, 15 Jun 2020 16:55:19 +0000 Subject: [issue40878] Use c99 on the aixtools bot In-Reply-To: <1591828625.5.0.0812253185046.issue40878@roundup.psfhosted.org> Message-ID: <011dc8ec-4d75-9cc9-ec88-23fc9a634b33@felt.demon.nl> Michael Felt added the comment: I'll switch my bot https://buildbot.python.org/all/#/builders/119 to use c99_r rather than xlc_r. Test 1129 will b e the first with c99_r (and xlc v13). On 11/06/2020 00:37, Stefan Krah wrote: > Stefan Krah added the comment: > > So it would still be interesting to see what happens if you compile > libmpdec with c99_r (emphasis mine): > > > """ > This command supports all ISO > C99 language features, but does > not support IBM language > extensions. Use this invocation for > *strict* conformance to the C99 > standard. > """ > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 12:56:45 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 16:56:45 +0000 Subject: [issue37556] Launcher help does not mention configuration options In-Reply-To: <1562822280.29.0.253272841298.issue37556@roundup.psfhosted.org> Message-ID: <1592240205.7.0.630618379774.issue37556@roundup.psfhosted.org> miss-islington added the comment: New changeset 2ad799fc761844551da64130a37aba4ace80f53e by Miss Islington (bot) in branch '3.9': bpo-37556 Extend help to include latest overrides (GH-14701) https://github.com/python/cpython/commit/2ad799fc761844551da64130a37aba4ace80f53e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 13:04:20 2020 From: report at bugs.python.org (Kevin) Date: Mon, 15 Jun 2020 17:04:20 +0000 Subject: [issue40424] AIX: makexp_aix, parallel build (failures) and ld WARNINGS In-Reply-To: <1588090800.25.0.961976947202.issue40424@roundup.psfhosted.org> Message-ID: <1592240660.42.0.434974874125.issue40424@roundup.psfhosted.org> Kevin added the comment: FYI, here's a patch we've been using with our builds on PASE (an AIX compatibility layer on the IBM i OS). It runs all the echos and nm in a sub-shell so that all the output appears as a continuous stream instead of 3 separate open/write/close events. There's still a race condition, but since it no longer appends, the last one in will win instead of the mixed result there is now. AFAICT, it gets created much earlier than it gets used so nothing _should_ be reading it while the writers are racing. At least it works for us on PASE with -j16 when building Python 3.6. ---------- Added file: https://bugs.python.org/file49234/python3-makexp_aix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 13:09:14 2020 From: report at bugs.python.org (E. Paine) Date: Mon, 15 Jun 2020 17:09:14 +0000 Subject: [issue40893] tkinter integrate TkDND support In-Reply-To: <1591474190.65.0.383574909158.issue40893@roundup.psfhosted.org> Message-ID: <1592240954.03.0.107871834175.issue40893@roundup.psfhosted.org> E. Paine added the comment: Terry: Thank you, I have updated my local version with a short descriptor and am relieved that I probably don't need to write a PEP as I am not known for my writing skills! Steve: Also thank you. I cannot think of a reason for it to be optional on Windows, however I think it would be best for it to remain a separate external (though, for obvious reasons, you should get the final say). There are two benefits, I think, that being a separate external brings: 1. Easier to update - I guess this depends on your experience of Tix (as an example), but for maintainability, I think it would be easier to update TkDND separate to updating tcl/tk. 2. Old Python builds don't included unneeded binaries - For older python versions, for which the changes to the tkinter library are not going to be backported (3.6 - 3.9), it seems pointless to package the TkDND binaries. 3. Easy to make optional in future - Less important, but if we change our mind about making TkDND optional (as an installer build flag, etc.), the change would be made much easier (whether that be during this issue/PR or as another issue). I will go about creating a PR for this, though if I am feeling particularly incompetent, may need you to set it as a draft! Ned: What changes would be required to the MacOS installer to declare TkDND as an optional dependency (I really don't have a clue how MacOS works so would really appreciate some help)? I presume, based on the READMEs that it doesn't use the source- & bin-deps repos, but it also doesn't have a package manager like Linux distros to which to specify the optional dependencies. Anyone! Could the person responsible for the Linux builds please be added to the nosy, so that I can ask the question about notifying the package maintainers for each of the distros. I would also like to ask if TkDND could be declared as an optional dependency, as many distros do not have it in their main repos (taking Arch Linux as an example, the TkDND package is in the AUR, while tk is in the "extra" repo). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 13:15:59 2020 From: report at bugs.python.org (hai shi) Date: Mon, 15 Jun 2020 17:15:59 +0000 Subject: [issue40965] Segfault when importing unittest module In-Reply-To: <1592015395.95.0.70978961228.issue40965@roundup.psfhosted.org> Message-ID: <1592241359.8.0.224203356183.issue40965@roundup.psfhosted.org> hai shi added the comment: Thanks for your report. I am not catch this segfault in my python compiler. I test your example in: Python 3.8.3 (v3.8.3:6f8c832) Python 3.9.0b3 (v3.9.0b3-dirty:b484871) Python 3.10.0a0 (heads/master-dirty:1c209e3) ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 13:28:55 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Jun 2020 17:28:55 +0000 Subject: [issue40448] ensurepip uses cache directory In-Reply-To: <1588239551.95.0.236818491517.issue40448@roundup.psfhosted.org> Message-ID: <1592242135.87.0.586390825077.issue40448@roundup.psfhosted.org> Ned Deily added the comment: New changeset 4a3a682b12f93a03888e8b59f439bc5fe30d6055 by Krzysztof Konopko in branch 'master': bpo-40448: ensurepip: Do not use cache (GH-19812) https://github.com/python/cpython/commit/4a3a682b12f93a03888e8b59f439bc5fe30d6055 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 13:29:06 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 17:29:06 +0000 Subject: [issue40448] ensurepip uses cache directory In-Reply-To: <1588239551.95.0.236818491517.issue40448@roundup.psfhosted.org> Message-ID: <1592242146.21.0.734145180132.issue40448@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +20076 pull_request: https://github.com/python/cpython/pull/20893 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 13:29:22 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 17:29:22 +0000 Subject: [issue40448] ensurepip uses cache directory In-Reply-To: <1588239551.95.0.236818491517.issue40448@roundup.psfhosted.org> Message-ID: <1592242162.69.0.385492084161.issue40448@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20078 pull_request: https://github.com/python/cpython/pull/20895 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 13:29:14 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 17:29:14 +0000 Subject: [issue40448] ensurepip uses cache directory In-Reply-To: <1588239551.95.0.236818491517.issue40448@roundup.psfhosted.org> Message-ID: <1592242154.0.0.324127434127.issue40448@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20077 pull_request: https://github.com/python/cpython/pull/20894 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 13:44:40 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 17:44:40 +0000 Subject: [issue40448] ensurepip uses cache directory In-Reply-To: <1588239551.95.0.236818491517.issue40448@roundup.psfhosted.org> Message-ID: <1592243080.94.0.325331560516.issue40448@roundup.psfhosted.org> miss-islington added the comment: New changeset b46beb25e4cf213dbf46a0a0cf3f0ed134894f7d by Miss Islington (bot) in branch '3.7': bpo-40448: ensurepip: Do not use cache (GH-19812) https://github.com/python/cpython/commit/b46beb25e4cf213dbf46a0a0cf3f0ed134894f7d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 13:45:25 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 17:45:25 +0000 Subject: [issue40448] ensurepip uses cache directory In-Reply-To: <1588239551.95.0.236818491517.issue40448@roundup.psfhosted.org> Message-ID: <1592243125.19.0.847587209318.issue40448@roundup.psfhosted.org> miss-islington added the comment: New changeset a1d3be4623c8ec7069bd34ccdce336be9cdeb644 by Miss Islington (bot) in branch '3.8': bpo-40448: ensurepip: Do not use cache (GH-19812) https://github.com/python/cpython/commit/a1d3be4623c8ec7069bd34ccdce336be9cdeb644 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 13:48:50 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 17:48:50 +0000 Subject: [issue40448] ensurepip uses cache directory In-Reply-To: <1588239551.95.0.236818491517.issue40448@roundup.psfhosted.org> Message-ID: <1592243330.97.0.716891741257.issue40448@roundup.psfhosted.org> miss-islington added the comment: New changeset 9a0624a3d9feb0c7664ace7a894a04e4af547661 by Miss Islington (bot) in branch '3.9': bpo-40448: ensurepip: Do not use cache (GH-19812) https://github.com/python/cpython/commit/9a0624a3d9feb0c7664ace7a894a04e4af547661 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 13:59:28 2020 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 15 Jun 2020 17:59:28 +0000 Subject: [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 In-Reply-To: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> Message-ID: <1592243968.38.0.265304995945.issue34226@roundup.psfhosted.org> Senthil Kumaran added the comment: This is now fixed in all active versions of python. No documentation changes required for this change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 14:19:06 2020 From: report at bugs.python.org (Matthew Lovell) Date: Mon, 15 Jun 2020 18:19:06 +0000 Subject: [issue40827] os.readlink should support getting the target's printname in Windows In-Reply-To: <1590856267.7.0.74543194815.issue40827@roundup.psfhosted.org> Message-ID: <1592245146.3.0.332317151954.issue40827@roundup.psfhosted.org> Change by Matthew Lovell : ---------- nosy: +mattblovell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 14:39:48 2020 From: report at bugs.python.org (Brett Cannon) Date: Mon, 15 Jun 2020 18:39:48 +0000 Subject: [issue40965] Segfault when importing unittest module via C API In-Reply-To: <1592015395.95.0.70978961228.issue40965@roundup.psfhosted.org> Message-ID: <1592246388.69.0.631381691082.issue40965@roundup.psfhosted.org> Change by Brett Cannon : ---------- title: Segfault when importing unittest module -> Segfault when importing unittest module via C API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 14:47:44 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 15 Jun 2020 18:47:44 +0000 Subject: [issue40985] PEG Parser: SyntaxError text empty when last line has a LINECONT In-Reply-To: <1592228734.99.0.539504567081.issue40985@roundup.psfhosted.org> Message-ID: <1592246864.32.0.524112243687.issue40985@roundup.psfhosted.org> Guido van Rossum added the comment: Yes, it's clear. :-) This is one reason we need to migrate off bpo and onto GitHub. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 15:03:22 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 15 Jun 2020 19:03:22 +0000 Subject: [issue36020] HAVE_SNPRINTF and MSVC std::snprintf support In-Reply-To: <1550485106.18.0.506219958256.issue36020@roundup.psfhosted.org> Message-ID: <1592247802.48.0.903120856231.issue36020@roundup.psfhosted.org> Stefan Krah added the comment: Can't we just use #ifndef __cplusplus instead of changing the function? I don't think anyone compiles the affected files with a C++ compiler. There are many areas in Include/* that fail with C++, e.g. isnan() with -std=c++11. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 15:04:59 2020 From: report at bugs.python.org (E. Paine) Date: Mon, 15 Jun 2020 19:04:59 +0000 Subject: [issue40893] tkinter integrate TkDND support In-Reply-To: <1591474190.65.0.383574909158.issue40893@roundup.psfhosted.org> Message-ID: <1592247899.88.0.970226849366.issue40893@roundup.psfhosted.org> Change by E. Paine : ---------- pull_requests: +20079 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20896 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 15:08:11 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 15 Jun 2020 19:08:11 +0000 Subject: [issue36020] HAVE_SNPRINTF and MSVC std::snprintf support In-Reply-To: <1550485106.18.0.506219958256.issue36020@roundup.psfhosted.org> Message-ID: <1592248091.05.0.361585818912.issue36020@roundup.psfhosted.org> Stefan Krah added the comment: I've tested the MSVC _snprintf extremely extensively in _decimal and never had a problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 15:11:24 2020 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Jun 2020 19:11:24 +0000 Subject: [issue40914] tarfile creates output that appears to omit files In-Reply-To: <1591650900.31.0.37019490492.issue40914@roundup.psfhosted.org> Message-ID: <1592248284.72.0.809517040128.issue40914@roundup.psfhosted.org> Change by Zachary Ware : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 15:16:56 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Jun 2020 19:16:56 +0000 Subject: [issue38488] Update bundled pip to 19.3 In-Reply-To: <1590672328.1.0.455055461704.issue38488@roundup.psfhosted.org> Message-ID: <1592248616.97.0.585791348214.issue38488@roundup.psfhosted.org> Ned Deily added the comment: New changeset 5f79f46612c351bde78a41c5264c42db21008868 by Xavier Fernandez in branch 'master': bpo-38488: Upgrade bundled versions of pip & setuptools (GH-20491) https://github.com/python/cpython/commit/5f79f46612c351bde78a41c5264c42db21008868 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 15:20:33 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 15 Jun 2020 19:20:33 +0000 Subject: [issue40878] Use c99 on the aixtools bot In-Reply-To: <1591385655.5.0.64244490428.issue40878@roundup.psfhosted.org> Message-ID: <1592248833.03.0.225631879404.issue40878@roundup.psfhosted.org> Stefan Krah added the comment: Thanks! Ha, it turns out that c99_r has excellent C99 compliance. :) > Variable arguments macro RAISE_SYNTAX_ERROR was invoked with an empty variable argument list. Totally legit, we should use xlc (at least the front end) more often. So maybe our code base is not C99 compliant enough and we have to switch back for sanity. For the _decimal problem at hand, if you give me the compiler identification macro (__xlc__ or something?) I can try the same as for MSVC and use the explicit EXTINLINE definition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 15:24:55 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Jun 2020 19:24:55 +0000 Subject: [issue40448] ensurepip uses cache directory In-Reply-To: <1588239551.95.0.236818491517.issue40448@roundup.psfhosted.org> Message-ID: <1592249095.3.0.593732258537.issue40448@roundup.psfhosted.org> Change by Ned Deily : ---------- 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 Jun 15 15:30:18 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Jun 2020 19:30:18 +0000 Subject: [issue40119] ensurepip should use different pattern for pip/setuptool wheel files In-Reply-To: <1585595381.19.0.00980598804085.issue40119@roundup.psfhosted.org> Message-ID: <1592249418.57.0.317098828327.issue40119@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report. This issue has been resolved in 5f79f46612c351bde78a41c5264c42db21008868 (and backports) for Issue38488 which upgraded ensurepip to newer versions of pip and setuptools. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Update bundled pip to 19.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 15:33:33 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Jun 2020 19:33:33 +0000 Subject: [issue40808] test_venv fails with HOME=/ on AMD64 FreeBSD Non-Debug 3.x In-Reply-To: <1590674161.97.0.214019790638.issue40808@roundup.psfhosted.org> Message-ID: <1592249613.26.0.486044984074.issue40808@roundup.psfhosted.org> Ned Deily added the comment: The failing test was fixed in an updated replacement PR, PR 20491, for bpo-38488. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Update bundled pip to 19.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 15:37:16 2020 From: report at bugs.python.org (mike stern) Date: Mon, 15 Jun 2020 19:37:16 +0000 Subject: [issue40981] increment is wrong in 3.7 but not in 2.7 In-Reply-To: <1592235979.92.0.513262474941.issue40981@roundup.psfhosted.org> Message-ID: mike stern added the comment: sorry but I don't see the option to delete ________________________________ From: report=bugs.python.org at roundup.psfhosted.org on behalf of Terry J. Reedy Sent: Monday, June 15, 2020 11:46 AM To: rskiredj at hotmail.com Subject: [issue40981] increment is wrong in 3.7 but not in 2.7 Terry J. Reedy added the comment: Mike, when you respond by email, delete the text you are responding to. Your email is posted below the already posted text and the quote is useless noise that makes it harder to see what you wrote. Newcomers to Python who think they have seen a bug should best post to python-list or similar forums asking "Is this a bug? If not, please explain.". ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 16:00:03 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 20:00:03 +0000 Subject: [issue36020] HAVE_SNPRINTF and MSVC std::snprintf support In-Reply-To: <1550485106.18.0.506219958256.issue36020@roundup.psfhosted.org> Message-ID: <1592251203.41.0.146599166896.issue36020@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 8.0 -> 9.0 pull_requests: +20080 pull_request: https://github.com/python/cpython/pull/20897 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 15:59:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 19:59:54 +0000 Subject: [issue36020] HAVE_SNPRINTF and MSVC std::snprintf support In-Reply-To: <1550485106.18.0.506219958256.issue36020@roundup.psfhosted.org> Message-ID: <1592251194.83.0.903293080097.issue36020@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e822e37946f27c09953bb5733acf3b07c2db690f by Victor Stinner in branch 'master': bpo-36020: Remove snprintf macro in pyerrors.h (GH-20889) https://github.com/python/cpython/commit/e822e37946f27c09953bb5733acf3b07c2db690f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 16:01:32 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Jun 2020 20:01:32 +0000 Subject: [issue40893] tkinter integrate TkDND support In-Reply-To: <1591474190.65.0.383574909158.issue40893@roundup.psfhosted.org> Message-ID: <1592251292.82.0.475725777031.issue40893@roundup.psfhosted.org> Ned Deily added the comment: > What changes would be required to the MacOS installer to declare TkDND ... Let's get Windows settled first and then I will look at adding it to the macOS installer. Regarding other platforms: we don't provide binaries for anything other than our own Windows and macOS installers. So I think there are a dew issues here: 1. What to do about third-party distributors of Python? (That includes macOS and Windows). The best we can do, probably, is to make sure the recommended dependency is mentioned in the What's New in 3.10 document. There may be some appropriate mailing lists or groups to discuss further; I vaguely recall there being one someone that was focused on distributors of Python. But there will be a *lot* of variability here since not all Python distributors also distribute their own version of Tcl/Tk for use with Python. 2. We would also want to make sure that our buildbot fleet is updated to include TkDND for those buildbots that attempt to do gui tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 16:10:04 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 20:10:04 +0000 Subject: [issue38488] Update bundled pip to 19.3 In-Reply-To: <1590672328.1.0.455055461704.issue38488@roundup.psfhosted.org> Message-ID: <1592251804.57.0.979828967351.issue38488@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +20081 pull_request: https://github.com/python/cpython/pull/20898 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 16:14:13 2020 From: report at bugs.python.org (Federico Caselli) Date: Mon, 15 Jun 2020 20:14:13 +0000 Subject: [issue40988] singledispatchmethod significantly slower than singledispatch Message-ID: <1592252053.27.0.723113376898.issue40988@roundup.psfhosted.org> New submission from Federico Caselli : The implementation of singledispatchmethod is significantly slower (~4x) than the normal singledispatch version Using timeit to test this example case: from functools import singledispatch, singledispatchmethod import timeit class Test: @singledispatchmethod def go(self, item, arg): print('general') @go.register def _(self, item:int, arg): return item + arg @singledispatch def go(item, arg): print('general') @go.register def _(item:int, arg): return item + arg print(timeit.timeit('t.go(1, 1)', globals={'t': Test()})) print(timeit.timeit('go(1, 1)', globals={'go': go})) Prints on my system. 3.118346 0.713173 Looking at the singledispatchmethod implementation I believe that most of the difference is because a new function is generated every time the method is called. Maybe an implementation similar to cached_property could be used if the class has __dict__ attribute? Trying this simple patch diff --git a/Lib/functools.py b/Lib/functools.py index 5cab497..e42f485 100644 --- a/Lib/functools.py +++ b/Lib/functools.py @@ -900,6 +900,7 @@ class singledispatchmethod: self.dispatcher = singledispatch(func) self.func = func + self.attrname = None def register(self, cls, method=None): """generic_method.register(cls, func) -> func @@ -908,6 +909,10 @@ class singledispatchmethod: """ return self.dispatcher.register(cls, func=method) + def __set_name__(self, owner, name): + if self.attrname is None: + self.attrname = name + def __get__(self, obj, cls=None): def _method(*args, **kwargs): method = self.dispatcher.dispatch(args[0].__class__) @@ -916,6 +921,7 @@ class singledispatchmethod: _method.__isabstractmethod__ = self.__isabstractmethod__ _method.register = self.register update_wrapper(_method, self.func) + obj.__dict__[self.attrname] = _method return _method @property improves the performance noticeably 0.9720976 0.7269078 ---------- components: Library (Lib) messages: 371594 nosy: CaselIT priority: normal severity: normal status: open title: singledispatchmethod significantly slower than singledispatch type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 16:20:13 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 20:20:13 +0000 Subject: [issue36020] HAVE_SNPRINTF and MSVC std::snprintf support In-Reply-To: <1550485106.18.0.506219958256.issue36020@roundup.psfhosted.org> Message-ID: <1592252413.75.0.721966434964.issue36020@roundup.psfhosted.org> miss-islington added the comment: New changeset b498c7f1b3890e43ea2e7d1570f8403707ea4cc6 by Miss Islington (bot) in branch '3.9': bpo-36020: Remove snprintf macro in pyerrors.h (GH-20889) https://github.com/python/cpython/commit/b498c7f1b3890e43ea2e7d1570f8403707ea4cc6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 16:22:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 20:22:35 +0000 Subject: [issue36020] HAVE_SNPRINTF and MSVC std::snprintf support In-Reply-To: <1550485106.18.0.506219958256.issue36020@roundup.psfhosted.org> Message-ID: <1592252555.25.0.632426326009.issue36020@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20082 pull_request: https://github.com/python/cpython/pull/20899 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 16:39:59 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 20:39:59 +0000 Subject: [issue38488] Update bundled pip to 19.3 In-Reply-To: <1590672328.1.0.455055461704.issue38488@roundup.psfhosted.org> Message-ID: <1592253599.53.0.49699617255.issue38488@roundup.psfhosted.org> miss-islington added the comment: New changeset bc996c67b7ba73886bb6edfd637ef3f874ddc9d4 by Miss Islington (bot) in branch '3.9': bpo-38488: Upgrade bundled versions of pip & setuptools (GH-20491) https://github.com/python/cpython/commit/bc996c67b7ba73886bb6edfd637ef3f874ddc9d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 16:52:31 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Jun 2020 20:52:31 +0000 Subject: [issue38488] Update bundled pip to 19.3 In-Reply-To: <1590672328.1.0.455055461704.issue38488@roundup.psfhosted.org> Message-ID: <1592254351.56.0.593213753021.issue38488@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +20083 pull_request: https://github.com/python/cpython/pull/20900 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 17:05:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 21:05:35 +0000 Subject: [issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API Message-ID: <1592255135.39.0.855912884014.issue40989@roundup.psfhosted.org> New submission from STINNER Victor : The _Py_NewReference() and _Py_ForgetReference() functions are tightly coupled to CPython internals. _Py_NewReference() is only exposed because it used by the PyObject_INIT() macro which is the fast inlined flavor of PyObject_Init(). If we make PyObject_INIT() as alias to PyObject_Init(), as already done for the limited C API, _Py_NewReference() can be removed from the public C API (moved to the internal C API). _Py_ForgetReference() function is only defined if Py_TRACE_REFS macro is defined. I propose to also removed it from the public C API (move it to the internal C API). In the CPython code base, _Py_NewReference() is used: * to implement the free list optimization * in _PyBytes_Resize() and unicode_resize() (resize_compact() to be precise) * by PyObject_CallFinalizerFromDealloc() to resurrect an object These are corner cases which can be avoided in third party C extension modules. ---------- components: C API messages: 371597 nosy: vstinner priority: normal severity: normal status: open title: [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 17:24:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 21:24:03 +0000 Subject: [issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API In-Reply-To: <1592255135.39.0.855912884014.issue40989@roundup.psfhosted.org> Message-ID: <1592256243.18.0.753662529101.issue40989@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +20084 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20901 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 17:42:30 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Jun 2020 21:42:30 +0000 Subject: [issue38488] Update bundled pip to 19.3 In-Reply-To: <1590672328.1.0.455055461704.issue38488@roundup.psfhosted.org> Message-ID: <1592257350.42.0.263668630874.issue38488@roundup.psfhosted.org> Ned Deily added the comment: New changeset e63cc2f64668bd1d4581f8efa7089af7e08863b8 by Ned Deily in branch '3.8': bpo-38488: Upgrade bundled versions of pip & setuptools (GH-20491) (GH-20900) https://github.com/python/cpython/commit/e63cc2f64668bd1d4581f8efa7089af7e08863b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 17:42:47 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 21:42:47 +0000 Subject: [issue38488] Update bundled pip to 19.3 In-Reply-To: <1590672328.1.0.455055461704.issue38488@roundup.psfhosted.org> Message-ID: <1592257367.89.0.506280658123.issue38488@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20085 pull_request: https://github.com/python/cpython/pull/20902 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 17:48:40 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 15 Jun 2020 21:48:40 +0000 Subject: [issue34916] Add create_window_function() to sqlite3.Connection In-Reply-To: <1538846966.09.0.545547206417.issue34916@psf.upfronthosting.co.za> Message-ID: <1592257720.57.0.627206976483.issue34916@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +20086 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20903 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 18:01:27 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jun 2020 22:01:27 +0000 Subject: [issue38488] Update bundled pip to 19.3 In-Reply-To: <1590672328.1.0.455055461704.issue38488@roundup.psfhosted.org> Message-ID: <1592258487.43.0.754700008888.issue38488@roundup.psfhosted.org> miss-islington added the comment: New changeset 678ffc42813c9fcf36324ba378632b8a3fc18fb6 by Miss Islington (bot) in branch '3.7': bpo-38488: Upgrade bundled versions of pip & setuptools (GH-20491) (GH-20900) https://github.com/python/cpython/commit/678ffc42813c9fcf36324ba378632b8a3fc18fb6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 18:39:52 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 Jun 2020 22:39:52 +0000 Subject: [issue40561] Add docstrings for webbrowser open functions In-Reply-To: <1588941280.97.0.150032786212.issue40561@roundup.psfhosted.org> Message-ID: <1592260792.9.0.484536313669.issue40561@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 18:46:45 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 Jun 2020 22:46:45 +0000 Subject: [issue40031] IDLE revise config-extensions.def comment- only good modules In-Reply-To: <1584783754.51.0.582471420619.issue40031@roundup.psfhosted.org> Message-ID: <1592261205.2.0.853767230198.issue40031@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: IDLE fails trying to inport old idlelib file names for config -> IDLE revise config-extensions.def comment- only good modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 18:50:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 22:50:58 +0000 Subject: [issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API In-Reply-To: <1592255135.39.0.855912884014.issue40989@roundup.psfhosted.org> Message-ID: <1592261458.53.0.524810250932.issue40989@roundup.psfhosted.org> STINNER Victor added the comment: Work on this issue started in Python 3.9 with the following change of bpo-39542: commit f58bd7c1693fe041f7296a5778d0a11287895648 Author: Victor Stinner Date: Wed Feb 5 13:12:19 2020 +0100 bpo-39542: Make PyObject_INIT() opaque in limited C API (GH-18363) In the limited C API, PyObject_INIT() and PyObject_INIT_VAR() are now defined as aliases to PyObject_Init() and PyObject_InitVar() to make their implementation opaque. It avoids to leak implementation details in the limited C API. Exclude the following functions from the limited C API, move them from object.h to cpython/object.h: * _Py_NewReference() * _Py_ForgetReference() * _PyTraceMalloc_NewReference() * _Py_GetRefTotal() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 18:54:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 22:54:48 +0000 Subject: [issue36020] HAVE_SNPRINTF and MSVC std::snprintf support In-Reply-To: <1550485106.18.0.506219958256.issue36020@roundup.psfhosted.org> Message-ID: <1592261688.38.0.868732774625.issue36020@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 7ab92d54b5d4440d84f6c02b4bc5a70103eff915 by Victor Stinner in branch 'master': bpo-36020: Require vsnprintf() to build Python (GH-20899) https://github.com/python/cpython/commit/7ab92d54b5d4440d84f6c02b4bc5a70103eff915 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 18:58:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 22:58:16 +0000 Subject: [issue36020] HAVE_SNPRINTF and MSVC std::snprintf support In-Reply-To: <1550485106.18.0.506219958256.issue36020@roundup.psfhosted.org> Message-ID: <1592261896.12.0.884652830832.issue36020@roundup.psfhosted.org> STINNER Victor added the comment: I removed the two offending macro defines from Python.h (pyerrors.h) in 3.9 and master branches. I close the issue. I also simplified PyOS_snprintf() and PyOS_vsnprintf() implementation in the master branch: they no longer call Py_FatalError() on buffer overflow, on platforms which don't provide vsnprintf(). vsnprintf() is now required to build the master branch. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 19:05:58 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Jun 2020 23:05:58 +0000 Subject: [issue38488] Update bundled pip to 20.1.1 In-Reply-To: <1590672328.1.0.455055461704.issue38488@roundup.psfhosted.org> Message-ID: <1592262358.97.0.422118275922.issue38488@roundup.psfhosted.org> Ned Deily added the comment: Thanks, Xavier, for the original PR and for the various requested updates! And thanks everyone else for the reviews and follow-ups. Merged for release in 3.9.0, 3.8.4, and 3.7.8. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: Update bundled pip to 19.3 -> Update bundled pip to 20.1.1 versions: +Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 19:28:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 23:28:14 +0000 Subject: [issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API In-Reply-To: <1592255135.39.0.855912884014.issue40989@roundup.psfhosted.org> Message-ID: <1592263694.2.0.884308962699.issue40989@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 04fc4f2a46b2fd083639deb872c3a3037fdb47d6 by Victor Stinner in branch 'master': bpo-40989: PyObject_INIT() becomes an alias to PyObject_Init() (GH-20901) https://github.com/python/cpython/commit/04fc4f2a46b2fd083639deb872c3a3037fdb47d6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 19:28:28 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 Jun 2020 23:28:28 +0000 Subject: [issue40511] IDLE: properly handle '(' and ')' within calls In-Reply-To: <1588680591.22.0.16376057042.issue40511@roundup.psfhosted.org> Message-ID: <1592263708.86.0.0568692835162.issue40511@roundup.psfhosted.org> Terry J. Reedy added the comment: Each '(' and ')' in an argument string such as in f('()(()()((((())))))))))))))') causes a blink. Ditto with a comment withing the call. A related bug is that any unquoted '(', as when one enters f((a+b)*c), dismisses the tip. Proposed partial solution: before displaying a tip, record the opening index (before the opening '('). When there is an opening index, and '(' is keyed, ignore it; no parsing. When the tip is closed (properly), removed the open index. I believe paren matching would work properly. The cause of blinks for ')' in strings and comments would need to be found and remedied. ---------- nosy: +cheryl.sabella, taleinat title: IDLE yellow hint frame blinks when entering () in strings in functions/classes -> IDLE: properly handle '(' and ')' within calls versions: +Python 3.10 -Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 19:28:34 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 15 Jun 2020 23:28:34 +0000 Subject: [issue40971] Documentation still mentions 'u' string formatting option In-Reply-To: <1592092069.64.0.724839327789.issue40971@roundup.psfhosted.org> Message-ID: <1592263714.65.0.827949848098.issue40971@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- keywords: +easy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 19:53:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jun 2020 23:53:41 +0000 Subject: [issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API In-Reply-To: <1592255135.39.0.855912884014.issue40989@roundup.psfhosted.org> Message-ID: <1592265221.77.0.353463684829.issue40989@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20087 pull_request: https://github.com/python/cpython/pull/20904 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 19:54:01 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 15 Jun 2020 23:54:01 +0000 Subject: [issue28557] error message for bad raw readinto In-Reply-To: <1477760845.01.0.230790209004.issue28557@psf.upfronthosting.co.za> Message-ID: <1592265241.45.0.383062291608.issue28557@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 8666356280084f0426c28a981341f72eaaacd006 by David Szotten in branch 'master': closes bpo-28557: error message for bad raw readinto (GH-7496) https://github.com/python/cpython/commit/8666356280084f0426c28a981341f72eaaacd006 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 19:58:51 2020 From: report at bugs.python.org (Quentin Wenger) Date: Mon, 15 Jun 2020 23:58:51 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592265531.99.0.00527160275643.issue40980@roundup.psfhosted.org> Quentin Wenger added the comment: This also affects functions/methods expecting a group name as parameter (e.g. match.group), the group name has to be passed as string. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 20:08:42 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 16 Jun 2020 00:08:42 +0000 Subject: [issue40981] increment is wrong in 3.7 but not in 2.7 In-Reply-To: Message-ID: <20200616000824.GD14357@ando.pearwood.info> Steven D'Aprano added the comment: On Mon, Jun 15, 2020 at 07:37:16PM +0000, mike stern wrote: > sorry but I don't see the option to delete Your keyboard has a Delete key and a Backspace key. Select the quoted text in your email client and press one or the other. If you can't see the quoted text in Hotmail, them I'm afraid you will have to do some homework of your own and find out how to do it in Hotmail. Possibly there is an option to reply *without* quoting the message you are replying to? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 20:27:41 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Jun 2020 00:27:41 +0000 Subject: [issue40985] PEG Parser: SyntaxError text empty when last line has a LINECONT In-Reply-To: <1592228734.99.0.539504567081.issue40985@roundup.psfhosted.org> Message-ID: <1592267261.53.0.508490437947.issue40985@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 113e2b0a07c72c0d5e3489076afb14f6b3ad1049 by Lysandros Nikolaou in branch 'master': bpo-40985: Show correct SyntaxError text when last line has a LINECONT (GH-20888) https://github.com/python/cpython/commit/113e2b0a07c72c0d5e3489076afb14f6b3ad1049 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 20:27:56 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Jun 2020 00:27:56 +0000 Subject: [issue40985] PEG Parser: SyntaxError text empty when last line has a LINECONT In-Reply-To: <1592228734.99.0.539504567081.issue40985@roundup.psfhosted.org> Message-ID: <1592267276.13.0.393045919549.issue40985@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +20088 pull_request: https://github.com/python/cpython/pull/20905 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 20:29:43 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Tue, 16 Jun 2020 00:29:43 +0000 Subject: [issue40985] PEG Parser: SyntaxError text empty when last line has a LINECONT In-Reply-To: <1592228734.99.0.539504567081.issue40985@roundup.psfhosted.org> Message-ID: <1592267383.72.0.738309103978.issue40985@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 Jun 15 20:46:51 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Jun 2020 00:46:51 +0000 Subject: [issue40985] PEG Parser: SyntaxError text empty when last line has a LINECONT In-Reply-To: <1592228734.99.0.539504567081.issue40985@roundup.psfhosted.org> Message-ID: <1592268411.19.0.645661019282.issue40985@roundup.psfhosted.org> miss-islington added the comment: New changeset 097b8b6d52e3d4991c68dce74f182718dc0eab9c by Miss Islington (bot) in branch '3.9': bpo-40985: Show correct SyntaxError text when last line has a LINECONT (GH-20888) https://github.com/python/cpython/commit/097b8b6d52e3d4991c68dce74f182718dc0eab9c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 20:56:35 2020 From: report at bugs.python.org (Inada Naoki) Date: Tue, 16 Jun 2020 00:56:35 +0000 Subject: [issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros In-Reply-To: <1384348276.8.0.185765824651.issue19569@psf.upfronthosting.co.za> Message-ID: <1592268995.84.0.803096994362.issue19569@roundup.psfhosted.org> Inada Naoki added the comment: New changeset de4304dad8e035dbbb57d653e685312eead816df by Zackery Spytz in branch 'master': bpo-19569: Add a macro to suppress deprecation warnings (GH-9004) https://github.com/python/cpython/commit/de4304dad8e035dbbb57d653e685312eead816df ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 20:56:49 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Jun 2020 00:56:49 +0000 Subject: [issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros In-Reply-To: <1384348276.8.0.185765824651.issue19569@psf.upfronthosting.co.za> Message-ID: <1592269009.43.0.717289365908.issue19569@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 10.0 -> 11.0 pull_requests: +20089 pull_request: https://github.com/python/cpython/pull/20907 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 15 21:07:07 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 16 Jun 2020 01:07:07 +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: <1592269627.09.0.911730620525.issue39189@roundup.psfhosted.org> Benjamin Peterson added the comment: I don't think there's a strong reason these values need to be same. Note, even today, they likely won't be the same since io.DEFAULT_BUFFER_SIZE is only a fallback buffer size used if st_blksize is not set. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 01:28:10 2020 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 16 Jun 2020 05:28:10 +0000 Subject: [issue22167] iglob() has misleading documentation (does indeed store names internally) In-Reply-To: <1591002964.5.0.271256610779.issue22167@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: How's this going? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 01:30:20 2020 From: report at bugs.python.org (Ma Lin) Date: Tue, 16 Jun 2020 05:30:20 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592285420.05.0.939092011538.issue40980@roundup.psfhosted.org> Ma Lin added the comment: Group name is `str` is very reasonable. Essentially it is just a name, it has nothing to do with `bytes`. Other names in Python are also `str` type, such as codec names, hashlib names. ---------- nosy: +Ma Lin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 01:47:10 2020 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 16 Jun 2020 05:47:10 +0000 Subject: [issue19821] pydoc.ispackage() could be more accurate In-Reply-To: <1385625330.82.0.952141123031.issue19821@psf.upfronthosting.co.za> Message-ID: <1592286430.62.0.186275403415.issue19821@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 3.0 -> 4.0 pull_requests: +20090 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20908 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 03:01:10 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 16 Jun 2020 07:01:10 +0000 Subject: [issue40511] IDLE: properly handle '(' and ')' within calls In-Reply-To: <1588680591.22.0.16376057042.issue40511@roundup.psfhosted.org> Message-ID: <1592290870.53.0.385433357046.issue40511@roundup.psfhosted.org> Tal Einat added the comment: I agree that this should be improved. Terry, on the technical side, IDLE already has good tools for parsing the current code line/block and figuring out whether the cursor is in a string, a comment or parentheses. This should be possible to solve in a robust way without writing any new parsing logic. I'll try to take a look at this soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 03:01:06 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Jun 2020 07:01:06 +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: <1592290866.87.0.628079209716.issue22167@roundup.psfhosted.org> Serhiy Storchaka added the comment: I am going to add the issue38144 feature first. Then maybe implement a dir_fd based optimization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 03:04:04 2020 From: report at bugs.python.org (Michael Felt) Date: Tue, 16 Jun 2020 07:04:04 +0000 Subject: [issue40878] Use c99 on the aixtools bot In-Reply-To: <1592248833.03.0.225631879404.issue40878@roundup.psfhosted.org> Message-ID: <151CFDE3-1C39-41C8-86C3-2B760D66E42E@felt.demon.nl> Michael Felt added the comment: I?ll switch back to xlc ( even try without the _r ) and look for the macro asap (vacation and occasional travel). Sent from my iPhone > On 15 Jun 2020, at 21:20, Stefan Krah wrote: > > ? > Stefan Krah added the comment: > > Thanks! > > Ha, it turns out that c99_r has excellent C99 compliance. :) > >> Variable arguments macro RAISE_SYNTAX_ERROR was invoked with an empty variable argument list. > > Totally legit, we should use xlc (at least the front end) more often. > > > So maybe our code base is not C99 compliant enough and we have to switch back for sanity. > > > > For the _decimal problem at hand, if you give me the compiler identification macro (__xlc__ or something?) I can try the same as for MSVC and use the explicit EXTINLINE definition. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 03:08:07 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Jun 2020 07:08:07 +0000 Subject: [issue40984] re.compile's repr truncates patterns at 200 characters In-Reply-To: <1592227791.99.0.0594724563571.issue40984@roundup.psfhosted.org> Message-ID: <1592291287.05.0.0903695641709.issue40984@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 03:11:03 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Jun 2020 07:11:03 +0000 Subject: [issue39949] truncating match in regular expression match objects repr In-Reply-To: <1584049767.16.0.188415292253.issue39949@roundup.psfhosted.org> Message-ID: <1592291463.74.0.988030398465.issue39949@roundup.psfhosted.org> Raymond Hettinger added the comment: +1 for adding an ellipsis. It's a conventional way to indicate that the displayed data is truncated. Concur with Eric that missing close quote is too subtle (and odd, and unexpected). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 03:36:59 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 16 Jun 2020 07:36:59 +0000 Subject: [issue40968] urllib is unable to deal with TURN server infront In-Reply-To: <1592046614.41.0.0652918856783.issue40968@roundup.psfhosted.org> Message-ID: <1592293019.05.0.999036176711.issue40968@roundup.psfhosted.org> Christian Heimes added the comment: It looks like the server is refusing requests that don't have an ALPN extension set in TLS layer. At first I though that the server may only support HTTP/2. The curl requests in your examples uses HTTP/2. urllib only supports HTTP/1.1 and HTTP/1.0. Then I tried "curl --http1.1 https://jitsi.molgen.mpg.de". The request also succeeds because curl is sending "ALPN, offering http/1.1". This request works for me: >>> import ssl >>> import urllib.request >>> ctx = ssl.create_default_context() >>> ctx.set_alpn_protocols(['http/1.1']) >>> urllib.request.urlopen('https://jitsi.molgen.mpg.de', context=ctx) urllib could set the ALPN header by default when the user does not supply a custom context. It looks like curl always adds an ALPN extension. I don't see code in Python requests that sets ALPN extension. On the other hand Tom Christie's excellent httpx library does set ALPN extension just like curl. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 03:57:15 2020 From: report at bugs.python.org (Paul Menzel) Date: Tue, 16 Jun 2020 07:57:15 +0000 Subject: [issue40968] urllib is unable to deal with TURN server infront In-Reply-To: <1592046614.41.0.0652918856783.issue40968@roundup.psfhosted.org> Message-ID: <1592294235.04.0.560278883267.issue40968@roundup.psfhosted.org> Paul Menzel added the comment: Wow, great job in figuring this out. Passing the context, it works here too. I just wanted to add, that I looked at this with Wireshark, and to not complicate things, first tried plain HTTP. ``` $ curl http://jitsi.molgen.mpg.de 301 Moved Permanently

301 Moved Permanently


nginx/1.14.2
``` With Python, there is also the connection lost error. But Wireshark shows that the 301 HTTP packet is send back by the server. ``` $ python3 Python 3.8.3 (default, May 14 2020, 11:03:12) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import urllib.request >>> response = urllib.request.urlopen('http://jitsi.molgen.mpg.de') Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/lib/python3.8/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 755, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "/usr/lib/python3.8/urllib/request.py", line 525, in open response = self._open(req, data) File "/usr/lib/python3.8/urllib/request.py", line 542, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1393, in https_open return self.do_open(http.client.HTTPSConnection, req, File "/usr/lib/python3.8/urllib/request.py", line 1354, in do_open r = h.getresponse() File "/usr/lib/python3.8/http/client.py", line 1332, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 303, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 272, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 04:06:26 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 16 Jun 2020 08:06:26 +0000 Subject: [issue40968] urllib is unable to deal with TURN server infront In-Reply-To: <1592046614.41.0.0652918856783.issue40968@roundup.psfhosted.org> Message-ID: <1592294786.08.0.237641698198.issue40968@roundup.psfhosted.org> Christian Heimes added the comment: Look closer at the traceback. You'll see that urllib follows redirects (http_response -> http_error_302 -> open -> HTTPSConnection). curl doesn't follow redirects by default. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 04:16:09 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 16 Jun 2020 08:16:09 +0000 Subject: [issue39949] truncating match in regular expression match objects repr In-Reply-To: <1584049767.16.0.188415292253.issue39949@roundup.psfhosted.org> Message-ID: <1592295369.31.0.00973822377846.issue39949@roundup.psfhosted.org> Change by Eric V. Smith : ---------- components: +Regular Expressions -Library (Lib) nosy: +ezio.melotti, mrabarnett resolution: not a bug -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 04:35:02 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 16 Jun 2020 08:35:02 +0000 Subject: [issue40511] IDLE: properly handle '(' and ')' within calls In-Reply-To: <1588680591.22.0.16376057042.issue40511@roundup.psfhosted.org> Message-ID: <1592296502.17.0.471831011603.issue40511@roundup.psfhosted.org> Tal Einat added the comment: > OMG, request too large. I can't upload mp4 You can try to reduce the video's resolution and/or framerate in order to reduce its size. Usually screen captures are taken at high resolution and framerates by default, making the resulting video files very large, which is a sensible default but not great for attaching to bug reports. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 04:43:50 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 16 Jun 2020 08:43:50 +0000 Subject: [issue40511] IDLE: properly handle '(' and ')' within calls In-Reply-To: <1588680591.22.0.16376057042.issue40511@roundup.psfhosted.org> Message-ID: <1592297030.17.0.251335807146.issue40511@roundup.psfhosted.org> Tal Einat added the comment: Confirmed on latest master on macOS 10.15.5 with Tcl/Tk 8.6.10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 04:53:43 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Jun 2020 08:53:43 +0000 Subject: [issue40979] typing module docs: keep text, add subsections In-Reply-To: <1592164571.1.0.235029301981.issue40979@roundup.psfhosted.org> Message-ID: <1592297623.81.0.282925847788.issue40979@roundup.psfhosted.org> Raymond Hettinger added the comment: Would you care to submit a PR? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 05:10:42 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 16 Jun 2020 09:10:42 +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: <1592298642.83.0.562029910423.issue40744@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +20091 pull_request: https://github.com/python/cpython/pull/20909 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 05:18:26 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 16 Jun 2020 09:18:26 +0000 Subject: [issue40511] IDLE: properly handle '(' and ')' within calls In-Reply-To: <1588680591.22.0.16376057042.issue40511@roundup.psfhosted.org> Message-ID: <1592299106.19.0.355098600769.issue40511@roundup.psfhosted.org> Change by Tal Einat : ---------- keywords: +patch pull_requests: +20092 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20910 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 05:26:29 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 16 Jun 2020 09:26:29 +0000 Subject: [issue40511] IDLE: properly handle '(' and ')' within calls In-Reply-To: <1588680591.22.0.16376057042.issue40511@roundup.psfhosted.org> Message-ID: <1592299589.01.0.484234186467.issue40511@roundup.psfhosted.org> Tal Einat added the comment: See PR GH-20910 with a fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 05:49:49 2020 From: report at bugs.python.org (Seth Troisi) Date: Tue, 16 Jun 2020 09:49:49 +0000 Subject: [issue39949] truncating match in regular expression match objects repr In-Reply-To: <1584049767.16.0.188415292253.issue39949@roundup.psfhosted.org> Message-ID: <1592300989.34.0.673866863028.issue39949@roundup.psfhosted.org> Seth Troisi added the comment: I didn't propose a patch before because I was unsure of decision. Now that there is a +1 from Raymond I'll working on a patch and some documentation. Expect a patch within the week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 05:59:08 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 09:59:08 +0000 Subject: [issue40984] re.compile's repr truncates patterns at 200 characters In-Reply-To: <1592227791.99.0.0594724563571.issue40984@roundup.psfhosted.org> Message-ID: <1592301548.19.0.12788353505.issue40984@roundup.psfhosted.org> Quentin Wenger added the comment: Pardon me, but I see an important difference with the other bug report: that one is about a repr in angle brackets, and as such does not require an exact output, so an ellipsis is good enough. In this bug, the output of repr gives a string than can, at least for small enough patterns, be passed to eval() to recontruct an object. So there is no good reason that this can be done for patterns up to 200 characters but not above; furthermore it is undocumented and goes against the doc on repr. Compare with a complexly-nested structure of, say, lists, dicts and strings: The repr will always be "reconstructible", even if it is well above 200 characters. Also, a common way to write repr is to draw the outer "container" as a string, and fill it with the (full!) repr of the object's parameters. E.g. the repr of a list containing a 1000-character string will simply write square brackets around the 1002-character repr of the string. re.compile doesn't conform to this "rule". ---------- resolution: duplicate -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 06:04:38 2020 From: report at bugs.python.org (Michael Felt) Date: Tue, 16 Jun 2020 10:04:38 +0000 Subject: [issue40878] Use c99 on the aixtools bot In-Reply-To: <151CFDE3-1C39-41C8-86C3-2B760D66E42E@felt.demon.nl> Message-ID: <4ce9876f-bb0b-953e-10f7-1061026baa7c@felt.demon.nl> Michael Felt added the comment: I switched the "aixtools" bot back to "xlc", and also back to my POWER6 server that runs xlc-v11. iirc it is xlc-v13 (or maybe even v12) that is having trouble with _decimal (or is it POWER8). From memory, _decimal was compiling properly with xlc-v11. Although - my last runs on the POWER6, by default, were using gcc - so maybe I thought, incorrectly, that xlc was passing. Time shall tell. p.s. - if you make a PR that emulates a rollback, if that is what you were thinking - I can test that separately/manually. Michael On 16/06/2020 09:04, Michael Felt wrote: > Michael Felt added the comment: > > I?ll switch back to xlc ( even try without the _r ) and look for the macro asap (vacation and occasional travel). > > Sent from my iPhone > >> On 15 Jun 2020, at 21:20, Stefan Krah wrote: >> >> ? >> Stefan Krah added the comment: >> >> Thanks! >> >> Ha, it turns out that c99_r has excellent C99 compliance. :) >> >>> Variable arguments macro RAISE_SYNTAX_ERROR was invoked with an empty variable argument list. >> Totally legit, we should use xlc (at least the front end) more often. >> >> >> So maybe our code base is not C99 compliant enough and we have to switch back for sanity. >> >> >> >> For the _decimal problem at hand, if you give me the compiler identification macro (__xlc__ or something?) I can try the same as for MSVC and use the explicit EXTINLINE definition. >> >> ---------- >> >> _______________________________________ >> Python tracker >> >> _______________________________________ >> > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 06:09:41 2020 From: report at bugs.python.org (hongweipeng) Date: Tue, 16 Jun 2020 10:09:41 +0000 Subject: [issue30533] missing feature in inspect module: getmembers_static In-Reply-To: <1496271168.24.0.639482608296.issue30533@psf.upfronthosting.co.za> Message-ID: <1592302181.4.0.691013195762.issue30533@roundup.psfhosted.org> Change by hongweipeng : ---------- keywords: +patch nosy: +hongweipeng nosy_count: 5.0 -> 6.0 pull_requests: +20093 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20911 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 06:13:21 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 10:13:21 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592302401.69.0.875137830465.issue40980@roundup.psfhosted.org> Quentin Wenger added the comment: Agreed to some extent, but there is the difference that group names are embedded in the pattern, which has to be bytes if the target is bytes. My use case is in an all-bytes, no-string project where I construct a large regular expression at startup, with semi-dynamical group names. So it seems natural to have everything in bytes to concatenate the regular expression, incl. the group names. But then group names that I receive back are strings, so I cannot look them up directly into the set of group names that I used to create the expression in the first place. Of course I can live with it by storing them as strings in the first place and encode()'ing them during concatenation, but it does not feel "natural". Furthermore, even if it is "just a name", a non-ascii group name will raise an error in bytes, even if encoded...: ``` >>> re.compile("(?P<" + "?" + ">)") re.compile('(?P)') >>> re.compile(b"(?P<" + "?".encode() + b">)") Traceback (most recent call last): File "", line 1, in re.compile(b"(?P<" + "?".encode() + b">)") File "/usr/lib/python3.8/re.py", line 252, in compile return _compile(pattern, flags) File "/usr/lib/python3.8/re.py", line 304, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python3.8/sre_compile.py", line 764, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python3.8/sre_parse.py", line 948, in parse p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) File "/usr/lib/python3.8/sre_parse.py", line 443, in _parse_sub itemsappend(_parse(source, state, verbose, nested + 1, File "/usr/lib/python3.8/sre_parse.py", line 703, in _parse raise source.error(msg, len(name) + 1) re.error: bad character in group name '??' at position 4 ``` So no, it's not really "just a name", considering that in Python "?" should is a valid name. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 06:13:24 2020 From: report at bugs.python.org (Michael Felt) Date: Tue, 16 Jun 2020 10:13:24 +0000 Subject: [issue40680] thread_cputime isn't supported by AIX5 In-Reply-To: <1591822729.18.0.174077340185.issue40680@roundup.psfhosted.org> Message-ID: <55e7f533-07a0-38ef-3f2f-24696044a000@felt.demon.nl> Michael Felt added the comment: There is still a lot of AIX 6.1 out there, and iirc, there may be "extended" support available. However, at this point in time the bots run (most of the time) on AIX 7.2, -- occasionally, on AIX 7.1. And when I (personally) test - it is usually on AIX 6.1 (e.g., to have _uuid support). In any case, I still package using AIX 6.1 (again, _uuid mod support) and rely on AIX binary compatibility for installations on AIX 7.1 and AIX 7.2. Should you be thinking/considering moving AIX to the "supported" column - I would "gladly" embrace AIX 7.1 as a requirement. On 10/06/2020 22:58, STINNER Victor wrote: > STINNER Victor added the comment: > > According to https://www.ibm.com/support/pages/aix-support-lifecycle-information I suggest to require AIX 7.1 and newer. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 06:14:49 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 10:14:49 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592302489.59.0.697161860986.issue40980@roundup.psfhosted.org> Quentin Wenger added the comment: should *be a valid name ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 06:26:05 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 10:26:05 +0000 Subject: [issue40984] re.compile's repr truncates patterns at 200 characters In-Reply-To: <1592227791.99.0.0594724563571.issue40984@roundup.psfhosted.org> Message-ID: <1592303165.28.0.842008031039.issue40984@roundup.psfhosted.org> Quentin Wenger added the comment: All in all, it is simply a matter of compliance. The doc of repr says that a repr is either - a string that can be eval()'ed back to (an equivalent of) the original object - or a "more loose" angle-bracket representation. re.compile with small patterns falls in the first category. The other bug report corresponds to the second one, no problem. However, re.compile with large patterns doesn't fall in either category, nor would it if changed to use an ellipsis. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 06:30:47 2020 From: report at bugs.python.org (Ma Lin) Date: Tue, 16 Jun 2020 10:30:47 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592303447.95.0.542484821211.issue40980@roundup.psfhosted.org> Ma Lin added the comment: > a non-ascii group name will raise an error in bytes, even if encoded Looks like this is a language limitation: >>> b'?' File "", line 1 SyntaxError: bytes can only contain ASCII literal characters. No problem if you use escaped character: >>> re.match(b'(?P<\xe9>)', b'').groupdict() {'?': b''} There may be some inconveniences in your program, but IMO there is nothing wrong, maybe this issue can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 07:16:10 2020 From: report at bugs.python.org (Manuel Jacob) Date: Tue, 16 Jun 2020 11:16:10 +0000 Subject: [issue40983] urllib.request.url2pathname() unconditionally uses utf-8 encoding and "replace" error handler In-Reply-To: <1592220222.29.0.529443110739.issue40983@roundup.psfhosted.org> Message-ID: <1592306170.98.0.0571511235446.issue40983@roundup.psfhosted.org> Change by Manuel Jacob : ---------- title: Can?t configure encoding used by urllib.request.url2pathname() -> urllib.request.url2pathname() unconditionally uses utf-8 encoding and "replace" error handler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 07:19:48 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 11:19:48 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592306388.53.0.413990454089.issue40980@roundup.psfhosted.org> Quentin Wenger added the comment: Of course an inconvenience in my program is not per se the reason to change the language. I just wanted to motivate that the current situation gives unexpected results. "\xe9" doesn't look like proper utf-8 to me: ``` >>> "?".encode("latin-1") b'\xe9' >>> "?".encode() b'\xc3\xa9' ``` Let's try another one: how would you go for ? ("\u0394") as a group name? ``` >>> "?".encode() b'\xce\x94' >>> "?".encode("latin-1") Traceback (most recent call last): File "", line 1, in "?".encode("latin-1") UnicodeEncodeError: 'latin-1' codec can't encode character '\u0394' in position 0: ordinal not in range(256) >>> re.match(b'(?P<\xce\x94>)', b'').groupdict() Traceback (most recent call last): File "", line 1, in re.match(b'(?P<\xce\x94>)', b'').groupdict() File "/usr/lib/python3.8/re.py", line 191, in match return _compile(pattern, flags).match(string) File "/usr/lib/python3.8/re.py", line 304, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python3.8/sre_compile.py", line 764, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python3.8/sre_parse.py", line 948, in parse p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) File "/usr/lib/python3.8/sre_parse.py", line 443, in _parse_sub itemsappend(_parse(source, state, verbose, nested + 1, File "/usr/lib/python3.8/sre_parse.py", line 703, in _parse raise source.error(msg, len(name) + 1) re.error: bad character in group name '?\x94' at position 4 >>> re.match(b'(?P<\u0394>)', b'').groupdict() Traceback (most recent call last): File "", line 1, in re.match(b'(?P<\u0394>)', b'').groupdict() File "/usr/lib/python3.8/re.py", line 191, in match return _compile(pattern, flags).match(string) File "/usr/lib/python3.8/re.py", line 304, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python3.8/sre_compile.py", line 764, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python3.8/sre_parse.py", line 948, in parse p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) File "/usr/lib/python3.8/sre_parse.py", line 443, in _parse_sub itemsappend(_parse(source, state, verbose, nested + 1, File "/usr/lib/python3.8/sre_parse.py", line 703, in _parse raise source.error(msg, len(name) + 1) re.error: bad character in group name '\\u0394' at position 4 ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 07:28:08 2020 From: report at bugs.python.org (E. Paine) Date: Tue, 16 Jun 2020 11:28:08 +0000 Subject: [issue37673] Tkinter won't create 5000 check boxes, stops at 1309. In-Reply-To: <1564004376.63.0.730032701785.issue37673@roundup.psfhosted.org> Message-ID: <1592306888.47.0.449224208975.issue37673@roundup.psfhosted.org> E. Paine added the comment: I tested the demo Python script and also had it stop at 1309. I wrote a small tcl script (a simplified version of the Python demo) to test in wish (see attached) which stopped at 1058. It is strange that tkinter stops later than wish, however I would still conclude this is a tcl problem not tkinter or Python. ---------- nosy: +epaine Added file: https://bugs.python.org/file49235/tkcheck.tcl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 07:40:39 2020 From: report at bugs.python.org (E. Paine) Date: Tue, 16 Jun 2020 11:40:39 +0000 Subject: [issue37149] link to John Shipman's Tkinter 8.5 documentation fails: website no longer available In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1592307639.46.0.814259713183.issue37149@roundup.psfhosted.org> E. Paine added the comment: I know I'm a bit late, but I believe the site is now being hosted on a Gtihub page: https://anzeljg.github.io/rin2/book2/2405/docs/tkinter/index.html I suspect this is another personal project just for historical reference and will not be updated, however I would (personally) prefer not to be linked to the Wayback Machine. ---------- nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 07:41:03 2020 From: report at bugs.python.org (Ma Lin) Date: Tue, 16 Jun 2020 11:41:03 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592307663.46.0.749053912699.issue40980@roundup.psfhosted.org> Ma Lin added the comment: `latin1` is the character set that Unicode code point from \u0000 to \u00ff, and the characters are directly mapped from/to bytes. So b'\xe9' is mapped to \u00e9, it is `?`. Of course, characters with Unicode code point greater than 0xff are impossible to appear in `bytes`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 07:51:43 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 11:51:43 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592308303.92.0.500837194033.issue40980@roundup.psfhosted.org> Quentin Wenger added the comment: > So b'\xe9' is mapped to \u00e9, it is `?`. Yes but \xe9 is not strictly valid utf-8, or say not the canonical representation of "?". So there is no way to get \xe9 starting from ? without leaving utf-8. So starting with ? as group name, I cannot programmatically encode it into a bytes pattern. > Of course, characters with Unicode code point greater than 0xff are impossible to appear in `bytes`. But \xce and \x94 are both lower than \xff, yet using \xce\x94 ("?".encode()) in a group name fails. According to the doc, the sole constraint on group names is that they have to be valid and unique Python identifiers. So this should work: ``` # ? is a valid identifier >>> "?".isidentifier() True >>> ? = 1 >>> ? 1 >>> import re >>> name = "?" >>> re.match(b"(?P<" + name.encode() + b">)", b"") Traceback (most recent call last): File "", line 1, in re.match(b"(?P<" + name.encode() + b">)", b"") File "/usr/lib/python3.8/re.py", line 191, in match return _compile(pattern, flags).match(string) File "/usr/lib/python3.8/re.py", line 304, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python3.8/sre_compile.py", line 764, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python3.8/sre_parse.py", line 948, in parse p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) File "/usr/lib/python3.8/sre_parse.py", line 443, in _parse_sub itemsappend(_parse(source, state, verbose, nested + 1, File "/usr/lib/python3.8/sre_parse.py", line 703, in _parse raise source.error(msg, len(name) + 1) re.error: bad character in group name '?\x94' at position 4 re.match(b'(?P<\xce\x94>)', b'').groupdict() ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 08:11:44 2020 From: report at bugs.python.org (Ma Lin) Date: Tue, 16 Jun 2020 12:11:44 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592309504.49.0.857535425387.issue40980@roundup.psfhosted.org> Ma Lin added the comment: In this case, you can only use 'latin1', which directly map one character (\u0000-\u00FF) to/from one byte. If use 'utf-8', it may map one character to multiple bytes, such as '?' -> b'\xce\x94' '\x94' is an invalid identifier, it will raise an error: >>> '\xce'.isidentifier() # '\xce' is '?' True >>> '\x94'.isidentifier() False You may close this issue (I can't close it), we can continue the discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 08:28:14 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 16 Jun 2020 12:28:14 +0000 Subject: [issue40984] re.compile's repr truncates patterns at 200 characters In-Reply-To: <1592227791.99.0.0594724563571.issue40984@roundup.psfhosted.org> Message-ID: <1592310494.61.0.873296131514.issue40984@roundup.psfhosted.org> Eric V. Smith added the comment: Any change to the repr should take place on the other issue. I don't feel very strongly that the repr must be eval-able, but in any event it should be raised on issue39949 if you feel strongly about it. I do think it's reasonable to say that if the repr is truncated, it must not be eval-able. Maybe the ellipsis should go outside the quotes, or something else to make it fail. But this should be discussed on issue39949. I'm going to close this. ---------- nosy: +eric.smith resolution: -> duplicate status: open -> closed superseder: -> truncating match in regular expression match objects repr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 08:30:13 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 16 Jun 2020 12:30:13 +0000 Subject: [issue39949] truncating match in regular expression match objects repr In-Reply-To: <1584049767.16.0.188415292253.issue39949@roundup.psfhosted.org> Message-ID: <1592310613.58.0.408270103003.issue39949@roundup.psfhosted.org> Eric V. Smith added the comment: There was a discussion in issue40984 that the repr must be eval-able. I don't feel very strongly about this, mainly because I don't think anyone ever does eval(repr(some_regex)). I'd be slightly sympathetic to wanting the eval to fail if the repr had to truncate its output, instead of succeeding because the string was still a valid, but different, regex. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 08:31:54 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 16 Jun 2020 12:31:54 +0000 Subject: [issue40965] Segfault when importing unittest module via C API In-Reply-To: <1592015395.95.0.70978961228.issue40965@roundup.psfhosted.org> Message-ID: <1592310714.9.0.844098172392.issue40965@roundup.psfhosted.org> Christian Heimes added the comment: It would be helpful if you could provide a C stacktrace. I use gdb to create a stacktrace. You may have to install additional debug symbols. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 08:37:24 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 12:37:24 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592311044.06.0.273919075593.issue40980@roundup.psfhosted.org> Quentin Wenger added the comment: But ? has no latin-1 representation. So ? currently cannot be used as a group name in bytes regex, although it is a valid Python identifier. So that's a bug. I mean, if you insist of having group names as strings even for bytes regexes, then it is not reasonable to prevent them from going _in_. b"(??<\xce\x94>)" is a valid utf-8-encoded bytestring, why wouldn't you accept it as a valid re pattern? IMHO, either - group names from byte regexes should be returned as bytes - or any utf-8-encoded representation of a valid Python identifier should be accepted as a group name of a bytes regex pattern. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 08:38:23 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 12:38:23 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592311103.12.0.408398031553.issue40980@roundup.psfhosted.org> Quentin Wenger added the comment: Sorry, b"(?P<\xce\x94>)" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 08:42:13 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 12:42:13 +0000 Subject: [issue39949] truncating match in regular expression match objects repr In-Reply-To: <1584049767.16.0.188415292253.issue39949@roundup.psfhosted.org> Message-ID: <1592311333.56.0.197159303703.issue39949@roundup.psfhosted.org> Quentin Wenger added the comment: For a bit of background, the other issue is about the repr of compiled patterns, not match objects. Please see my argument there about the conformance to repr's doc - merely adding an ellipsis would _not_ solve this case. I have however nothing against the pattern being truncated/ellipsed when inside the repr of a match object. ---------- nosy: +matpi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 08:49:11 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 12:49:11 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592311751.7.0.390931644093.issue40980@roundup.psfhosted.org> Quentin Wenger added the comment: The issue with the second variant is that utf-8 is an arbitrary (although default) choice. But: re is doing that same arbitrary choice already in decoding the group names into a string, which is my original complaint! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 08:51:47 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 16 Jun 2020 12:51:47 +0000 Subject: [issue40990] Make http.server support SSL Message-ID: <1592311907.03.0.0583719503418.issue40990@roundup.psfhosted.org> New submission from R?mi Lapeyre : It's a bit outside of its original scope but with more and more application requiring HTTPS it is sometime needed even when doing some simple tests or local development. It's quite easy to have an SSL certificate, either auto-signed or using Let's Encrypt but configuring Nginx or HAProxy just to serve a local directory on localhost is tedious. I think just wrapping the socket in SSLSocket and adding two flags on the command line would be enough? ---------- components: Library (Lib) messages: 371647 nosy: remi.lapeyre priority: normal severity: normal status: open title: Make http.server support SSL type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 08:52:20 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 16 Jun 2020 12:52:20 +0000 Subject: [issue39949] truncating match in regular expression match objects repr In-Reply-To: <1584049767.16.0.188415292253.issue39949@roundup.psfhosted.org> Message-ID: <1592311940.62.0.24005855509.issue39949@roundup.psfhosted.org> Eric V. Smith added the comment: Ah, I see. I missed that this issue was only about match objects. I apologize for the confusion. That being the case, I'll re-open the other issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 08:54:54 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 16 Jun 2020 12:54:54 +0000 Subject: [issue40984] re.compile's repr truncates patterns at 200 characters In-Reply-To: <1592227791.99.0.0594724563571.issue40984@roundup.psfhosted.org> Message-ID: <1592312094.73.0.871248126866.issue40984@roundup.psfhosted.org> Eric V. Smith added the comment: Re-opening this because issue39949 is about match objects, not compiled re objects. Still, I don't think the repr "rule" about being eval-able is hard and fast. Although changing the repr to be in brackets wouldn't be unreasonable just to drive the point home. ---------- resolution: duplicate -> stage: resolved -> status: closed -> open superseder: truncating match in regular expression match objects repr -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 08:56:43 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 12:56:43 +0000 Subject: [issue39949] truncating match in regular expression match objects repr In-Reply-To: <1584049767.16.0.188415292253.issue39949@roundup.psfhosted.org> Message-ID: <1592312203.11.0.30840114821.issue39949@roundup.psfhosted.org> Quentin Wenger added the comment: @eric.smith thanks, no problem. If I can give any advice on this present issue, I would suggest to have the ellipsis _inside_ the quote, to make clear that the pattern is being truncated, not the match. So instead of ``` <_sre.SRE_Match object; span=(0, 49), match='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRS'...> ``` as suggested by @Seth.Troisi, I'd suggest ``` <_sre.SRE_Match object; span=(0, 49), match='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRS...'> ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 09:00:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 13:00:38 +0000 Subject: [issue40680] thread_cputime isn't supported by AIX5 In-Reply-To: <1589888991.61.0.317317587375.issue40680@roundup.psfhosted.org> Message-ID: <1592312438.42.0.649787977421.issue40680@roundup.psfhosted.org> STINNER Victor added the comment: > There is still a lot of AIX 6.1 out there, and iirc, there may be "extended" support available. This issue is about AIX5 support. I'm fine with providing best effort support for AIX 6.1. If supporting AIX 6 becomes too expensive, we can consider to drop support for this version. Anyway, I close this issue: I don't think that it's worth it to attempt to support AIX 5 in Python 3.10: AIX 5 is no longer supported by its vendor (IBM). Use Python 3.9 which seems to better support AIX 5 (don't need thread_cputime()). ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 09:03:43 2020 From: report at bugs.python.org (Ma Lin) Date: Tue, 16 Jun 2020 13:03:43 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592312623.22.0.71380135637.issue40980@roundup.psfhosted.org> Ma Lin added the comment: It seems you don't know some knowledge of encoding yet. Naturally, `bytes` cannot contain character which Unicode code point is greater than \u00ff. So you can only use "latin1" encoding, which map from character to byte (or reverse) directly. "utf-8", "utf-16" and "utf-32" are all encoding codecs, "utf-8" should not have a special status in this scene. ---------- nosy: -ezio.melotti, mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 09:06:47 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 13:06:47 +0000 Subject: [issue40984] re.compile's repr truncates patterns at 200 characters In-Reply-To: <1592227791.99.0.0594724563571.issue40984@roundup.psfhosted.org> Message-ID: <1592312807.98.0.191226255136.issue40984@roundup.psfhosted.org> Quentin Wenger added the comment: I welcome any counter-example to the eval()'able property in the stdlib. I do believe in this rule as hard and fast, because it works for small patterns, only bitting you when you grow, probably programmatically (so exactly when you actually could need the repr). Furthermore, 200 seems very low anyway by today standards. I mean, if you want a repr in the first place, then chances are that you want it full if (reasonably) possible. If a string repr's itself fully no matter what, why should re.compile arbitrarily decide to truncate its argument? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 09:29:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 13:29:09 +0000 Subject: [issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API In-Reply-To: <1592255135.39.0.855912884014.issue40989@roundup.psfhosted.org> Message-ID: <1592314149.66.0.709516106273.issue40989@roundup.psfhosted.org> STINNER Victor added the comment: See "Removal of _Py_ForgetReference from public header in 3.9 issue" discussion on capi-sig: https://mail.python.org/archives/list/capi-sig at python.org/thread/4EOCN7P4HI56GQ74FY3TMIKDBIPGKL2G/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 09:40:45 2020 From: report at bugs.python.org (miikama) Date: Tue, 16 Jun 2020 13:40:45 +0000 Subject: [issue37369] Issue with pip in venv on Powershell in Windows In-Reply-To: <1561161256.11.0.32935812019.issue37369@roundup.psfhosted.org> Message-ID: <1592314845.58.0.877280321052.issue37369@roundup.psfhosted.org> miikama added the comment: Hi, First time reporting so feel free to direct me to a better place if this is not the correct place :) I am still facing the issue that started this thread with Python 3.8 and 3.9. Steps to reproduces 1. Clean install of Python 3.9.0b3 (quick install via .exe https://www.python.org/downloads/windows/) 2. create a python virtual environment in powershell python -m venv env or with absolute path: python -m venv C:\Users\\\env 3. activate virtual environment .\env\Scripts\Activate.ps1 4. use pip (env) PS C:\Users\\ python --version Python 3.9.0b3 (env) PS C:\Users\\ pip --version Fatal error in launcher: Unable to create process using '"c:\users\\\env\scripts\python.exe" "C:\Users\\\env\Scripts\pip.exe" --version' However, python and pip are installed in the env\Scripts\* (env) PS C:\Users\\ Get-Command python python.exe 3.9.113 C:\Users\\\env\Scripts\python.exe (env) PS C:\Users\\ Get-Command pip pip.exe 0.0.0.0 C:\Users\\\env\Scripts\pip.exe But the pip module is not actually found by the python interpreter inside the virtual environment. (env) PS C:\Users\\ python -m pip --version C:\Users\\\env\Scripts\python.exe: No module named pip Notes: 1. the global pip installation works well and can be used to install packages PS C:\Users\\ pip --version pip 19.2.3 from c:\users\\appdata\local\programs\python\python39\lib\site-packages\pip (python 3.9) 2. Windows version: Microsoft Windows [Version 10.0.18363.836] 3. Powershell Version: 5.1.18362.752 4. Paths in a python interpreter started in the active env (env) PS C:\Users\\ python >>> import sys,os >>> sys.exec_prefix 'C:\\Users\\\\\\env' >>> sys.base_prefix 'C:\\Users\\\\AppData\\Local\\Programs\\Python\\Python39' >>> sys.path ['', 'C:\\Users\\\\AppData\\Local\\Programs\\Python\\Python39\\python39.zip', 'C:\\Users\\\\AppData\\Local\\Programs\\Python\\Python39\\DLLs', 'C:\\Users\\\\AppData\\Local\\Programs\\Python\\Python39\\lib', 'C:\\Users\\\\AppData\\Local\\Programs\\Python\\Python39', 'C:\\Users\\\\\\env'] >>> import pip Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'pip' quit() I did not find more recent bugs related to this and wanted to bring the issue back to your attention. At least to me, based on the discussion here it seemed that the issue should have been fixed. Please let me know if you need any further input. ---------- nosy: +miikama versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 09:42:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 13:42:53 +0000 Subject: [issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API In-Reply-To: <1592255135.39.0.855912884014.issue40989@roundup.psfhosted.org> Message-ID: <1592314973.95.0.12866332572.issue40989@roundup.psfhosted.org> STINNER Victor added the comment: > In the CPython code base, _Py_NewReference() is used: > * to implement the free list optimization I found a similar code pattern outside CPython code base. Like Nuitka generic macros for free lists: https://github.com/Nuitka/Nuitka/blob/8e2357ee8e9a93d835e98d5a88ca0181cc34dabc/nuitka/build/include/nuitka/freelists.h#L22 Another example in the old unmaintained gmpy project (last release in 2013): https://github.com/LogicalKnight/gmpy/blob/5d758abc9fcb44b08dd000145afe48160bd802f1/src/gmpy2_cache.c#L93-L111 These functions can opt-in for the internal C API to continue to get access to _Py_NewReference(). Or maybe free lists should be implemented differently? (is it possible?) > * in _PyBytes_Resize() and unicode_resize() (resize_compact() to be precise) Third-party code can use the public PyUnicode_Resize() function and the private _PyBytes_Resize() function. Later, if needed, we can consider to expose _PyBytes_Resize() in the limited C API. > * by PyObject_CallFinalizerFromDealloc() to resurrect an object I found a few projects which basically reimplement the PEP 442 logic in their tp_dealloc function. Example with pyuv resurrect_object() function: https://github.com/saghul/pyuv/blob/9d226dd61162a998745681eb87ef34e1a7d8586a/src/handle.c#L9 For these, using PEP 442 tp_finalizer here would avoid relying on private functions like _Py_NewReference(), make the code simpler and more reliable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 09:51:43 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 13:51:43 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592315503.45.0.107578900502.issue40980@roundup.psfhosted.org> Quentin Wenger added the comment: > It seems you don't know some knowledge of encoding yet. I don't have to be ashamed of my knowledge of encoding. Yet you are right that I was missing a subtlety, which is that latin-1 is a strict subset of Unicode rather than a completely arbitrary encoding. Thank you for that. So what you are saying is that group names in bytes regexes can only be specified directly (without -explicit- encoding), so de facto they are limited to the latin-1 subset. Very well. But then, once again: 1) why convert them to string when spitting them out? bytes they were when going in, bytes they should remain... **By converting them you are choosing an arbitrary encoding, even if it is the "natural" one.** 2) this limitation to the latin-1 subset is not compatible with the documentation, which says that valid Python identifiers are valid group names. If this was really the case, then I would expect to be able to use any string for which .isidentifier() is true as a group name, programmatically. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 10:06:27 2020 From: report at bugs.python.org (Brendan Steffens) Date: Tue, 16 Jun 2020 14:06:27 +0000 Subject: [issue40991] Can't open more than on .py file with IDLE Message-ID: <1592316387.5.0.39234682117.issue40991@roundup.psfhosted.org> New submission from Brendan Steffens : I am using Python 3.7.2, macOS Catalina 10.15.5. When I double click a .py script from the Finder, it opens it, along with IDLE shell. When I click a second .py script so I can view both at once, it won't open the second one. ---------- assignee: terry.reedy components: IDLE messages: 371658 nosy: BrendanSteffens, terry.reedy priority: normal severity: normal status: open title: Can't open more than on .py file with IDLE type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 10:11:01 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 14:11:01 +0000 Subject: [issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API In-Reply-To: <1592255135.39.0.855912884014.issue40989@roundup.psfhosted.org> Message-ID: <1592316661.49.0.443182866954.issue40989@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20094 pull_request: https://github.com/python/cpython/pull/20915 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 10:14:39 2020 From: report at bugs.python.org (Alex Alex) Date: Tue, 16 Jun 2020 14:14:39 +0000 Subject: [issue40992] Wrong warning in asyncio debug mode Message-ID: <1592316879.27.0.621999678999.issue40992@roundup.psfhosted.org> New submission from Alex Alex : I run code in example and get message like: Executing () created at /usr/lib/python3.7/asyncio/futures.py:288> took 2.000 seconds It say that coroutine run for 2 second but it was run for 5 second. Also if I comment part in qwe function after await I won't get any warning, but should. ---------- components: asyncio files: asyncio-wrong-warn.py messages: 371659 nosy: Alex Alex, asvetlov, yselivanov priority: normal severity: normal status: open title: Wrong warning in asyncio debug mode versions: Python 3.7 Added file: https://bugs.python.org/file49237/asyncio-wrong-warn.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 10:34:12 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 14:34:12 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592318052.88.0.70549465929.issue40980@roundup.psfhosted.org> Quentin Wenger added the comment: I prove my point that the decoding to string is arbitrary: ``` >>> import re >>> orig_name = "?" >>> orig_ch = orig_name.encode("cp1250") # Because why not? >>> name = list(re.match(b"(?P<" + orig_ch + b">)", b"").groupdict().keys())[0] >>> name == orig_name False >>> name '?' >>> name.encode("latin-1") == orig_ch True ``` For any dynamically-constructed bytes regex pattern, a string group name as output is unusable. Only after latin-1-reencoding can it be safely compared. This latin-1 choice is arbitrary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 10:36:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 14:36:59 +0000 Subject: [issue37369] Issue with pip in venv on Powershell in Windows In-Reply-To: <1561161256.11.0.32935812019.issue37369@roundup.psfhosted.org> Message-ID: <1592318219.05.0.181659609687.issue37369@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 10:58:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 14:58:58 +0000 Subject: [issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests Message-ID: <1592319538.03.0.787243890388.issue40993@roundup.psfhosted.org> New submission from STINNER Victor : Currently, Travis CI runs C coverage and Python coverage jobs on all pull requests. This is a waste of resources: we should only run these jobs on branches like master. Attached PR skips these jobs on pull requests. Not only it's a waste of resources, but it seems like it's not longer possible to merge a PR as soon as Travis CI required jobs pass: a PR can only be merged when *all* Travis CI jobs complete. Problem: while a full test suite run takes around 20 min, coverage jobs take longer than 40 minutes. By the way, the C coverage job fails with timeout, but that's a different issue. ---------- components: Build messages: 371661 nosy: vstinner priority: normal severity: normal status: open title: Don't run Python and C coverage jobs of Travis CI on pull requests versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:02:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 15:02:28 +0000 Subject: [issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests In-Reply-To: <1592319538.03.0.787243890388.issue40993@roundup.psfhosted.org> Message-ID: <1592319748.83.0.749709237393.issue40993@roundup.psfhosted.org> STINNER Victor added the comment: Concrete issue: on my PR 20915, Travis CI mandatory jobs completed successfully but I wasn't able to merge the PR since GitHub says "travis-ci/pr Pending ? The Travis CI build is in progress". I cancelled the last running coverage job... but I was still unable to merge the PR, since Travis CI didn't report the status to GitHub. I had to reschedule all Travis CI jobs... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:02:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 15:02:40 +0000 Subject: [issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests In-Reply-To: <1592319538.03.0.787243890388.issue40993@roundup.psfhosted.org> Message-ID: <1592319760.6.0.782242377737.issue40993@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +20095 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20916 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:03:15 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 15:03:15 +0000 Subject: [issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests In-Reply-To: <1592319538.03.0.787243890388.issue40993@roundup.psfhosted.org> Message-ID: <1592319795.34.0.198929424841.issue40993@roundup.psfhosted.org> STINNER Victor added the comment: See also "Travis CI doesn't report its status or doesn't run on Python pull requests": https://github.com/python/core-workflow/issues/371 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:06:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 15:06:04 +0000 Subject: [issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests In-Reply-To: <1592319538.03.0.787243890388.issue40993@roundup.psfhosted.org> Message-ID: <1592319964.53.0.138900485804.issue40993@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-40237: "Test code coverage (C) job of Travis CI fails on test_distutils which creates _configtest.gcno file". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:06:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 15:06:19 +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: <1592319979.84.0.991172815301.issue40237@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-40993: "Don't run Python and C coverage jobs of Travis CI on pull requests". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:06:32 2020 From: report at bugs.python.org (Shubham Upreti) Date: Tue, 16 Jun 2020 15:06:32 +0000 Subject: [issue40971] Documentation still mentions 'u' string formatting option In-Reply-To: <1592092069.64.0.724839327789.issue40971@roundup.psfhosted.org> Message-ID: <1592319992.19.0.271299027282.issue40971@roundup.psfhosted.org> Shubham Upreti added the comment: Should i take this issue? ---------- nosy: +shubh07 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:09:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 15:09:47 +0000 Subject: [issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests In-Reply-To: <1592319538.03.0.787243890388.issue40993@roundup.psfhosted.org> Message-ID: <1592320187.19.0.393080289798.issue40993@roundup.psfhosted.org> STINNER Victor added the comment: Documentation about skipping jobs on pull requests: https://docs.travis-ci.com/user/pull-requests/#how-pull-requests-are-built I don't think that the following method works for the issue: "To only build on push events not on pull requests, disable Build on Pull Requests in your repository settings." That would disable all jobs, not only coverage jobs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:21:23 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jun 2020 15:21:23 +0000 Subject: [issue40991] Can't open more than on .py file with IDLE In-Reply-To: <1592316387.5.0.39234682117.issue40991@roundup.psfhosted.org> Message-ID: <1592320883.05.0.941932387596.issue40991@roundup.psfhosted.org> Terry J. Reedy added the comment: Almost certainly Catalina - tcl/tk issue. Fix difficult and unknown. Won't make 3.7. In the meanwhile, use IDLE's file=> open menu. See original issue 38946 for more. ---------- components: +macOS -IDLE nosy: +ned.deily, ronaldoussoren resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:21:39 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jun 2020 15:21:39 +0000 Subject: [issue40991] Can't open more than on .py file with IDLE In-Reply-To: <1592316387.5.0.39234682117.issue40991@roundup.psfhosted.org> Message-ID: <1592320899.08.0.98739815939.issue40991@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- assignee: terry.reedy -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:24:02 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jun 2020 15:24:02 +0000 Subject: [issue37673] Tkinter won't create 5000 check boxes, stops at 1309. In-Reply-To: <1564004376.63.0.730032701785.issue37673@roundup.psfhosted.org> Message-ID: <1592321042.63.0.802880680075.issue37673@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:27:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 15:27:49 +0000 Subject: [issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests In-Reply-To: <1592319538.03.0.787243890388.issue40993@roundup.psfhosted.org> Message-ID: <1592321269.76.0.424505562962.issue40993@roundup.psfhosted.org> STINNER Victor added the comment: New changeset fc710ee266e9461fdba9933ec6004318db588820 by Victor Stinner in branch 'master': bpo-40993: Don't run Travis CI coverage on PRs (GH-20916) https://github.com/python/cpython/commit/fc710ee266e9461fdba9933ec6004318db588820 ---------- message_count: 5.0 -> 6.0 nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +20096 pull_request: https://github.com/python/cpython/pull/20917 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:27:49 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Jun 2020 15:27:49 +0000 Subject: [issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests In-Reply-To: <1592319538.03.0.787243890388.issue40993@roundup.psfhosted.org> Message-ID: <1592321269.69.0.556522387025.issue40993@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +20096 pull_request: https://github.com/python/cpython/pull/20917 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:27:57 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Jun 2020 15:27:57 +0000 Subject: [issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests In-Reply-To: <1592319538.03.0.787243890388.issue40993@roundup.psfhosted.org> Message-ID: <1592321277.64.0.814820899278.issue40993@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20097 pull_request: https://github.com/python/cpython/pull/20918 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:29:54 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jun 2020 15:29:54 +0000 Subject: [issue37673] Tkinter won't create 5000 check boxes, stops at 1309. In-Reply-To: <1564004376.63.0.730032701785.issue37673@roundup.psfhosted.org> Message-ID: <1592321394.15.0.881513747648.issue37673@roundup.psfhosted.org> Terry J. Reedy added the comment: Lou, when you respond by email, please snip the already posted email you are responding to. The redundant noise makes *your* message harder to read. (Leaving an especially relevant line or two is OK.) E.Paine. Thank you for the confirmation. Learning tcl/tk well enough to write test cases like this is something I have avoided, and Serhiy mostly works on other modules. I hope you continue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:29:57 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 15:29:57 +0000 Subject: [issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API In-Reply-To: <1592255135.39.0.855912884014.issue40989@roundup.psfhosted.org> Message-ID: <1592321397.88.0.906662065772.issue40989@roundup.psfhosted.org> STINNER Victor added the comment: New changeset fcc60e40bbfe8a229b8b83f1d1ee77fd4bf870d1 by Victor Stinner in branch 'master': bpo-40989: Make _PyTraceMalloc_NewReference() internal (GH-20915) https://github.com/python/cpython/commit/fcc60e40bbfe8a229b8b83f1d1ee77fd4bf870d1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:32:23 2020 From: report at bugs.python.org (hai shi) Date: Tue, 16 Jun 2020 15:32:23 +0000 Subject: [issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests In-Reply-To: <1592319538.03.0.787243890388.issue40993@roundup.psfhosted.org> Message-ID: <1592321543.96.0.603506907705.issue40993@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:33:39 2020 From: report at bugs.python.org (Ma Lin) Date: Tue, 16 Jun 2020 15:33:39 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592321619.24.0.459268861234.issue40980@roundup.psfhosted.org> Ma Lin added the comment: > this limitation to the latin-1 subset is not compatible with the documentation, which says that valid Python identifiers are valid group names. Not all latin-1 characters are valid identifier, for example: >>> '\x94'.encode('latin1') b'\x94' >>> '\x94'.isidentifier() False There is a workaround, you can convert `bytes` to `str` with "latin-1" decoder before processing, IIRC there will be no extra overhead (memory/speed) during processing, then the name and content are the same type. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:47:23 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Jun 2020 15:47:23 +0000 Subject: [issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests In-Reply-To: <1592319538.03.0.787243890388.issue40993@roundup.psfhosted.org> Message-ID: <1592322443.35.0.360486430758.issue40993@roundup.psfhosted.org> miss-islington added the comment: New changeset 3cf809475a93228a3cb310b4d10d38f3b9d44c1f by Miss Islington (bot) in branch '3.9': bpo-40993: Don't run Travis CI coverage on PRs (GH-20916) https://github.com/python/cpython/commit/3cf809475a93228a3cb310b4d10d38f3b9d44c1f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:47:23 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Jun 2020 15:47:23 +0000 Subject: [issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests In-Reply-To: <1592319538.03.0.787243890388.issue40993@roundup.psfhosted.org> Message-ID: <1592322443.35.0.360486430758.issue40993@roundup.psfhosted.org> miss-islington added the comment: New changeset 3cf809475a93228a3cb310b4d10d38f3b9d44c1f by Miss Islington (bot) in branch '3.9': bpo-40993: Don't run Travis CI coverage on PRs (GH-20916) https://github.com/python/cpython/commit/3cf809475a93228a3cb310b4d10d38f3b9d44c1f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:47:23 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Jun 2020 15:47:23 +0000 Subject: [issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests In-Reply-To: <1592319538.03.0.787243890388.issue40993@roundup.psfhosted.org> Message-ID: <1592322443.44.0.139654659774.issue40993@roundup.psfhosted.org> miss-islington added the comment: New changeset 071bed842eeff9673bc5c4f64e3916a151132d2a by Miss Islington (bot) in branch '3.8': bpo-40993: Don't run Travis CI coverage on PRs (GH-20916) https://github.com/python/cpython/commit/071bed842eeff9673bc5c4f64e3916a151132d2a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:49:51 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Jun 2020 15:49:51 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1592322591.68.0.754508837238.issue40958@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 51c5896b6205911d29ac07f167ec7f3cf1cb600d by Pablo Galindo in branch 'master': bpo-40958: Avoid buffer overflow in the parser when indexing the current line (GH-20875) https://github.com/python/cpython/commit/51c5896b6205911d29ac07f167ec7f3cf1cb600d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:49:57 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Jun 2020 15:49:57 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1592322597.65.0.611687408432.issue40958@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +20098 pull_request: https://github.com/python/cpython/pull/20919 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:51:14 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Jun 2020 15:51:14 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1592322674.18.0.105385846063.issue40958@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 Jun 16 11:51:24 2020 From: report at bugs.python.org (Ma Lin) Date: Tue, 16 Jun 2020 15:51:24 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592322684.69.0.637168639861.issue40980@roundup.psfhosted.org> Ma Lin added the comment: Please look at these: >>> orig_name = "?" >>> orig_ch = orig_name.encode("cp1250") # Because why not? >>> orig_ch b'\xd8' >>> name = list(re.match(b"(?P<" + orig_ch + b">)", b"").groupdict().keys())[0] >>> name '?' # '\xd8' >>> name == orig_name False >>> name.encode("latin-1") b'\xd8' >>> name.encode("latin-1") == orig_ch True "?" (\u0158) --cp1250--> b'\xd8' "?" (\u00d8) --latin-1--> b'\xd8' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:52:07 2020 From: report at bugs.python.org (hai shi) Date: Tue, 16 Jun 2020 15:52:07 +0000 Subject: [issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests In-Reply-To: <1592319538.03.0.787243890388.issue40993@roundup.psfhosted.org> Message-ID: <1592322727.21.0.80705928998.issue40993@roundup.psfhosted.org> hai shi added the comment: > Attached PR skips these jobs on pull requests. I am not familiar with travis ci. coverage jobs can tell us how many features need add unit tests. Can we use other CI services to do this job? MAYBE in checks gate or something other services like buildbot.python.org? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:54:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 15:54:37 +0000 Subject: [issue37857] Setting logger.level directly has no effect due to caching in 3.7+ In-Reply-To: <1565811970.47.0.529067236549.issue37857@roundup.psfhosted.org> Message-ID: <1592322877.3.0.950540383323.issue37857@roundup.psfhosted.org> STINNER Victor added the comment: Vinay: > That code in the wild that sets the level attribute directly is wrong and should be changed, right? The documentation has always been clear that setLevel() should be used. If we now take steps to support setting the level via attribute, isn't that encouraging bypassing the documented APIs? I'm not sure such misuse is widespread. I understood that Zane Bitter opened this issue *because* people misuses the logging API. Vinay: > (...) Sure, mistakes will happen, and that's the price paid when one doesn't follow documentation. It feels wrong to do this as a band-aid to help out people who didn't do the right thing. setLevel() enforces consistency: it calls _checkLevel() to convert string to integer. Also, Logger.setLevel() also invalidates caches. Having a way to update the level without invalidating caches sounds like a bug to me. -- Zane proposed to deprecate setting the level attribute in PR 15286. I dislike this idea. It's kind of weird to be able to *read* a public attribute but not to *set* it. Either the attribute should be removed by adding a getLevel() method (and deprecate the attribute and then remove it), or it should be possible to get and set it. I'm in favor of not deprecating "logger.level = level". Just wrap it into a property silently. -- I rewrote the microbenchmark using pyperf: --- import pyperf class Logger(object): def __init__(self): self._levelprop = self.level = 0 @property def levelprop(self): return self.level logger = Logger() ns = {'logger': logger} runner = pyperf.Runner() runner.timeit('read attribute', 'logger.level', globals=ns) runner.timeit('read property', 'logger.levelprop', globals=ns) --- Result: * read attribute: Mean +- std dev: 38.9 ns +- 0.8 ns * read property: Mean +- std dev: 104 ns +- 3 ns Reading a property is 2.7x slower than reading an attribute. Well, that's not surprising to have an overhead. But the absolute numbers remain reasonable. We're talking about 100 ns, not 100 ms. IMHO the overhead is reasonable in 3rd party code. Inside the logging module, only the private _level attribute should be used and so there is no overhead. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:55:11 2020 From: report at bugs.python.org (Nam Tran) Date: Tue, 16 Jun 2020 15:55:11 +0000 Subject: [issue40893] None In-Reply-To: <1591474190.65.0.383574909158.issue40893@roundup.psfhosted.org> Message-ID: <1592322911.13.0.585638142353.issue40893@roundup.psfhosted.org> Change by Nam Tran : ---------- components: +Library (Lib) -Tkinter title: tkinter integrate TkDND support -> None type: enhancement -> versions: -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 11:57:44 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 16 Jun 2020 15:57:44 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1592323064.31.0.585177230531.issue1635741@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +20099 pull_request: https://github.com/python/cpython/pull/20920 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 12:08:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 16:08:59 +0000 Subject: [issue40987] Add tests to test_interpreters to import C extension modules converted to PEP 489 multiphase initialization In-Reply-To: <1592237189.15.0.645985819824.issue40987@roundup.psfhosted.org> Message-ID: <1592323739.85.0.814928193389.issue40987@roundup.psfhosted.org> STINNER Victor added the comment: According to Dong-hee, importing dbm in a subinterpreter leaks references: https://github.com/python/cpython/pull/20920#issuecomment-644856401 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 12:12:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 16:12:35 +0000 Subject: [issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests In-Reply-To: <1592319538.03.0.787243890388.issue40993@roundup.psfhosted.org> Message-ID: <1592323955.42.0.317358691288.issue40993@roundup.psfhosted.org> STINNER Victor added the comment: > coverage jobs can tell us how many features need add unit tests. Coverage jobs are still run with my changes. https://codecov.io/gh/python/cpython is still updated. My change only stops running coverage jobs on pull requests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 12:17:49 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 16:17:49 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592324269.32.0.908830086532.issue40980@roundup.psfhosted.org> Quentin Wenger added the comment: > > this limitation to the latin-1 subset is not compatible with the documentation, which says that valid Python identifiers are valid group names. > > Not all latin-1 characters are valid identifier, for example: > > >>> '\x94'.encode('latin1') > b'\x94' > >>> '\x94'.isidentifier() > False True but that's not the point. ? is a valid Python identifier but not a valid group name in bytes regexes, because it is not in the latin-1 plane. The documentation does not mention this. > There is a workaround, you can convert `bytes` to `str` with "latin-1" decoder before processing, IIRC there will be no extra overhead (memory/speed) during processing, then the name and content are the same type. :) I am not searching a workaround for my current code. And the simplest workaround is to latin-1-convert back to bytes, because re should not latin-1-convert to string in the first place. Are you saying that the proper way to use bytes regexes is to use string regexes instead? > Please look at these: > > >>> orig_name = "?" > >>> orig_ch = orig_name.encode("cp1250") # Because why not? > >>> orig_ch > b'\xd8' > >>> name = list(re.match(b"(?P<" + orig_ch + b">)", b"").groupdict().keys())[0] > >>> name > '?' # '\xd8' > >>> name == orig_name > False > >>> name.encode("latin-1") > b'\xd8' > >>> name.encode("latin-1") == orig_ch > True > > "?" (\u0158) --cp1250--> b'\xd8' > "?" (\u00d8) --latin-1--> b'\xd8' That's no surprize, I carefully crafted this example. :-) Rather, that is exactly my point: several different strings (which can all be valid Python identifiers) can have the same single-byte representation, simply by the mean of different encodings (duh). So why convert group names to strings when outputting them from matches, when you don't know where the bytes come from, or even whether they ever were strings? That should be left to the programmer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 12:25:17 2020 From: report at bugs.python.org (hai shi) Date: Tue, 16 Jun 2020 16:25:17 +0000 Subject: [issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests In-Reply-To: <1592319538.03.0.787243890388.issue40993@roundup.psfhosted.org> Message-ID: <1592324717.17.0.792953108822.issue40993@roundup.psfhosted.org> hai shi added the comment: > Coverage jobs are still run with my changes. > https://codecov.io/gh/python/cpython is still updated. Copy that, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 12:41:34 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 16 Jun 2020 16:41:34 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1592325694.93.0.703423705353.issue1635741@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset c4862e333ab405dd5789b4061222db1982147de4 by Dong-hee Na in branch 'master': bpo-1635741: Port _gdbm module to multiphase initialization (GH-20920) https://github.com/python/cpython/commit/c4862e333ab405dd5789b4061222db1982147de4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 12:42:11 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 16 Jun 2020 16:42:11 +0000 Subject: [issue40987] Add tests to test_interpreters to import C extension modules converted to PEP 489 multiphase initialization In-Reply-To: <1592237189.15.0.645985819824.issue40987@roundup.psfhosted.org> Message-ID: <1592325731.79.0.06507124077.issue40987@roundup.psfhosted.org> Dong-hee Na added the comment: > According to Dong-hee, importing dbm in a subinterpreter leaks references: GH-20920 fixed the leak :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 13:01:22 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jun 2020 17:01:22 +0000 Subject: [issue40893] tkinter: integrate TkDND support In-Reply-To: <1591474190.65.0.383574909158.issue40893@roundup.psfhosted.org> Message-ID: <1592326882.01.0.498910891866.issue40893@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- components: +Tkinter title: None -> tkinter: integrate TkDND support type: -> enhancement versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 13:15:44 2020 From: report at bugs.python.org (Open Close) Date: Tue, 16 Jun 2020 17:15:44 +0000 Subject: [issue40594] urljoin since 3.5 incorrectly filters out double slashes In-Reply-To: <1589198030.38.0.614579410038.issue40594@roundup.psfhosted.org> Message-ID: <1592327744.87.0.102375815322.issue40594@roundup.psfhosted.org> Open Close added the comment: To Senthil Kumaran: https://bugs.python.org/issue40594#msg371092 > As far as I know, the browsers remove them, combine them as a single URL. > (Tested on Chrome with some URLs to confirm on June 2020) How did you test them? ---------- nosy: +op368 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 13:37:25 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Jun 2020 17:37:25 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1592329045.79.0.102411828519.issue40958@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 7795ae8f05a5b1134a576a372f64699176cac5fb by Miss Islington (bot) in branch '3.9': bpo-40958: Avoid buffer overflow in the parser when indexing the current line (GH-20875) (GH-20919) https://github.com/python/cpython/commit/7795ae8f05a5b1134a576a372f64699176cac5fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 14:11:46 2020 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 16 Jun 2020 18:11:46 +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: <1592331106.15.0.387002003584.issue22167@roundup.psfhosted.org> Guido van Rossum added the comment: Sounds good. FWIW, and totally off-topic, I find it annoying that pathlib's .glob() method supports ** in patterns, but its cousing .match() does not: >>> p = pathlib.Path("Lib/test/support/os_helper.py") >>> p.match("Lib/**/*.py") False >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 14:22:27 2020 From: report at bugs.python.org (Ryan Schmidt) Date: Tue, 16 Jun 2020 18:22:27 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1592331747.95.0.442356618023.issue1222585@roundup.psfhosted.org> Ryan Schmidt added the comment: What needs to happen to get this 15 year old bug fixed? It prevents C++ Python modules from being compiled in situations where the user needs to supply CXXFLAGS. ---------- nosy: +ryandesign _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 14:46:17 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 16 Jun 2020 18:46:17 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1592333177.89.0.173589234844.issue1222585@roundup.psfhosted.org> Christian Heimes added the comment: Please report the issue with setuptools. distutils is no longer under development. We recommend that all users use setuptools. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 15:14:55 2020 From: report at bugs.python.org (Sydney Pemberton) Date: Tue, 16 Jun 2020 19:14:55 +0000 Subject: [issue40994] Very confusing documenation for abc.Collections Message-ID: <1592334895.01.0.222155011801.issue40994@roundup.psfhosted.org> New submission from Sydney Pemberton : I was writing a Jupyter notebook at the time, which I think perfectly illustrated the blind alley this documentation bug led me down before beating me up and stealing my lunch money. I have come to this point in the documentation at least half a dozen times while learning Python and always left confused and with the sense that Python is more complicated than I had thought. Notebook attached. This documentation style violates two principles: - The implied structure of headings and content below it. - Many natural languages do not contain context-sensitive grammar and so using the "respectively" idiom can be very confusing for people who speak English as a second language. ---------- assignee: docs at python components: Documentation files: Confusing docs.ipynb messages: 371690 nosy: Sydney Pemberton, docs at python priority: normal severity: normal status: open title: Very confusing documenation for abc.Collections versions: Python 3.8 Added file: https://bugs.python.org/file49238/Confusing docs.ipynb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 15:20:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 19:20:27 +0000 Subject: [issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests In-Reply-To: <1592319538.03.0.787243890388.issue40993@roundup.psfhosted.org> Message-ID: <1592335227.09.0.0777169496009.issue40993@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 15:29:24 2020 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 16 Jun 2020 19:29:24 +0000 Subject: [issue40594] urljoin since 3.5 incorrectly filters out double slashes In-Reply-To: <1589198030.38.0.614579410038.issue40594@roundup.psfhosted.org> Message-ID: <1592335764.83.0.323346273804.issue40594@roundup.psfhosted.org> Senthil Kumaran added the comment: > How did you test them? https://about.google//products/ https://www.google.com///search?q=something Were redirecting, and collapsing multiple slashes to single. Now, when I try this on: > https://en.wikipedia.org/w//index.php?search=foobar+something was not. Sorry. It is false to say that it was a default client behavior of chrome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 15:41:48 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 19:41:48 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592336508.19.0.514114656387.issue40980@roundup.psfhosted.org> Quentin Wenger added the comment: And there's no need for a cryptic encoding like cp1250 for this problem to arise. Here is a simple example with Python's default encoding utf-8: ``` >>> a = "?" >>> b = list(re.match(b"(?P<" + a.encode() + b">)", b"").groupdict())[0] >>> a.isidentifier() True >>> b.isidentifier() True >>> b '??' >>> a.encode() == b.encode("latin1") True ``` For reference, here is the very source of the issue: https://github.com/python/cpython/blob/master/Lib/sre_parse.py#L228 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 15:49:17 2020 From: report at bugs.python.org (E. Paine) Date: Tue, 16 Jun 2020 19:49:17 +0000 Subject: [issue13554] Tkinter doesn't use higher resolution app icon In-Reply-To: <1323308666.66.0.322569696678.issue13554@psf.upfronthosting.co.za> Message-ID: <1592336957.0.0.196286635917.issue13554@roundup.psfhosted.org> E. Paine added the comment: This is a tk issue, as it can be reproduced using 'wish' (tcl 8.6.10): wm title . "APP title" wm iconname . APP image create photo .iconL -file icon256.png image create photo .iconS -file icon48.png wm iconphoto . -default .iconL .iconS Thank you th9 for reporting this, but it should be closed as "third party". ---------- nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 16:05:57 2020 From: report at bugs.python.org (ramalho) Date: Tue, 16 Jun 2020 20:05:57 +0000 Subject: [issue40979] typing module docs: keep text, add subsections In-Reply-To: <1592164571.1.0.235029301981.issue40979@roundup.psfhosted.org> Message-ID: <1592337957.19.0.647424634206.issue40979@roundup.psfhosted.org> ramalho added the comment: Thanks, I am happy to submit a PR. Before I do, I'd like to discuss the subsection titles, starting from the arrangement in typing.__all__: # Special typing constructs (source comment is: "Super-special typing primitives") Any Callable ClassVar Final ForwardRef Generic Literal Optional Protocol Tuple Type TypeVar Union In this section I propose we add: - NamedTuple and TypedDict: source comments say "Not really a type" (for both), and I believe it's confusing to list them along the other collections. Tuple is already in the "Special constructs" category, so NamedTuple should follow in there. TypedDict is very different from the other collections, it's purely a type hinting construct with no runtime counterpart so it's pretty special IMHO. - AnyStr: should be listed right after TypeVar, NoReturn, NewType - Text, TYPE_CHECKING: I am not sure about those, but if they are removed from the "One-off things" all that remains are functions and decorators, which looks good. # ABCs (from collections.abc) [Keep this title] AbstractSet ByteString Container ContextManager Hashable ItemsView Iterable Iterator KeysView Mapping MappingView MutableMapping MutableSequence MutableSet Sequence Sized ValuesView Awaitable AsyncIterator AsyncIterable Coroutine Collection AsyncGenerator AsyncContextManager # Concrete collection types [keep this title] ChainMap Counter Deque Dict DefaultDict List OrderedDict Set FrozenSet - Generator should go with "ABCs" - NamedTuple TypedDict should go with "Special typing constructs" # Protocols (source comment is "Structural checks, a.k.a. protocols.") Reversible SupportsAbs SupportsBytes SupportsComplex SupportsFloat SupportsIndex SupportsInt SupportsRound # Functions and decorators (source comment is "One-off things.") cast final get_args get_origin get_type_hints no_type_check no_type_check_decorator overload runtime_checkable - AnyStr NewType NoReturn: these should go with "Special typing constructs" - Text TYPE_CHECKING: either go with "Special typing constructs" or a constants section, which could include AnyStr as well There are also the IO and re types which could have their own subsections. Looking forward for feeback on this. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 16:08:18 2020 From: report at bugs.python.org (ramalho) Date: Tue, 16 Jun 2020 20:08:18 +0000 Subject: [issue40979] typing module docs: keep text, add subsections In-Reply-To: <1592164571.1.0.235029301981.issue40979@roundup.psfhosted.org> Message-ID: <1592338098.89.0.421337395839.issue40979@roundup.psfhosted.org> ramalho added the comment: Sorry, there was an editing mistake above. Where I wrote: - AnyStr: should be listed right after TypeVar, NoReturn, NewType I meant to write: - AnyStr: should be listed right after TypeVar - NoReturn, NewType: both belong with "Special Constructs" as well - Text, TYPE_CHECKING: I am not sure about those ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 16:17:50 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 20:17:50 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592338670.69.0.284643310652.issue40980@roundup.psfhosted.org> Quentin Wenger added the comment: The problem can also be played in reverse, maybe it is more telling: ``` # consider the following bytestring pattern >>> p = b"(?P<\xc3\xba>)" # what character does the group name correspond to? # maybe we can try to infer it by decoding the bytestring? # let's try to do it with the default encoding... that natural, right? >>> p.decode() '(?P)' # so we can reasonably expect the group name to be ?, right? >>> list(re.compile(p).groupindex.keys()).pop() '??' # Fail. ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 16:37:53 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 20:37:53 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592339873.63.0.277699758327.issue40980@roundup.psfhosted.org> Quentin Wenger added the comment: You questioned my knowledge of encodings. Let's quote from one of the most famous introductory articles on the subject (https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/): > It does not make sense to have a string without knowing what encoding it uses So I have that bytestring that comes from somewhere, maybe it was originally utf-8 or cp1250 or ... encoded, but I won't tell or don't know, the only thing I swear is that it originally was a valid Python identifier. Now I pass it as a group name in re.match (it was a valid Python identifier, so that has to be alright per the docs) and I get back a (unicode) string. re.match, how dare you giving me back a string when _you have no clue what my bytestring originally represented, resp. what it originally was encoded with_? Maybe re.match will even crash, because it wrongly and assumes the bytestring to have been latin-1 encoded! So: latin-1 is an arbitrary choice that is no better than any other, and the fact that it "naturally" converts bytes to unicode code points is an implementation detail. If you want to keep it so, it ought (cf. the quote above) to be made clear in the docs that group names come out as latin-1-encoded strings, with all the restrictions that follow from that choice. But the more logical way would be to renounce this arbitrary encoding altogether. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 16:43:12 2020 From: report at bugs.python.org (Seth Troisi) Date: Tue, 16 Jun 2020 20:43:12 +0000 Subject: [issue39949] truncating match in regular expression match objects repr In-Reply-To: <1584049767.16.0.188415292253.issue39949@roundup.psfhosted.org> Message-ID: <1592340192.84.0.383580780949.issue39949@roundup.psfhosted.org> Change by Seth Troisi : ---------- keywords: +patch pull_requests: +20100 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20922 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 17:19:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jun 2020 21:19:38 +0000 Subject: [issue23427] Add sys.orig_argv: original command line arguments passed to the Python executable In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1592342378.08.0.41576343656.issue23427@roundup.psfhosted.org> Change by STINNER Victor : ---------- versions: +Python 3.10 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 17:19:38 2020 From: report at bugs.python.org (Seth Troisi) Date: Tue, 16 Jun 2020 21:19:38 +0000 Subject: [issue39949] truncating match in regular expression match objects repr In-Reply-To: <1584049767.16.0.188415292253.issue39949@roundup.psfhosted.org> Message-ID: <1592342378.93.0.251676717003.issue39949@roundup.psfhosted.org> Seth Troisi added the comment: @matpi The current behavior is for the right quote to not appear I kept this behavior but happy to consider changing that. See the linked patch for examples ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 17:29:20 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 21:29:20 +0000 Subject: [issue39949] truncating match in regular expression match objects repr In-Reply-To: <1584049767.16.0.188415292253.issue39949@roundup.psfhosted.org> Message-ID: <1592342960.92.0.792412709955.issue39949@roundup.psfhosted.org> Quentin Wenger added the comment: Oh ok, I was mislead by the example in your first message, where you did have both the quote and ellipsis. I don't have a strong opinion. - having the quote is a bit more "clean" - but not having it makes clear than the pattern is truncated (per se, three dots is a valid pattern) The best would be to find a precedent in the stdlib, but I currently cannot think of any either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 17:53:36 2020 From: report at bugs.python.org (Quentin Wenger) Date: Tue, 16 Jun 2020 21:53:36 +0000 Subject: [issue39949] truncating match in regular expression match objects repr In-Reply-To: <1584049767.16.0.188415292253.issue39949@roundup.psfhosted.org> Message-ID: <1592344416.7.0.929644056001.issue39949@roundup.psfhosted.org> Quentin Wenger added the comment: File objects are an example of a square-bracket repr with string parameters in the repr, but no truncation is performed (see https://github.com/python/cpython/blob/master/Modules/_io/textio.c#L2912). Various truncations with the same (lack of?) clarity are done in the stdlib, see eg. https://github.com/python/cpython/blob/04fc4f2a46b2fd083639deb872c3a3037fdb47d6/Objects/longobject.c#L2475. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 18:45:41 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 16 Jun 2020 22:45:41 +0000 Subject: [issue40990] Make http.server support SSL In-Reply-To: <1592311907.03.0.0583719503418.issue40990@roundup.psfhosted.org> Message-ID: <1592347541.81.0.410098582623.issue40990@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +20101 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20923 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 18:51:48 2020 From: report at bugs.python.org (daniel hahler) Date: Tue, 16 Jun 2020 22:51:48 +0000 Subject: [issue22433] Argparse considers unknown optional arguments with spaces as a known positional argument In-Reply-To: <1410969476.15.0.703805216421.issue22433@psf.upfronthosting.co.za> Message-ID: <1592347908.58.0.624574988735.issue22433@roundup.psfhosted.org> Change by daniel hahler : ---------- nosy: +blueyed nosy_count: 3.0 -> 4.0 pull_requests: +20102 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20924 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 19:00:12 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 16 Jun 2020 23:00:12 +0000 Subject: [issue40995] reprlib.Repr.__init__ should accept arguments Message-ID: <1592348412.27.0.318563143111.issue40995@roundup.psfhosted.org> New submission from R?mi Lapeyre : reprlib.Repr does not accept arguments for the moment so setting its attributes must be done in multiple steps: import reprlib r = reprlib.Repr() r.maxstring = 10 r.maxset = 4 r.repr(...) It would be more user-friendly to be able to do: import reprlib r = reprlib.Repr(maxstring=10, maxset=4) r.repr(...) ---------- components: Library (Lib) messages: 371701 nosy: remi.lapeyre priority: normal severity: normal status: open title: reprlib.Repr.__init__ should accept arguments type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 19:13:25 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 16 Jun 2020 23:13:25 +0000 Subject: [issue40995] reprlib.Repr.__init__ should accept arguments In-Reply-To: <1592348412.27.0.318563143111.issue40995@roundup.psfhosted.org> Message-ID: <1592349205.74.0.961024844738.issue40995@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +20104 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20925 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 19:27:28 2020 From: report at bugs.python.org (Eric Snow) Date: Tue, 16 Jun 2020 23:27:28 +0000 Subject: [issue32604] [subinterpreters] PEP 554 implementation: add interpreters module In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1592350048.86.0.220424411203.issue32604@roundup.psfhosted.org> Change by Eric Snow : ---------- pull_requests: +20105 pull_request: https://github.com/python/cpython/pull/20926 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 20:19:11 2020 From: report at bugs.python.org (Manuel Jacob) Date: Wed, 17 Jun 2020 00:19:11 +0000 Subject: [issue40996] urllib should fsdecode percent-encoded parts of file URIs on Unix Message-ID: <1592353150.99.0.187851758639.issue40996@roundup.psfhosted.org> New submission from Manuel Jacob : On Unix, file names are bytes. Python mostly prefers to use unicode for file names. On the Python <-> system boundary, os.fsencode() / os.fsdecode() are used. In URIs, bytes can be percent-encoded. On Unix, most applications pass the percent-decoded bytes in file URIs to the file system unchanged. The remainder of this issue description is about Unix, except for the last paragraph. Pathlib fsencodes the path when making a file URI, roundtripping the bytes e.g. passed as an argument: % python3 -c 'import pathlib, sys; print(pathlib.Path(sys.argv[1]).as_uri())' /tmp/a$(echo -e '\xE4') file:///tmp/a%E4 Example with curl using this URL: % echo 'Hello, World!' > /tmp/a$(echo -e '\xE4') % curl file:///tmp/a%E4 Hello, World! Python 2?s urllib works the same: % python2 -c 'from urllib import urlopen; print(repr(urlopen("file:///tmp/a%E4").read()))' 'Hello, World!\n' However, Python 3?s urllib fails: % python3 -c 'from urllib.request import urlopen; print(repr(urlopen("file:///tmp/a%E4").read()))' Traceback (most recent call last): File "/usr/lib/python3.8/urllib/request.py", line 1507, in open_local_file stats = os.stat(localfile) FileNotFoundError: [Errno 2] No such file or directory: '/tmp/a?' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.8/urllib/request.py", line 525, in open response = self._open(req, data) File "/usr/lib/python3.8/urllib/request.py", line 542, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1485, in file_open return self.open_local_file(req) File "/usr/lib/python3.8/urllib/request.py", line 1524, in open_local_file raise URLError(exp) urllib.error.URLError: urllib.request.url2pathname() is the function converting the path of the file URI to a file name. On Unix, it uses urllib.parse.unquote() with the default settings (UTF-8 encoding and the "replace" error handler). I think that on Unix, the settings from os.fsdecode() should be used, so that it roundtrips with pathlib.Path.as_uri() and so that the percent-decoded bytes are passed to the file system as-is. On Windows, I couldn?t do experiments, but using UTF-8 seems like the right thing (according to https://en.wikipedia.org/wiki/File_URI_scheme#Windows_2). I?m not sure that the "replace" error handler is a good idea. I prefer "errors should never pass silently" from the Zen of Python, but I don?t a have a strong opinion on this. ---------- components: Library (Lib), Unicode messages: 371702 nosy: ezio.melotti, mjacob, vstinner priority: normal severity: normal status: open title: urllib should fsdecode percent-encoded parts of file URIs on Unix type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 20:24:47 2020 From: report at bugs.python.org (Eric Snow) Date: Wed, 17 Jun 2020 00:24:47 +0000 Subject: [issue32604] [subinterpreters] PEP 554 implementation: add interpreters module In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1592353487.74.0.344856103781.issue32604@roundup.psfhosted.org> Eric Snow added the comment: New changeset 818f5b597ae93411cc44e404544247d436026a00 by Eric Snow in branch 'master': bpo-32604: Clean up test.support.interpreters. (gh-20926) https://github.com/python/cpython/commit/818f5b597ae93411cc44e404544247d436026a00 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 20:23:11 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 17 Jun 2020 00:23:11 +0000 Subject: [issue40978] Document that typing.SupportsXXX protocols are runtime checkable In-Reply-To: <1592163787.83.0.523481527574.issue40978@roundup.psfhosted.org> Message-ID: <1592353391.29.0.91568214261.issue40978@roundup.psfhosted.org> Guido van Rossum added the comment: And here I had hoped that this was a Pull Request. :-) Note that the docs also still state that these are ABCs -- in fact they are Protocols. I'm not sure why the same info should be repeated for the `@runtime_checkable` decorator though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 20:26:30 2020 From: report at bugs.python.org (Quentin Wenger) Date: Wed, 17 Jun 2020 00:26:30 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592353590.53.0.149226661557.issue40980@roundup.psfhosted.org> Quentin Wenger added the comment: I just had an "aha moment": What re claims is that, rather than doing as I suggested: > ``` > # consider the following bytestring pattern > >>> p = b"(?P<\xc3\xba>)" > > # what character does the group name correspond to? > # maybe we can try to infer it by decoding the bytestring? > # let's try to do it with the default encoding... that's natural, right? > >>> p.decode() > '(?P)' > ``` the actual way to know what group name is represented would be to look at the (unicode) string with the same "graphical representation": ``` # consider the following bytestring pattern >>> p = b"(?P<\xc3\xba>)" # what character does the group name correspond to? # to discover it, we instead consider the string that "looks the same": >>> "(?P<\xc3\xba>)" '(?P)' # ok so the group name will be "??" ``` This way of going from bytes to strings _naively_ (which happens to be called latin-1) makes IMHO as much sense as saying that 0x10, 0b10 and 0o10 should be the same value, just because they "look the same" in the source code. This is like throwing away everything we ever learned about Unicode and how a code point is fundamentally different from what is stored in memory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 20:32:27 2020 From: report at bugs.python.org (Manuel Jacob) Date: Wed, 17 Jun 2020 00:32:27 +0000 Subject: [issue40983] urllib.request.url2pathname() unconditionally uses utf-8 encoding and "replace" error handler In-Reply-To: <1592220222.29.0.529443110739.issue40983@roundup.psfhosted.org> Message-ID: <1592353947.18.0.769574298872.issue40983@roundup.psfhosted.org> Manuel Jacob added the comment: I?ve created issue40996, which suggests that urllib should fsdecode percent-encoded parts of file URIs on Unix. Since the two tickets are very related and I?d prefer if the issue was solved more generally for the whole module, I close this as a duplicate. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 20:42:48 2020 From: report at bugs.python.org (Eric Snow) Date: Wed, 17 Jun 2020 00:42:48 +0000 Subject: [issue32604] [subinterpreters] PEP 554 implementation: add interpreters module In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1592354568.34.0.578135108748.issue32604@roundup.psfhosted.org> Eric Snow added the comment: @Pablo, yeah, I'll try to take a look this week. Are these new failures? Keep in mind that these tests can sometimes expose existing bugs in our runtime (as we fix runtime issues elsewhere) rather than regressions, though that isn't necessarily the case here. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 21:30:33 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 17 Jun 2020 01:30:33 +0000 Subject: [issue40994] Very confusing documenation for abc.Collections In-Reply-To: <1592334895.01.0.222155011801.issue40994@roundup.psfhosted.org> Message-ID: <1592357433.73.0.930938611084.issue40994@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 23:18:10 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jun 2020 03:18:10 +0000 Subject: [issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros In-Reply-To: <1384348276.8.0.185765824651.issue19569@psf.upfronthosting.co.za> Message-ID: <1592363890.73.0.33986698265.issue19569@roundup.psfhosted.org> miss-islington added the comment: New changeset 2c6d6c12c2d1a8f0c131d70ccf087555c52d4587 by Miss Islington (bot) in branch '3.9': bpo-19569: Add a macro to suppress deprecation warnings (GH-9004) https://github.com/python/cpython/commit/2c6d6c12c2d1a8f0c131d70ccf087555c52d4587 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 16 23:30:17 2020 From: report at bugs.python.org (Ma Lin) Date: Wed, 17 Jun 2020 03:30:17 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592364617.27.0.701441132643.issue40980@roundup.psfhosted.org> Ma Lin added the comment: Why you always want to use "utf-8" encoded identifier as group name in `bytes` pattern. The direction is: a group name written in `bytes` pattern, and will convert to `str. Not this direction: `str` group name -(utf8)-> `bytes` pattern -> `str` group name ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 01:12:43 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 17 Jun 2020 05:12:43 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1592370763.62.0.731276786346.issue36346@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +20106 pull_request: https://github.com/python/cpython/pull/20927 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 02:32:01 2020 From: report at bugs.python.org (Mike Weilgart) Date: Wed, 17 Jun 2020 06:32:01 +0000 Subject: [issue40283] Documentation of turtle.circle() In-Reply-To: <1586883280.42.0.803600338852.issue40283@roundup.psfhosted.org> Message-ID: <1592375521.68.0.960660030662.issue40283@roundup.psfhosted.org> Change by Mike Weilgart : ---------- keywords: +patch nosy: +Weildcard nosy_count: 6.0 -> 7.0 pull_requests: +20107 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20928 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 02:33:01 2020 From: report at bugs.python.org (Eddie Parker) Date: Wed, 17 Jun 2020 06:33:01 +0000 Subject: [issue40997] python 3.8.2: datetime.datetime(1969, 1, 1).timestamp() yields OSError Message-ID: <1592375581.16.0.231176585152.issue40997@roundup.psfhosted.org> New submission from Eddie Parker : Running the following yields an unexpected OSError: Invalid argument: Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> datetime.datetime(1000,1,1).timestamp() >>> datetime.datetime(1969,1,1).timestamp() Traceback (most recent call last): File "", line 1, in OSError: [Errno 22] Invalid argument I understand that the time can't yield a valid timestamp, but the exception doesn't really explain that and the documentation doesn't mention OSError as an exception to indicate an invalid date is specified. Ideally a better exception could be used (ValueError?) or the documentation could mention this possibility? Or even better, allow timestamp() to take a parameter for what to return in the case of an invalid timestamp (None?) I mention this because I hit this in some asyncio code which was a nuisance to debug and finding it excepting on a timestamp that had worked before with an OS error baffled me until I got it in a debugger. Thanks as always! ---------- components: Library (Lib) messages: 371710 nosy: Eddie Parker priority: normal severity: normal status: open title: python 3.8.2: datetime.datetime(1969,1,1).timestamp() yields OSError type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 02:35:00 2020 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 17 Jun 2020 06:35:00 +0000 Subject: [issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API In-Reply-To: <1592255135.39.0.855912884014.issue40989@roundup.psfhosted.org> Message-ID: <1592375700.62.0.581786996954.issue40989@roundup.psfhosted.org> Stefan Behnel added the comment: To add to the list, Cython also calls _Py_NewReference() in its async generator code, which uses a free-list. That code was mostly copied from the CPython-internal implementation. Other freelist implementations in Cython call PyObject_INIT() instead, so I guess calling _Py_NewReference() directly here isn't actually required and could be avoided. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 03:00:21 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jun 2020 07:00:21 +0000 Subject: [issue40998] Compiler warnings in ubsan builds Message-ID: <1592377221.62.0.524170790208.issue40998@roundup.psfhosted.org> New submission from Christian Heimes : I'm seeing several compiler warnings in ubsan builds: $ ./configure --with-address-sanitizer --with-undefined-behavior-sanitizer $ make clean $ make Parser/string_parser.c: In function ?decode_unicode_with_escapes?: Parser/string_parser.c:98:17: warning: null destination pointer [-Wformat-overflow=] 98 | sprintf(p, "\\U%08x", chr); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Parser/string_parser.c:98:17: warning: null destination pointer [-Wformat-overflow=] Parser/string_parser.c:98:17: warning: null destination pointer [-Wformat-overflow=] In function ?assemble_lnotab?, inlined from ?assemble_emit? at Python/compile.c:5697:25, inlined from ?assemble? at Python/compile.c:6036:18: Python/compile.c:5651:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 5651 | *lnotab++ = k; | ~~~~~~~~~~^~~ Objects/unicodeobject.c: In function ?xmlcharrefreplace?: Objects/unicodeobject.c:849:16: warning: null destination pointer [-Wformat-overflow=] 849 | str += sprintf(str, "&#%d;", PyUnicode_READ(kind, data, i)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Objects/unicodeobject.c:849:16: warning: null destination pointer [-Wformat-overflow=] Objects/unicodeobject.c:849:16: warning: null destination pointer [-Wformat-overflow=] Python/pylifecycle.c: In function ?Py_FinalizeEx?: Python/pylifecycle.c:1339:25: warning: unused variable ?interp? [-Wunused-variable] 1339 | PyInterpreterState *interp = tstate->interp; | ---------- components: Build messages: 371712 nosy: christian.heimes priority: normal severity: normal status: open title: Compiler warnings in ubsan builds type: compile error versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 03:06:40 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jun 2020 07:06:40 +0000 Subject: [issue40998] Compiler warnings in ubsan builds In-Reply-To: <1592377221.62.0.524170790208.issue40998@roundup.psfhosted.org> Message-ID: <1592377600.29.0.104163952517.issue40998@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +20108 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20929 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 03:07:32 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jun 2020 07:07:32 +0000 Subject: [issue40998] Compiler warnings in ubsan builds In-Reply-To: <1592377221.62.0.524170790208.issue40998@roundup.psfhosted.org> Message-ID: <1592377652.21.0.71848629669.issue40998@roundup.psfhosted.org> Christian Heimes added the comment: PR 20929 addresses three out of four warnings found by GCC 10's ubsan on Fedora 32. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 03:16:16 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jun 2020 07:16:16 +0000 Subject: [issue40999] implicit-int-float-conversion warnings in time and math code Message-ID: <1592378175.99.0.301099402499.issue40999@roundup.psfhosted.org> New submission from Christian Heimes : clang 10 with asan and ubsan complains about implicit int to float conversion in time and math related code: $ CC=clang ./configure --with-address-sanitizer --with-undefined-behavior-sanitizer $ make clean $ make -s Python/pytime.c:154:10: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion] if (!_Py_InIntegralTypeRange(time_t, intpart)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./Include/pymath.h:228:82: note: expanded from macro '_Py_InIntegralTypeRange' #define _Py_InIntegralTypeRange(type, v) (_Py_IntegralTypeMin(type) <= v && v <= _Py_IntegralTypeMax(type)) ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~ ./Include/pymath.h:221:124: note: expanded from macro '_Py_IntegralTypeMax' #define _Py_IntegralTypeMax(type) ((_Py_IntegralTypeSigned(type)) ? (((((type)1 << (sizeof(type)*CHAR_BIT - 2)) - 1) << 1) + 1) : ~(type)0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ Python/pytime.c:207:14: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion] if (!_Py_InIntegralTypeRange(time_t, intpart)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./Include/pymath.h:228:82: note: expanded from macro '_Py_InIntegralTypeRange' #define _Py_InIntegralTypeRange(type, v) (_Py_IntegralTypeMin(type) <= v && v <= _Py_IntegralTypeMax(type)) ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~ ./Include/pymath.h:221:124: note: expanded from macro '_Py_IntegralTypeMax' #define _Py_IntegralTypeMax(type) ((_Py_IntegralTypeSigned(type)) ? (((((type)1 << (sizeof(type)*CHAR_BIT - 2)) - 1) << 1) + 1) : ~(type)0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ Python/pytime.c:392:10: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion] if (!_Py_InIntegralTypeRange(_PyTime_t, d)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./Include/pymath.h:228:82: note: expanded from macro '_Py_InIntegralTypeRange' #define _Py_InIntegralTypeRange(type, v) (_Py_IntegralTypeMin(type) <= v && v <= _Py_IntegralTypeMax(type)) ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~ ./Include/pymath.h:221:124: note: expanded from macro '_Py_IntegralTypeMax' #define _Py_IntegralTypeMax(type) ((_Py_IntegralTypeSigned(type)) ? (((((type)1 << (sizeof(type)*CHAR_BIT - 2)) - 1) << 1) + 1) : ~(type)0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ 3 warnings generated. ./Modules/timemodule.c:116:13: warning: code will never be executed [-Wunreachable-code] PyErr_SetString(PyExc_OverflowError, ^~~~~~~~~~~~~~~ 1 warning generated. ./Modules/_threadmodule.c:1587:19: warning: implicit conversion from '_PyTime_t' (aka 'long') to 'double' changes value from 9223372036854775 to 9223372036854776 [-Wimplicit-int-float-conversion] timeout_max = (_PyTime_t)PY_TIMEOUT_MAX * 1e-6; ^~~~~~~~~~~~~~~~~~~~~~~~~ ~ 1 warning generated. ---------- messages: 371714 nosy: christian.heimes, mark.dickinson, p-ganssle priority: normal severity: normal status: open title: implicit-int-float-conversion warnings in time and math code type: compile error versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 03:24:04 2020 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 17 Jun 2020 07:24:04 +0000 Subject: [issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API In-Reply-To: <1592255135.39.0.855912884014.issue40989@roundup.psfhosted.org> Message-ID: <1592378644.34.0.752904690194.issue40989@roundup.psfhosted.org> Stefan Behnel added the comment: I looked into the freelists a bit more and (as always) it's not quite that simple. Calling _Py_NewReference() allows keeping the "ob_type" pointer in place, whereas PyObject_INIT() requires a blank object in order to set the type and properly ref-count heap types. I think what that means is that there are at least two different cases for freelists: those that only keep the bare object memory alive (and can also support subtypes of the same size), and those that keep the (cleared) object alive, including its type. For the first, PyObject_INIT() works. For the latter, _Py_NewReference() seems the right helper function. The advantage of keeping the object as it is is the much simpler freelist code in tp_dealloc(). All it needs to do is 1) clear the ref-counted object fields (if any) and 2) put it in the freelist. No other C-API interaction is needed. If we only want to keep the object memory, then we need C-API support in both tp_new() and tp_dealloc(). If _Py_NewReference() is removed/hidden, then it would be nice if there was a replacement for the use case of initialising an object from a freelist that already knows its type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 04:00:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 08:00:39 +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: <1592380839.77.0.213846565996.issue40237@roundup.psfhosted.org> STINNER Victor added the comment: See also Coverage report in Github CI for standard library discussion: https://discuss.python.org/t/coverage-report-in-github-ci-for-standard-library/2836 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 04:03:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 08:03:00 +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: <1592380980.72.0.146764205157.issue40237@roundup.psfhosted.org> STINNER Victor added the comment: Another issue: the "Test code coverage (C)" job on Travis CI times out after 50 minutes: https://travis-ci.org/github/python/cpython/jobs/699170857 0:44:44 load avg: 7.76 running: test_multiprocessing_spawn (11 min 38 sec), test_concurrent_futures (9 min 33 sec), test_unparse (25 min 7 sec), test_capi (1 min) 0:45:14 load avg: 7.91 running: test_multiprocessing_spawn (12 min 8 sec), test_concurrent_futures (10 min 3 sec), test_unparse (25 min 37 sec), test_capi (1 min 30 sec) 0:45:44 load avg: 8.21 running: test_multiprocessing_spawn (12 min 38 sec), test_concurrent_futures (10 min 33 sec), test_unparse (26 min 7 sec), test_capi (2 min) 0:46:14 load avg: 7.33 running: test_multiprocessing_spawn (13 min 8 sec), test_concurrent_futures (11 min 3 sec), test_unparse (26 min 37 sec), test_capi (2 min 30 sec) (...) The job exceeded the maximum time limit for jobs, and has been terminated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 04:10:17 2020 From: report at bugs.python.org (Quentin Wenger) Date: Wed, 17 Jun 2020 08:10:17 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592381417.36.0.0407511496227.issue40980@roundup.psfhosted.org> Quentin Wenger added the comment: Because utf-8 is Python's default encoding, e.g. in source files, decode() and encode(). Literally everywhere. If you ask around "I have a bytestring, I need a string, what do I do?", using latin-1 will not be the first answer (and moreover, the correct answer should be "it depends on the encoding", which re happily ignores by just asserting one). Saying "just strip that b prefix, it's fine" cannot be taken seriously. Yes latin-1 will never give an error on converting a bytestring, because it has full coverage of the 256 byte values, but saying that this is the reason why it should be used instead of another is forgetting why we have Unicode in the first place. **It is just pretending that Unicode never was a thing**. It is not because it can decode any bytestring that it will not return garbage _when the bytestring is not latin-1-encoded in the first place_. Take a look at the documentation: https://docs.python.org/3/howto/unicode.html 7 references to latin-1, none saying that latin-1 is the way to go because it is so much better than anything else. latin-1 used to be prominent in the 2.x world, it should slowly be time to recognize that this is over, and we cannot ignore anymore that encoding is a thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 04:17:09 2020 From: report at bugs.python.org (Quentin Wenger) Date: Wed, 17 Jun 2020 08:17:09 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592381829.15.0.364483149764.issue40980@roundup.psfhosted.org> Quentin Wenger added the comment: If I don't have to think about the str -> bytes direction, re should first stop going in the other direction. When I have bytes regexes I actually don't care about strings and would happily receive group names as bytes. But no, re decides that latin-1 is the way to go, and this way it 1) reduces my freedom in the choice of the group names, 2) makes me need to go read the internals to understand the the encoding it arbitrarily chose is latin-1, so that I can undo it properly and get back what I always wanted - a bytes group name. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 04:20:57 2020 From: report at bugs.python.org (Quentin Wenger) Date: Wed, 17 Jun 2020 08:20:57 +0000 Subject: [issue40980] group names of bytes regexes are strings In-Reply-To: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> Message-ID: <1592382057.4.0.96835900164.issue40980@roundup.psfhosted.org> Quentin Wenger added the comment: bytes are _not_ Unicode code points, not even in the 256 range. End of the story. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 04:51:40 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 17 Jun 2020 08:51:40 +0000 Subject: [issue40987] Add tests to test_interpreters to import C extension modules converted to PEP 489 multiphase initialization In-Reply-To: <1592237189.15.0.645985819824.issue40987@roundup.psfhosted.org> Message-ID: <1592383900.08.0.926903127768.issue40987@roundup.psfhosted.org> Dong-hee Na added the comment: Hmm today I personally wrote the tests for it. Two goals should be achived 1. import doesn't crash 2. Memory leak should be detected. Running "import xxx" in _testcapi.run_in_subinterp() only detect that the import doesn't crash But the memory leak was not detected with a leaky module. So I'd like to suggest to write import tests on their module test by using _testcapi.run_in_subinterp() for each case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 05:22:18 2020 From: report at bugs.python.org (E. Paine) Date: Wed, 17 Jun 2020 09:22:18 +0000 Subject: [issue41000] IDLE only allow single instance Message-ID: <1592385738.41.0.899337100123.issue41000@roundup.psfhosted.org> New submission from E. Paine : I propose that IDLE only allows a single instance, but behaves mostly like before (multiple shells, etc.). The main motivation for this issue is to (1) stop the same file being opened more than once and (2) make a tabbed interface easier to implement. Starting with point (1), believe a file should not be allowed to be opened multiple times but enforcing this currently in IDLE would be incredibly difficult. Instead, I propose that a socket-server sits on the main instance and any new instances send requests to the main instance (to open a file in a new 'instance'). There would be two layers of file-lists, and the current one still acts as an 'instance' file-list but we also create a master list which controls all of the 'instances': Instance flist Instance flist | | ---- Master flist ---- Secondly, point (2). I am currently in the planning phase of creating an IDLE tabbed interface (based loosely off the code currently found in #9262) but it requires both this issue and #40893 to be pulled before it can work effectively (dragging tabs between windows, etc.). I don't currently have any code to propose, but I don't think it should be *too* difficult to implement (but now I've said that!...). ---------- assignee: terry.reedy components: IDLE messages: 371722 nosy: epaine, taleinat, terry.reedy priority: normal severity: normal status: open title: IDLE only allow single instance versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 05:37:31 2020 From: report at bugs.python.org (Matti) Date: Wed, 17 Jun 2020 09:37:31 +0000 Subject: [issue40855] statistics.stdev ignore xbar argument In-Reply-To: <1591187481.58.0.119061539675.issue40855@roundup.psfhosted.org> Message-ID: <1592386651.25.0.636831772002.issue40855@roundup.psfhosted.org> Matti added the comment: >I see what you're trying to do but think that interpretation is surprising >and is at odds with the existing and intended uses of the *xbar* argument. > >The goals were to allow the mean to be precomputed (common case) or to be recentered (uncommon). Neither case should have the effect of changing the divisor. > >We can't break existing code that assumes that stdev(data) is equal to stdev(data, xbar=mean(data)). Maybe the requirement are buged? It seems to me that recalculating the mean is a very niche use case. You will very little time on a call you do once. But what good is it to supply a re-centered mean if you get a wrong estimation of the standard deviation? If the mean is not the mean of the sample it was not calculated using the sample so there is no loos of degrees of freedom. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 05:38:49 2020 From: report at bugs.python.org (Matti) Date: Wed, 17 Jun 2020 09:38:49 +0000 Subject: [issue40855] statistics.stdev ignore xbar argument In-Reply-To: <1591187481.58.0.119061539675.issue40855@roundup.psfhosted.org> Message-ID: <1592386729.5.0.692489222251.issue40855@roundup.psfhosted.org> Matti added the comment: I meant to write "pre-calculate". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 05:39:42 2020 From: report at bugs.python.org (E. Paine) Date: Wed, 17 Jun 2020 09:39:42 +0000 Subject: [issue10118] Tkinter does not find font In-Reply-To: <1287192630.89.0.924571330725.issue10118@psf.upfronthosting.co.za> Message-ID: <1592386782.79.0.130357956385.issue10118@roundup.psfhosted.org> E. Paine added the comment: On Linux using, tcl 8.6.10 and Python 3.8.3, this does not appear to be an issue (Zed appears in the tkinter font family list). ---------- nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 06:14:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 10:14:11 +0000 Subject: [issue40987] Add tests to test_interpreters to import C extension modules converted to PEP 489 multiphase initialization In-Reply-To: <1592237189.15.0.645985819824.issue40987@roundup.psfhosted.org> Message-ID: <1592388851.96.0.851683807619.issue40987@roundup.psfhosted.org> STINNER Victor added the comment: > So I'd like to suggest to write import tests on their module test > by using _testcapi.run_in_subinterp() for each case. I like this idea. But I would prefer to factorize the code as much as possible. Like being able to add more checks later without having to modify N files. In test_xxx, I expect something like: --- class SubinterpreterTests(support.SubinterpreterTestCase): module_name = "xxx" --- Nothing else, all logic would live in a different file, like test.support. I prefer to use a string for the module. For example, it is possible to import a fresh copy of the module in the current interpreter using a module name. We can start with a single test which imports the module in run_in_subinterp(), but it becomes possible to add more tests later. For example, import in the current interpreter, import in a subinterpreter, and ensure that the two modules are not the same object. I see an advantage of putting such tests in each test_xxx file: it prevents to have to import 50+ modules in test_interpreters which would increase its memory footprint, likely have unexpected side effects, etc. Maybe support.SubinterpreterTestCase should give the ability to override some method. For example, if we need a fresh copy of a module, maybe we should give the ability to provide a list of blocked modules. That's important for "io" vs "_pyio" tests, or "datetime" vs "_datetime", etc. (PEP 399) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 06:14:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 10:14:42 +0000 Subject: [issue40996] urllib should fsdecode percent-encoded parts of file URIs on Unix In-Reply-To: <1592353150.99.0.187851758639.issue40996@roundup.psfhosted.org> Message-ID: <1592388882.64.0.0834089642988.issue40996@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 06:22:48 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jun 2020 10:22:48 +0000 Subject: [issue41001] Provide wrapper for eventfd Message-ID: <1592389368.35.0.695966020763.issue41001@roundup.psfhosted.org> New submission from Christian Heimes : eventfd is a Linux syscall that returns a file descriptor for event/notify systems. I propse to add a simple eventfd(initval, flags) function that is a wrapper around glibc's eventfd abstraction layer. High level notify and semaphores can then be implemented in pure Python. See https://man7.org/linux/man-pages/man2/eventfd.2.html for more details See https://bugs.python.org/issue40485 for a use case. ---------- components: Extension Modules, Library (Lib) messages: 371727 nosy: christian.heimes priority: normal severity: normal status: open title: Provide wrapper for eventfd versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 06:25:51 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jun 2020 10:25:51 +0000 Subject: [issue41001] Provide wrapper for eventfd In-Reply-To: <1592389368.35.0.695966020763.issue41001@roundup.psfhosted.org> Message-ID: <1592389551.52.0.461078897456.issue41001@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +20109 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20930 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 06:30:37 2020 From: report at bugs.python.org (E. Paine) Date: Wed, 17 Jun 2020 10:30:37 +0000 Subject: [issue35663] webbrowser.py firefox bug [python3, windows 10] In-Reply-To: <1546664632.95.0.705177998493.issue35663@roundup.psfhosted.org> Message-ID: <1592389837.26.0.202560054346.issue35663@roundup.psfhosted.org> E. Paine added the comment: Your code works fine on Windows 10 2004 with Python 3.8.3 and Firefox 77.0.1 (Firefox not set to default browser). ---------- nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 06:34:18 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jun 2020 10:34:18 +0000 Subject: [issue41001] Provide wrapper for eventfd In-Reply-To: <1592389368.35.0.695966020763.issue41001@roundup.psfhosted.org> Message-ID: <1592390058.81.0.533741422984.issue41001@roundup.psfhosted.org> Change by Christian Heimes : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 06:42:52 2020 From: report at bugs.python.org (hai shi) Date: Wed, 17 Jun 2020 10:42:52 +0000 Subject: [issue40987] Add tests to test_interpreters to import C extension modules converted to PEP 489 multiphase initialization In-Reply-To: <1592237189.15.0.645985819824.issue40987@roundup.psfhosted.org> Message-ID: <1592390572.1.0.504724625024.issue40987@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 06:45:55 2020 From: report at bugs.python.org (E. Paine) Date: Wed, 17 Jun 2020 10:45:55 +0000 Subject: [issue41000] IDLE only allow single instance In-Reply-To: <1592385738.41.0.899337100123.issue41000@roundup.psfhosted.org> Message-ID: <1592390755.79.0.618495133342.issue41000@roundup.psfhosted.org> E. Paine added the comment: Sorry, I feel I need to clarify. When I say "... requires ... #40893 to be pulled ..." I mean that that would be the preferred way to transfer tabs. If TkDND is not available, or the version is a backport (which wouldn't have the bindings) then tab transfer will use Toplevels instead. The preferred method would be TkDND, but any change should not require it to provide full functionality. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 06:57:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 10:57:44 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1592391464.17.0.335176945169.issue35059@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20110 pull_request: https://github.com/python/cpython/pull/20931 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 07:09:48 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 17 Jun 2020 11:09:48 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1592392188.89.0.509357682566.issue36346@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 2c4928d37edc5e4aeec3c0b79fa3460b1ec9b60d by Inada Naoki in branch 'master': bpo-36346: Add Py_DEPRECATED to deprecated unicode APIs (GH-20878) https://github.com/python/cpython/commit/2c4928d37edc5e4aeec3c0b79fa3460b1ec9b60d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 07:10:11 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jun 2020 11:10:11 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1592392211.06.0.51166873326.issue36346@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +20111 pull_request: https://github.com/python/cpython/pull/20932 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 07:33:56 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 17 Jun 2020 11:33:56 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1592393636.82.0.657005423788.issue36346@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +20112 pull_request: https://github.com/python/cpython/pull/20933 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 08:01:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 12:01:03 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1592395263.66.0.260361386943.issue36346@roundup.psfhosted.org> STINNER Victor added the comment: > bpo-36346: Add Py_DEPRECATED to deprecated unicode APIs (GH-20878) This change broke test_distutils on multiple buildbots. Examples: * https://buildbot.python.org/all/#builders/6/builds/1311 * https://buildbot.python.org/all/#builders/639/builds/729 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 08:08:16 2020 From: report at bugs.python.org (Bruce Merry) Date: Wed, 17 Jun 2020 12:08:16 +0000 Subject: [issue41002] HTTPResponse.read with amt is slow Message-ID: <1592395696.11.0.156333341881.issue41002@roundup.psfhosted.org> New submission from Bruce Merry : I've run into this on 3.8, but the code on Git master doesn't look significantly different so I assume it still applies. I'm happy to work on a PR for this. When http.client.HTTPResponse.read is called with a specific amount to read, it goes down this code path: ``` if amt is not None: # Amount is given, implement using readinto b = bytearray(amt) n = self.readinto(b) return memoryview(b)[:n].tobytes() ``` That's pretty inefficient, because - `bytearray(amt)` will first zero-fill some memory - `tobytes()` will make an extra copy of this memory - if amt is big enough, it'll cause the temporary memory to be allocated from the kernel, which will *also* zero-fill the pages for security. A better approach would be to use the read method of the underlying fp. I have a micro-benchmark (that I'll attach) showing that for a 1GB body and reading the whole body with or without the amount being explicit, performance is reduced from 3GB/s to 1GB/s. For some unknown reason the requests library likes to read the body in 10KB chunks even if the user has requested the entire body, so this will help here (although the gains probably won't be as big because 10KB is really too small to amortise all the accounting overhead). Output from my benchmark, run against a 1GB file on localhost: httpclient-read: 3019.0 ? 63.8 MB/s httpclient-read-length: 1050.3 ? 4.8 MB/s httpclient-read-raw: 3150.3 ? 5.3 MB/s socket-read: 3134.4 ? 7.9 MB/s ---------- components: Library (Lib) files: httpbench-simple.py messages: 371732 nosy: bmerry priority: normal severity: normal status: open title: HTTPResponse.read with amt is slow versions: Python 3.8 Added file: https://bugs.python.org/file49239/httpbench-simple.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 08:09:16 2020 From: report at bugs.python.org (Bruce Merry) Date: Wed, 17 Jun 2020 12:09:16 +0000 Subject: [issue41002] HTTPResponse.read with amt is slow In-Reply-To: <1592395696.11.0.156333341881.issue41002@roundup.psfhosted.org> Message-ID: <1592395756.27.0.0117416618082.issue41002@roundup.psfhosted.org> Change by Bruce Merry : ---------- type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 08:23:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 12:23:25 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1592396605.03.0.990712781883.issue35059@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 07923f32b16ba39165a58a5f47e807ca04ae17aa by Victor Stinner in branch 'master': bpo-35059: Enhance _PyObject_GC_TRACK() macros (GH-20931) https://github.com/python/cpython/commit/07923f32b16ba39165a58a5f47e807ca04ae17aa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 08:27:49 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 17 Jun 2020 12:27:49 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1592396869.31.0.932957131087.issue36346@roundup.psfhosted.org> Inada Naoki added the comment: Oh, why I can not use C99? ``` /home/buildbot/buildarea/3.x.cstratak-RHEL7-ppc64le/build/Include/cpython/unicodeobject.h: In function ?Py_UNICODE_FILL?: /home/buildbot/buildarea/3.x.cstratak-RHEL7-ppc64le/build/Include/cpython/unicodeobject.h:56:5: error: ?for? loop initial declarations are only allowed in C99 mode for (Py_ssize_t i = 0; i < length; i++) { ^ /home/buildbot/buildarea/3.x.cstratak-RHEL7-ppc64le/build/Include/cpython/unicodeobject.h:56:5: note: use option -std=c99 or -std=gnu99 to compile your code ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 08:31:17 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 17 Jun 2020 12:31:17 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1592397077.29.0.315621193204.issue36346@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +20113 pull_request: https://github.com/python/cpython/pull/20934 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 08:30:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 12:30:50 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1592397050.01.0.631649161046.issue36346@roundup.psfhosted.org> STINNER Victor added the comment: > Oh, why I can not use C99? PEP 7 requires C99 to build Python, but I think that we can try to keep C89 compatibility for the public header files (Python C API). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 08:45:57 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 12:45:57 +0000 Subject: [issue41003] test_copyreg: importing numpy changes warnings filters Message-ID: <1592397957.29.0.726353926705.issue41003@roundup.psfhosted.org> New submission from STINNER Victor : This issue is similar to bpo-40055: running test_copyreg fails with ENV_CHANGED if numpy is available. Example: $ ./python -m venv env $ env/bin/python -m pip install numpy $ env/bin/python -m test --fail-env-changed -v test_copyreg -m xxxx == CPython 3.9.0b3+ (heads/getpath_platlibdir39:11462e9847, Jun 11 2020, 17:49:13) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] (...) Warning -- warnings.filters was modified by test_copyreg Before: (140498488250848, [], []) After: (140498488250848, [], [('ignore', re.compile('numpy.ndarray size changed', re.IGNORECASE), , None, 0), ('ignore', re.compile('numpy.ufunc size changed', re.IGNORECASE), , None, 0), ('ignore', re.compile('numpy.dtype size changed', re.IGNORECASE), , None, 0), ('always', None, , None, 0)]) (...) ---------- components: Tests messages: 371736 nosy: vstinner priority: normal severity: normal status: open title: test_copyreg: importing numpy changes warnings filters versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 09:08:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 13:08:42 +0000 Subject: [issue41003] test_copyreg: importing numpy changes warnings filters In-Reply-To: <1592397957.29.0.726353926705.issue41003@roundup.psfhosted.org> Message-ID: <1592399321.99.0.577092065174.issue41003@roundup.psfhosted.org> STINNER Victor added the comment: The issue can be replaced by a fake numpy module: $ cat Lib/numpy.py import warnings warnings.simplefilter('ignore', UserWarning) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 09:11:52 2020 From: report at bugs.python.org (martin w) Date: Wed, 17 Jun 2020 13:11:52 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface Message-ID: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> New submission from martin w : In the ipaddress library there exists two classes IPv4Interface, and IPv6Interface. These classes' hash functions will always return 32 and 64 respectively. If IPv4Interface or IPv6Interface objects then are put in a dictionary, on for example a server storing IPs, this will cause hash collisions, which in turn can lead to DOS. The root of this is on line 1421 and 2095. On both lines, self._ip and self.network.network_address will both be same, and when xor is applied they will cancel eachother out, leaving return self._prefixlen . Since self._prefixlen is a constant, 32 and 64 respectively, this will lead to a constant hash. The fix is trivial, on line 1421, change to: return hash((self._ip, self._prefixlen, int(self.network.network_address))) and on line 2095, change to: return hash((self._ip, self._prefixlen, int(self.network.network_address))) ---------- components: Library (Lib) messages: 371738 nosy: nnewram priority: normal severity: normal status: open title: Hash collisions in IPv4Interface and IPv6Interface versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 09:12:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 13:12:43 +0000 Subject: [issue41003] test_copyreg: importing numpy changes warnings filters In-Reply-To: <1592397957.29.0.726353926705.issue41003@roundup.psfhosted.org> Message-ID: <1592399563.37.0.993289790017.issue41003@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +20114 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20935 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 09:20:54 2020 From: report at bugs.python.org (SBC King) Date: Wed, 17 Jun 2020 13:20:54 +0000 Subject: [issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line Message-ID: <1592400054.74.0.017392691783.issue41005@roundup.psfhosted.org> New submission from SBC King : error was caused by the permission problem with 'xdg-settings'. I checked that Google Chrome is my default browser. I tried the following command by changing the c.NotebookApp.allow_root to True in the jupyter_notebook_config.py file, and it can successfully open jupyter notebook in the browser Safari: sudo jupyter notebook ---------- messages: 371739 nosy: SBC King priority: normal severity: normal status: open title: Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 09:28:57 2020 From: report at bugs.python.org (SBC King) Date: Wed, 17 Jun 2020 13:28:57 +0000 Subject: [issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line In-Reply-To: <1592400054.74.0.017392691783.issue41005@roundup.psfhosted.org> Message-ID: <1592400537.27.0.1657419082.issue41005@roundup.psfhosted.org> SBC King added the comment: error was caused by the permission problem with 'xdg-settings'. I checked that Google Chrome is my default browser. I tried the following command by changing the c.NotebookApp.allow_root to True in the jupyter_notebook_config.py file, and it can successfully open jupyter notebook in the browser Safari: sudo jupyter notebook. this is just a workaround however. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 09:29:19 2020 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Jun 2020 13:29:19 +0000 Subject: [issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line In-Reply-To: <1592400054.74.0.017392691783.issue41005@roundup.psfhosted.org> Message-ID: <1592400559.09.0.507953565336.issue41005@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +20115 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20936 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 09:55:51 2020 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 17 Jun 2020 13:55:51 +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: <1592402151.18.0.741247907547.issue40637@roundup.psfhosted.org> Change by Charalampos Stratakis : ---------- nosy: +cstratak nosy_count: 2.0 -> 3.0 pull_requests: +20116 pull_request: https://github.com/python/cpython/pull/20937 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 09:58:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 13:58:21 +0000 Subject: [issue41006] Reduce number of modules imported by runpy Message-ID: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> New submission from STINNER Victor : Currently, the runpy module imports many modules. runpy is used by "python3 -m module". I propose to attempt to reduce the number of imports to reduce Python startup time. With my local changes, I reduce Python startup time from 24 ms to 18 ms: Mean +- std dev: [ref] 24.3 ms +- 0.2 ms -> [patch] 18.0 ms +- 0.3 ms: 1.35x faster (-26%) Timing measured by: ./python -m venv env python -m pyperf command -v -o patch.json -- env/bin/python -m empty Currently, runpy imports +21 modules: * ./python mod.py: Total 33 * ./python -m mod: Total 54 (+21) Example with attached mod.py: $ ./python -m mod ['__main__', '_abc', '_codecs', '_collections', '_collections_abc', '_frozen_importlib', '_frozen_importlib_external', '_functools', '_heapq', '_imp', '_io', '_locale', '_operator', '_signal', '_sitebuiltins', '_sre', '_stat', '_thread', '_warnings', '_weakref', '_weakrefset', 'abc', 'builtins', 'codecs', 'collections', 'collections.abc', 'contextlib', 'copyreg', 'encodings', 'encodings.aliases', 'encodings.ascii', 'encodings.latin_1', 'encodings.utf_8', 'enum', 'functools', 'genericpath', 'heapq', 'importlib', 'importlib._bootstrap', 'importlib._bootstrap_external', 'importlib.abc', 'importlib.machinery', 'importlib.util', 'io', 'itertools', 'keyword', 'marshal', 'operator', 'os', 'os.path', 'pkgutil', 'posix', 'posixpath', 're', 'reprlib', 'runpy', 'site', 'sre_compile', 'sre_constants', 'sre_parse', 'stat', 'sys', 'time', 'types', 'typing', 'typing.io', 'typing.re', 'warnings', 'weakref', 'zipimport'] Total 70 ---------- components: Library (Lib) files: mod.py messages: 371741 nosy: vstinner priority: normal severity: normal status: open title: Reduce number of modules imported by runpy versions: Python 3.10 Added file: https://bugs.python.org/file49240/mod.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 10:00:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 14:00:50 +0000 Subject: [issue41006] Reduce number of modules imported by runpy In-Reply-To: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> Message-ID: <1592402450.3.0.452930537647.issue41006@roundup.psfhosted.org> STINNER Victor added the comment: My local changes removed the following imports from runpy: - '_heapq', - '_locale', - '_sre', - 'collections.abc', - 'copyreg', - 'enum', - 'heapq', - 'importlib.abc', - 'itertools', - 're', - 'sre_compile', - 'sre_constants', - 'sre_parse', - 'typing', - 'typing.io', - 'typing.re', ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 10:16:14 2020 From: report at bugs.python.org (martin w) Date: Wed, 17 Jun 2020 14:16:14 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1592403374.2.0.702826620188.issue41004@roundup.psfhosted.org> Change by martin w : ---------- type: -> security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 10:33:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 14:33:20 +0000 Subject: [issue41007] test_importlib logs ResourceWarning: test_path.CommonTests.test_importing_module_as_side_effect() Message-ID: <1592404400.93.0.826536668116.issue41007@roundup.psfhosted.org> New submission from STINNER Victor : It seems like the issue was introduced in bpo-39791 by: commit 843c27765652e2322011fb3e5d88f4837de38c06 Author: Jason R. Coombs Date: Sun Jun 7 21:00:51 2020 -0400 bpo-39791 native hooks for importlib.resources.files (GH-20576) The warning: $ ./python -X tracemalloc=20 -m test test_importlib -m test.test_importlib.test_path.CommonTests.test_importing_module_as_side_effect -v == CPython 3.10.0a0 (heads/importlib_typing:d1b0d052cf, Jun 17 2020, 16:09:52) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] == Linux-5.6.18-300.fc32.x86_64-x86_64-with-glibc2.31 little-endian == cwd: /home/vstinner/python/master/build/test_python_67972 == CPU count: 8 == encodings: locale=UTF-8, FS=utf-8 0:00:00 load avg: 0.44 Run tests sequentially 0:00:00 load avg: 0.44 [1/1] test_importlib test_importing_module_as_side_effect (test.test_importlib.test_path.CommonTests) ... /home/vstinner/python/master/Lib/contextlib.py:124: ResourceWarning: unclosed file <_io.BufferedReader name='/home/vstinner/python/master/Lib/test/test_importlib/data01/utf-8.file'> next(self.gen) Object allocated at (most recent call last): File "/home/vstinner/python/master/Lib/unittest/runner.py", lineno 176 test(result) File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 84 return self.run(*args, **kwds) File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 122 test(result) File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 84 return self.run(*args, **kwds) File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 122 test(result) File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 84 return self.run(*args, **kwds) File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 122 test(result) File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 84 return self.run(*args, **kwds) File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 122 test(result) File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 84 return self.run(*args, **kwds) File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 122 test(result) File "/home/vstinner/python/master/Lib/unittest/case.py", lineno 653 return self.run(*args, **kwds) File "/home/vstinner/python/master/Lib/unittest/case.py", lineno 593 self._callTestMethod(testMethod) File "/home/vstinner/python/master/Lib/unittest/case.py", lineno 550 method() File "/home/vstinner/python/master/Lib/test/test_importlib/util.py", lineno 509 self.execute(data01.__name__, 'utf-8.file') File "/home/vstinner/python/master/Lib/test/test_importlib/test_path.py", lineno 10 with resources.path(package, path): File "/home/vstinner/python/master/Lib/contextlib.py", lineno 117 return next(self.gen) File "/home/vstinner/python/master/Lib/importlib/resources.py", lineno 118 opener_reader = reader.open_resource(norm_resource) File "/home/vstinner/python/master/Lib/importlib/abc.py", lineno 465 return self.files().joinpath(resource).open('rb') File "/home/vstinner/python/master/Lib/pathlib.py", lineno 1238 return io.open(self, mode, buffering, encoding, errors, newline, ok ---------------------------------------------------------------------- Ran 1 test in 0.134s OK == Tests result: SUCCESS == 1 test OK. Total duration: 6.2 sec Tests result: SUCCESS ---------- components: Tests messages: 371743 nosy: vstinner priority: normal severity: normal status: open title: test_importlib logs ResourceWarning: test_path.CommonTests.test_importing_module_as_side_effect() versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 10:34:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 14:34:19 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1592404459.22.0.682111912312.issue39791@roundup.psfhosted.org> STINNER Victor added the comment: > bpo-39791 native hooks for importlib.resources.files (GH-20576) > https://github.com/python/cpython/commit/843c27765652e2322011fb3e5d88f4837de38c06 This change introduced bpo-41007 "test_importlib logs ResourceWarning: test_path.CommonTests.test_importing_module_as_side_effect()" regression. ---------- nosy: +vstinner versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 10:35:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 14:35:32 +0000 Subject: [issue41006] Reduce number of modules imported by runpy In-Reply-To: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> Message-ID: <1592404532.93.0.381756953049.issue41006@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +20117 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20938 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 10:39:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 14:39:06 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1592404746.08.0.825966890734.issue39791@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20118 pull_request: https://github.com/python/cpython/pull/20938 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 10:43:09 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 17 Jun 2020 14:43:09 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1592404989.38.0.145074323731.issue36346@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 8e34e92caa73259620dd242b92d26edd0949b4ba by Inada Naoki in branch 'master': bpo-36346: Make unicodeobject.h C89 compatible (GH-20934) https://github.com/python/cpython/commit/8e34e92caa73259620dd242b92d26edd0949b4ba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 10:47:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 14:47:58 +0000 Subject: [issue41006] Reduce number of modules imported by runpy In-Reply-To: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> Message-ID: <1592405278.1.0.944177332661.issue41006@roundup.psfhosted.org> STINNER Victor added the comment: > Currently, runpy imports +21 modules: > * ./python mod.py: Total 33 > * ./python -m mod: Total 54 (+21) Oops sorry, that's with my local changes! Currently, runpy imports not less than 37 modules: * ./python mod.py: Total 33 * ./python -m mod: Total 70 (+37) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 10:48:26 2020 From: report at bugs.python.org (hai shi) Date: Wed, 17 Jun 2020 14:48:26 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1592405306.94.0.377148036564.issue36346@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 10:51:12 2020 From: report at bugs.python.org (Brandt Bucher) Date: Wed, 17 Jun 2020 14:51:12 +0000 Subject: [issue40353] Add an optional "strict" check to zip In-Reply-To: <1587486778.34.0.294525065748.issue40353@roundup.psfhosted.org> Message-ID: <1592405472.79.0.955306081497.issue40353@roundup.psfhosted.org> Brandt Bucher added the comment: Looks like two issues were created. I'm going to close this one in favor of 40636, which has PRs attached and is specific to PEP 618. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Provide a strict form of zip (PEP-618) requiring same length inputs versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 10:52:09 2020 From: report at bugs.python.org (Brandt Bucher) Date: Wed, 17 Jun 2020 14:52:09 +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: <1592405529.28.0.118197674506.issue40636@roundup.psfhosted.org> Change by Brandt Bucher : ---------- assignee: -> brandtbucher components: +Interpreter Core nosy: +cool-RR versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 10:52:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 14:52:44 +0000 Subject: [issue41006] Reduce number of modules imported by runpy In-Reply-To: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> Message-ID: <1592405564.72.0.297050283888.issue41006@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20119 pull_request: https://github.com/python/cpython/pull/20939 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 10:53:56 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 17 Jun 2020 14:53:56 +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: <1592405636.7.0.0443600624244.issue40636@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: +gvanrossum nosy_count: 5.0 -> 6.0 pull_requests: +20120 pull_request: https://github.com/python/cpython/pull/20921 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 10:58:26 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 14:58:26 +0000 Subject: [issue41006] Reduce number of modules imported by runpy In-Reply-To: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> Message-ID: <1592405906.81.0.0254624950947.issue41006@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20121 pull_request: https://github.com/python/cpython/pull/20940 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 10:59:25 2020 From: report at bugs.python.org (David Adam) Date: Wed, 17 Jun 2020 14:59:25 +0000 Subject: [issue41008] multiprocessing.Connection.poll raises BrokenPipeError on Windows Message-ID: <1592405965.75.0.513458950808.issue41008@roundup.psfhosted.org> New submission from David Adam : On Windows 10 (1909, build 18363.900) in 3.7.7 and 3.9.0b3, poll() on a multiprocessing.Connection object can produce an exception: -- import multiprocessing def run(output_socket): for i in range(10): output_socket.send(i) output_socket.close() def main(): recv, send = multiprocessing.Pipe(duplex=False) process = multiprocessing.Process(target=run, args=(send,)) process.start() send.close() while True: if not process._closed: if recv.poll(): try: print(recv.recv()) except EOFError: process.join() break if __name__ == "__main__": main() -- On Linux/macOS this prints 0-9 and exits successfully, but on Windows produces a backtrace as follows: File "mptest.py", line 17, in main if recv.poll(): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.179.0_x64__qbz5n2kfra8p0\lib\multiprocessing\connection.py", line 262, in poll return self._poll(timeout) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.179.0_x64__qbz5n2kfra8p0\lib\multiprocessing\connection.py", line 333, in _poll _winapi.PeekNamedPipe(self._handle)[0] != 0): BrokenPipeError: [WinError 109] The pipe has been ended ---------- messages: 371748 nosy: zanchey priority: normal severity: normal status: open title: multiprocessing.Connection.poll raises BrokenPipeError on Windows type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 11:06:04 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 17 Jun 2020 15:06:04 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1592406364.58.0.448150049603.issue36346@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +20122 pull_request: https://github.com/python/cpython/pull/20941 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 11:10:18 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 17 Jun 2020 15:10:18 +0000 Subject: [issue41000] IDLE only allow single instance In-Reply-To: <1592385738.41.0.899337100123.issue41000@roundup.psfhosted.org> Message-ID: <1592406618.09.0.800646003618.issue41000@roundup.psfhosted.org> Terry J. Reedy added the comment: I am somewhat dubious about this. IDLE *must* allow side-by-side windows. AFAIK, single instance Notepad++ does not allow this. Tiles rather than only tabbed windows can potentially be done with with one process (turtledemo), but we are not there yet. I have no idea how easy it is to enforce 'one process' across platforms. ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 11:11:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 15:11:12 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1592406672.25.0.416896722599.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-41006: "Reduce number of modules imported by runpy". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 11:11:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 15:11:09 +0000 Subject: [issue41006] Reduce number of modules imported by runpy In-Reply-To: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> Message-ID: <1592406669.96.0.410407177947.issue41006@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-40275: "test.support has way too many imports". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 11:17:22 2020 From: report at bugs.python.org (hai shi) Date: Wed, 17 Jun 2020 15:17:22 +0000 Subject: [issue41006] Reduce number of modules imported by runpy In-Reply-To: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> Message-ID: <1592407042.69.0.896889627597.issue41006@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 11:20:43 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jun 2020 15:20:43 +0000 Subject: [issue41009] @support.requires_*_version broken for classes Message-ID: <1592407243.92.0.831664912584.issue41009@roundup.psfhosted.org> New submission from Christian Heimes : The decorators requires_linux_version, requires_freebsd_version, and requires_mac_ver don't work as class decorators. Decorated classes are ignored completely and not used in tests. The problem affects a couple of tests in test_os and maybe more cases. ---------- components: Tests messages: 371752 nosy: christian.heimes priority: high severity: normal status: open title: @support.requires_*_version broken for classes versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 11:22:09 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 17 Jun 2020 15:22:09 +0000 Subject: [issue10118] Tkinter does not find font In-Reply-To: <1287192630.89.0.924571330725.issue10118@psf.upfronthosting.co.za> Message-ID: <1592407329.39.0.833962992792.issue10118@roundup.psfhosted.org> Terry J. Reedy added the comment: If this is not out of date, it is, and was, a tcl/tk (3rd party) issue. tkinter.font.families basically wraps a tk call. return root.tk.splitlist(root.tk.call("font", "families", *args)) ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 11:28:43 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jun 2020 15:28:43 +0000 Subject: [issue41009] @support.requires_*_version broken for classes In-Reply-To: <1592407243.92.0.831664912584.issue41009@roundup.psfhosted.org> Message-ID: <1592407723.26.0.971300898838.issue41009@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +20123 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20942 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 11:34:48 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jun 2020 15:34:48 +0000 Subject: [issue40485] Provide an abstraction for a select-able Event In-Reply-To: <1588520007.12.0.424273214975.issue40485@roundup.psfhosted.org> Message-ID: <1592408088.24.0.516076900677.issue40485@roundup.psfhosted.org> Change by Christian Heimes : ---------- dependencies: +Provide wrapper for eventfd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 11:41:04 2020 From: report at bugs.python.org (Bruce Merry) Date: Wed, 17 Jun 2020 15:41:04 +0000 Subject: [issue41002] HTTPResponse.read with amt is slow In-Reply-To: <1592395696.11.0.156333341881.issue41002@roundup.psfhosted.org> Message-ID: <1592408464.43.0.976021229745.issue41002@roundup.psfhosted.org> Change by Bruce Merry : ---------- keywords: +patch pull_requests: +20124 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20943 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 11:53:53 2020 From: report at bugs.python.org (Theresa O'Connor) Date: Wed, 17 Jun 2020 15:53:53 +0000 Subject: [issue34908] netrc parsing is overly strict In-Reply-To: <1538760084.12.0.545547206417.issue34908@psf.upfronthosting.co.za> Message-ID: <1592409233.72.0.452319794167.issue34908@roundup.psfhosted.org> Theresa O'Connor added the comment: Emacs' netrc library supports some other keywords, namely 'port'. (This helps distinguish SMTP and IMAP auth information for the same machine.) Documentation is here: https://www.gnu.org/software/emacs/manual/html_node/auth/Help-for-users.html ---------- nosy: +hober _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 12:06:53 2020 From: report at bugs.python.org (patrick totzke) Date: Wed, 17 Jun 2020 16:06:53 +0000 Subject: [issue41010] email.message.EmailMessage.get_body Message-ID: <1592410013.12.0.0160903099449.issue41010@roundup.psfhosted.org> New submission from patrick totzke : I am trying to use EmailMessage.get_body() on the attached spam email. Although that message may be malformed, I believe that this method should fail gracefully. To reproduce ``` with open('msg', 'rb') as f: m = email.message_from_binary_file(f, _class=email.message.EmailMessage) m.get_body() --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) in ----> 1 m.get_body() /usr/lib/python3.8/email/message.py in get_body(self, preferencelist) 1016 best_prio = len(preferencelist) 1017 body = None -> 1018 for prio, part in self._find_body(self, preferencelist): 1019 if prio < best_prio: 1020 best_prio = prio /usr/lib/python3.8/email/message.py in _find_body(self, part, preferencelist) 987 if subtype != 'related': 988 for subpart in part.iter_parts(): --> 989 yield from self._find_body(subpart, preferencelist) 990 return 991 if 'related' in preferencelist: /usr/lib/python3.8/email/message.py in _find_body(self, part, preferencelist) 987 if subtype != 'related': 988 for subpart in part.iter_parts(): --> 989 yield from self._find_body(subpart, preferencelist) 990 return 991 if 'related' in preferencelist: /usr/lib/python3.8/email/message.py in _find_body(self, part, preferencelist) 976 977 def _find_body(self, part, preferencelist): --> 978 if part.is_attachment(): 979 return 980 maintype, subtype = part.get_content_type().split('/') AttributeError: 'str' object has no attribute 'is_attachment' ``` I am on Python 3.8.3 on debian testing. ---------- components: Library (Lib) files: msg messages: 371755 nosy: patrick totzke priority: normal severity: normal status: open title: email.message.EmailMessage.get_body type: crash versions: Python 3.8 Added file: https://bugs.python.org/file49241/msg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 12:07:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 16:07:28 +0000 Subject: [issue41003] test_copyreg: importing numpy changes warnings filters In-Reply-To: <1592397957.29.0.726353926705.issue41003@roundup.psfhosted.org> Message-ID: <1592410048.1.0.665386817174.issue41003@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8362893e3fe083df2ec8bb94c28b1a78383eadbf by Victor Stinner in branch 'master': bpo-41003: Fix test_copyreg when numpy is installed (GH-20935) https://github.com/python/cpython/commit/8362893e3fe083df2ec8bb94c28b1a78383eadbf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 12:10:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 16:10:44 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm In-Reply-To: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> Message-ID: <1592410244.23.0.0381191903012.issue38377@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner nosy_count: 3.0 -> 4.0 pull_requests: +20125 pull_request: https://github.com/python/cpython/pull/20944 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 12:18:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 16:18:11 +0000 Subject: [issue41003] test_copyreg: importing numpy changes warnings filters In-Reply-To: <1592397957.29.0.726353926705.issue41003@roundup.psfhosted.org> Message-ID: <1592410691.42.0.986213872164.issue41003@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20126 pull_request: https://github.com/python/cpython/pull/20945 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 12:21:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 16:21:34 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1592410894.17.0.0560424364014.issue1222585@roundup.psfhosted.org> STINNER Victor added the comment: > What needs to happen to get this 15 year old bug fixed? It prevents C++ Python modules from being compiled in situations where the user needs to supply CXXFLAGS. Someone has to propose a PR, someone else to review it, and a core developer has to take the responsibility to merge that PR. So far, there is no PR created. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 12:34:37 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jun 2020 16:34:37 +0000 Subject: [issue41009] @support.requires_*_version broken for classes In-Reply-To: <1592407243.92.0.831664912584.issue41009@roundup.psfhosted.org> Message-ID: <1592411677.85.0.282706073787.issue41009@roundup.psfhosted.org> Christian Heimes added the comment: Clarification: By "ignored" I mean that the entire class is ignored and none of the tests in the class is executed. I ran into the issue when I was working on eventfd PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 12:36:01 2020 From: report at bugs.python.org (Steve Dower) Date: Wed, 17 Jun 2020 16:36:01 +0000 Subject: [issue37369] Issue with pip in venv on Powershell in Windows In-Reply-To: <1561161256.11.0.32935812019.issue37369@roundup.psfhosted.org> Message-ID: <1592411761.04.0.997759823706.issue37369@roundup.psfhosted.org> Steve Dower added the comment: Hi Miika Please create a new issue. It would also be helpful if you gave us some idea of what your username looks like, even if you change it a bit to hide it from the internet. The most common cause of this error is spaces or non-ASCII characters in your username - hiding those makes it impossible to rule out the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 12:40:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 16:40:23 +0000 Subject: [issue41003] test_copyreg: importing numpy changes warnings filters In-Reply-To: <1592397957.29.0.726353926705.issue41003@roundup.psfhosted.org> Message-ID: <1592412023.66.0.0315424808901.issue41003@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b39d41ba1b77f7bc51c4d6f6d0e336693192cb3a by Victor Stinner in branch '3.9': bpo-41003: Fix test_copyreg when numpy is installed (GH-20935) (GH-20945) https://github.com/python/cpython/commit/b39d41ba1b77f7bc51c4d6f6d0e336693192cb3a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 12:42:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 16:42:50 +0000 Subject: [issue41003] test_copyreg: importing numpy changes warnings filters In-Reply-To: <1592397957.29.0.726353926705.issue41003@roundup.psfhosted.org> Message-ID: <1592412170.56.0.770779242762.issue41003@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20127 pull_request: https://github.com/python/cpython/pull/20946 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 12:44:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 16:44:49 +0000 Subject: [issue41006] Reduce number of modules imported by runpy In-Reply-To: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> Message-ID: <1592412289.71.0.407104362199.issue41006@roundup.psfhosted.org> STINNER Victor added the comment: I created 3 PRs. I have a few more local branches to avoid types and itertools imports. I may create PRs for these ones as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 12:56:12 2020 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 17 Jun 2020 16:56:12 +0000 Subject: [issue40999] implicit-int-float-conversion warnings in time and math code In-Reply-To: <1592378175.99.0.301099402499.issue40999@roundup.psfhosted.org> Message-ID: <1592412972.73.0.925648477326.issue40999@roundup.psfhosted.org> Mark Dickinson added the comment: I think #39277 is related. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 13:09:18 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jun 2020 17:09:18 +0000 Subject: [issue41009] @support.requires_*_version broken for classes In-Reply-To: <1592407243.92.0.831664912584.issue41009@roundup.psfhosted.org> Message-ID: <1592413758.22.0.563000234184.issue41009@roundup.psfhosted.org> miss-islington added the comment: New changeset bb6ec14479f18c32e71e43f2785f177aa17aabbd by Christian Heimes in branch 'master': bpo-41009: fix requires_OS_version() class decorator (GH-20942) https://github.com/python/cpython/commit/bb6ec14479f18c32e71e43f2785f177aa17aabbd ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 13:09:57 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 17:09:57 +0000 Subject: [issue41003] test_copyreg: importing numpy changes warnings filters In-Reply-To: <1592397957.29.0.726353926705.issue41003@roundup.psfhosted.org> Message-ID: <1592413797.0.0.136862375583.issue41003@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3d974b2fc681ddd0ec722cf631008d5941da52b8 by Victor Stinner in branch '3.8': bpo-41003: Fix test_copyreg when numpy is installed (GH-20935) (GH-20945) (GH-20946) https://github.com/python/cpython/commit/3d974b2fc681ddd0ec722cf631008d5941da52b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 13:10:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 17:10:24 +0000 Subject: [issue41003] test_copyreg: importing numpy changes warnings filters In-Reply-To: <1592397957.29.0.726353926705.issue41003@roundup.psfhosted.org> Message-ID: <1592413824.07.0.654049128825.issue41003@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 13:10:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 17:10:55 +0000 Subject: [issue41006] Reduce number of modules imported by runpy In-Reply-To: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> Message-ID: <1592413855.79.0.41798522429.issue41006@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 7824cc05bfe7f8181b21848a52007ddaf5612b9b by Victor Stinner in branch 'master': bpo-41006: collections imports lazily heap (GH-20940) https://github.com/python/cpython/commit/7824cc05bfe7f8181b21848a52007ddaf5612b9b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 13:11:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 17:11:58 +0000 Subject: [issue41006] Reduce number of modules imported by runpy In-Reply-To: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> Message-ID: <1592413918.04.0.00515030761188.issue41006@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 98ce7b107e6611d04dc35a4f5b02ea215ef122cf by Victor Stinner in branch 'master': bpo-41006: pkgutil imports lazily re (GH-20939) https://github.com/python/cpython/commit/98ce7b107e6611d04dc35a4f5b02ea215ef122cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 13:25:36 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jun 2020 17:25:36 +0000 Subject: [issue41009] @support.requires_*_version broken for classes In-Reply-To: <1592407243.92.0.831664912584.issue41009@roundup.psfhosted.org> Message-ID: <1592414736.73.0.147679193492.issue41009@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +20128 pull_request: https://github.com/python/cpython/pull/20947 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 13:26:12 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jun 2020 17:26:12 +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: <1592414772.88.0.264833150558.issue40637@roundup.psfhosted.org> miss-islington added the comment: New changeset 236a0f5cf022b59dbb6ea17a8e7a677c573d39b9 by stratakis in branch 'master': bpo-40637: Do not emit warnings for disabled builtin hashes (GH-20937) https://github.com/python/cpython/commit/236a0f5cf022b59dbb6ea17a8e7a677c573d39b9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 13:26:24 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jun 2020 17:26:24 +0000 Subject: [issue41009] @support.requires_*_version broken for classes In-Reply-To: <1592407243.92.0.831664912584.issue41009@roundup.psfhosted.org> Message-ID: <1592414784.9.0.601941703453.issue41009@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +20129 pull_request: https://github.com/python/cpython/pull/20948 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 13:27:03 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jun 2020 17:27:03 +0000 Subject: [issue41009] @support.requires_*_version broken for classes In-Reply-To: <1592407243.92.0.831664912584.issue41009@roundup.psfhosted.org> Message-ID: <1592414823.94.0.177839567358.issue41009@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +20130 pull_request: https://github.com/python/cpython/pull/20949 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 13:30:06 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 17 Jun 2020 17:30:06 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1592415006.53.0.540850840802.issue41004@roundup.psfhosted.org> Eric V. Smith added the comment: Good catch. Your approach seems like a good one. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 13:31:45 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 17 Jun 2020 17:31:45 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1592415105.77.0.834336152869.issue41004@roundup.psfhosted.org> Change by Eric V. Smith : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 14:08:55 2020 From: report at bugs.python.org (martin w) Date: Wed, 17 Jun 2020 18:08:55 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1592417335.55.0.904809895377.issue41004@roundup.psfhosted.org> Change by martin w : ---------- versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 14:39:38 2020 From: report at bugs.python.org (E. Paine) Date: Wed, 17 Jun 2020 18:39:38 +0000 Subject: [issue41000] IDLE: only allow single instance In-Reply-To: <1592385738.41.0.899337100123.issue41000@roundup.psfhosted.org> Message-ID: <1592419178.86.0.641867021304.issue41000@roundup.psfhosted.org> E. Paine added the comment: I appreciate your concerns Terry and I guess I must start by saying as much as I like notepad++, I don't like how their instances work. This issue shouldn't change any behaviour (from a user's perspective) other than not being able to open the same file twice. The idea is that each group (what we pretend is an instance) will be almost completely self-contained. Each instance will have its own shell (they will not share, etc.) and the windowed design will remain (for now...). What they will share is the main tkinter root (Tk instance) and the bottom layer of a stack-like file-list system (which I failed to properly describe in the original message). Calls will only descend the stack as far as necessary, but it allows one group to bring another group's editor to the front when the file tries to open a second time (like how an instance can raise any of its editors). The finer details are yet to be confirmed as I don't have any code, but it is likely that settings will take effect immediately across all groups and I have yet to decide whether the 'window' menu should be unified of per-group. I understand that the immediate benefits of this issue are not worth the change required, however I believe it would be highly beneficial going forward for groups to be able to communicate (like my previous example of creating a tabbed interface). ---------- title: IDLE only allow single instance -> IDLE: only allow single instance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 14:55:04 2020 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 17 Jun 2020 18:55:04 +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: <1592420104.09.0.959828240085.issue40637@roundup.psfhosted.org> Change by Charalampos Stratakis : ---------- pull_requests: +20131 pull_request: https://github.com/python/cpython/pull/20951 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 15:07:20 2020 From: report at bugs.python.org (martin w) Date: Wed, 17 Jun 2020 19:07:20 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1592420840.39.0.155063621305.issue41004@roundup.psfhosted.org> martin w added the comment: Forgot to add, this applies to all versions, 3.10, 3.9, 3.8, 3.7, 3.6, 3.5 ---------- 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 Jun 17 15:13:55 2020 From: report at bugs.python.org (SilentGhost) Date: Wed, 17 Jun 2020 19:13:55 +0000 Subject: [issue40997] python 3.8.2: datetime.datetime(1969, 1, 1).timestamp() yields OSError In-Reply-To: <1592375581.16.0.231176585152.issue40997@roundup.psfhosted.org> Message-ID: <1592421235.46.0.858129560967.issue40997@roundup.psfhosted.org> SilentGhost added the comment: This looks like a duplicate of #37527. ---------- nosy: +SilentGhost, belopolsky, p-ganssle resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Timestamp conversion on windows fails with timestamps close to EPOCH _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 15:43:41 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jun 2020 19:43:41 +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: <1592423021.42.0.279382590088.issue40637@roundup.psfhosted.org> miss-islington added the comment: New changeset 9a58f03dc21d15c076d051d902ce1d0324db9741 by stratakis in branch '3.9': [3.9] bpo-40637: Do not emit warnings for disabled builtin hashes (GH? (GH-20951) https://github.com/python/cpython/commit/9a58f03dc21d15c076d051d902ce1d0324db9741 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 15:59:31 2020 From: report at bugs.python.org (obserience) Date: Wed, 17 Jun 2020 19:59:31 +0000 Subject: [issue39093] tkinter objects garbage collected from non-tkinter thread cause crash In-Reply-To: <1576724216.68.0.395572121912.issue39093@roundup.psfhosted.org> Message-ID: <1592423971.19.0.303124870982.issue39093@roundup.psfhosted.org> obserience added the comment: I looked into this in greater depth a while back and never followed up. In "Modules/_tkinter.c" the Tkapp_Dealloc() function has a commented out check that would ensure it isn't called from the wrong thread. Tkapp_Dealloc(PyObject *self) { PyObject *tp = (PyObject *) Py_TYPE(self); /*CHECK_TCL_APPARTMENT;*/ ENTER_TCL Tcl_DeleteInterp(Tkapp_Interp(self)); LEAVE_TCL PyObject_Del(self); Py_DECREF(tp); DisableEventHook(); } If this is uncommented, garbage collection from a non-main thread will fail and the object will be leaked. Adding a warning would be a good idea so the user knows that a memory leak has occurred. **Doing this makes the code safe.** No more crashes. It should be done a bugfix regardless of anything else. #################### >> I propose that the Tkapp object can only be created in the main thread Restricting interpreter object creation/destruction to the main thread is very much an API change that would break any code that puts the interpreter in a non-main thread. Since we're keeping the objects around till the interpreter exits we still "leak" the memory and calling the destructor before the process exits has no benefits. Directly leaking the memory isn't any worse in terms of memory consumption and doesn't break currently working code. #################### My opinion is we should leak the memory, warn the user and forget about it. TCL interpreters are tiny and anyone who was doing this before was crashing their application anyway. A nice to have would be changing the python tkinter code to cleanup the references when the associated GUI exits (as it arguably should) --root.quit() doesn't do what the docs say and is regularly abused(ignore it) --root.destroy() is more clear cut and a better candidate for adding cleanup behavior implementations: 1)explicitly manage multiple references to the interpreter removing when appropriate (messy) --remove widget.tk refs on widget.destroy() --remove variable._tk when root.destroy() called (requires tracking variables with weakrefs) 2)replace root.tk with a weakproxy at initialisation and everything references the weakproxy (no other code changes) 3)replace widget.tk and variable._tk with a property that fetches root.tk --no weakrefs or explicit cleanup needed --**I favor this options** For all implementations we need code to handle post-cleanup tk retrieval failure: --Calls to root.quit() and other NOP equivalent methods should be ignored --Variable sets should be ignored but trigger a warning --Variable reads should RuntimeError since the TCL interpreter is dead The user can shoot themselves in the foot by grabbing an explicit reference to the TCL interpreter but I've never seen that done and now it only causes a memory leak (which we can warn about). Again, the python changes are nice to have but the "Modules/_tkinter.c" "CHECK_TCL_APPARTMENT;" macro needs to be uncommented. I'd be happy to do the python side-changes if that's likely to be accepted. ---------- title: tkinter objects garbage collected from non-tkinter thread cause panic and core dump -> tkinter objects garbage collected from non-tkinter thread cause crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 17:16:07 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 21:16:07 +0000 Subject: [issue41006] Reduce number of modules imported by runpy In-Reply-To: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> Message-ID: <1592428567.41.0.823977913889.issue41006@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 9e09849d20987c131b28bcdd252e53440d4cd1b3 by Victor Stinner in branch 'master': bpo-41006: importlib.util no longer imports typing (GH-20938) https://github.com/python/cpython/commit/9e09849d20987c131b28bcdd252e53440d4cd1b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 17:25:38 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 17 Jun 2020 21:25:38 +0000 Subject: [issue41011] [venv] record which executable and command were used to create a virtual environment Message-ID: <1592429138.01.0.105154043549.issue41011@roundup.psfhosted.org> New submission from Brett Cannon : When a virtual environment is created, the resulting pyvenv.cfg specifies the directory which contained the Python executable and the version of Python (see https://github.com/python/cpython/blob/master/Lib/venv/__init__.py#L147). Unfortunately that may not be enough to work backwards to which binary was used to create the virtual environment. My idea is to add an `executable` and `command` key to pyvenv.cfg which record the Python executable name and the command used to construct the virtual environment, respectively. The former would disambiguate which exact Python interpreter was used, and the `command` key could be used by e.g. virtualenv to record what was used to construct the virtual environment. That potentially could be used to make recreating a broken virtual environment easier. ---------- components: Library (Lib) messages: 371775 nosy: brett.cannon, vinay.sajip priority: normal severity: normal status: open title: [venv] record which executable and command were used to create a virtual environment type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 17:36:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 21:36:12 +0000 Subject: [issue41006] Reduce number of modules imported by runpy In-Reply-To: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> Message-ID: <1592429772.13.0.764265282987.issue41006@roundup.psfhosted.org> STINNER Victor added the comment: I close the issue. Making more imports lazy doesn't bring much benefit. -- With the 3 changes, runpy now imports 55 modules, instead of 70. The startup time is 1.3x faster, 18 ms instead of 24 ms: Mean +- std dev: [before] 23.7 ms +- 0.4 ms -> [after] 17.8 ms +- 0.6 ms: 1.33x faster (-25%) -- Avoiding itertools and types doesn't bring much benefit: Mean +- std dev: [after] 17.8 ms +- 0.6 ms -> [WIP] 17.2 ms +- 0.4 ms: 1.03x faster (-3%) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 17:46:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 21:46:38 +0000 Subject: [issue41006] Reduce number of modules imported by runpy In-Reply-To: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> Message-ID: <1592430398.83.0.351309031437.issue41006@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20132 pull_request: https://github.com/python/cpython/pull/20953 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 17:59:05 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 21:59:05 +0000 Subject: [issue41006] Reduce number of modules imported by runpy In-Reply-To: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> Message-ID: <1592431145.03.0.311502277119.issue41006@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4c18fc8f1def7030e5ec5d1ffb9355d7453dc408 by Victor Stinner in branch 'master': bpo-41006: Document the runpy optimization (GH-20953) https://github.com/python/cpython/commit/4c18fc8f1def7030e5ec5d1ffb9355d7453dc408 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 18:03:03 2020 From: report at bugs.python.org (Manuel Jacob) Date: Wed, 17 Jun 2020 22:03:03 +0000 Subject: [issue17110] sys.argv docs should explaining how to handle encoding issues In-Reply-To: <1359864071.69.0.659089821533.issue17110@psf.upfronthosting.co.za> Message-ID: <1592431383.21.0.791833410138.issue17110@roundup.psfhosted.org> Manuel Jacob added the comment: The actual startup code uses Py_DecodeLocale() for converting argv from bytes to unicode. Since which Python version is it guaranteed that Py_DecodeLocale() and os.fsencode() roundtrip? ---------- nosy: +mjacob _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 18:09:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 22:09:02 +0000 Subject: [issue41006] Reduce number of modules imported by runpy In-Reply-To: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> Message-ID: <1592431742.92.0.911302315213.issue41006@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20133 pull_request: https://github.com/python/cpython/pull/20954 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 18:39:43 2020 From: report at bugs.python.org (Manuel Jacob) Date: Wed, 17 Jun 2020 22:39:43 +0000 Subject: [issue41012] Some code comments refer to removed initfsencoding() Message-ID: <1592433583.2.0.837325823711.issue41012@roundup.psfhosted.org> New submission from Manuel Jacob : Some code comments refer to initfsencoding(), which was however removed after Python 3.7. ---------- messages: 371779 nosy: mjacob priority: normal severity: normal status: open title: Some code comments refer to removed initfsencoding() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 18:52:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 22:52:12 +0000 Subject: [issue41013] test_os.test_memfd_create() fails on AMD64 FreeBSD Shared 3.x Message-ID: <1592434332.74.0.304039490213.issue41013@roundup.psfhosted.org> New submission from STINNER Victor : https://buildbot.python.org/all/#/builders/152/builds/1024 ... test_makedir (test.test_os.MakedirTests) ... ok test_mode (test.test_os.MakedirTests) ... ok Timeout (0:25:00)! Thread 0x0000000800b54000 (most recent call first): File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_os.py", line 3520 in test_memfd_create ... ---------- components: Tests messages: 371780 nosy: vstinner priority: normal severity: normal status: open title: test_os.test_memfd_create() fails on AMD64 FreeBSD Shared 3.x versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 18:52:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 22:52:21 +0000 Subject: [issue41013] test_os.test_memfd_create() fails on AMD64 FreeBSD Shared 3.x In-Reply-To: <1592434332.74.0.304039490213.issue41013@roundup.psfhosted.org> Message-ID: <1592434341.61.0.78121008111.issue41013@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 19:10:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 23:10:28 +0000 Subject: [issue41006] Reduce number of modules imported by runpy In-Reply-To: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> Message-ID: <1592435428.33.0.7596456599.issue41006@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20134 pull_request: https://github.com/python/cpython/pull/20955 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 19:11:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 23:11:54 +0000 Subject: [issue41006] Reduce number of modules imported by runpy In-Reply-To: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> Message-ID: <1592435514.38.0.231830059018.issue41006@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1bf7959dce0597e312c6f35476a7cc957fd0323c by Victor Stinner in branch 'master': bpo-41006: Remove init_sys_streams() hack (GH-20954) https://github.com/python/cpython/commit/1bf7959dce0597e312c6f35476a7cc957fd0323c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 19:20:57 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jun 2020 23:20:57 +0000 Subject: [issue41006] Reduce number of modules imported by runpy In-Reply-To: <1592402301.15.0.428746435956.issue41006@roundup.psfhosted.org> Message-ID: <1592436057.32.0.297348628962.issue41006@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 2c2a4f3d8545784c6e4ca8128bfc706916080712 by Victor Stinner in branch 'master': bpo-41006: What's New: less => fewer modules (GH-20955) https://github.com/python/cpython/commit/2c2a4f3d8545784c6e4ca8128bfc706916080712 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 19:24:12 2020 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 17 Jun 2020 23:24:12 +0000 Subject: =?utf-8?q?=5Bissue34820=5D_binascii=2Ec=3A1578=3A1=3A_error=3A_the_contro?= =?utf-8?q?l_flow_of_function_=E2=80=98binascii=5Fcrc32=E2=80=99_does_not_?= =?utf-8?q?match_its_profile_data_=28counter_=E2=80=98arcs=E2=80=99=29?= In-Reply-To: <1538056682.62.0.545547206417.issue34820@psf.upfronthosting.co.za> Message-ID: <1592436252.47.0.981827628641.issue34820@roundup.psfhosted.org> Nick Coghlan added the comment: I'm seeing this as well when attempting to run an optimised Python 3.8 build on an old Debian 9 system (with the curses and socket extension modules). For example: cpython/Modules/socketmodule.c: In function ?PyInit__socket?: cpython/Modules/socketmodule.c:8304:1: error: the control flow of function ?PyInit__socket? does not match its profile data (counter ?arcs?) [-Werror=coverage-mismatch] cpython/Modules/socketmodule.c:8304:1: error: the control flow of function ?PyInit__socket? does not match its profile data (counter ?time_profiler?) [-Werror=coverage-mismatch] That said, I did install missing optional dependendencies and then do a reconfigure without doing a "make clean", which is pretty dubious. So David's assessment here sounds good to me: the bug is that "make clean" should be removing the intermediate PGO files, but is currently leaving them lying around. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 19:26:08 2020 From: report at bugs.python.org (Sree Vaddi) Date: Wed, 17 Jun 2020 23:26:08 +0000 Subject: [issue41014] sqlite3_trace deprecated Message-ID: <1592436367.99.0.294210468626.issue41014@roundup.psfhosted.org> New submission from Sree Vaddi : details in the attached python.compile.log ---------- components: macOS files: python.compile.log messages: 371784 nosy: ned.deily, ronaldoussoren, svaddi priority: normal severity: normal status: open title: sqlite3_trace deprecated type: enhancement Added file: https://bugs.python.org/file49242/python.compile.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 19:27:44 2020 From: report at bugs.python.org (Sree Vaddi) Date: Wed, 17 Jun 2020 23:27:44 +0000 Subject: [issue41015] warning: 'sqlite3_enable_shared_cache' is deprecated Message-ID: <1592436464.21.0.919729812752.issue41015@roundup.psfhosted.org> New submission from Sree Vaddi : details in the attached python.compile.log ---------- components: macOS files: python.compile.log messages: 371785 nosy: ned.deily, ronaldoussoren, svaddi priority: normal severity: normal status: open title: warning: 'sqlite3_enable_shared_cache' is deprecated type: enhancement Added file: https://bugs.python.org/file49243/python.compile.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 19:28:16 2020 From: report at bugs.python.org (Sree Vaddi) Date: Wed, 17 Jun 2020 23:28:16 +0000 Subject: [issue41014] warning: 'sqlite3_trace' is deprecated In-Reply-To: <1592436367.99.0.294210468626.issue41014@roundup.psfhosted.org> Message-ID: <1592436496.69.0.371939602927.issue41014@roundup.psfhosted.org> Change by Sree Vaddi : ---------- title: sqlite3_trace deprecated -> warning: 'sqlite3_trace' is deprecated _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 19:29:09 2020 From: report at bugs.python.org (Sree Vaddi) Date: Wed, 17 Jun 2020 23:29:09 +0000 Subject: [issue41016] warning: 'Tk_GetNumMainWindows' is deprecated Message-ID: <1592436549.98.0.251888900953.issue41016@roundup.psfhosted.org> Change by Sree Vaddi : ---------- components: macOS files: python.compile.log nosy: ned.deily, ronaldoussoren, svaddi priority: normal severity: normal status: open title: warning: 'Tk_GetNumMainWindows' is deprecated type: enhancement Added file: https://bugs.python.org/file49244/python.compile.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 19:29:34 2020 From: report at bugs.python.org (Sree Vaddi) Date: Wed, 17 Jun 2020 23:29:34 +0000 Subject: [issue41017] warning: 'Tk_Init' is deprecated: first deprecated Message-ID: <1592436574.64.0.825505741473.issue41017@roundup.psfhosted.org> Change by Sree Vaddi : ---------- components: macOS files: python.compile.log nosy: ned.deily, ronaldoussoren, svaddi priority: normal severity: normal status: open title: warning: 'Tk_Init' is deprecated: first deprecated Added file: https://bugs.python.org/file49245/python.compile.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 19:30:13 2020 From: report at bugs.python.org (Sree Vaddi) Date: Wed, 17 Jun 2020 23:30:13 +0000 Subject: [issue41018] warning: 'Tk_MainWindow' is deprecated: first deprecated Message-ID: <1592436613.04.0.537099789756.issue41018@roundup.psfhosted.org> Change by Sree Vaddi : ---------- components: macOS files: python.compile.log nosy: ned.deily, ronaldoussoren, svaddi priority: normal severity: normal status: open title: warning: 'Tk_MainWindow' is deprecated: first deprecated Added file: https://bugs.python.org/file49246/python.compile.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 19:31:30 2020 From: report at bugs.python.org (Sree Vaddi) Date: Wed, 17 Jun 2020 23:31:30 +0000 Subject: [issue41019] The necessary bits to build these optional modules were not found: Message-ID: <1592436690.4.0.900808103671.issue41019@roundup.psfhosted.org> Change by Sree Vaddi : ---------- components: macOS files: python.compile.log nosy: ned.deily, ronaldoussoren, svaddi priority: normal severity: normal status: open title: The necessary bits to build these optional modules were not found: Added file: https://bugs.python.org/file49247/python.compile.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 19:31:58 2020 From: report at bugs.python.org (Sree Vaddi) Date: Wed, 17 Jun 2020 23:31:58 +0000 Subject: [issue41020] Could not build the ssl module! Message-ID: <1592436718.73.0.150168220835.issue41020@roundup.psfhosted.org> Change by Sree Vaddi : ---------- components: macOS files: python.compile.log nosy: ned.deily, ronaldoussoren, svaddi priority: normal severity: normal status: open title: Could not build the ssl module! Added file: https://bugs.python.org/file49248/python.compile.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 19:36:27 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 17 Jun 2020 23:36:27 +0000 Subject: [issue41020] Could not build the ssl module! Message-ID: <1592436987.89.0.437564799974.issue41020@roundup.psfhosted.org> New submission from Ned Deily : Thank you for your report but please stop filing all of these separate issues. :) As is true on many platforms, you can't build Python on macOS without additional third-party libraries. The Python Developer's Guide, among other places, has more information. https://devguide.python.org/setup/#macos-and-os-x ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 19:49:40 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Wed, 17 Jun 2020 23:49:40 +0000 Subject: [issue41020] Could not build the ssl module! In-Reply-To: <1592436987.89.0.437564799974.issue41020@roundup.psfhosted.org> Message-ID: <1592437780.93.0.309155938678.issue41020@roundup.psfhosted.org> Emmanuel Arias added the comment: Hi, All issue opened seems to be the same: https://bugs.python.org/issue41019 https://bugs.python.org/issue41018 https://bugs.python.org/issue41017 https://bugs.python.org/issue41016 https://bugs.python.org/issue41015 https://bugs.python.org/issue41014 Maybe should be great close them? ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 21:42:25 2020 From: report at bugs.python.org (Inada Naoki) Date: Thu, 18 Jun 2020 01:42:25 +0000 Subject: [issue17110] sys.argv docs should explaining how to handle encoding issues In-Reply-To: <1359864071.69.0.659089821533.issue17110@psf.upfronthosting.co.za> Message-ID: <1592444545.89.0.299131215503.issue17110@roundup.psfhosted.org> Inada Naoki added the comment: There is no strict guarantee. I think ASCII, UTF-8, latin1 with surrogateescape guarantee roundtrip. Other legacy encodings like cp932 may not roundtrip. But it is not a huge problem because only Windows use them typically. On Windows: * wchar_t is used in most case, instead of fsencoding * fsencoding is now UTF-8 by default In other words, if you are using legacy encoding on Unix, it may be not roundtripping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 22:02:26 2020 From: report at bugs.python.org (Inada Naoki) Date: Thu, 18 Jun 2020 02:02:26 +0000 Subject: [issue41002] HTTPResponse.read with amt is slow In-Reply-To: <1592395696.11.0.156333341881.issue41002@roundup.psfhosted.org> Message-ID: <1592445746.51.0.665311132603.issue41002@roundup.psfhosted.org> Change by Inada Naoki : ---------- nosy: +inada.naoki versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 23:51:44 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 18 Jun 2020 03:51:44 +0000 Subject: [issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration In-Reply-To: <1586183568.2.0.322929459864.issue40204@roundup.psfhosted.org> Message-ID: <1592452304.84.0.37087965514.issue40204@roundup.psfhosted.org> Ned Deily added the comment: New changeset 0d70a98f449d58311aff3374ab5f203a401fc3bf by Ned Deily in branch '3.7': bpo-40204: Pin Sphinx version to 2.3.1 in Doc/Makefile https://github.com/python/cpython/commit/0d70a98f449d58311aff3374ab5f203a401fc3bf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 17 23:51:44 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 18 Jun 2020 03:51:44 +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: <1592452304.72.0.379212014788.issue39580@roundup.psfhosted.org> Ned Deily added the comment: New changeset 966036af0e5e1dff8fedd423d90a246067537345 by Ned Deily in branch '3.7': bpo-39580: add check for CLI installation on macOS https://github.com/python/cpython/commit/966036af0e5e1dff8fedd423d90a246067537345 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 01:21:48 2020 From: report at bugs.python.org (hai shi) Date: Thu, 18 Jun 2020 05:21:48 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1592457708.64.0.568028588222.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +20135 pull_request: https://github.com/python/cpython/pull/20957 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 01:52:05 2020 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 18 Jun 2020 05:52:05 +0000 Subject: [issue35018] Sax parser provides no user access to lexical handlers In-Reply-To: <1539879741.38.0.788709270274.issue35018@psf.upfronthosting.co.za> Message-ID: <1592459525.86.0.242598478633.issue35018@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz nosy_count: 3.0 -> 4.0 pull_requests: +20136 pull_request: https://github.com/python/cpython/pull/20958 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 01:58:23 2020 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Jun 2020 05:58:23 +0000 Subject: [issue41020] Could not build the ssl module! In-Reply-To: <1592436987.89.0.437564799974.issue41020@roundup.psfhosted.org> Message-ID: <1592459903.36.0.670538139363.issue41020@roundup.psfhosted.org> Christian Heimes added the comment: I'm closing the ssl related issue. Please follow the documentation to install the necessary dependencies. ---------- assignee: -> christian.heimes components: +SSL nosy: +christian.heimes resolution: -> works for me stage: -> resolved status: open -> closed type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 02:00:12 2020 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Jun 2020 06:00:12 +0000 Subject: [issue41013] test_os.test_memfd_create() fails on AMD64 FreeBSD Shared 3.x In-Reply-To: <1592434332.74.0.304039490213.issue41013@roundup.psfhosted.org> Message-ID: <1592460012.26.0.944189448093.issue41013@roundup.psfhosted.org> Christian Heimes added the comment: Commit bb6ec14479f18c32e71e43f2785f177aa17aabbd fixed a problem with tests, so the test is now executed. Does FreeBSD have an implementation of memfd_create that behaves slightly differently than memfd_create on Linux? ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 03:58:42 2020 From: report at bugs.python.org (Amir Mohamadi) Date: Thu, 18 Jun 2020 07:58:42 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1592467122.79.0.990648133401.issue41004@roundup.psfhosted.org> Amir Mohamadi added the comment: Can I make a PR for this? ---------- nosy: +Amir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 04:03:05 2020 From: report at bugs.python.org (martin w) Date: Thu, 18 Jun 2020 08:03:05 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1592467385.27.0.392866265487.issue41004@roundup.psfhosted.org> martin w added the comment: Absolutely, go ahead Amir ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 04:03:09 2020 From: report at bugs.python.org (Sree Vaddi) Date: Thu, 18 Jun 2020 08:03:09 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1592467389.05.0.904365106695.issue41004@roundup.psfhosted.org> Change by Sree Vaddi : ---------- keywords: +patch nosy: +svaddi nosy_count: 3.0 -> 4.0 pull_requests: +20137 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20956 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 04:06:29 2020 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 18 Jun 2020 08:06:29 +0000 Subject: [issue35018] Sax parser provides no user access to lexical handlers In-Reply-To: <1539879741.38.0.788709270274.issue35018@psf.upfronthosting.co.za> Message-ID: <1592467589.06.0.3427952401.issue35018@roundup.psfhosted.org> Change by Zackery Spytz : ---------- versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 04:31:23 2020 From: report at bugs.python.org (Inada Naoki) Date: Thu, 18 Jun 2020 08:31:23 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1592469083.02.0.324341932266.issue36346@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 610a60c601fb4380eee30e15be1cd4dcbdaeec4c by Inada Naoki in branch '3.9': bpo-36346: Add Py_DEPRECATED to deprecated unicode APIs (GH-20878) https://github.com/python/cpython/commit/610a60c601fb4380eee30e15be1cd4dcbdaeec4c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 05:13:10 2020 From: report at bugs.python.org (Michael Osipov) Date: Thu, 18 Jun 2020 09:13:10 +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: <1592471590.94.0.833545185727.issue11102@roundup.psfhosted.org> Change by Michael Osipov <1983-01-06 at gmx.net>: ---------- nosy: +michael-o _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 05:26:16 2020 From: report at bugs.python.org (Aravindhan) Date: Thu, 18 Jun 2020 09:26:16 +0000 Subject: [issue41021] Ctype callback with Structures crashes on python 3.8 on windows. Message-ID: <1592472376.78.0.985098642017.issue41021@roundup.psfhosted.org> New submission from Aravindhan : Python Process crashes with unauthorised memory access when the C++ DLL callback has arguments as structures. Happens in python 3.8. python 3.7 works fine with same source code. Initial investigations revels that the structure is called back as a pointer instead of plain python object. Callbacks with Primitive types are successful. This might be something to do with vector calling in python 3.8? >>>Replicate: >>>A c++ DLL with "subscribe_cb" function and a callback "listen_cb"; where FILETIME is windows FILETIME structure (it can be any structure for that matter) extern "C" CBFUNC(void, listen_cb)(int value, FILETIME ts ); extern "C" EXFUNC(void) subscribe_cb(listen_cb); EXFUNC(void) subscribe_cb(listen_cb cb) { int i = 0; while (true) { FILETIME systime; GetSystemTimeAsFileTime(&systime); i++; Sleep(1000); cb(i, systime); } } >>>Python client for the dll class FT(Structure): _fields_ = [("dwLowDateTime", c_ulong, 32), ("dwHighDateTime", c_ulong, 32)] @WINFUNCTYPE(c_void_p, c_int, FT) def cb(val, ft): print(f"callback {val} {ft.dwLowDateTime} {ft.dwHighDateTime}") lib = WinDLL(r"C:\Temp\CBsimulate\CbClient\CbClient\Debug\DummyCb.dll") lib.subscribe_cb(cb) while 1: sleep(5) ---------- components: ctypes messages: 371796 nosy: amaury.forgeotdarc, belopolsky, itsgk92, meador.inge priority: normal severity: normal status: open title: Ctype callback with Structures crashes on python 3.8 on windows. type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 05:34:11 2020 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Jun 2020 09:34:11 +0000 Subject: [issue40968] urllib does not send http/1.1 ALPN extension In-Reply-To: <1592046614.41.0.0652918856783.issue40968@roundup.psfhosted.org> Message-ID: <1592472851.61.0.93815976091.issue40968@roundup.psfhosted.org> Change by Christian Heimes : ---------- title: urllib is unable to deal with TURN server infront -> urllib does not send http/1.1 ALPN extension versions: +Python 3.10, Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 05:38:01 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 18 Jun 2020 09:38:01 +0000 Subject: [issue41022] AST sum types is unidentifiable after ast.Constant became a base class Message-ID: <1592473081.05.0.347184745832.issue41022@roundup.psfhosted.org> New submission from Batuhan Taskaya : Previously (before ast.Constant became a base class for deprecated node classes), Sum types were identifiable with this rule; len(node_class.__subclasses__()) > 0 Now, this is also valid for the ast.Constant itself because of ast.Str, ast.Num etc. bases it. The bad side is, it makes (complex) sum classes unidentifiable. ---------- components: Library (Lib) messages: 371797 nosy: BTaskaya, pablogsal, serhiy.storchaka priority: normal severity: normal status: open title: AST sum types is unidentifiable after ast.Constant became a base class _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 05:38:05 2020 From: report at bugs.python.org (Chris Withers) Date: Thu, 18 Jun 2020 09:38:05 +0000 Subject: [issue40133] Provide additional matchers for unittest.mock In-Reply-To: <1585735205.76.0.306632606173.issue40133@roundup.psfhosted.org> Message-ID: <1592473085.1.0.579285448768.issue40133@roundup.psfhosted.org> Chris Withers added the comment: Gregory, I find your response a little troubling. Myself and Karthikeyan both do a lot of work on Mock, some might even say we're the maintainers of Mock in both cpython's core repo and the backport. We both feel this belongs standalone on pypi, and would prefer not to see this merged. "We've been using these internally at Google for years" is not a compelling argument and suggests you already have a viable solution which doesn't involve merging these into the core repo. Your phrasing could be interpreted as somewhat bullying - "it's right for Google, so I'm going to do it for all of Python in spite of comments from other core contributors, and I don't want to discuss this on a mailing list because that will take too long". Please consider re-closing this issue and respecting the decisions of those of us who maintain mock long-term. If not, please suggest a way forward to mediate this disagreement, but please do not unilaterally merge anything without sorting this out first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 05:40:05 2020 From: report at bugs.python.org (Kubilay Kocak) Date: Thu, 18 Jun 2020 09:40:05 +0000 Subject: [issue41013] test_os.test_memfd_create() fails on AMD64 FreeBSD Shared 3.x In-Reply-To: <1592434332.74.0.304039490213.issue41013@roundup.psfhosted.org> Message-ID: <1592473205.7.0.700158851696.issue41013@roundup.psfhosted.org> Kubilay Kocak added the comment: memfd_create came in via: https://github.com/freebsd/freebsd/commit/575e351fdd996f72921b87e71c2c26466e887ed2 via review: https://reviews.freebsd.org/D21393 via kevans (cc'd) ---------- nosy: +kevans _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 05:44:37 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 18 Jun 2020 09:44:37 +0000 Subject: [issue41019] The necessary bits to build these optional modules were not found: Message-ID: <1592473477.66.0.014691616705.issue41019@roundup.psfhosted.org> New submission from Ronald Oussoren : What's your question or bug report? The log just shows that a number of extensions could not be build because their dependencies are not installed. https://devguide.python.org/setup/#macos-and-os-x shows how to install dependencies (but I noticed that sqlite is not mentioned there) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 05:45:34 2020 From: report at bugs.python.org (Jay Patel) Date: Thu, 18 Jun 2020 09:45:34 +0000 Subject: [issue41023] smtplib does not handle Unicode characters Message-ID: <1592473534.66.0.101889528587.issue41023@roundup.psfhosted.org> New submission from Jay Patel : According to the user requirements, I need to send an email, which is provided as a raw email, i.e., the contents of email are provided in form of headers. To accomplish this I am using the methods provided in the "send_rawemail_demo.py" file (attached below). The smtplib library works fine when providing only 'ascii' characters in the 'raw_email' variable. But, when I provide any Unicode characters either in the Subject or Body of the email, then the sendmail method of the smtplib library fails with the following message: UnicodeEncodeError 'ascii' codec can't encode characters in position 123-124: ordinal not in range(128) I tried providing the mail_options=["SMTPUTF-8"] in the sendmail method (On line no. 72 in the send_rawemail_demo.py file), but then it fails (even for the 'ascii' characters) with the exception as SMTPSenderRefused. I have faced the same issue on Python 3.6. The sendmail method of the SMTP class encodes the message using 'ascii' as: if isinstance(msg, str): msg = _fix_eols(msg).encode('ascii') The code works properly for Python 2 as the smtplib library for Python 2 does not have the above line and hence it allows Unicode characters in the Body and the Subject. ---------- components: email files: send_rawemail_demo.py messages: 371801 nosy: barry, jpatel, r.david.murray priority: normal severity: normal status: open title: smtplib does not handle Unicode characters type: enhancement versions: Python 3.8 Added file: https://bugs.python.org/file49249/send_rawemail_demo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 05:48:29 2020 From: report at bugs.python.org (Manuel Jacob) Date: Thu, 18 Jun 2020 09:48:29 +0000 Subject: [issue17110] sys.argv docs should explaining how to handle encoding issues In-Reply-To: <1359864071.69.0.659089821533.issue17110@psf.upfronthosting.co.za> Message-ID: <1592473709.53.0.415596353771.issue17110@roundup.psfhosted.org> Manuel Jacob added the comment: If the encoding supports it, since which Python version do Py_DecodeLocale() and os.fsencode() roundtrip? The background of my question is that Mercurial goes some extra rounds to determine the correct encoding to emulate what Py_EncodeLocale() would do: https://www.mercurial-scm.org/repo/hg/file/5.4.1/mercurial/pycompat.py#l157 . If os.fsencode() could be used, it would simplify the code. Mercurial supports Python 3.5+. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 05:50:08 2020 From: report at bugs.python.org (Jay Patel) Date: Thu, 18 Jun 2020 09:50:08 +0000 Subject: [issue41023] smtplib does not handle Unicode characters In-Reply-To: <1592473534.66.0.101889528587.issue41023@roundup.psfhosted.org> Message-ID: <1592473808.32.0.853841988031.issue41023@roundup.psfhosted.org> Jay Patel added the comment: Screenshot for the case, where only the 'raw_email' variable contains only 'ascii' characters. ---------- Added file: https://bugs.python.org/file49250/providing_only_ascii_characters.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 05:50:41 2020 From: report at bugs.python.org (Jay Patel) Date: Thu, 18 Jun 2020 09:50:41 +0000 Subject: [issue41023] smtplib does not handle Unicode characters In-Reply-To: <1592473534.66.0.101889528587.issue41023@roundup.psfhosted.org> Message-ID: <1592473841.93.0.947616458175.issue41023@roundup.psfhosted.org> Change by Jay Patel : Added file: https://bugs.python.org/file49251/providing_Unicode_characters_in_email_body.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 05:50:58 2020 From: report at bugs.python.org (Jay Patel) Date: Thu, 18 Jun 2020 09:50:58 +0000 Subject: [issue41023] smtplib does not handle Unicode characters In-Reply-To: <1592473534.66.0.101889528587.issue41023@roundup.psfhosted.org> Message-ID: <1592473858.85.0.168747005362.issue41023@roundup.psfhosted.org> Change by Jay Patel : Added file: https://bugs.python.org/file49252/providing_mail_options_in_sendmail.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 05:59:33 2020 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Jun 2020 09:59:33 +0000 Subject: [issue40968] urllib does not send http/1.1 ALPN extension In-Reply-To: <1592046614.41.0.0652918856783.issue40968@roundup.psfhosted.org> Message-ID: <1592474373.18.0.882724150691.issue40968@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +20138 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20959 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 06:04:23 2020 From: report at bugs.python.org (E. Paine) Date: Thu, 18 Jun 2020 10:04:23 +0000 Subject: [issue39093] tkinter objects garbage collected from non-tkinter thread cause crash In-Reply-To: <1576724216.68.0.395572121912.issue39093@roundup.psfhosted.org> Message-ID: <1592474663.7.0.773366229076.issue39093@roundup.psfhosted.org> E. Paine added the comment: > ... would break any code that puts the interpreter in a non-main thread Have people not been warned enough?! But seriously, looking anywhere on Google will scream at you to stop using using threads with tkinter, let alone having the interpreter in a thread. I am not sure I agree with your statement that we would be keeping the interpreter exits, as that was only a 'fallback' if a delete was attempted in a thread. However, I agree with you that we should avoid breaking existing code where possible and so such a change shouldn't be added. As for uncommenting CHECK_TCL_APPARTMENT in Tkapp_Dealloc, I looked at the blame and found that it was added as a comment: https://github.com/python/cpython/commit/b5bfb9f38c786c3330b2d52d93b664588c42283dbecaus I don't know the reason for adding it commented, but it is possible Martin couldn't find a situation in which it was required. My only problem with uncommenting it would be that I don't understand how the GC works. I suspect it would not be a problem, but if the error caused the GC to halt collecting, we would be in exactly the same situation (though I doubt this would be true). > It should be done a bugfix regardless of anything else. Agreed. Such a simple change to stop the interpreter crashing is definitely beneficial. As for actually fixing the root of the problem, I suspect any of the changes you proposed, similar to mine, would be too controversial and not really go anywhere (being fairly large changes to fix just a handful of situations). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 06:05:34 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 18 Jun 2020 10:05:34 +0000 Subject: [issue40077] Convert static types to PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1592474734.28.0.506211088751.issue40077@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +20139 pull_request: https://github.com/python/cpython/pull/20960 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 07:15:45 2020 From: report at bugs.python.org (SBC King) Date: Thu, 18 Jun 2020 11:15:45 +0000 Subject: [issue32068] textpad from curses package isn't handling backspace key In-Reply-To: <1511014836.54.0.213398074469.issue32068@psf.upfronthosting.co.za> Message-ID: <1592478945.09.0.0525250160567.issue32068@roundup.psfhosted.org> SBC King added the comment: I would create a pull request ---------- nosy: +SBC King _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 07:19:04 2020 From: report at bugs.python.org (Inada Naoki) Date: Thu, 18 Jun 2020 11:19:04 +0000 Subject: [issue17110] sys.argv docs should explaining how to handle encoding issues In-Reply-To: <1592473709.53.0.415596353771.issue17110@roundup.psfhosted.org> Message-ID: Inada Naoki added the comment: > > Manuel Jacob added the comment: > > If the encoding supports it, since which Python version do > Py_DecodeLocale() and os.fsencode() roundtrip? > Maybe, since Python 3.2. FWIW, fsencode is added by Victor in https://bugs.python.org/issue8514 > The background of my question is that Mercurial goes some extra rounds to > determine the correct encoding to emulate what Py_EncodeLocale() would do: > https://www.mercurial-scm.org/repo/hg/file/5.4.1/mercurial/pycompat.py#l157 > . If os.fsencode() could be used, it would simplify the code. Mercurial > supports Python 3.5+. > > > I think it is a right approach. One of the important use case of os.fsencode is using file path from sys.argv even if it can not be decoded by filesystem encoding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 07:46:07 2020 From: report at bugs.python.org (Ram Rachum) Date: Thu, 18 Jun 2020 11:46: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: <1592480767.5.0.982620875168.issue40636@roundup.psfhosted.org> Change by Ram Rachum : ---------- pull_requests: +20140 pull_request: https://github.com/python/cpython/pull/20961 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 08:06:00 2020 From: report at bugs.python.org (Sree Vaddi) Date: Thu, 18 Jun 2020 12:06:00 +0000 Subject: [issue41020] Could not build the ssl module! In-Reply-To: <1592436987.89.0.437564799974.issue41020@roundup.psfhosted.org> Message-ID: <1592481960.77.0.472316799975.issue41020@roundup.psfhosted.org> Sree Vaddi added the comment: openssl brew installed and upto date. despite build says it could not build the ssl module. i followed the macos instructions at the dev guide. svaddi at cpython % brew --prefix openssl /usr/local/opt/openssl at 1.1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 08:51:04 2020 From: report at bugs.python.org (R. David Murray) Date: Thu, 18 Jun 2020 12:51:04 +0000 Subject: [issue41023] smtplib does not handle Unicode characters In-Reply-To: <1592473534.66.0.101889528587.issue41023@roundup.psfhosted.org> Message-ID: <1592484664.0.0.410233112213.issue41023@roundup.psfhosted.org> R. David Murray added the comment: If you use the 'sendmail' function for sending, then it is entirely your responsibility to turn the email into "wire format". Unicode is not wire format, but if you give sendmail a string that only has ascii in it it nicely converts it to binary for you. But given that the email RFCs specify specific ways to indicate how non-ascii is encoded in the message, there is no way for the smtp library to know now to do that correctly when passed an arbitrary unicode string, so it doesn't try. sendmail requires *you* do do the encoding to binary, indicating you at least think that you got the RFC parts right :) In python2, strings are binary by default, so in that case you are handing sendmail binary format data (with the same assumption that you got the RFC parts right)...if you passed the python2 function a unicode string it would probably complain as well, although not in the same way. If your raw email is RFC compliant, then you can do: sendmail(from, to, mymsg.encode()). I see from your example that you are trying to use the email package to construct the email, which is good. But, emails are *binary*, they are not unicode, so passing "message_from_string" a unicode string containing non-ascii isn't going to do what you are expecting, any more than passing unicode to the 'sendmail' function did. message_from_string is really only useful for doing certain sorts of debug and ought to be deprecated. Or produce a warning when handed a string containing non-ascii. (There are historical reasons why it doesn't :( And then you should use smtplib's 'sendmessage' function, which understands email package messages and will Do the Right Thing with them (including the extraction of the to and from addresses your code is currently doing). However, even if you encoded your raw message to binary and then passed it to message_from_bytes, your example message is *not* RFC compliant: without MIME headers, an email with non-ascii characters in the body is technically in violation of the RFC. Most email programs will handle that particular message despite that, but not all. You are better off using the email package to construct a properly RFC formatted email, using the new API (ex: msg = EmailMessage() (not Message), and then doing msg['from'] = address, etc, and msg.set_content(your unicode string body)). I can't really give you much advice here (nor should I, this being a bug tracker :) because I don't know how exactly how the data is coming in to your program in your real use case. Once you have a properly constructed EmailMessage object, you should use smtplib's 'sendmessage' function, which understands email package messages and will Do the Right Thing with them (including the extraction of the to and from addresses your code is currently doing, as well as properly handling BCC, which means deleting BCC headers from the message before sending it, which your code does not do and which 'sendmail' would not do.) SMTPUTF8 is about non-ascii in the email *headers*, and most SMTP servers these days do not yes support it[*]. Some of the big ones do, though (I believe gmail does). [*] although that doesn't explain why what you got was SMTPSenderRefused. You should have gotten SMTPNotSupportedError. ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 08:53:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jun 2020 12:53:27 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm In-Reply-To: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> Message-ID: <1592484807.06.0.661616803595.issue38377@roundup.psfhosted.org> STINNER Victor added the comment: New changeset ddbeb2f3e02a510c5784ffd74c5e09e8c70b5881 by Victor Stinner in branch 'master': bpo-38377: Add support.skip_if_broken_multiprocessing_synchronize() (GH-20944) https://github.com/python/cpython/commit/ddbeb2f3e02a510c5784ffd74c5e09e8c70b5881 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 08:58:54 2020 From: report at bugs.python.org (Kyle Evans) Date: Thu, 18 Jun 2020 12:58:54 +0000 Subject: [issue41013] test_os.test_memfd_create() fails on AMD64 FreeBSD Shared 3.x In-Reply-To: <1592434332.74.0.304039490213.issue41013@roundup.psfhosted.org> Message-ID: <1592485134.06.0.601225804609.issue41013@roundup.psfhosted.org> Kyle Evans added the comment: Interesting; I don't quite have time to look at the moment, but what is the test doing that it's ultimately timing out? Our memfd_create is assumed to be compatible, with the exception that we don't yet support HUGETLB (but there are patches in progress for the vm that might make it feasible); in my experience most users of memfd_create weren't really using hugetlb, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 09:01:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jun 2020 13:01:02 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm In-Reply-To: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> Message-ID: <1592485262.26.0.43493165375.issue38377@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20141 pull_request: https://github.com/python/cpython/pull/20962 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 09:11:32 2020 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Jun 2020 13:11:32 +0000 Subject: [issue41013] test_os.test_memfd_create() fails on AMD64 FreeBSD Shared 3.x In-Reply-To: <1592434332.74.0.304039490213.issue41013@roundup.psfhosted.org> Message-ID: <1592485892.12.0.540563795969.issue41013@roundup.psfhosted.org> Christian Heimes added the comment: The traceback points to line 3520, which calls f.tell() on a file object that wraps a memfd. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 10:02:28 2020 From: report at bugs.python.org (vincent-ferotin) Date: Thu, 18 Jun 2020 14:02:28 +0000 Subject: [issue41024] doc: Explicitly mention use of 'enum.Enum' as a valid container for 'choices' argument of 'argparse.ArgumentParser.add_argument' Message-ID: <1592488947.97.0.69594351568.issue41024@roundup.psfhosted.org> New submission from vincent-ferotin : It is currently not obvious, reading :mod:`argparse` documentation, that :meth:`argparse.ArgumentParser.add_argument` could accept as 'choices' parameter an :class:`enum.Enum`. However, it seems (at least to me) that this 'choices' parameter [1] is the perfect candidat of enums usage (see [2]). So I suggest here to explicitly mention and illustrate such usage in current Python documentation. As far I as could test, such usage works at least with Python 3.5, 3.7, and 3.8. A small patch on 'master' branches is in progress, and should shortly be available as a GitHub pull-request. [1] https://docs.python.org/3/library/argparse.html#choices [2] PEP 435: https://www.python.org/dev/peps/pep-0435/#motivation ---------- assignee: docs at python components: Documentation messages: 371812 nosy: Vincent F?rotin, docs at python priority: normal severity: normal status: open title: doc: Explicitly mention use of 'enum.Enum' as a valid container for 'choices' argument of 'argparse.ArgumentParser.add_argument' 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 Jun 18 10:06:50 2020 From: report at bugs.python.org (Kyle Evans) Date: Thu, 18 Jun 2020 14:06:50 +0000 Subject: [issue41013] test_os.test_memfd_create() fails on AMD64 FreeBSD Shared 3.x In-Reply-To: <1592434332.74.0.304039490213.issue41013@roundup.psfhosted.org> Message-ID: <1592489210.79.0.890477857923.issue41013@roundup.psfhosted.org> Kyle Evans added the comment: I think it's too early to look at this, I'll circle back another time. :-) I got a minute and extracted the relevant test, but I guess there must have been some fundamental transcription error: import os fd = os.memfd_create("Hi", os.MFD_CLOEXEC) if fd == -1: print("boo") os.exit(1) if os.get_inheritable(fd): print("inheritable, boo") os.exit(1) with open(fd, "wb", closefd=False) as f: f.write(b'memfd_create') if f.tell() != 12: print("Hork") os.exit(1) print("What?") print("Done") When I run this with python3.9, I get: ... 3038 100554: shm_open2(SHM_ANON,O_RDWR|O_CLOEXEC,00,0,"memfd:Hi") = 3 (0x3) 3038 100554: fcntl(3,F_GETFD,) = 1 (0x1) 3038 100554: fstat(3,{ mode=---------- ,inode=10,size=0,blksize=4096 }) = 0 (0x0) 3038 100554: ioctl(3,TIOCGETA,0x7fffffffe2a0) ERR#25 'Inappropriate ioctl for device' 3038 100554: lseek(3,0x0,SEEK_CUR) = 0 (0x0) 3038 100554: lseek(3,0x0,SEEK_CUR) = 0 (0x0) 3038 100554: write(3,"memfd_create",12) = 0 (0x0) 3038 100554: write(3,"memfd_create",12) = 0 (0x0) 3038 100554: write(3,"memfd_create",12) = 0 (0x0) 3038 100554: write(3,"memfd_create",12) = 0 (0x0) 3038 100554: write(3,"memfd_create",12) = 0 (0x0) (ad infinitum) So in my local repro, Python is looping forever on successful write() for reasons I'm not immediately sure of. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 10:06:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jun 2020 14:06:36 +0000 Subject: [issue40077] Convert static types to PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1592489196.72.0.133874484646.issue40077@roundup.psfhosted.org> STINNER Victor added the comment: PR 20960 (_bz2 module) triggers an interesting question. The effect of converting a static type to a heap type on pickle, especially for protocols 0 and 1. pickle.dumps(o, 0) calls object.__reduce__(o) which calls copyreg._reduce_ex(o, 0). copyreg._reduce_ex() behaves differently on heap types: ... for base in cls.__mro__: if hasattr(base, '__flags__') and not base.__flags__ & _HEAPTYPE: break else: base = object # not really reachable ... There are 3 things which impacts serialization/deserialization: - Py_TPFLAGS_HEAPTYPE flag in the type flags - Is __new__() overriden in the type? - Py_TPFLAGS_BASETYPE flag in the type flags Examples: * In Python 3.7, _random.Random() cannot be serialized because it's a static type (it doesn't have (Py_TPFLAGS_HEAPTYPE) * In master, _random.Random() cannot be deserialized because _random.Random() has __new__() method (it's not object.__new__()) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 10:10:28 2020 From: report at bugs.python.org (Kyle Evans) Date: Thu, 18 Jun 2020 14:10:28 +0000 Subject: [issue41013] test_os.test_memfd_create() fails on AMD64 FreeBSD Shared 3.x In-Reply-To: <1592434332.74.0.304039490213.issue41013@roundup.psfhosted.org> Message-ID: <1592489428.36.0.578379064765.issue41013@roundup.psfhosted.org> Kyle Evans added the comment: (Transcription error beyond the bogus os.exit() :-)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 10:19:02 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Jun 2020 14:19:02 +0000 Subject: [issue40884] Added defaults parameter for logging.Formatter In-Reply-To: <1591399791.89.0.0887642700869.issue40884@roundup.psfhosted.org> Message-ID: <1592489942.23.0.870415396483.issue40884@roundup.psfhosted.org> miss-islington added the comment: New changeset 8f192d12af82c4dc40730bf59814f6a68f68f950 by Bar Harel in branch 'master': bpo-40884: Added defaults parameter for logging.Formatter (GH-20668) https://github.com/python/cpython/commit/8f192d12af82c4dc40730bf59814f6a68f68f950 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 10:22:54 2020 From: report at bugs.python.org (vincent-ferotin) Date: Thu, 18 Jun 2020 14:22:54 +0000 Subject: [issue41024] doc: Explicitly mention use of 'enum.Enum' as a valid container for 'choices' argument of 'argparse.ArgumentParser.add_argument' In-Reply-To: <1592488947.97.0.69594351568.issue41024@roundup.psfhosted.org> Message-ID: <1592490174.77.0.759019608229.issue41024@roundup.psfhosted.org> Change by vincent-ferotin : ---------- keywords: +patch pull_requests: +20142 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20964 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 10:26:51 2020 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 18 Jun 2020 14:26:51 +0000 Subject: [issue41025] C implementation of ZoneInfo cannot be subclassed Message-ID: <1592490411.18.0.433446521396.issue41025@roundup.psfhosted.org> New submission from Paul Ganssle : In the C implementation of zoneinfo.ZoneInfo, __init_subclass__ is not declared as a classmethod, which prevents it from being subclassed. This was not noticed because the tests for ZoneInfo subclasses in C are actually testing zoneinfo.ZoneInfo, not a subclass, due to a mistake in the inheritance tree: https://github.com/python/cpython/blob/8f192d12af82c4dc40730bf59814f6a68f68f950/Lib/test/test_zoneinfo/test_zoneinfo.py#L465-L487 Originally reported on the backport by S?bastien Eustace: https://github.com/pganssle/zoneinfo/issues/82 The fix in the backport is here: https://github.com/pganssle/zoneinfo/pull/83 ---------- assignee: p-ganssle components: Library (Lib) messages: 371817 nosy: p-ganssle priority: high severity: normal stage: needs patch status: open title: C implementation of ZoneInfo cannot be subclassed versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 10:41:21 2020 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 18 Jun 2020 14:41:21 +0000 Subject: [issue41025] C implementation of ZoneInfo cannot be subclassed In-Reply-To: <1592490411.18.0.433446521396.issue41025@roundup.psfhosted.org> Message-ID: <1592491281.77.0.244630583168.issue41025@roundup.psfhosted.org> Change by Paul Ganssle : ---------- keywords: +patch pull_requests: +20143 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20965 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 10:49:38 2020 From: report at bugs.python.org (Kyle Evans) Date: Thu, 18 Jun 2020 14:49:38 +0000 Subject: [issue41013] test_os.test_memfd_create() fails on AMD64 FreeBSD Shared 3.x In-Reply-To: <1592434332.74.0.304039490213.issue41013@roundup.psfhosted.org> Message-ID: <1592491778.4.0.35451994743.issue41013@roundup.psfhosted.org> Kyle Evans added the comment: Ah, now that I'm more awake, I see the problem- the write is unsuccessful because I haven't yet implemented grow-on-write. None of the consumers that I had found relied on it, instead choosing to ftruncate() it to the size they need before operating on it. I think the best course of action might be to disable the test on FreeBSD for now (unless you're ok with tossing in a truncate to expand the file), because it might take me a little bit to get around to this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 11:20:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jun 2020 15:20:08 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm In-Reply-To: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> Message-ID: <1592493608.04.0.499113256526.issue38377@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b1e736113484c99acb57e4acb417b91a9e58e7ff by Victor Stinner in branch '3.9': bpo-38377: Add support.skip_if_broken_multiprocessing_synchronize() (GH-20944) (GH-20962) https://github.com/python/cpython/commit/b1e736113484c99acb57e4acb417b91a9e58e7ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 11:25:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jun 2020 15:25:02 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm In-Reply-To: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> Message-ID: <1592493902.53.0.186671833199.issue38377@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20144 pull_request: https://github.com/python/cpython/pull/20966 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 12:08:07 2020 From: report at bugs.python.org (Ivan Ivanyuk) Date: Thu, 18 Jun 2020 16:08:07 +0000 Subject: [issue39247] dataclass defaults and property don't work together In-Reply-To: <1578418537.56.0.0565923550129.issue39247@roundup.psfhosted.org> Message-ID: <1592496487.01.0.342893031807.issue39247@roundup.psfhosted.org> Ivan Ivanyuk added the comment: Was there some solution in progress here? We would like to use dataclasses and seems this problem currently limits their usefulness to us. We recently came upon the same behaviour https://mail.python.org/pipermail/python-list/2020-June/897502.html and I was wondering if it was possible to make it work without changing the property decorator behaviour. Is there a way at all to preserve the default value on the class with @property even before dataclass starts processing it? An example from that mail thread to workaround this: from dataclasses import dataclass, field def set_property(): Container.x = property(Container.get_x, Container.set_x) return 30 @dataclass class Container: x: int = field(default_factory=set_property) def get_x(self) -> int: return self._x def set_x(self, z: int): if z > 1: self._x = z else: raise ValueError set_property can also be made a class method and referenced like this: x: int = field(default_factory=lambda: Container.set_property()) Is it possible that this kind of behaviour can be made one of standard flows for the field() function and dataclasses module can generate a function like this and set it on the class during processing? Or maybe it's better to extend @property decorator to update property object with default value which can be used later by the dataclass? ---------- nosy: +iivanyuk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 12:32:50 2020 From: report at bugs.python.org (Open Close) Date: Thu, 18 Jun 2020 16:32:50 +0000 Subject: [issue41002] HTTPResponse.read with amt is slow In-Reply-To: <1592395696.11.0.156333341881.issue41002@roundup.psfhosted.org> Message-ID: <1592497970.57.0.402049803674.issue41002@roundup.psfhosted.org> Open Close added the comment: @bmerry check the test results again. (perhaps 'MB/s's are wrong). httpclient-read: 3019.0 ? 63.8 MB/s httpclient-read-length: 1050.3 ? 4.8 MB/s --> httpclient-read-raw: 3150.3 ? 5.3 MB/s --> socket-read: 3134.4 ? 7.9 MB/s ---------- nosy: +op368 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 12:39:48 2020 From: report at bugs.python.org (Bruce Merry) Date: Thu, 18 Jun 2020 16:39:48 +0000 Subject: [issue41002] HTTPResponse.read with amt is slow In-Reply-To: <1592395696.11.0.156333341881.issue41002@roundup.psfhosted.org> Message-ID: <1592498388.84.0.0816507938451.issue41002@roundup.psfhosted.org> Bruce Merry added the comment: > (perhaps 'MB/s's are wrong). Why, are you getting significantly different results? Just in case it's confusing, the results are reported as A ? B MB/s, where A is the mean and B is the standard deviation of the mean. So it's about 3GB/s when no length if passed, or 1GB/s when a length is passed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 12:45:48 2020 From: report at bugs.python.org (Laurence) Date: Thu, 18 Jun 2020 16:45:48 +0000 Subject: [issue41026] mailbox does not support new Path object Message-ID: <1592498748.35.0.391421735484.issue41026@roundup.psfhosted.org> New submission from Laurence : The mailbox library, in particular the Mailbox class I'm using, does not support the new Path object requiring a clumsy `mbx = Maildir(str(some_path_obj))` to use with a Path instance. It currently blows up if passed a Path directly (does not support startswith) - perhaps a simple solution is to coerce whatever is passed into a string inside `__init__`? Could this support be added? I feel that strings representing paths should be discouraged as a general principal now we have a truly portable object to represent paths, and supporting Path in all places it makes logical sense (without breaking backwards compatibility, if implemented as I suggest with coercion by `str(...)` inside the module) in the core library seems like a good thing to me. ---------- components: Library (Lib) messages: 371823 nosy: LimaAlphaHotel priority: normal severity: normal status: open title: mailbox does not support new Path object type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 12:46:20 2020 From: report at bugs.python.org (Open Close) Date: Thu, 18 Jun 2020 16:46:20 +0000 Subject: [issue41002] HTTPResponse.read with amt is slow In-Reply-To: <1592395696.11.0.156333341881.issue41002@roundup.psfhosted.org> Message-ID: <1592498780.91.0.0859142754324.issue41002@roundup.psfhosted.org> Open Close added the comment: @bmerry yah, sorry, don't bother. I have mistaken. (I thought somehow 'MB/s' was simple speed, not std). I confirmed your tests. httpclient-read: 2504.5 ? 10.6 MB/s httpclient-read-length: 871.5 ? 4.9 MB/s httpclient-read-raw: 2528.3 ? 3.6 MB/s socket-read: 2520.9 ? 3.6 MB/s ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 12:46:51 2020 From: report at bugs.python.org (Laurence) Date: Thu, 18 Jun 2020 16:46:51 +0000 Subject: [issue41026] mailbox does not support new Path object In-Reply-To: <1592498748.35.0.391421735484.issue41026@roundup.psfhosted.org> Message-ID: <1592498811.72.0.248366163576.issue41026@roundup.psfhosted.org> Laurence added the comment: Sorry, should read "in particular the Maildir class I'm using"... Same applies to mbox, however. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 12:56:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jun 2020 16:56:52 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm In-Reply-To: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> Message-ID: <1592499412.85.0.212869890598.issue38377@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e8056180a13b6755e4e3e5505b7bf03f79da29fb by Victor Stinner in branch '3.8': bpo-38377: Add support.skip_if_broken_multiprocessing_synchronize() (GH-20944) (GH-20962) (GH-20966) https://github.com/python/cpython/commit/e8056180a13b6755e4e3e5505b7bf03f79da29fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 12:57:15 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 18 Jun 2020 16:57:15 +0000 Subject: [issue41020] Could not build the ssl module! In-Reply-To: <1592436987.89.0.437564799974.issue41020@roundup.psfhosted.org> Message-ID: <1592499435.83.0.313951299229.issue41020@roundup.psfhosted.org> Ned Deily added the comment: You appear to be using the Developer Guide recipe for Python versions < 3.7. Try this one to get everything: CPPFLAGS="-I$(brew --prefix openssl)/include" \ LDFLAGS="-L$(brew --prefix openssl)/lib" \ --with-openssl=$(brew --prefix openssl) \ ./configure --with-pydebug ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 12:58:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jun 2020 16:58:55 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm In-Reply-To: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> Message-ID: <1592499535.43.0.775934622923.issue38377@roundup.psfhosted.org> STINNER Victor added the comment: Hum, test_resource_tracker_reused() failed twice on macOS, but it's unclear to me if it's a regression caused by my change or not. x86-64 macOS 3.9: https://buildbot.python.org/all/#builders/696/builds/119 FAIL: test_resource_tracker_reused (test.test_multiprocessing_forkserver.TestResourceTracker) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.9.billenstein-macos/build/Lib/test/_test_multiprocessing.py", line 5219, in test_resource_tracker_reused self.assertTrue(is_resource_tracker_reused) AssertionError: False is not true ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 13:19:51 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 18 Jun 2020 17:19:51 +0000 Subject: [issue41026] mailbox does not support new Path object In-Reply-To: <1592498748.35.0.391421735484.issue41026@roundup.psfhosted.org> Message-ID: <1592500791.23.0.689962234187.issue41026@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Laurence, Maildir predates pathlib so it's not surprising it hasn't been updated yet. Could you open a PR to add this? BTW, you should use os.fspath() instead of str() here. ---------- nosy: +remi.lapeyre versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 13:38:27 2020 From: report at bugs.python.org (mbarbera) Date: Thu, 18 Jun 2020 17:38:27 +0000 Subject: [issue41027] get_version() fails to return gcc version for gcc-7 Message-ID: <1592501907.65.0.64967213393.issue41027@roundup.psfhosted.org> New submission from mbarbera : In Lib/distutils/cygwincompiler.py, get_version() tries to parse the output of shell commands to check for the gcc version. gcc-7 has changed the behavior of the flag -dumpversion to only show the major version number. This prevents the regex string RE_VERSION from parsing the version number from the shell output. The issue was encountered when trying to install a third-party module to python3.6 on Ubuntu 18.04 ---------- components: Distutils messages: 371830 nosy: dstufft, eric.araujo, mbarbera priority: normal severity: normal status: open title: get_version() fails to return gcc version for gcc-7 type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 13:38:51 2020 From: report at bugs.python.org (mbarbera) Date: Thu, 18 Jun 2020 17:38:51 +0000 Subject: [issue41027] get_version() fails to return gcc version for gcc-7 In-Reply-To: <1592501907.65.0.64967213393.issue41027@roundup.psfhosted.org> Message-ID: <1592501931.1.0.161650786761.issue41027@roundup.psfhosted.org> Change by mbarbera : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 14:32:08 2020 From: report at bugs.python.org (neonene) Date: Thu, 18 Jun 2020 18:32:08 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1592505128.59.0.334368896512.issue40958@roundup.psfhosted.org> neonene added the comment: FYI, since PR 20875/20919, msvc(x64) has warned C4244 (conversion from 'Py_ssize_t' to 'int', possible loss of data). parse.c especially gets more than 700. ---------- nosy: +neonene -christian.heimes, miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 14:59:48 2020 From: report at bugs.python.org (mbarbera) Date: Thu, 18 Jun 2020 18:59:48 +0000 Subject: [issue41027] get_version() fails to return gcc version for gcc-7 In-Reply-To: <1592501907.65.0.64967213393.issue41027@roundup.psfhosted.org> Message-ID: <1592506788.03.0.426694562218.issue41027@roundup.psfhosted.org> Change by mbarbera : ---------- keywords: +patch pull_requests: +20145 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20967 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 15:08:39 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Jun 2020 19:08:39 +0000 Subject: [issue38144] Add the root_dir and dir_fd parameters in glob.glob() In-Reply-To: <1568313061.34.0.998675763501.issue38144@roundup.psfhosted.org> Message-ID: <1592507319.09.0.894862193289.issue38144@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 8a64ceaf9856e7570cad6f5d628cce789834e019 by Serhiy Storchaka in branch 'master': bpo-38144: Add the root_dir and dir_fd parameters in glob.glob(). (GH-16075) https://github.com/python/cpython/commit/8a64ceaf9856e7570cad6f5d628cce789834e019 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 15:29:42 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 18 Jun 2020 19:29:42 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm In-Reply-To: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> Message-ID: <1592508582.35.0.154103396987.issue38377@roundup.psfhosted.org> Ned Deily added the comment: > Hum, test_resource_tracker_reused() failed twice on macOS, but it's unclear to me if it's a regression caused by my change or not. It does appear to be caused by your change. I did a quick check with the 3.8 branch. With that PR, test_multiprocessing_forkserver fails solidly. Backing up to the previous commit, test_multiprocessing_forkserver passes. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 15:46:43 2020 From: report at bugs.python.org (=?utf-8?b?0JDQvdC00YDQtdC5INCa0LDQt9Cw0L3RhtC10LI=?=) Date: Thu, 18 Jun 2020 19:46:43 +0000 Subject: [issue40816] Add missed AsyncContextDecorator to contextlib In-Reply-To: <1590763993.17.0.319482222949.issue40816@roundup.psfhosted.org> Message-ID: <1592509603.5.0.306916886035.issue40816@roundup.psfhosted.org> ?????? ???????? added the comment: Yury Selivanov, did you see the pull request? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 16:11:07 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 18 Jun 2020 20:11:07 +0000 Subject: [issue40133] Provide additional matchers for unittest.mock In-Reply-To: <1585735205.76.0.306632606173.issue40133@roundup.psfhosted.org> Message-ID: <1592511067.84.0.560742482697.issue40133@roundup.psfhosted.org> Gregory P. Smith added the comment: I suggest waiting to see what I come up with as a proposal for what part(s) of this makes sense in the stdlib and why. I've closed the PR. Nothing is going to be added to mock without your agreement. This issue is not a high priority for me, but leaving it open and assigned to me as reminder helps keep the TODO of whittling the proposal down with justifications on my radar. ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 17:01:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jun 2020 21:01:35 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm In-Reply-To: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> Message-ID: <1592514095.36.0.967063356211.issue38377@roundup.psfhosted.org> STINNER Victor added the comment: test_multiprocessing_forkserver.test_resource_tracker_reused() failed on 3.8, 3.9 and master buildbots. It looks like a real reproducible bug. I'm not sure how my change triggered this bug. ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 17:13:56 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 18 Jun 2020 21:13:56 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1592514836.95.0.0889448267921.issue40958@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Hummmm, that is because now lineno, col_offset, end_lineno, end_col_offset are Py_ssize_t so we probably need to adapt the other assignments. WIll make a PR soon ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 17:16:33 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 18 Jun 2020 21:16:33 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1592514993.19.0.127134308721.issue40958@roundup.psfhosted.org> Lysandros Nikolaou added the comment: > WIll make a PR soon No need. Already got something ready. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 17:19:09 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 18 Jun 2020 21:19:09 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1592515149.7.0.914484513089.issue40958@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +20146 pull_request: https://github.com/python/cpython/pull/20968 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 17:35:33 2020 From: report at bugs.python.org (Julien Palard) Date: Thu, 18 Jun 2020 21:35:33 +0000 Subject: [issue41028] Move docs.python.org language and version switcher out of cpython Message-ID: <1592516133.76.0.0424010515361.issue41028@roundup.psfhosted.org> New submission from Julien Palard : This is to track [1] from the cpython point of view, mostly just to remove the switchers as they are now handled by docsbuild-scripts. see: https://mail.python.org/pipermail/doc-sig/2020-June/004200.html [1]: https://github.com/python/docsbuild-scripts/issues/90 ---------- assignee: mdk components: Documentation messages: 371839 nosy: mdk priority: normal severity: normal status: open title: Move docs.python.org language and version switcher out of cpython _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 17:43:29 2020 From: report at bugs.python.org (Julien Palard) Date: Thu, 18 Jun 2020 21:43:29 +0000 Subject: [issue41028] Move docs.python.org language and version switcher out of cpython In-Reply-To: <1592516133.76.0.0424010515361.issue41028@roundup.psfhosted.org> Message-ID: <1592516609.99.0.866795911625.issue41028@roundup.psfhosted.org> Change by Julien Palard : ---------- keywords: +patch pull_requests: +20147 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20969 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 17:45:53 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 18 Jun 2020 21:45:53 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1592516753.02.0.320619117751.issue40958@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +20148 pull_request: https://github.com/python/cpython/pull/20970 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 18:12:39 2020 From: report at bugs.python.org (Ryan Schmidt) Date: Thu, 18 Jun 2020 22:12:39 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1592518359.71.0.91167272514.issue1222585@roundup.psfhosted.org> Ryan Schmidt added the comment: Christian, thanks for the pointer. I think you're right, I probably am actually wanting this to be fixed in setuptools, not distutils, since setuptools is what people are using today. Since setuptools is an offshoot of distutils, I had assumed that the developers of setuptools would take ownership of any remaining distutils bugs that affected setuptools but I guess not. I looked through the setuptools issue tracker and this was the closest existing bug I could find: https://github.com/pypa/setuptools/issues/1732 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 18:39:55 2020 From: report at bugs.python.org (Chris AtLee) Date: Thu, 18 Jun 2020 22:39:55 +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: <1592519995.09.0.662802375433.issue12800@roundup.psfhosted.org> Change by Chris AtLee : ---------- pull_requests: +20149 pull_request: https://github.com/python/cpython/pull/20972 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 19:10:50 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 18 Jun 2020 23:10:50 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1592521850.82.0.362221446215.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 01ece63d42b830df106948db0aefa6c1ba24416a by Lysandros Nikolaou in branch 'master': bpo-40334: Produce better error messages on invalid targets (GH-20106) https://github.com/python/cpython/commit/01ece63d42b830df106948db0aefa6c1ba24416a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 19:31:17 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 18 Jun 2020 23:31:17 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1592523077.37.0.835973498746.issue40334@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +20150 pull_request: https://github.com/python/cpython/pull/20973 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 20:04:05 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 19 Jun 2020 00:04:05 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1592525045.23.0.928992292578.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset a5442b26f46f1073d1eb78895d554be520105ecb by Lysandros Nikolaou in branch '3.9': [3.9] bpo-40334: Produce better error messages on invalid targets (GH-20106) (GH-20973) https://github.com/python/cpython/commit/a5442b26f46f1073d1eb78895d554be520105ecb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 20:05:58 2020 From: report at bugs.python.org (Seth Troisi) Date: Fri, 19 Jun 2020 00:05:58 +0000 Subject: [issue39949] truncating match in regular expression match objects repr In-Reply-To: <1584049767.16.0.188415292253.issue39949@roundup.psfhosted.org> Message-ID: <1592525158.06.0.866302062175.issue39949@roundup.psfhosted.org> Seth Troisi added the comment: I was thinking about how to add the end quote and found these weird cases: >>> "asdf'asdf'asdf" "asdf'asdf'asdf" >>> "asdf\"asdf\"asdf" 'asdf"asdf"asdf' >>> "asdf\"asdf'asdf" 'asdf"asdf\'asdf' This means that len(s) +2 (or 3 for bytes) != len(repr(s)) e.g. >>> s = "\"''''''" '"\'\'\'\'\'\'' >>> s >>> len(s) 7 >>> len(repr(s)) 15 This can lead to a weird partial trailing character >>> re.match(".*", "a"*48 + "'\"") <_sre.SRE_Match object; span=(0, 50), match='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\> This means I'll need to rethink len(group0) >= 48 as the condition for truncation (as a 30 length string can be truncated by %.50R) Maybe it makes sense to write group0 to a temp string and then check if that's truncated and extract the quote character from that OR PyUnicode_FromFormat('%R', group0[:50]) # avoids trailing escape character ('\') but might be longer than 50 characters ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 20:28:48 2020 From: report at bugs.python.org (Eryk Sun) Date: Fri, 19 Jun 2020 00:28:48 +0000 Subject: [issue41021] Ctype callback with Structures crashes on python 3.8 on windows. In-Reply-To: <1592472376.78.0.985098642017.issue41021@roundup.psfhosted.org> Message-ID: <1592526528.49.0.297608781504.issue41021@roundup.psfhosted.org> Eryk Sun added the comment: Please provide complete code that can be compiled as is, and the required build environment. I wrote a similar example in C, compiled for x64 with MSVC, and it worked fine for me. Also, please provide more details about the error -- a traceback in a native debugger, exception analysis, or a dump file. One detail that stands out to me is that you set the ctypes callback return type to c_void_p -- instead of void (None). But that shouldn't cause a crash. Another concern is your use of WINFUNCTYPE (stdcall) and WinDLL instead of CFUNCTYPE (cdecl) and CDLL. In x64 they're the same, but it's still important to use the function's declared calling convention, for the sake of x86 compatibility. Make sure you're really using stdcall. Here's the code that worked for me: c/test.c: #include typedef void listen_fn(int, FILETIME); static void subscribe_thread(listen_fn *cb) { int i = 0; FILETIME systime; while (1) { GetSystemTimeAsFileTime(&systime); cb(i++, systime); Sleep(1000); } } void __declspec(dllexport) subscribe(listen_fn *cb) { CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)subscribe_thread, cb, 0, NULL); } test.py: import ctypes from ctypes import wintypes lib = ctypes.CDLL('c/test.dll') listen_fn = ctypes.CFUNCTYPE(None, ctypes.c_int, wintypes.FILETIME) @listen_fn def cb(val, ft): print(f"callback {val:03d} {ft.dwHighDateTime} {ft.dwLowDateTime}") print('press enter to quit') lib.subscribe(cb) input() ---------- components: +Windows nosy: +eryksun, paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 20:40:30 2020 From: report at bugs.python.org (Eryk Sun) Date: Fri, 19 Jun 2020 00:40:30 +0000 Subject: [issue41021] ctypes callback with structure crashes in Python 3.8 on Windows In-Reply-To: <1592472376.78.0.985098642017.issue41021@roundup.psfhosted.org> Message-ID: <1592527230.29.0.395505338388.issue41021@roundup.psfhosted.org> Change by Eryk Sun : ---------- stage: -> test needed title: Ctype callback with Structures crashes on python 3.8 on windows. -> ctypes callback with structure crashes in Python 3.8 on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 18 23:11:11 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 19 Jun 2020 03:11:11 +0000 Subject: [issue40077] Convert static types to PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1592536271.5.0.775204298896.issue40077@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +20151 pull_request: https://github.com/python/cpython/pull/20974 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 01:05:22 2020 From: report at bugs.python.org (Suganya Vijayaraghavan) Date: Fri, 19 Jun 2020 05:05:22 +0000 Subject: [issue41029] parallel sftp from local to remote file creates empty directory in home path Message-ID: <1592543121.98.0.114702153703.issue41029@roundup.psfhosted.org> New submission from Suganya Vijayaraghavan : I was using parallelSSHClient - copy_to_file The code was like below, greenlets = client.copy_file('/tmp/logs', '/home/sugan/remote_copy/', recurse=True) >From /tmp/logs, I'm copying to my home path(/home/sugan) under the name 'remote_copy'. The copying is as expected but during copying the destination path is starting with '/' then after '/' what is the first directory (in my case it 'home') a empty directory 'home' is getting creating in my home path(/home/sugan) output: -rw-r--r-- 1 sugan sugan 420 Jun 19 00:15 sftp.py drwxr-xr-x 3 sugan sugan 21 Jun 19 00:17 home pwd: /home/sugan Consider now my script is changed as, greenlets = client.copy_file('/tmp/logs', '/opt/user1/remote_copy/', recurse=True) My home path is - /home/sugan but I'm copying to /opt/user1. So now when I executed the script. The script creates a empty directory 'opt' in my home path(/home/sugan). output: -rw-r--r-- 1 sugan sugan 420 Jun 19 00:19 sftp.py drwxr-xr-x 3 sugan sugan 21 Jun 19 00:22 opt pwd: /home/sugan So whatever destination path is given and the path startswith '/' then the first directory of the path is getting created in home path. If a same directory already exists in home path then it is ignored. And if the destination path is a relative path from home then the parallelSSHClient.copy_file works as expected. My concern is generally we use absolute path for all... So each an empty directory is getting created in home. ---------- components: Library (Lib) messages: 371845 nosy: sugan19 priority: normal severity: normal status: open title: parallel sftp from local to remote file creates empty directory in home path type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 01:53:00 2020 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 19 Jun 2020 05:53:00 +0000 Subject: [issue40851] subprocess.Popen: impossible to show console window when shell=True In-Reply-To: <1591160070.69.0.321919779989.issue40851@roundup.psfhosted.org> Message-ID: <1592545980.48.0.347129234363.issue40851@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 6.0 -> 7.0 pull_requests: +20152 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20975 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 02:21:31 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 19 Jun 2020 06:21:31 +0000 Subject: [issue41029] parallel sftp from local to remote file creates empty directory in home path In-Reply-To: <1592543121.98.0.114702153703.issue41029@roundup.psfhosted.org> Message-ID: <1592547691.71.0.113582480557.issue41029@roundup.psfhosted.org> Christian Heimes added the comment: ParallelSSH is a 3rd party library and not part of Python's standard library. Please report the issue at https://github.com/ParallelSSH/parallel-ssh/ ---------- nosy: +christian.heimes resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 02:34:22 2020 From: report at bugs.python.org (hongweipeng) Date: Fri, 19 Jun 2020 06:34:22 +0000 Subject: [issue40873] Something wrong with html.unescape() In-Reply-To: <1591373228.55.0.770453836865.issue40873@roundup.psfhosted.org> Message-ID: <1592548462.17.0.0629420138986.issue40873@roundup.psfhosted.org> Change by hongweipeng : ---------- nosy: +hongweipeng _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 03:33:55 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 19 Jun 2020 07:33:55 +0000 Subject: [issue40873] Something wrong with html.unescape() In-Reply-To: <1591373228.55.0.770453836865.issue40873@roundup.psfhosted.org> Message-ID: <1592552035.04.0.632406147313.issue40873@roundup.psfhosted.org> Christian Heimes added the comment: According to https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#cite_ref-semicolon_1-64 the trailing semicolon can be omitted for the named entity "reg". That means "®" and "®" are equivalent. saxutils.unescape() only handles '<', '>', and '&' by default. You have to pass in a dictionary to unescape other entities. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 03:54:58 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 19 Jun 2020 07:54:58 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1592553298.37.0.513190172376.issue40334@roundup.psfhosted.org> Lysandros Nikolaou added the comment: All parts of the implementation are now in. New issues should be opened for any potential bugs. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 04:04:47 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Jun 2020 08:04:47 +0000 Subject: [issue40873] Something wrong with html.unescape() In-Reply-To: <1591373228.55.0.770453836865.issue40873@roundup.psfhosted.org> Message-ID: <1592553887.93.0.844507219179.issue40873@roundup.psfhosted.org> Serhiy Storchaka added the comment: Concur with Christian. It works as designed, in accordance to the standard. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 04:07:02 2020 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 19 Jun 2020 08:07:02 +0000 Subject: [issue40873] Something wrong with html.unescape() In-Reply-To: <1591373228.55.0.770453836865.issue40873@roundup.psfhosted.org> Message-ID: <1592554022.39.0.686744752661.issue40873@roundup.psfhosted.org> Change by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 04:08:58 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Jun 2020 08:08:58 +0000 Subject: [issue41022] AST sum types is unidentifiable after ast.Constant became a base class In-Reply-To: <1592473081.05.0.347184745832.issue41022@roundup.psfhosted.org> Message-ID: <1592554138.25.0.532810882812.issue41022@roundup.psfhosted.org> Serhiy Storchaka added the comment: Where they were identifable in such way? It is incorrect way, because user can create a subclass of every AST class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 04:11:05 2020 From: report at bugs.python.org (Aravindhan) Date: Fri, 19 Jun 2020 08:11:05 +0000 Subject: [issue41021] ctypes callback with structure crashes in Python 3.8 on Windows In-Reply-To: <1592472376.78.0.985098642017.issue41021@roundup.psfhosted.org> Message-ID: <1592554265.43.0.20977014299.issue41021@roundup.psfhosted.org> Aravindhan added the comment: Hi, Thanks for response @eryksun Sorry that I did not mention it is compiled for x86 and the crash happens in 32bit python. Yes, the dll is declared with stdcall and built for x86 with MSVC. It is tested with python 3.7.4 32bit which is successful and fails on python 3.8.2 32bit. I did not look into on x64 though. Below is the source code. I have also attached them as a zip. >>> c/DummyCb.h #pragma once #include #include #define CALLBACK __stdcall #define WINAPI __stdcall #define EXFUNC(type) _declspec(dllexport) void WINAPI // export function #define CBFUNC(type,func) typedef void (CALLBACK* func) // callback function extern "C" CBFUNC(void, listen_cb)(int value, FILETIME ts ); extern "C" EXFUNC(void) subscribe_cb(listen_cb); >>> c/DummyCb.cpp #include "pch.h" #include "DummyCb.h" #include EXFUNC(void) subscribe_cb(listen_cb cb) { int i = 0; while (true) { FILETIME systime; GetSystemTimeAsFileTime(&systime); i++; Sleep(1000); cb(i, systime); } } >>> c/CbClient.cpp #include #include "DummyCb.h" #include #include void __stdcall lis(int a, FILETIME ts) { printf("calling back %d, %d, %d \n", a,ts.dwHighDateTime, ts.dwLowDateTime); } int main() { subscribe_cb(&lis); } >>> CbClient.py from ctypes import * from time import sleep class FT(Structure): _fields_ = [("dwLowDateTime", c_ulong, 32), ("dwHighDateTime", c_ulong, 32)] @WINFUNCTYPE(c_void_p, c_int, FT) def cb(val, ft): print(f"callback {val} {ft.dwLowDateTime} {ft.dwHighDateTime}") lib = WinDLL(r"c/DummyCb.dll") lib.subscribe_cb(cb) while 1: sleep(5) >>> Traceback on python lib.subscribe_cb(cb) OSError: exception: access violation writing 0xCA35789B >>> Native Debug traceback Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention. >>> Further analysis change the callback declaration to a pointer of structure and it has same crash on python 3.7 32 bit. @WINFUNCTYPE(c_void_p, c_int, POINTER(FT)) def cb(val, ft): print(f"callback {val} {ft.contents}") Which makes me correlate is it something to do with vector calling on python 3.8 which makes callabck as *cb (a pointer) instead of a plain object call (just a thought, did not investigate change logs). Though its interesting to note that it did not fail on x64 with cdecl calling convention. That explains why our larger code base din't crash on Linux x86 linked as a .SO . cheers. ---------- Added file: https://bugs.python.org/file49253/callback.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 04:28:41 2020 From: report at bugs.python.org (Aravindhan) Date: Fri, 19 Jun 2020 08:28:41 +0000 Subject: [issue41021] ctypes callback with structure crashes in Python 3.8 on Windows x86 In-Reply-To: <1592472376.78.0.985098642017.issue41021@roundup.psfhosted.org> Message-ID: <1592555321.61.0.81186067569.issue41021@roundup.psfhosted.org> Change by Aravindhan : ---------- title: ctypes callback with structure crashes in Python 3.8 on Windows -> ctypes callback with structure crashes in Python 3.8 on Windows x86 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 04:41:27 2020 From: report at bugs.python.org (=?utf-8?q?Julien_Edmond_Ren=C3=A9_Harbulot?=) Date: Fri, 19 Jun 2020 08:41:27 +0000 Subject: [issue41030] Provide toList() method on iterators (`list()` is a flow killer in REPL) Message-ID: <1592556087.66.0.973915032204.issue41030@roundup.psfhosted.org> New submission from Julien Edmond Ren? Harbulot : I work with python in the REPL or jupyter notebooks for my data science work and often find myself needing to explore data structures or directories on disk. So I'll access these data structure in a linear "go-forward" fashion using the dot, for instance: ``` root_directory = pathlib.Path(...) root_directory.iterdir()[0].iterdir() ``` Which of course doesn't work because iterdir() provides an iterator instead of a list (I understand this is good for performance, but how annoying for interactive sessions!) The problem with the current API is that: 1. I have to go back to my code and edit in several places to convert the iterators to lists. With the currrent way (i.e. `list( ... )`) I have to edit before the iterator to add `list(` and then after to add `)`. When my one-liners become complex, this is very tedious because I have to perform extensive search to find where to insert the `list(` part. Having a method `.toList()` would allow to edit the expression in a *single* place instead, and is also much easier to read in my opinion: ``` root_directory.iterdir().toList()[0].iterdir().toList() ``` instead of: ``` list(list(root_directory.iterdir())[0].iterdir()) ``` 2. I want to think about my work, the business task at hand. Not about the particularities of python iterators. Having to specify `list(` first, forces me to think about the language. This gets in my way. The possiblity to use `.toList()` at the end of an expression allows the conversion to happen as an afterthought. In particular in REPL or notebooks where I'll often write: ``` directory.iterdir() ``` And the repl will display ``` ``` How easy would it be if I could just *append* to my code instead of surgically edit before and after. ---------- components: Demos and Tools messages: 371852 nosy: Julien Edmond Ren? Harbulot priority: normal severity: normal status: open title: Provide toList() method on iterators (`list()` is a flow killer in REPL) type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 04:42:43 2020 From: report at bugs.python.org (Laurence) Date: Fri, 19 Jun 2020 08:42:43 +0000 Subject: [issue41026] mailbox does not support new Path object In-Reply-To: <1592498748.35.0.391421735484.issue41026@roundup.psfhosted.org> Message-ID: <1592556163.4.0.695078101911.issue41026@roundup.psfhosted.org> Laurence added the comment: Hi R?mi, I understand why it is the case, I just thought it would be a nice enhancement and quick win to add the support. RE "you should use os.fspath() instead of str()": I'm following in the pathlib docuementation (https://docs.python.org/3/library/pathlib.html): > The string representation of a path is the raw filesystem path itself (in native form, e.g. with backslashes under Windows), which you can pass to any function taking a file path as a string: > >>> > >>> p = PurePath('/etc') > >>> str(p) > '/etc' > >>> p = PureWindowsPath('c:/Program Files') > >>> str(p) > 'c:\\Program Files' Is the pathlib documentation wrong/out-of-date? I Googled your suggestion of `os.fspath` and found which reads like the pathlib docs need correcting? I'm trying to setup a build environment to create a PR for this issue as I type... Thanks, Laurence ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 04:45:24 2020 From: report at bugs.python.org (=?utf-8?q?Julien_Edmond_Ren=C3=A9_Harbulot?=) Date: Fri, 19 Jun 2020 08:45:24 +0000 Subject: [issue41030] Provide toList() method on iterators (`list()` is a flow killer in REPL) In-Reply-To: <1592556087.66.0.973915032204.issue41030@roundup.psfhosted.org> Message-ID: <1592556324.45.0.517936041263.issue41030@roundup.psfhosted.org> Julien Edmond Ren? Harbulot added the comment: Consider how easy in the REPL it is to hit `up arrow` and then append code to the previously entered command, compared to having to move the cursor back in the command to edit it somewhere in the middle. Simulated REPL session: ``` dir.iterdir() > .toList() > [Path(...), Path(...)] ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 04:52:29 2020 From: report at bugs.python.org (Julien H) Date: Fri, 19 Jun 2020 08:52:29 +0000 Subject: [issue41030] Provide toList() method on iterators (`list()` is a flow killer in REPL) In-Reply-To: <1592556087.66.0.973915032204.issue41030@roundup.psfhosted.org> Message-ID: <1592556749.58.0.420980156751.issue41030@roundup.psfhosted.org> Change by Julien H : ---------- components: +Library (Lib) -Demos and Tools versions: -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 04:54:21 2020 From: report at bugs.python.org (Julien H) Date: Fri, 19 Jun 2020 08:54:21 +0000 Subject: [issue41030] Provide toList() method on iterators/generators (`list()` is a flow killer in REPL) In-Reply-To: <1592556087.66.0.973915032204.issue41030@roundup.psfhosted.org> Message-ID: <1592556861.03.0.14049639393.issue41030@roundup.psfhosted.org> Change by Julien H : ---------- title: Provide toList() method on iterators (`list()` is a flow killer in REPL) -> Provide toList() method on iterators/generators (`list()` is a flow killer in REPL) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 04:54:18 2020 From: report at bugs.python.org (Michael Simacek) Date: Fri, 19 Jun 2020 08:54:18 +0000 Subject: [issue41031] Inconsistency in C and python traceback printers Message-ID: <1592556858.95.0.825167658939.issue41031@roundup.psfhosted.org> New submission from Michael Simacek : I belive the python traceback module was designed to produce the same output as the internal exception printer (sys.__excepthook__), but this is not the case when the exception's __str__ raises an exception. Given an exception of the following class: class E(Exception): def __str__(self): raise RuntimeError Internal printer output: Traceback (most recent call last): File "inconsistent.py", line 6, in raise E() __main__.E: traceback.print_exc output: Traceback (most recent call last): File "inconsistent.py", line 6, in raise E() E: ---------- components: Library (Lib) messages: 371855 nosy: msimacek priority: normal severity: normal status: open title: Inconsistency in C and python traceback printers type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 04:54:52 2020 From: report at bugs.python.org (Ammar Askar) Date: Fri, 19 Jun 2020 08:54:52 +0000 Subject: [issue41030] Provide toList() method on iterators/generators (`list()` is a flow killer in REPL) In-Reply-To: <1592556087.66.0.973915032204.issue41030@roundup.psfhosted.org> Message-ID: <1592556892.61.0.633292665978.issue41030@roundup.psfhosted.org> Ammar Askar added the comment: Julien, in the REPL "_" represents the last evaluated expression. So you can do: >>> iter(range(10)) >>> list(_) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] Do you feel like that covers what you're asking for? ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 04:59:52 2020 From: report at bugs.python.org (Julien H) Date: Fri, 19 Jun 2020 08:59:52 +0000 Subject: [issue41030] Provide toList() method on iterators/generators (`list()` is a flow killer in REPL) In-Reply-To: <1592556087.66.0.973915032204.issue41030@roundup.psfhosted.org> Message-ID: <1592557192.93.0.947539098596.issue41030@roundup.psfhosted.org> Julien H added the comment: Hello Ammar Askar, I agree `_` avoids the "up arrow" problem I mentioned in the REPL. I actually primarily use jupyter notebooks in my work. Point 1. in my first message is the primary issue. Having to edit the line in two places to perform one action has driven me crazy over and over. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 05:20:42 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 19 Jun 2020 09:20:42 +0000 Subject: [issue41030] Provide toList() method on iterators/generators (`list()` is a flow killer in REPL) In-Reply-To: <1592556087.66.0.973915032204.issue41030@roundup.psfhosted.org> Message-ID: <1592558442.88.0.902450278972.issue41030@roundup.psfhosted.org> R?mi Lapeyre added the comment: It would not work, an iterator is just a thing that has __next__() and __iter__(): class MyIterator: def __iter__(self): return self def __next__(self): return 1 Plenty of iterators would not have this method even if we added it to some of them in the standard library and you would be event more frustated that sometimes toList(), and sometimes doesn't. If you need to move in the current line in the REPL you can use Ctrl-a and Ctrl-e and you can use Ctrl + arrow in a Jupyter Notebook. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 05:26:17 2020 From: report at bugs.python.org (Arkady) Date: Fri, 19 Jun 2020 09:26:17 +0000 Subject: [issue40860] Exception in multiprocessing/context.py under load In-Reply-To: <1591239973.04.0.347860195364.issue40860@roundup.psfhosted.org> Message-ID: <1592558777.84.0.740975592628.issue40860@roundup.psfhosted.org> Arkady added the comment: There is a memory leak every time call to join() fails (is https://bugs.python.org/issue37788 relevant?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 05:26:58 2020 From: report at bugs.python.org (MarcoBakera) Date: Fri, 19 Jun 2020 09:26:58 +0000 Subject: [issue41032] locale.setlocale example incorrect Message-ID: <1592558818.84.0.296845885403.issue41032@roundup.psfhosted.org> New submission from MarcoBakera : The example given results in an error. https://docs.python.org/3.8/library/locale.html?highlight=locale >>> locale.setlocale(locale.LC_ALL, 'de_DE') I could be improved with one of the following versions: >>> locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8') >>> locale.setlocale(locale.LC_ALL, ('de_DE'), ('UTF-8')) ---------- assignee: docs at python components: Documentation messages: 371860 nosy: docs at python, pintman priority: normal severity: normal status: open title: locale.setlocale example incorrect type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 05:43:54 2020 From: report at bugs.python.org (daniel hahler) Date: Fri, 19 Jun 2020 09:43:54 +0000 Subject: [issue41033] readline.c: SEGFAULT on SIGWINCH when loaded twice Message-ID: <1592559834.18.0.183747914407.issue41033@roundup.psfhosted.org> New submission from daniel hahler : The following will crash due to the signal handler calling itself recursively: ``` import os, readline, signal, sys del sys.modules["readline"] import readline os.kill(os.getpid(), signal.SIGWINCH) ``` This fixes it: ``` diff --git a/Modules/readline.c b/Modules/readline.c index 081657fb23..174e0117a9 100644 --- a/Modules/readline.c +++ b/Modules/readline.c @@ -967,6 +967,7 @@ readline_sigwinch_handler(int signum) { sigwinch_received = 1; if (sigwinch_ohandler && + sigwinch_ohandler != readline_sigwinch_handler && sigwinch_ohandler != SIG_IGN && sigwinch_ohandler != SIG_DFL) sigwinch_ohandler(signum); ``` It gets installed/saved in https://github.com/python/cpython/blob/01ece63d42b830df106948db0aefa6c1ba24416a/Modules/readline.c#L1111-L1112. Maybe it could also not save it in the first place if it is itself / has been installed already. Or, it could be uninstalled when the module is unloaded, if there is such a thing? I've seen the crash initially in a more complex setup, where it is not really clear why/how the readline module gets initialized twice really, but the above appears to simulate the situation. (Hints on where to break in gdb to see where/when a module gets unloaded would be appreciated) Added in https://github.com/python/cpython/commit/5dbbf1abba89ef1766759fbc9d5a5af02db49505 (3.5.2). ---------- components: Extension Modules messages: 371861 nosy: blueyed priority: normal severity: normal status: open title: readline.c: SEGFAULT on SIGWINCH when loaded twice type: crash 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 Fri Jun 19 05:45:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jun 2020 09:45:39 +0000 Subject: [issue40943] PEP 353: Drop support for PyArg_ParseTuple() "#" formats when PY_SSIZE_T_CLEAN is not defined In-Reply-To: <1591805352.1.0.263144015623.issue40943@roundup.psfhosted.org> Message-ID: <1592559939.69.0.325886088128.issue40943@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 37bb2895561d3e63a631f10875567b4e33b30c07 by Victor Stinner in branch 'master': bpo-40943: PY_SSIZE_T_CLEAN required for '#' formats (GH-20784) https://github.com/python/cpython/commit/37bb2895561d3e63a631f10875567b4e33b30c07 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 05:55:04 2020 From: report at bugs.python.org (Vinay Sharma) Date: Fri, 19 Jun 2020 09:55:04 +0000 Subject: [issue38035] shared_semaphores cannot be shared across unrelated processes In-Reply-To: <1567659668.43.0.186142682202.issue38035@roundup.psfhosted.org> Message-ID: <1592560504.01.0.350621905676.issue38035@roundup.psfhosted.org> Vinay Sharma added the comment: Hi @taleinat, I had sent a mail to the python mailing list as suggested. And till now it has received rather positive comments, in the sense that people who responded see this is a useful feature to be integrated into python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 05:55:33 2020 From: report at bugs.python.org (Quentin Wenger) Date: Fri, 19 Jun 2020 09:55:33 +0000 Subject: [issue39949] truncating match in regular expression match objects repr In-Reply-To: <1584049767.16.0.188415292253.issue39949@roundup.psfhosted.org> Message-ID: <1592560533.62.0.249780692644.issue39949@roundup.psfhosted.org> Quentin Wenger added the comment: An extraneous difficulty also exists for bytes regexes, because there non-ascii characters are repr'ed using escape sequences. So there's a risk of cutting one in the middle. ``` >>> import re >>> re.match(b".*", b"\xce") ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 05:56:55 2020 From: report at bugs.python.org (Julien Palard) Date: Fri, 19 Jun 2020 09:56:55 +0000 Subject: [issue41028] Move docs.python.org language and version switcher out of cpython In-Reply-To: <1592516133.76.0.0424010515361.issue41028@roundup.psfhosted.org> Message-ID: <1592560615.29.0.560195836031.issue41028@roundup.psfhosted.org> Julien Palard added the comment: In production, this is now starting to fix links and picker for the 2.7 version, which was stating: Docs by version Python 3.9 (in development) and now displays: Docs by version Python 3.10 (in development) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 05:58:22 2020 From: report at bugs.python.org (Arkady) Date: Fri, 19 Jun 2020 09:58:22 +0000 Subject: [issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak In-Reply-To: <1565194972.64.0.065323919799.issue37788@roundup.psfhosted.org> Message-ID: <1592560702.11.0.527444282772.issue37788@roundup.psfhosted.org> Arkady added the comment: I have reproduced a similar memory leak in the multiprocessing This is the trace: 913 memory blocks: 33232 Bytes: File "/usr/lib/python3.7/threading.py", line 890; self._bootstrap_inner(); File "/usr/lib/python3.7/threading.py", line 914; self._set_tstate_lock(); File "/usr/lib/python3.7/threading.py", line 904; self._tstate_lock = _set_sentinel(); ---------- nosy: +Arkady M _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 06:00:30 2020 From: report at bugs.python.org (Quentin Wenger) Date: Fri, 19 Jun 2020 10:00:30 +0000 Subject: [issue39949] truncating match in regular expression match objects repr In-Reply-To: <1584049767.16.0.188415292253.issue39949@roundup.psfhosted.org> Message-ID: <1592560830.86.0.877846460963.issue39949@roundup.psfhosted.org> Quentin Wenger added the comment: And ascii escapes should also not be forgotten. ``` >>> re.match(b".*", b"\t") >>> re.match(".*", "\t") ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 06:02:04 2020 From: report at bugs.python.org (Quentin Wenger) Date: Fri, 19 Jun 2020 10:02:04 +0000 Subject: [issue39949] truncating match in regular expression match objects repr In-Reply-To: <1584049767.16.0.188415292253.issue39949@roundup.psfhosted.org> Message-ID: <1592560924.68.0.651824147291.issue39949@roundup.psfhosted.org> Quentin Wenger added the comment: (but those are one-character escapes, so that should be fine - either the escape is complete or the backslash is trailing and can be "peeled of") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 06:02:37 2020 From: report at bugs.python.org (Quentin Wenger) Date: Fri, 19 Jun 2020 10:02:37 +0000 Subject: [issue39949] truncating match in regular expression match objects repr In-Reply-To: <1584049767.16.0.188415292253.issue39949@roundup.psfhosted.org> Message-ID: <1592560957.37.0.551785241757.issue39949@roundup.psfhosted.org> Quentin Wenger added the comment: *off ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 06:17:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jun 2020 10:17:28 +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: <1592561848.75.0.750367467662.issue40636@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 310f6aa7db8dd48952ed718111ce0f016b1c8ef9 by Guido van Rossum in branch 'master': bpo-40636: PEP 618: add strict parameter to zip() (GH-20921) https://github.com/python/cpython/commit/310f6aa7db8dd48952ed718111ce0f016b1c8ef9 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 06:22:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jun 2020 10:22:34 +0000 Subject: [issue41034] test_builtin: PtyTests fail when run twice Message-ID: <1592562154.53.0.0111619252983.issue41034@roundup.psfhosted.org> New submission from STINNER Victor : I tried to check for reference leaks, but running test_builtin twice fails: $ ./python -m test -R 3:3 test_builtin 0:00:00 load avg: 2.18 Run tests sequentially 0:00:00 load avg: 2.18 [1/1] test_builtin beginning 6 repetitions 123456 .test test_builtin failed -- multiple errors occurred; run in verbose mode for details test_builtin failed == Tests result: FAILURE == 1 test failed: test_builtin Total duration: 1.3 sec Tests result: FAILURE The error comes from PtyTests, but the issue is only triggered when builtins.float.hex is also run: $ ./python -m test test_builtin test_builtin -m test.test_builtin.PtyTests.test_input_tty_non_ascii_unicode_errors -m builtins.float.hex -v == CPython 3.10.0a0 (heads/master:310f6aa7db, Jun 19 2020, 12:18:54) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] == Linux-5.6.18-300.fc32.x86_64-x86_64-with-glibc2.31 little-endian == cwd: /home/vstinner/python/master/build/test_python_122646 == CPU count: 8 == encodings: locale=UTF-8, FS=utf-8 0:00:00 load avg: 0.60 Run tests sequentially 0:00:00 load avg: 0.60 [1/2] test_builtin test_input_tty_non_ascii_unicode_errors (test.test_builtin.PtyTests) ... ok hex (builtins.float) Doctest: builtins.float.hex ... ok ---------------------------------------------------------------------- Ran 2 tests in 0.009s OK 0:00:00 load avg: 0.63 [2/2] test_builtin test_input_tty_non_ascii_unicode_errors (test.test_builtin.PtyTests) ... FAIL hex (builtins.float) Doctest: builtins.float.hex ... ok ====================================================================== FAIL: test_input_tty_non_ascii_unicode_errors (test.test_builtin.PtyTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vstinner/python/master/Lib/test/test_builtin.py", line 2105, in test_input_tty_non_ascii_unicode_errors self.check_input_tty("prompt?", b"quux\xe9", "ascii") File "/home/vstinner/python/master/Lib/test/test_builtin.py", line 2092, in check_input_tty self.assertEqual(input_result, expected) AssertionError: 'quux' != 'quux\udce9' - quux + quux\udce9 ? + ---------------------------------------------------------------------- Ran 2 tests in 0.011s FAILED (failures=1) test test_builtin failed test_builtin failed == Tests result: FAILURE == 1 test OK. 1 test failed: test_builtin Total duration: 762 ms Tests result: FAILURE ---------- components: Tests messages: 371871 nosy: vstinner priority: normal severity: normal status: open title: test_builtin: PtyTests fail when run twice versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 06:36:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jun 2020 10:36:51 +0000 Subject: [issue41034] test_builtin: PtyTests fail when run twice In-Reply-To: <1592562154.53.0.0111619252983.issue41034@roundup.psfhosted.org> Message-ID: <1592563011.94.0.207599766633.issue41034@roundup.psfhosted.org> STINNER Victor added the comment: test_input_tty_non_ascii_unicode_errors() fails if readline was imported previously. Example: $ ./python -m test test_readline test_builtin -v (...) ====================================================================== FAIL: test_input_tty_non_ascii (test.test_builtin.PtyTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vstinner/python/master/Lib/test/test_builtin.py", line 2102, in test_input_tty_non_ascii self.check_input_tty("prompt?", b"quux\xe9", "utf-8") File "/home/vstinner/python/master/Lib/test/test_builtin.py", line 2093, in check_input_tty self.assertEqual(input_result, expected) AssertionError: 'quux' != 'quux\udce9' - quux + quux\udce9 ? + ====================================================================== FAIL: test_input_tty_non_ascii_unicode_errors (test.test_builtin.PtyTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vstinner/python/master/Lib/test/test_builtin.py", line 2106, in test_input_tty_non_ascii_unicode_errors self.check_input_tty("prompt?", b"quux\xe9", "ascii") File "/home/vstinner/python/master/Lib/test/test_builtin.py", line 2093, in check_input_tty self.assertEqual(input_result, expected) AssertionError: 'quux' != 'quux\udce9' - quux + quux\udce9 ? + Another example: import readline in test_builtin. diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 40df7b606a..102b397e66 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -1,3 +1,4 @@ +import readline # Python test set -- built-in functions import ast $ ./python -m test test_builtin -v -m PtyTests == CPython 3.10.0a0 (heads/master:310f6aa7db, Jun 19 2020, 12:18:54) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] == Linux-5.6.18-300.fc32.x86_64-x86_64-with-glibc2.31 little-endian == cwd: /home/vstinner/python/master/build/test_python_123487 == CPU count: 8 == encodings: locale=UTF-8, FS=utf-8 0:00:00 load avg: 0.36 Run tests sequentially 0:00:00 load avg: 0.36 [1/1] test_builtin test_input_no_stdout_fileno (test.test_builtin.PtyTests) ... ok test_input_tty (test.test_builtin.PtyTests) ... ok test_input_tty_non_ascii (test.test_builtin.PtyTests) ... FAIL test_input_tty_non_ascii_unicode_errors (test.test_builtin.PtyTests) ... FAIL ====================================================================== FAIL: test_input_tty_non_ascii (test.test_builtin.PtyTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vstinner/python/master/Lib/test/test_builtin.py", line 2102, in test_input_tty_non_ascii self.check_input_tty("prompt?", b"quux\xe9", "utf-8") File "/home/vstinner/python/master/Lib/test/test_builtin.py", line 2093, in check_input_tty self.assertEqual(input_result, expected) AssertionError: 'quux' != 'quux\udce9' - quux + quux\udce9 ? + ====================================================================== FAIL: test_input_tty_non_ascii_unicode_errors (test.test_builtin.PtyTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vstinner/python/master/Lib/test/test_builtin.py", line 2106, in test_input_tty_non_ascii_unicode_errors self.check_input_tty("prompt?", b"quux\xe9", "ascii") File "/home/vstinner/python/master/Lib/test/test_builtin.py", line 2093, in check_input_tty self.assertEqual(input_result, expected) AssertionError: 'quux' != 'quux\udce9' - quux + quux\udce9 ? + ---------------------------------------------------------------------- Ran 4 tests in 0.028s FAILED (failures=2) test test_builtin failed test_builtin failed == Tests result: FAILURE == 1 test failed: test_builtin Total duration: 446 ms Tests result: FAILURE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 06:38:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jun 2020 10:38:42 +0000 Subject: [issue41034] test_builtin: PtyTests fail when run twice In-Reply-To: <1592562154.53.0.0111619252983.issue41034@roundup.psfhosted.org> Message-ID: <1592563122.29.0.446391624132.issue41034@roundup.psfhosted.org> STINNER Victor added the comment: The two non-ASCII tests are very old: commit 0d776b1ce849ff0646738b6361ef940ab6f8b9cb Author: Antoine Pitrou Date: Sun Nov 6 00:34:26 2011 +0100 Issue #13342: input() used to ignore sys.stdin's and sys.stdout's unicode error handler in interactive mode (when calling into PyOS_Readline()). The code was refactored later by: commit c9a6ab56cfae90c96c1361314c3c99b32e114446 Author: Martin Panter Date: Sat Oct 10 01:25:38 2015 +0000 Issue #24402: Fix input() when stdout.fileno() fails; diagnosed by Eryksun Also factored out some test cases into a new PtyTests class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 06:39:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jun 2020 10:39:21 +0000 Subject: [issue41034] test_builtin: PtyTests fail when run twice In-Reply-To: <1592562154.53.0.0111619252983.issue41034@roundup.psfhosted.org> Message-ID: <1592563161.24.0.0447978681203.issue41034@roundup.psfhosted.org> STINNER Victor added the comment: I reproduce the issue on Fedora 32 with readline 8.0: $ ./python -m test.pythoninfo|grep readline readline._READLINE_LIBRARY_VERSION: 8.0 readline._READLINE_RUNTIME_VERSION: 0x800 readline._READLINE_VERSION: 0x800 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 06:41:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jun 2020 10:41:38 +0000 Subject: [issue41034] test_builtin: PtyTests fail when run twice In-Reply-To: <1592562154.53.0.0111619252983.issue41034@roundup.psfhosted.org> Message-ID: <1592563298.31.0.917891862637.issue41034@roundup.psfhosted.org> STINNER Victor added the comment: I also reproduce the issue on RHEL 8 with readline 7.0. But the issue is hidden if stdout is not a TTY. I use "| cat", so Python stdout is a pipe: $ ./python -m test test_readline test_builtin -v|cat (...) Tests result: SUCCESS ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 06:42:46 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 19 Jun 2020 10:42:46 +0000 Subject: [issue40741] Upgrade to SQLite v3.32 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1592563366.0.0.509808470704.issue40741@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: FYI, 3.32.3 is out now: https://sqlite.org/releaselog/3_32_3.html I'll update the PR and push a new PR for source deps right away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 06:44:56 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jun 2020 10:44:56 +0000 Subject: [issue41034] test_builtin: PtyTests fail when run twice In-Reply-To: <1592562154.53.0.0111619252983.issue41034@roundup.psfhosted.org> Message-ID: <1592563496.28.0.116279947954.issue41034@roundup.psfhosted.org> STINNER Victor added the comment: See also: * bpo-19884: "Importing readline produces erroneous output". Worked around using TERM='xterm-256color env var and by calling rl_variable_bind ("enable-meta-key", "off"); * bpo-11679 "readline interferes with characters beginning with byte \xe9". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 07:11:33 2020 From: report at bugs.python.org (Quentin Wenger) Date: Fri, 19 Jun 2020 11:11:33 +0000 Subject: [issue39949] truncating match in regular expression match objects repr In-Reply-To: <1584049767.16.0.188415292253.issue39949@roundup.psfhosted.org> Message-ID: <1592565093.88.0.455473446709.issue39949@roundup.psfhosted.org> Quentin Wenger added the comment: Other pathological case: literal backslashes ``` >>> re.match(".*", r"\\\\\\") ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 07:38:07 2020 From: report at bugs.python.org (Laurence) Date: Fri, 19 Jun 2020 11:38:07 +0000 Subject: [issue41026] mailbox does not support new Path object In-Reply-To: <1592498748.35.0.391421735484.issue41026@roundup.psfhosted.org> Message-ID: <1592566687.74.0.105018243256.issue41026@roundup.psfhosted.org> Change by Laurence : ---------- keywords: +patch pull_requests: +20153 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20976 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 07:48:37 2020 From: report at bugs.python.org (Laurence) Date: Fri, 19 Jun 2020 11:48:37 +0000 Subject: [issue41026] mailbox does not support new Path object In-Reply-To: <1592498748.35.0.391421735484.issue41026@roundup.psfhosted.org> Message-ID: <1592567317.79.0.851454866725.issue41026@roundup.psfhosted.org> Laurence added the comment: I have patched the module to accept a path-like object, however it still follows the pre-pathlib ways of doing things elsewhere. There's quite a bit of work to do to modernise the whole module, but this patch at least adds support to pass a Path to the classes it provides so external code can use pathlib and interface with it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 07:49:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jun 2020 11:49:25 +0000 Subject: [issue40943] PEP 353: Drop support for PyArg_ParseTuple() "#" formats when PY_SSIZE_T_CLEAN is not defined In-Reply-To: <1591805352.1.0.263144015623.issue40943@roundup.psfhosted.org> Message-ID: <1592567365.85.0.935642786464.issue40943@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 08:13:56 2020 From: report at bugs.python.org (sorrow) Date: Fri, 19 Jun 2020 12:13:56 +0000 Subject: [issue41035] zipfile.Path does not work properly with zip archives where paths start with / Message-ID: <1592568836.11.0.709805363189.issue41035@roundup.psfhosted.org> New submission from sorrow : I encountered errors when I had to work with ZPI file where path start with "/" ---------- components: Library (Lib) messages: 371880 nosy: sorrow priority: normal severity: normal status: open title: zipfile.Path does not work properly with zip archives where paths start with / type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 08:14:31 2020 From: report at bugs.python.org (sorrow) Date: Fri, 19 Jun 2020 12:14:31 +0000 Subject: [issue41035] zipfile.Path does not work properly with zip archives where paths start with / In-Reply-To: <1592568836.11.0.709805363189.issue41035@roundup.psfhosted.org> Message-ID: <1592568871.68.0.582811280135.issue41035@roundup.psfhosted.org> sorrow added the comment: >>> import zipfile >>> import io >>> data = io.BytesIO() >>> zf = zipfile.ZipFile(data, 'w') >>> zf.writestr('/a.txt', 'content of a') >>> zf.filename = 'abcde.zip' >>> root = zipfile.Path(zf) >>> list(root.iterdir()) [] >>> root.exists() False ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 08:21:19 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 19 Jun 2020 12:21:19 +0000 Subject: [issue40741] Upgrade to SQLite v3.32 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1592569279.54.0.565023282936.issue40741@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +20155 pull_request: https://github.com/python/cpython/pull/20979 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 09:10:54 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 19 Jun 2020 13:10:54 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1592572254.39.0.979004862144.issue41004@roundup.psfhosted.org> Eric V. Smith added the comment: Changing versions to where the fix would be applied. ---------- versions: -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 09:32:16 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 19 Jun 2020 13:32:16 +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: <1592573536.13.0.176350573204.issue40637@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +20156 pull_request: https://github.com/python/cpython/pull/20980 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 10:01:19 2020 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 19 Jun 2020 14:01:19 +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: <1592575279.69.0.715814415566.issue40704@roundup.psfhosted.org> Stefan Behnel added the comment: It should be replaced with an actual function, which can be inline in the non-limited case. ---------- nosy: +scoder stage: -> needs patch type: -> compile error versions: +Python 3.10, Python 3.9 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 10:05:01 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jun 2020 14:05:01 +0000 Subject: [issue41036] Visit the type of instance of heap types if tp_traverse is not implemented Message-ID: <1592575501.27.0.818244173351.issue41036@roundup.psfhosted.org> New submission from STINNER Victor : While reviewing changes of bpo-40077 "Convert static types to PyType_FromSpec()", I noticed that some static types don't implement tp_traverse. The doc says: Heap-allocated types (...) hold a reference to their type. Their traversal function must therefore either visit Py_TYPE(self), or delegate this responsibility by calling tp_traverse of another heap-allocated type (such as a heap-allocated superclass). If they do not, the type object may not be garbage-collected. https://docs.python.org/dev/c-api/typeobj.html#c.PyTypeObject.tp_traverse Porting to 3.9 says: for types that have a custom tp_traverse function, ensure that all custom tp_traverse functions of heap-allocated types visit the object?s type https://docs.python.org/dev/whatsnew/3.9.html#changes-in-the-c-api -- It seems like converting a static type to a heap allocated type requires to *add* a new tp_traverse function, if it wasn't the case. Maybe we can provide a base tp_traverse implementation in the base object type: visit the type if it's a heap type? See attached PR. See bpo-35810 and bpo-40217 for more information. ---------- components: C API, Interpreter Core messages: 371884 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: Visit the type of instance of heap types if tp_traverse is not implemented versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 10:11:55 2020 From: report at bugs.python.org (Sebastian Berg) Date: Fri, 19 Jun 2020 14:11:55 +0000 Subject: [issue41037] Add (optional) threadstate to: PyOS_InterruptOccurred() Message-ID: <1592575915.61.0.789948755318.issue41037@roundup.psfhosted.org> New submission from Sebastian Berg : In https://bugs.python.org/issue40826 it was defined that `PyOS_InterruptOccurred()` can only be called with a GIL. NumPy had a few places with very unsafe sigint handling (not thread-safe). But generally when we are in a situation that catching sigints would be nice as an enhancement, we do of course not hold the GIL. So I am wondering if we can find some kind of thread-safe solution, or even just recipe. Briefly looking at the code, it seemed to me that adding a new function with an additional `tstate` signature: PyOS_InterruptOccurred(PyThreadState *tstate) Could work, and be a simple way to allow this in the future? It is probably not high priority for us (NumPy had only one place where it tried to stop long running computations). But right now I am unsure if the function has much use if it requires the GIL to be held and a `tstate=NULL` argument seemed reasonable (if it works), except that it adds a C-API name. ---------- components: C API messages: 371885 nosy: seberg, vstinner priority: normal severity: normal status: open title: Add (optional) threadstate to: PyOS_InterruptOccurred() type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 10:13:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jun 2020 14:13:52 +0000 Subject: [issue41036] Visit the type of instance of heap types if tp_traverse is not implemented In-Reply-To: <1592575501.27.0.818244173351.issue41036@roundup.psfhosted.org> Message-ID: <1592576032.84.0.0400553452226.issue41036@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +20157 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20983 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 10:33:42 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 19 Jun 2020 14:33:42 +0000 Subject: [issue41036] Visit the type of instance of heap types if tp_traverse is not implemented In-Reply-To: <1592575501.27.0.818244173351.issue41036@roundup.psfhosted.org> Message-ID: <1592577222.67.0.608540503025.issue41036@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 10:55:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jun 2020 14:55:19 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm In-Reply-To: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> Message-ID: <1592578519.45.0.874109032081.issue38377@roundup.psfhosted.org> STINNER Victor added the comment: >From what I understood, the problem is that creating a SemLock has an impact on the resource tracker. The failing unit tests checks something about the resource tracker. The test runs a function in a child process. The function is defined in _test_multiprocessing.py. _test_multiprocessing.py calls skip_if_broken_multiprocessing_synchronize() which creates a SemLock(). At the end, the child process modifies the resource tracker because it creates a SemLock(). There are different options to fix the issue: * Modify skip_if_broken_multiprocessing_synchronize() only only attempt to create a SemLock on Linux. * Modify skip_if_broken_multiprocessing_synchronize() to only check if the current user is allowed to write into /dev/shm/ directory: that would allow touching the resource tracker. * Modify the test to avoid improting _test_multiprocessing in the child process. I don't know why the test only fails on macOS. Note: I ignored macOS failure when I merged my PR because the macOS job of GitHub Action is failing randomly for at least 3 months and nobody attempted to fix it. So I learnt to ignore this job. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 10:59:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jun 2020 14:59:23 +0000 Subject: [issue41037] Add (optional) threadstate to: PyOS_InterruptOccurred() In-Reply-To: <1592575915.61.0.789948755318.issue41037@roundup.psfhosted.org> Message-ID: <1592578763.22.0.188432886338.issue41037@roundup.psfhosted.org> STINNER Victor added the comment: Such function already exists in the master branch, but it's only part of the internal C API: PyAPI_FUNC(int) _PyOS_InterruptOccurred(PyThreadState *tstate); Currently, the C API design is to always requires to hold the GIL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 10:59:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jun 2020 14:59:43 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm In-Reply-To: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> Message-ID: <1592578783.45.0.010662526513.issue38377@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20158 pull_request: https://github.com/python/cpython/pull/20984 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 11:11:05 2020 From: report at bugs.python.org (neonene) Date: Fri, 19 Jun 2020 15:11:05 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1592579465.55.0.526547541017.issue40958@roundup.psfhosted.org> Change by neonene : ---------- nosy: +christian.heimes -neonene _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 11:18:28 2020 From: report at bugs.python.org (Nikita Nemkin) Date: Fri, 19 Jun 2020 15:18:28 +0000 Subject: [issue41038] VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale Message-ID: <1592579908.38.0.132085999949.issue41038@roundup.psfhosted.org> New submission from Nikita Nemkin : In absence of explicit declaration, resource compiler uses system codepage. When this codepage is DBCS or UTF-8, Python's copyright string is corrupted, because it contains copyright sign encoded as \xA9. The fix is to explicitly declare codepage 1252. Another possible fix is to use codepage 65001, but that will require replacing \xA9 with an actual ?, because it seems impossible to escape unicode characters in VersionInfo strings. ---------- components: Windows messages: 371888 nosy: nnemkin, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 11:22:22 2020 From: report at bugs.python.org (Nikita Nemkin) Date: Fri, 19 Jun 2020 15:22:22 +0000 Subject: [issue41038] VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale In-Reply-To: <1592579908.38.0.132085999949.issue41038@roundup.psfhosted.org> Message-ID: <1592580142.64.0.417019757006.issue41038@roundup.psfhosted.org> Change by Nikita Nemkin : ---------- keywords: +patch pull_requests: +20159 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20985 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 11:37:58 2020 From: report at bugs.python.org (Zachary Ware) Date: Fri, 19 Jun 2020 15:37:58 +0000 Subject: [issue41030] Provide toList() method on iterators/generators (`list()` is a flow killer in REPL) In-Reply-To: <1592556087.66.0.973915032204.issue41030@roundup.psfhosted.org> Message-ID: <1592581078.41.0.845740925339.issue41030@roundup.psfhosted.org> Zachary Ware added the comment: Hi Julien, Thanks for the suggestion, but I agree with Ammar and Remi that this is not likely to either be easily doable or actually help your case. This would also be a big enough change to likely need a PEP. If you still want to pursue this I would suggest starting a discussion on the python-ideas at python.org mailing list, but for now I'm going to go ahead and close this issue. ---------- nosy: +zach.ware resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 11:44:52 2020 From: report at bugs.python.org (hai shi) Date: Fri, 19 Jun 2020 15:44:52 +0000 Subject: [issue41036] Visit the type of instance of heap types if tp_traverse is not implemented In-Reply-To: <1592575501.27.0.818244173351.issue41036@roundup.psfhosted.org> Message-ID: <1592581492.76.0.236214742499.issue41036@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 11:46:38 2020 From: report at bugs.python.org (hai shi) Date: Fri, 19 Jun 2020 15:46:38 +0000 Subject: [issue41034] test_builtin: PtyTests fail when run twice In-Reply-To: <1592562154.53.0.0111619252983.issue41034@roundup.psfhosted.org> Message-ID: <1592581598.79.0.0277662236773.issue41034@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 11:55:39 2020 From: report at bugs.python.org (Charalampos Stratakis) Date: Fri, 19 Jun 2020 15:55:39 +0000 Subject: [issue37630] Investigate replacing SHA3 code with OpenSSL In-Reply-To: <1563535856.49.0.726904541971.issue37630@roundup.psfhosted.org> Message-ID: <1592582139.86.0.416076063993.issue37630@roundup.psfhosted.org> Change by Charalampos Stratakis : ---------- pull_requests: +20160 pull_request: https://github.com/python/cpython/pull/20986 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 11:56:17 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 19 Jun 2020 15:56:17 +0000 Subject: [issue40077] Convert static types to PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1592582177.2.0.238254837189.issue40077@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset ec689187957cc80af56b9a63251bbc295bafd781 by Dong-hee Na in branch 'master': bpo-40077: Convert _bz2 module to use PyType_FromSpec (GH-20960) https://github.com/python/cpython/commit/ec689187957cc80af56b9a63251bbc295bafd781 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 12:01:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jun 2020 16:01:25 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm In-Reply-To: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> Message-ID: <1592582485.94.0.287819284821.issue38377@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3358da4054b9b0b045eb47dc74dee3d58bfbb1d5 by Victor Stinner in branch 'master': bpo-38377: Fix skip_if_broken_multiprocessing_synchronize() on macOS (GH-20984) https://github.com/python/cpython/commit/3358da4054b9b0b045eb47dc74dee3d58bfbb1d5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 12:01:47 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jun 2020 16:01:47 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm In-Reply-To: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> Message-ID: <1592582507.81.0.636141832456.issue38377@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20162 pull_request: https://github.com/python/cpython/pull/20988 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 12:01:40 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jun 2020 16:01:40 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm In-Reply-To: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> Message-ID: <1592582500.58.0.266125408998.issue38377@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +20161 pull_request: https://github.com/python/cpython/pull/20987 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 12:19:45 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jun 2020 16:19:45 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm In-Reply-To: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> Message-ID: <1592583585.63.0.348741455411.issue38377@roundup.psfhosted.org> miss-islington added the comment: New changeset ec9bc2da421c456e416d991fd1fe79ac33344d9d by Miss Islington (bot) in branch '3.8': bpo-38377: Fix skip_if_broken_multiprocessing_synchronize() on macOS (GH-20984) https://github.com/python/cpython/commit/ec9bc2da421c456e416d991fd1fe79ac33344d9d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 12:20:19 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jun 2020 16:20:19 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm In-Reply-To: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> Message-ID: <1592583619.25.0.273004252627.issue38377@roundup.psfhosted.org> miss-islington added the comment: New changeset 1529322ca6b7b029af65aceeb04e6d47013eeeb4 by Miss Islington (bot) in branch '3.9': bpo-38377: Fix skip_if_broken_multiprocessing_synchronize() on macOS (GH-20984) https://github.com/python/cpython/commit/1529322ca6b7b029af65aceeb04e6d47013eeeb4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 12:27:16 2020 From: report at bugs.python.org (Nikita Nemkin) Date: Fri, 19 Jun 2020 16:27:16 +0000 Subject: [issue41039] Simplify python3.dll build Message-ID: <1592584036.23.0.347214520388.issue41039@roundup.psfhosted.org> New submission from Nikita Nemkin : python3.dll build process can be simplified if we use linker comment #pragma instead of .def files. Custom build targets become unnecessary and hardcoded Python DLL name can be replaced with a macro. Also, python3.dll doesn't need DllMain and can be built with /NOENTRY. ---------- components: Windows messages: 371894 nosy: nnemkin, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Simplify python3.dll build type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 12:29:41 2020 From: report at bugs.python.org (Nikita Nemkin) Date: Fri, 19 Jun 2020 16:29:41 +0000 Subject: [issue41039] Simplify python3.dll build In-Reply-To: <1592584036.23.0.347214520388.issue41039@roundup.psfhosted.org> Message-ID: <1592584181.48.0.751023872034.issue41039@roundup.psfhosted.org> Change by Nikita Nemkin : ---------- keywords: +patch pull_requests: +20163 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20989 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 12:57:32 2020 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Fri, 19 Jun 2020 16:57:32 +0000 Subject: [issue41026] mailbox does not support new Path object In-Reply-To: <1592498748.35.0.391421735484.issue41026@roundup.psfhosted.org> Message-ID: <1592585852.71.0.716855717964.issue41026@roundup.psfhosted.org> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- nosy: +thatiparthy nosy_count: 2.0 -> 3.0 pull_requests: +20164 pull_request: https://github.com/python/cpython/pull/20990 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 13:12:08 2020 From: report at bugs.python.org (Bar Harel) Date: Fri, 19 Jun 2020 17:12:08 +0000 Subject: [issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order In-Reply-To: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> Message-ID: <1592586728.23.0.558308559501.issue19270@roundup.psfhosted.org> Bar Harel added the comment: I've just encountered this bug as well. Although this issue is old, #1 should be fixed whether we like it or not. Cancelling an unintended event instead of the one we wanted is a bug, and prevents me from using the library at all (I schedule events based on absolute time). To be honest, I do not believe anyone uses scheduler.cancel(Event(time, priority, ...)) in order to cancel an event based on the given time and priority. Even if they do so, Event itself is undocumented and is being treated mostly as an ID for a currently scheduled event. A good solution would be to add a DeprecationWarning to the ordering functions, so people won't use them, and remove __eq__ at 3.12. The only issue that will arise is that an event1 might be >= than event2, <= than event 2, and != to event 2, as the other ordering will stay. We can fix this by implementing a slower lookup but I believe it isn't a real issue. ---------- nosy: +bar.harel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 13:45:04 2020 From: report at bugs.python.org (Maxwell Bernstein) Date: Fri, 19 Jun 2020 17:45:04 +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: <1592588704.77.0.91258621279.issue40704@roundup.psfhosted.org> Maxwell Bernstein added the comment: Oh, it looks like this has been done: https://github.com/python/cpython/commit/ea62ce7f4fefc66bc0adba16bcd7666d5bbd5b44 Although I am not sure what version this made it into. So maybe this does not affect versions 3.9/3.10. I've seen it in 3.6/6, for sure. ---------- versions: +Python 3.6, Python 3.7 -Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 13:45:24 2020 From: report at bugs.python.org (Maxwell Bernstein) Date: Fri, 19 Jun 2020 17:45:24 +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: <1592588724.14.0.519964797524.issue40704@roundup.psfhosted.org> Change by Maxwell Bernstein : ---------- keywords: +patch pull_requests: +20165 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/7477 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 16:06:42 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Jun 2020 20:06:42 +0000 Subject: [issue41040] Fix test_modulefinder Message-ID: <1592597202.88.0.995685925684.issue41040@roundup.psfhosted.org> New submission from Serhiy Storchaka : There is a bug in test_modulefinder. The bytes string literal contains \u2090. 1. Since \u is not recognized escape sequence in bytes literals, compiling the file emits a deprecation warning: /home/serhiy/py/cpython/Lib/test/test_modulefinder.py:281: DeprecationWarning: invalid escape sequence \u b"""\ 2. b"\u2090" is interpreted as b"\\u2090", but actually the test implies that it should be a bytes sequence b'\xe2\x82\x90' which is valid in UTF-8 but is not a valid in CP1252. ---------- components: Tests messages: 371897 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Fix test_modulefinder type: behavior versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 16:08:28 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Jun 2020 20:08:28 +0000 Subject: [issue41040] Fix test_modulefinder In-Reply-To: <1592597202.88.0.995685925684.issue41040@roundup.psfhosted.org> Message-ID: <1592597308.44.0.461355595008.issue41040@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +20166 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 16:34:52 2020 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 19 Jun 2020 20:34:52 +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: <1592598892.19.0.385224494689.issue40704@roundup.psfhosted.org> Stefan Behnel added the comment: You can see it from the tags on the commit, it was fixed in Py3.8. Duplicate of issue 33738. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 16:39:30 2020 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 19 Jun 2020 20:39:30 +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: <1592599170.08.0.407899926347.issue40636@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 59cf853332a82ce92875ea3dd6bba08e1305a288 by Ram Rachum in branch 'master': bpo-40636: Documentation for zip-strict (#20961) https://github.com/python/cpython/commit/59cf853332a82ce92875ea3dd6bba08e1305a288 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 17:00:05 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Fri, 19 Jun 2020 21:00:05 +0000 Subject: [issue41041] Multiprocesing Pool borken on macOS REPL Message-ID: <1592600405.92.0.621654131969.issue41041@roundup.psfhosted.org> New submission from Matthias Bussonnier : $ python Python 3.8.2 | packaged by conda-forge | (default, Apr 24 2020, 07:56:27) [Clang 9.0.1 ] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from multiprocessing import Pool >>> >>> def f(x): ... return x*x ... >>> with Pool(5) as p: ... print(p.map(f, [1, 2, 3])) Process SpawnPoolWorker-1: Process SpawnPoolWorker-2: Process SpawnPoolWorker-3: Traceback (most recent call last): File "/Users/bussonniermatthias/miniconda3/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/Users/bussonniermatthias/miniconda3/lib/python3.8/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/Users/bussonniermatthias/miniconda3/lib/python3.8/multiprocessing/pool.py", line 114, in worker task = get() File "/Users/bussonniermatthias/miniconda3/lib/python3.8/multiprocessing/queues.py", line 358, in get return _ForkingPickler.loads(res) AttributeError: Can't get attribute 'f' on Traceback (most recent call last): ... This is likely due to https://bugs.python.org/issue33725 (use spawn on MacOS), we we can't use `fork()`. ---------- messages: 371900 nosy: mbussonn priority: normal severity: normal status: open title: Multiprocesing Pool borken on macOS REPL _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 17:06:13 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Jun 2020 21:06:13 +0000 Subject: [issue41040] Fix test_modulefinder In-Reply-To: <1592597202.88.0.995685925684.issue41040@roundup.psfhosted.org> Message-ID: <1592600773.54.0.584658366461.issue41040@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset a041e116db5f1e78222cbf2c22aae96457372680 by Serhiy Storchaka in branch 'master': bpo-41040: Fix test_modulefinder. (GH-20991) https://github.com/python/cpython/commit/a041e116db5f1e78222cbf2c22aae96457372680 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 17:06:22 2020 From: report at bugs.python.org (Michael J.) Date: Fri, 19 Jun 2020 21:06:22 +0000 Subject: [issue41042] import searches for package even after file was found successfully Message-ID: <1592600782.72.0.658576039777.issue41042@roundup.psfhosted.org> New submission from Michael J. : Hello, Earlier today, I was developing a program and I wanted to check its variables after it finished running. Simply going into a terminal, entering my program's directory, and executing "python3 index.py" would return control to the command line before I would have a chance to examine the data, so I ran "python3", got to the shell, and then imported my file. My script executed, but after it finished, the intepreter raised a "ModuleNotFoundError: No module named 'index.py'; 'index' is not a package." Is this supposed to happen after the interpreter finishes importing a file? Thanks, Michael ---------- components: Interpreter Core messages: 371902 nosy: MichaelSapphire priority: normal severity: normal status: open title: import searches for package even after file was found successfully type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 17:06:37 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jun 2020 21:06:37 +0000 Subject: [issue41040] Fix test_modulefinder In-Reply-To: <1592597202.88.0.995685925684.issue41040@roundup.psfhosted.org> Message-ID: <1592600797.01.0.0612195005859.issue41040@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +20167 pull_request: https://github.com/python/cpython/pull/20992 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 17:06:44 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jun 2020 21:06:44 +0000 Subject: [issue41040] Fix test_modulefinder In-Reply-To: <1592597202.88.0.995685925684.issue41040@roundup.psfhosted.org> Message-ID: <1592600804.42.0.25058330915.issue41040@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20168 pull_request: https://github.com/python/cpython/pull/20993 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 17:16:43 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Jun 2020 21:16:43 +0000 Subject: [issue41043] Escape the literal part of the path for glob() Message-ID: <1592601403.75.0.126611663451.issue41043@roundup.psfhosted.org> New submission from Serhiy Storchaka : It is common to use glob() as glob.glob(os.path.join(basedir, pattern)) But it does not work correctly if the base directory contains special globbing characters ('*', '?', '['). It is an uncommon case, so in most cases the code works. But when move sources to the directory containing special characters, built it and run tests, some tests will fail: test test_tokenize failed -- Traceback (most recent call last): File "/home/serhiy/py/[cpython]/Lib/test/test_tokenize.py", line 1615, in test_random_files testfiles.remove(os.path.join(tempdir, "test_unicode_identifiers.py")) ValueError: list.remove(x): x not in list test test_multiprocessing_fork failed -- Traceback (most recent call last): File "/home/serhiy/py/[cpython]/Lib/test/_test_multiprocessing.py", line 4272, in test_import modules = self.get_module_names() File "/home/serhiy/py/[cpython]/Lib/test/_test_multiprocessing.py", line 4267, in get_module_names modules.remove('multiprocessing.__init__') ValueError: list.remove(x): x not in list test test_bz2 failed -- Traceback (most recent call last): File "/home/serhiy/py/[cpython]/Lib/test/test_bz2.py", line 740, in testDecompressorChunksMaxsize self.assertFalse(bzd.needs_input) AssertionError: True is not false test test_multiprocessing_forkserver failed -- Traceback (most recent call last): File "/home/serhiy/py/[cpython]/Lib/test/_test_multiprocessing.py", line 4272, in test_import modules = self.get_module_names() File "/home/serhiy/py/[cpython]/Lib/test/_test_multiprocessing.py", line 4267, in get_module_names modules.remove('multiprocessing.__init__') ValueError: list.remove(x): x not in list test test_multiprocessing_spawn failed -- Traceback (most recent call last): File "/home/serhiy/py/[cpython]/Lib/test/_test_multiprocessing.py", line 4272, in test_import modules = self.get_module_names() File "/home/serhiy/py/[cpython]/Lib/test/_test_multiprocessing.py", line 4267, in get_module_names modules.remove('multiprocessing.__init__') ValueError: list.remove(x): x not in list The proposed PR adds glob.escape() to the above code: glob.glob(os.path.join(glob.escape(basedir), pattern)) ---------- components: Library (Lib) messages: 371903 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Escape the literal part of the path for glob() type: behavior versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 17:21:35 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Jun 2020 21:21:35 +0000 Subject: [issue41043] Escape the literal part of the path for glob() In-Reply-To: <1592601403.75.0.126611663451.issue41043@roundup.psfhosted.org> Message-ID: <1592601695.98.0.707920506067.issue41043@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +20169 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20994 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 17:25:32 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jun 2020 21:25:32 +0000 Subject: [issue41040] Fix test_modulefinder In-Reply-To: <1592597202.88.0.995685925684.issue41040@roundup.psfhosted.org> Message-ID: <1592601932.67.0.749113369289.issue41040@roundup.psfhosted.org> miss-islington added the comment: New changeset 80651ab9e3f9d9a89e566a0b87a51b28720094f0 by Miss Islington (bot) in branch '3.8': bpo-41040: Fix test_modulefinder. (GH-20991) https://github.com/python/cpython/commit/80651ab9e3f9d9a89e566a0b87a51b28720094f0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 17:26:07 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jun 2020 21:26:07 +0000 Subject: [issue41040] Fix test_modulefinder In-Reply-To: <1592597202.88.0.995685925684.issue41040@roundup.psfhosted.org> Message-ID: <1592601967.82.0.26563312211.issue41040@roundup.psfhosted.org> miss-islington added the comment: New changeset 75238869b546526ac9e18d6169f3dc87c7f94eef by Miss Islington (bot) in branch '3.9': bpo-41040: Fix test_modulefinder. (GH-20991) https://github.com/python/cpython/commit/75238869b546526ac9e18d6169f3dc87c7f94eef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 18:26:39 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 19 Jun 2020 22:26:39 +0000 Subject: [issue41041] Multiprocesing Pool borken on macOS REPL In-Reply-To: <1592600405.92.0.621654131969.issue41041@roundup.psfhosted.org> Message-ID: <1592605599.75.0.923258724524.issue41041@roundup.psfhosted.org> Eric V. Smith added the comment: To be unpickle-able, the code for f needs to be imported, which it can't be from the repl. Windows has this same issue, due to also not using fork(). >From https://docs.python.org/3/library/pickle.html#what-can-be-pickled-and-unpickled: "Thus the defining module must be importable in the unpickling environment, and the module must contain the named object, otherwise an exception will be raised." I'll wait a while to see who else chimes in, but I think this should be closed as "not a bug". ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 18:28:10 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 19 Jun 2020 22:28:10 +0000 Subject: [issue41042] import searches for package even after file was found successfully In-Reply-To: <1592600782.72.0.658576039777.issue41042@roundup.psfhosted.org> Message-ID: <1592605690.69.0.949961037305.issue41042@roundup.psfhosted.org> Eric V. Smith added the comment: Please provide a small script that demonstrates this behavior. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 18:57:19 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 19 Jun 2020 22:57:19 +0000 Subject: [issue41044] Pegen: double trailing comma on optional+sequence rules at python generator Message-ID: <1592607439.16.0.781875892842.issue41044@roundup.psfhosted.org> New submission from Batuhan Taskaya : Python generator generates two trailing commas instead of one when both repeat0 (*) + optional ([]) qualifiers used. Example failing test (raises a SyntaxError, since the generated parser can't be parseable / executable) def test_opt_sequence(self) -> None: grammar = """ start: [NAME*] """ # This case was failing because of double trailing comma at the end # of the generated parser. See bpo- make_parser(grammar) ---------- messages: 371908 nosy: BTaskaya priority: normal severity: normal status: open title: Pegen: double trailing comma on optional+sequence rules at python generator _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 19:02:30 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 19 Jun 2020 23:02:30 +0000 Subject: [issue41044] Pegen: double trailing comma on optional+sequence rules at python generator In-Reply-To: <1592607439.16.0.781875892842.issue41044@roundup.psfhosted.org> Message-ID: <1592607750.85.0.0466777567809.issue41044@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +20170 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20995 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 19:30:11 2020 From: report at bugs.python.org (Michael J.) Date: Fri, 19 Jun 2020 23:30:11 +0000 Subject: [issue41042] import searches for package even after file was found successfully In-Reply-To: <1592600782.72.0.658576039777.issue41042@roundup.psfhosted.org> Message-ID: <1592609411.94.0.705376620089.issue41042@roundup.psfhosted.org> Michael J. added the comment: Attached I have a file containing the script for my program. It's obviously incomplete, but it will work as a sample file for demonstrating the output and behavior of the interpreter. (1/2) ---------- Added file: https://bugs.python.org/file49254/index.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 19:31:19 2020 From: report at bugs.python.org (Michael J.) Date: Fri, 19 Jun 2020 23:31:19 +0000 Subject: [issue41042] import searches for package even after file was found successfully In-Reply-To: <1592600782.72.0.658576039777.issue41042@roundup.psfhosted.org> Message-ID: <1592609479.6.0.457496713445.issue41042@roundup.psfhosted.org> Michael J. added the comment: This is a screenshot of the output I received when I ran index.py in a terminal. As you can see, it imports the script OK, but then it tries to find index as a package, and it fails and prints an error. (2/2) ---------- Added file: https://bugs.python.org/file49255/Screenshot at 2020-06-19 18-26-53.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 19:37:50 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 19 Jun 2020 23:37:50 +0000 Subject: [issue41042] import searches for package even after file was found successfully In-Reply-To: <1592600782.72.0.658576039777.issue41042@roundup.psfhosted.org> Message-ID: <1592609870.69.0.206621080991.issue41042@roundup.psfhosted.org> Eric V. Smith added the comment: You should just be using "import index". By using "import index.py", you're telling the interpreter to first import index, execute the code in it, then look for a sub-module named "py" (full name: index.py). Since no such sub-module exists, and index is not a package, you get the exception you're seeing. It's like "import os.path": first import "os", then look for "path" inside of that. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 19:53:12 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 19 Jun 2020 23:53:12 +0000 Subject: [issue41045] f-string's "debug" feature is undocumented Message-ID: <1592610792.76.0.722931750761.issue41045@roundup.psfhosted.org> New submission from Eric V. Smith : The feature of f-strings using '=' for "debugging" formatting is not documented. >>> foo = 'bar' >>> f'{foo=}' "foo='bar'" I'm not sure where this should fit in to the documentation, but it needs to be in there somewhere. Basically the documentation needs to say: 1. The entire string from the opening brace { to the start of the expression appears in the output. This allows things like f'{foo = }' to evaluate to "foo = 'bar'" (notice the extra spaces). 2. If no format spec (like :20) is given, repr() is used on the expression. If a format spec is given, then str() is used on the expression. You can use repr() with a format spec by using the !r conversion, like: >>> f'{foo=:20}' 'foo=bar ' >>> f'{foo=!r:20}' "foo='bar' " ---------- assignee: docs at python components: Documentation messages: 371912 nosy: docs at python, eric.smith priority: normal severity: normal stage: needs patch status: open title: f-string's "debug" feature is undocumented versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 20:25:21 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Jun 2020 00:25:21 +0000 Subject: [issue41045] f-string's "debug" feature is undocumented In-Reply-To: <1592610792.76.0.722931750761.issue41045@roundup.psfhosted.org> Message-ID: <1592612721.19.0.167594152773.issue41045@roundup.psfhosted.org> Guido van Rossum added the comment: Every other detail about f-strings is spelled out meticulously in the reference manual: https://docs.python.org/3/reference/lexical_analysis.html#formatted-string-literals I think it needs to be added here. PS OT: I can't find anything about f-strings in pydoc. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 20:36:33 2020 From: report at bugs.python.org (James Corbett) Date: Sat, 20 Jun 2020 00:36:33 +0000 Subject: [issue41046] unittest: make skipTest a classmethod Message-ID: <1592613393.95.0.180040510992.issue41046@roundup.psfhosted.org> New submission from James Corbett : The `unittest.TestCase.skipTest` method, used to skip the current test, is currently an instance method. There's nothing to stop it from being a `classmethod` or a `staticmethod` though---it doesn't use its reference to `self` since it's just a wrapper around the `SkipTest` exception. Making it a `classmethod` or `staticmethod` would allow calling the method from `setUpClass`. Here's an example: ``` import unittest class MyTestCase(unittest.TestCase): @classmethod def ready_for_tests(cls): pass @classmethod def setUpClass(cls): if not cls.ready_for_tests(): cls.skipTest() ``` ---------- components: Library (Lib) messages: 371914 nosy: jameshcorbett priority: normal severity: normal status: open title: unittest: make skipTest a classmethod type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 20:39:15 2020 From: report at bugs.python.org (James Corbett) Date: Sat, 20 Jun 2020 00:39:15 +0000 Subject: [issue41046] unittest: make skipTest a classmethod In-Reply-To: <1592613393.95.0.180040510992.issue41046@roundup.psfhosted.org> Message-ID: <1592613555.94.0.486287714978.issue41046@roundup.psfhosted.org> Change by James Corbett : ---------- keywords: +patch pull_requests: +20171 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20996 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 22:15:23 2020 From: report at bugs.python.org (James Corbett) Date: Sat, 20 Jun 2020 02:15:23 +0000 Subject: [issue41047] argparse: misbehavior when combining positionals and choices Message-ID: <1592619323.37.0.243911882097.issue41047@roundup.psfhosted.org> New submission from James Corbett : The `argparse.ArgumentParser` sometimes rejects positional arguments with no arguments when `choices` is set and `nargs="*"`. When there are no arguments and `nargs` is `"*"`, the default value is chosen, or `[]` if there is no default value. This value is then checked against `choices` and an error message is printed if the value is not in `choices`. However, sometimes the value is intentionally not in `choices`, and this leads to problems. An example will explain this much better, and show that the issue only occurs with the particular combination of positionals, `nargs="*"`, and `choices`: ``` >>> import argparse >>> parser = argparse.ArgumentParser() >>> parser.add_argument("foo", choices=["a", "b", "c"], nargs="*") >>> parser.add_argument("--bar", choices=["d", "e", "f"], nargs="*") >>> parser.add_argument('--baz', type=int, choices=range(5, 10), default="20") >>> parser.parse_args("a --bar".split()) Namespace(foo=['a'], bar=[], baz=20) >>> parser.parse_args(["a"]) Namespace(foo=['a'], bar=None, baz=20) >>> parser.parse_args([]) usage: [-h] [--bar [{d,e,f} ...]] [--baz {5,6,7,8,9}] [{a,b,c} ...] : error: argument foo: invalid choice: [] (choose from 'a', 'b', 'c') ``` In this case I could have got around the last error by adding `[]` to choices, but that pollutes the help and usage messages. ---------- components: Library (Lib) messages: 371915 nosy: jameshcorbett priority: normal severity: normal status: open title: argparse: misbehavior when combining positionals and choices type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 22:23:45 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 20 Jun 2020 02:23:45 +0000 Subject: [issue41047] argparse: misbehavior when combining positionals and choices In-Reply-To: <1592619323.37.0.243911882097.issue41047@roundup.psfhosted.org> Message-ID: <1592619825.69.0.0217479086292.issue41047@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +paul.j3, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 22:29:09 2020 From: report at bugs.python.org (James Corbett) Date: Sat, 20 Jun 2020 02:29:09 +0000 Subject: [issue41047] argparse: misbehavior when combining positionals and choices In-Reply-To: <1592619323.37.0.243911882097.issue41047@roundup.psfhosted.org> Message-ID: <1592620149.09.0.785267560861.issue41047@roundup.psfhosted.org> Change by James Corbett : ---------- keywords: +patch pull_requests: +20172 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20997 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 19 23:24:27 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 20 Jun 2020 03:24:27 +0000 Subject: [issue41041] Multiprocesing Pool borken on macOS REPL In-Reply-To: <1592600405.92.0.621654131969.issue41041@roundup.psfhosted.org> Message-ID: <1592623467.75.0.834056718513.issue41041@roundup.psfhosted.org> Matthias Bussonnier added the comment: Thanks. That's an annoying side effect of having spawn by default on macOS then. Could it be possible in `pool.map()` to detect that some of the objects are from main and would fail and then raise an error message in the parent process before starting the children ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 00:26:32 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 20 Jun 2020 04:26:32 +0000 Subject: [issue41041] Multiprocesing Pool borken on macOS REPL In-Reply-To: <1592600405.92.0.621654131969.issue41041@roundup.psfhosted.org> Message-ID: <1592627192.26.0.588419555431.issue41041@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: There is a documentation ticket already open : https://bugs.python.org/issue33553 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 00:36:03 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 20 Jun 2020 04:36:03 +0000 Subject: [issue41041] Multiprocesing Pool borken on macOS REPL In-Reply-To: <1592600405.92.0.621654131969.issue41041@roundup.psfhosted.org> Message-ID: <1592627763.54.0.530229635888.issue41041@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Some related note in documentation about repl with commit : https://github.com/python/cpython/commit/73dd030c8b71a7080648554652912982054b1177 > Note Functionality within this package requires that the __main__ module be importable by the children. This is covered in Programming guidelines however it is worth pointing out here. This means that some examples, such as the multiprocessing.pool.Pool examples will not work in the interactive interpreter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 01:04:47 2020 From: report at bugs.python.org (Digital India) Date: Sat, 20 Jun 2020 05:04:47 +0000 Subject: [issue41041] Digital India In-Reply-To: <1592600405.92.0.621654131969.issue41041@roundup.psfhosted.org> Message-ID: <1592629487.66.0.643068411492.issue41041@roundup.psfhosted.org> Digital India added the comment: Digital INDIA?Common Services Centre is an online?portal?where citizens are provided access to various government services. The?CSC?e-Governance is a?portal?developed by the Ministry of Electronic and Information Technology, Government of India.? https://www.digitalindiagov.in/ https://www.digitalindiagov.in/csc-login/ https://www.digitalindiagov.in/apna-khata-rajasthan-e-dharti-land-records/ https://www.digitalindiagov.in/apply-for-apna-csc-online-digital-seva-registration-2019/ https://www.digitalindiagov.in/digital-seva/ https://www.digitalindiagov.in/digitize-india-platform/ https://www.digitalindiagov.in/digitize-india-registration-on-digitizeindia-gov-in-sign-up-for-data-entry-job/ https://www.digitalindiagov.in/nsp/ https://www.digitalindiagov.in/pmay-pradhan-mantri-awas-yojana/ https://www.digitalindiagov.in/csc-portal/ ---------- nosy: +Digital India title: Multiprocesing Pool borken on macOS REPL -> Digital India type: -> security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 01:24:18 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 20 Jun 2020 05:24:18 +0000 Subject: [issue41041] Digital India In-Reply-To: <1592600405.92.0.621654131969.issue41041@roundup.psfhosted.org> Message-ID: <1592630658.16.0.669647582457.issue41041@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- Removed message: https://bugs.python.org/msg371919 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 01:29:16 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 20 Jun 2020 05:29:16 +0000 Subject: [issue41041] Multiprocesing Pool borken on macOS REPL In-Reply-To: <1592600405.92.0.621654131969.issue41041@roundup.psfhosted.org> Message-ID: <1592630956.72.0.805409957099.issue41041@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: -Digital India title: Digital India -> Multiprocesing Pool borken on macOS REPL type: security -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 01:43:53 2020 From: report at bugs.python.org (Eryk Sun) Date: Sat, 20 Jun 2020 05:43:53 +0000 Subject: [issue41021] ctypes callback with structure crashes in Python 3.8 on Windows x86 In-Reply-To: <1592472376.78.0.985098642017.issue41021@roundup.psfhosted.org> Message-ID: <1592631833.98.0.858216756882.issue41021@roundup.psfhosted.org> Eryk Sun added the comment: I can reproduce a crash with an x86 build that uses a stdcall callback with a 32-bit argument followed by any ffi_type_sint64 argument (FILETIME, long long, etc). Apparently this is a bug in libffi's ffi_prep_cif. Given the 2nd argument has a size of 8 bytes and an alignment of 8 bytes, it sets the CIF (call interface) to 16 bytes instead of the correct value of 12 bytes. source: import ctypes @ctypes.WINFUNCTYPE(None, ctypes.c_int, ctypes.c_int64) def test(i, j): print(f"callback {i} {j}") debugger: 0:000:x86> k 2 ChildEBP RetAddr 00bef6a0 6f1873bd _ctypes_d!_ctypes_alloc_callback+0x24c 00bef6dc 6e7ad81b _ctypes_d!PyCFuncPtr_new+0x32d The `bytes` field should be 12, not 16: 0:000:x86> ?? p->cif struct ffi_cif +0x000 abi : 2 ( FFI_STDCALL ) +0x004 nargs : 2 +0x008 arg_types : 0x02dc43bc -> 0x00742e5c _ffi_type +0x00c rtype : 0x6f1accec _ffi_type +0x010 bytes : 0x10 +0x014 flags : 8 0:000:x86> ?? p->cif.arg_types[0] struct _ffi_type * 0x00742e5c +0x000 size : 4 +0x004 alignment : 4 +0x006 type : 0xa +0x008 elements : (null) 0:000:x86> ?? p->cif.arg_types[1] struct _ffi_type * 0x02dd635c +0x000 size : 8 +0x004 alignment : 8 +0x006 type : 0xc +0x008 elements : (null) When the callback returns, it cleans 16 bytes from stack instead of the expected 12. With stack-allocated `systime` in the sample code, eventually GetSystemTimeAsFileTime(&systime) ends up overwriting the return address, and it tries to return to an arbitrary address. If you're lucky, this address isn't executable memory, and it immediately fails on an access violation. The callback in Aravindhan's sample code works fine if I modify the CIF to use 12 bytes instead of 16: _ctypes_d!_ctypes_alloc_callback+0x24c: 6e9f36ec 83c414 add esp,14h 0:000:x86> ?? p->cif.bytes = 12 unsigned int 0xc 0:000:x86> bd 0; g callback 1 477180670 30820036 callback 2 487502671 30820036 callback 3 497655140 30820036 callback 4 507801994 30820036 callback 5 517818512 30820036 callback 6 527961670 30820036 I suppose this issue should be closed as third party, with a bug report pushed upstream -- unless for now it would be better if ctypes implements a workaround. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 02:27:09 2020 From: report at bugs.python.org (Larry Hastings) Date: Sat, 20 Jun 2020 06:27:09 +0000 Subject: [issue39503] [security][CVE-2020-8492] Denial of service in urllib.request.AbstractBasicAuthHandler In-Reply-To: <1580397089.41.0.564267118679.issue39503@roundup.psfhosted.org> Message-ID: <1592634429.57.0.721701169873.issue39503@roundup.psfhosted.org> Larry Hastings added the comment: New changeset 37fe316479e0b6906a74b0c0a5e495c55037fdfd by Victor Stinner in branch '3.5': bpo-39503: CVE-2020-8492: Fix AbstractBasicAuthHandler (GH-18284) (#19305) https://github.com/python/cpython/commit/37fe316479e0b6906a74b0c0a5e495c55037fdfd ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 02:44:07 2020 From: report at bugs.python.org (Larry Hastings) Date: Sat, 20 Jun 2020 06:44:07 +0000 Subject: [issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen() In-Reply-To: <1571903478.88.0.753943817426.issue38576@roundup.psfhosted.org> Message-ID: <1592635447.43.0.815309641903.issue38576@roundup.psfhosted.org> Larry Hastings added the comment: New changeset 09d8172837b6985c4ad90ee025f6b5a554a9f0ac by Tapas Kundu in branch '3.5': [3.5] closes bpo-38576: Disallow control characters in hostnames in http.client. (#19300) https://github.com/python/cpython/commit/09d8172837b6985c4ad90ee025f6b5a554a9f0ac ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 04:10:51 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Jun 2020 08:10:51 +0000 Subject: [issue41043] Escape the literal part of the path for glob() In-Reply-To: <1592601403.75.0.126611663451.issue41043@roundup.psfhosted.org> Message-ID: <1592640651.14.0.0254210618656.issue41043@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 935586845815f5b4c7814794413f6a812d4bd45f by Serhiy Storchaka in branch 'master': bpo-41043: Escape literal part of the path for glob(). (GH-20994) https://github.com/python/cpython/commit/935586845815f5b4c7814794413f6a812d4bd45f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 04:30:06 2020 From: report at bugs.python.org (Kubilay Kocak) Date: Sat, 20 Jun 2020 08:30:06 +0000 Subject: [issue39503] [security][CVE-2020-8492] Denial of service in urllib.request.AbstractBasicAuthHandler In-Reply-To: <1580397089.41.0.564267118679.issue39503@roundup.psfhosted.org> Message-ID: <1592641806.52.0.215764068632.issue39503@roundup.psfhosted.org> Change by Kubilay Kocak : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 04:29:59 2020 From: report at bugs.python.org (Kubilay Kocak) Date: Sat, 20 Jun 2020 08:29:59 +0000 Subject: [issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen() In-Reply-To: <1571903478.88.0.753943817426.issue38576@roundup.psfhosted.org> Message-ID: <1592641799.63.0.00858368530175.issue38576@roundup.psfhosted.org> Change by Kubilay Kocak : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 04:33:12 2020 From: report at bugs.python.org (Larry Hastings) Date: Sat, 20 Jun 2020 08:33:12 +0000 Subject: [issue39503] [security][CVE-2020-8492] Denial of service in urllib.request.AbstractBasicAuthHandler In-Reply-To: <1580397089.41.0.564267118679.issue39503@roundup.psfhosted.org> Message-ID: <1592641992.13.0.248996031936.issue39503@roundup.psfhosted.org> Change by Larry Hastings : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 04:55:45 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Jun 2020 08:55:45 +0000 Subject: [issue18670] Using read_mime_types function from mimetypes module gives resource warning In-Reply-To: <1375803104.23.0.740839065527.issue18670@psf.upfronthosting.co.za> Message-ID: <1592643345.64.0.225237827107.issue18670@roundup.psfhosted.org> Serhiy Storchaka added the comment: It was fixed in issue20331. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 05:11:00 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Jun 2020 09:11:00 +0000 Subject: [issue41048] read_mime_types() should read the rule file using UTF-8, not the locale encoding Message-ID: <1592644260.23.0.766790238639.issue41048@roundup.psfhosted.org> New submission from Serhiy Storchaka : MimeTypes.read() read the rule file using UTF-8, but read_mime_types() uses the locale encoding. It is an easy issue. You need just repeat issue13025 for read_mime_types(). ---------- components: Library (Lib) keywords: easy messages: 371925 nosy: serhiy.storchaka, vstinner priority: normal severity: normal stage: needs patch status: open title: read_mime_types() should read the rule file using UTF-8, not the locale encoding type: behavior versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 05:11:44 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Jun 2020 09:11:44 +0000 Subject: [issue13025] mimetypes should read the rule file using UTF-8, not the locale encoding In-Reply-To: <1316560027.85.0.800562759244.issue13025@psf.upfronthosting.co.za> Message-ID: <1592644304.61.0.673722707994.issue13025@roundup.psfhosted.org> Serhiy Storchaka added the comment: However read_mime_types() still uses the locale encoding. See issue41048. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 05:20:57 2020 From: report at bugs.python.org (tamuhey) Date: Sat, 20 Jun 2020 09:20:57 +0000 Subject: [issue41049] PyObject_RichCompareBool(nan, nan, eq) can be True Message-ID: <1592644857.04.0.72570245151.issue41049@roundup.psfhosted.org> New submission from tamuhey : Applying PyObject_RichCompareBool to two `nan`s can be true if the two nans are same object, i.e. ``` a = float("nan") PyObject_RichCompareBool(a, a, Py_EQ) // True ``` I read the document (https://docs.python.org/3/c-api/object.html?highlight=pyobject_richcomparebool#c.PyObject_RichCompareBool) and understood it is intended, but there should be gentle comment to tell users this behaviour. ---------- components: C API messages: 371927 nosy: tamuhey priority: normal severity: normal status: open title: PyObject_RichCompareBool(nan, nan, eq) can be True 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 Jun 20 05:40:48 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jun 2020 09:40:48 +0000 Subject: [issue41049] PyObject_RichCompareBool(nan, nan, eq) can be True In-Reply-To: <1592644857.04.0.72570245151.issue41049@roundup.psfhosted.org> Message-ID: <1592646048.81.0.133313846084.issue41049@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for the report. I'll add a note to the C API docs. ---------- assignee: -> rhettinger components: +Documentation -C API nosy: +rhettinger versions: -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 05:54:05 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jun 2020 09:54:05 +0000 Subject: [issue41049] Document pointer comparison in PyObject_RichCompareBool() In-Reply-To: <1592644857.04.0.72570245151.issue41049@roundup.psfhosted.org> Message-ID: <1592646845.01.0.638963554528.issue41049@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- title: PyObject_RichCompareBool(nan, nan, eq) can be True -> Document pointer comparison in PyObject_RichCompareBool() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 05:56:11 2020 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Sat, 20 Jun 2020 09:56:11 +0000 Subject: [issue41048] read_mime_types() should read the rule file using UTF-8, not the locale encoding In-Reply-To: <1592644260.23.0.766790238639.issue41048@roundup.psfhosted.org> Message-ID: <1592646971.64.0.135899997184.issue41048@roundup.psfhosted.org> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- keywords: +patch nosy: +thatiparthy nosy_count: 2.0 -> 3.0 pull_requests: +20173 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20998 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 05:59:26 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jun 2020 09:59:26 +0000 Subject: [issue41049] Document pointer comparison in PyObject_RichCompareBool() In-Reply-To: <1592644857.04.0.72570245151.issue41049@roundup.psfhosted.org> Message-ID: <1592647166.98.0.95413013247.issue41049@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +20174 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20999 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 06:01:44 2020 From: report at bugs.python.org (Nikita Nemkin) Date: Sat, 20 Jun 2020 10:01:44 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1592647304.92.0.262045680004.issue40939@roundup.psfhosted.org> Nikita Nemkin added the comment: Shouldn't the following files be deleted too? Include/bitset.h Include/grammar.h Include/graminit.h Include/parsetok.h Include/node.h Python/graminit.c Parser/node.c Also declarations: PyNode_Compile in Include/compile.h PyParser_SimpleParse* in Include/pythonrun.h And PyParser_ASTFrom* API need new implementations. ---------- nosy: +nnemkin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 06:13:40 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jun 2020 10:13:40 +0000 Subject: [issue41049] Document pointer comparison in PyObject_RichCompareBool() In-Reply-To: <1592644857.04.0.72570245151.issue41049@roundup.psfhosted.org> Message-ID: <1592648020.28.0.467682244382.issue41049@roundup.psfhosted.org> Raymond Hettinger added the comment: Hmm, I missed it. There is already a note in the link you provided" """Note If o1 and o2 are the same object, PyObject_RichCompareBool() will always return 1 for Py_EQ and 0 for Py_NE.""" ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 06:28:45 2020 From: report at bugs.python.org (tamuhey) Date: Sat, 20 Jun 2020 10:28:45 +0000 Subject: [issue41049] Document pointer comparison in PyObject_RichCompareBool() In-Reply-To: <1592644857.04.0.72570245151.issue41049@roundup.psfhosted.org> Message-ID: <1592648925.97.0.500305144472.issue41049@roundup.psfhosted.org> tamuhey added the comment: > Hmm, I missed it. There is already a note in the link you provided I've read the comment before posting this issue. But I think there should be the following info: 1. example (float("nan")) 2. the result is inconsistent with PyObject_RichCompare ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 07:16:56 2020 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 20 Jun 2020 11:16:56 +0000 Subject: [issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?) In-Reply-To: <1584138664.49.0.0727456636956.issue39960@roundup.psfhosted.org> Message-ID: <1592651816.97.0.57328835321.issue39960@roundup.psfhosted.org> Stefan Behnel added the comment: I ran into this, too. I agree that the "hackcheck" loop on heap types is probably wrong. https://github.com/python/cpython/blob/04fc4f2a46b2fd083639deb872c3a3037fdb47d6/Objects/typeobject.c#L5947-L5977 It was written at a time (Py2.3?) when (practically) only Python implemented types were heap types, not extension types. I think what it tried to do was to find the builtin base type of a Python type, and check that no-one played tricks on the C slot functions of that C implemented type. With extension types implemented as heap types, having a different slot function in there is a perfectly valid thing. I'll call in a couple of people since I'm also not sure how to fix the "hackcheck". I'll also leave Py3.7 in the list of affected Python versions since we still have a short week before its final non-secfix-release. :) ---------- nosy: +gvanrossum, petr.viktorin, scoder type: -> behavior versions: +Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 08:00:55 2020 From: report at bugs.python.org (Kernel Plevitsky) Date: Sat, 20 Jun 2020 12:00:55 +0000 Subject: [issue41050] class multiprocessing.Value calls set_start_method Message-ID: <1592654455.47.0.317268475244.issue41050@roundup.psfhosted.org> New submission from Kernel Plevitsky : I'm not sure if this is a bug or my carelessness. I cannot call set_start_method () if multiprocessing.Value() is declared in the class above than "if __name__ ==" __main__ "" The documentation for Value did not describe this. I have attached a code playing this moment. Sorry for my English ---------- assignee: docs at python components: Documentation files: test.py messages: 371933 nosy: Kernel Plevitsky, docs at python priority: normal severity: normal status: open title: class multiprocessing.Value calls set_start_method type: behavior versions: Python 3.5, Python 3.8 Added file: https://bugs.python.org/file49256/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 08:34:37 2020 From: report at bugs.python.org (Manuel Jacob) Date: Sat, 20 Jun 2020 12:34:37 +0000 Subject: [issue41051] Flush file after warning is written Message-ID: <1592656477.66.0.545359338323.issue41051@roundup.psfhosted.org> New submission from Manuel Jacob : Calling warnings.warn() will write to a file, but not flush it. On Python 3.9+, it won?t usually be a problem because the file is most likely stderr, which is always line-buffered. However, on older Python versions or if a different file is used, the current behavior unnecessarily delays the output of the warning. This is especially problematic if the warning is about buffering behavior itself, as e.g. caused by `open('/tmp/test', 'wb', buffering=1)`. ---------- messages: 371934 nosy: mjacob priority: normal severity: normal status: open title: Flush file after warning is written _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 08:37:58 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 20 Jun 2020 12:37:58 +0000 Subject: [issue41039] Simplify python3.dll build In-Reply-To: <1592584036.23.0.347214520388.issue41039@roundup.psfhosted.org> Message-ID: <1592656678.9.0.598781783948.issue41039@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 08:39:37 2020 From: report at bugs.python.org (Manuel Jacob) Date: Sat, 20 Jun 2020 12:39:37 +0000 Subject: [issue41051] Flush file after warning is written In-Reply-To: <1592656477.66.0.545359338323.issue41051@roundup.psfhosted.org> Message-ID: <1592656777.76.0.719144039107.issue41051@roundup.psfhosted.org> Change by Manuel Jacob : ---------- keywords: +patch pull_requests: +20175 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21000 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 08:55:09 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Jun 2020 12:55:09 +0000 Subject: [issue41024] doc: Explicitly mention use of 'enum.Enum' as a valid container for 'choices' argument of 'argparse.ArgumentParser.add_argument' In-Reply-To: <1592488947.97.0.69594351568.issue41024@roundup.psfhosted.org> Message-ID: <1592657709.2.0.6231420298.issue41024@roundup.psfhosted.org> miss-islington added the comment: New changeset 344c2a75c1c13de781962a3f80552e66a4c89024 by Vincent F?rotin in branch 'master': bpo-41024: doc: Explicitly mention use of 'enum.Enum' as a valid container for '? (GH-20964) https://github.com/python/cpython/commit/344c2a75c1c13de781962a3f80552e66a4c89024 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 08:57:30 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Jun 2020 12:57:30 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1592657850.49.0.850848832159.issue40958@roundup.psfhosted.org> miss-islington added the comment: New changeset 861efc6e8fe7f030b1e193989b13287b31385939 by Lysandros Nikolaou in branch 'master': bpo-40958: Avoid 'possible loss of data' warning on Windows (GH-20970) https://github.com/python/cpython/commit/861efc6e8fe7f030b1e193989b13287b31385939 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 08:57:40 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Jun 2020 12:57:40 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1592657860.0.0.882944275127.issue40958@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20176 pull_request: https://github.com/python/cpython/pull/21001 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 09:17:30 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 20 Jun 2020 13:17:30 +0000 Subject: [issue41052] Opt out serialization/deserialization for heap type Message-ID: <1592659049.98.0.596314769567.issue41052@roundup.psfhosted.org> New submission from Dong-hee Na : See https://bugs.python.org/issue40077#msg371813 We noticed that heap type has different behavior about serialization/deserialization. Basically it can occur the regression issues. Two things needed. 1. opt out serialization/deserialization for converted modules. 2. Add unit tests to check whether their serialization is blocked. 3. If the module is already ported to 3.9 backport patch is needed. Long term - Add the object.reduce() and/or update pickle can be smarter ---------- components: C API messages: 371937 nosy: corona10, vstinner priority: normal severity: normal status: open title: Opt out serialization/deserialization for heap type type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 09:45:04 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 20 Jun 2020 13:45:04 +0000 Subject: [issue41052] Opt out serialization/deserialization for heap type In-Reply-To: <1592659049.98.0.596314769567.issue41052@roundup.psfhosted.org> Message-ID: <1592660704.9.0.555464264092.issue41052@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 09:47:45 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 20 Jun 2020 13:47:45 +0000 Subject: [issue41052] Opt out serialization/deserialization for heap type In-Reply-To: <1592659049.98.0.596314769567.issue41052@roundup.psfhosted.org> Message-ID: <1592660865.22.0.396632871412.issue41052@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +20177 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21002 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 10:40:43 2020 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 20 Jun 2020 14:40:43 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1592664043.72.0.209284189435.issue35975@roundup.psfhosted.org> Stefan Behnel added the comment: I was made aware [1] that the addition of the "cf_feature_version" field broke the backwards compatibility of the "PyRun_StringFlags()" function [2]. Unlike what the docs of "PyCompilerFlags" [3] suggest, the new field is not ignored there but must now be set in order to enable the syntax features of the running Python version. Background: A Cython user was trying "exec()" on code with f-strings in Py3.8 and got a SyntaxError, because "cf_feature_version" had not been initialised. I can see two types of existing code being affected: 1) applications or modules that execute user provided Python code (as in the bug report) for which users expect the syntax of the currently running Python runtime to be available. 2) code that used to work in Py3.6/7 using the available Python syntax features and now runs into newly introduced syntax restrictions in Py3.8, such as f-strings no longer being available. Since Py3.8 has been out for a while with this change, and there were apparently little complaints in addition to issue 37072, should we just update the documentation of "PyCompilerFlags" and "PyRun_StringFlags()" to mention the change there? [1] https://github.com/cython/cython/issues/3695 [2] https://docs.python.org/3/c-api/veryhigh.html#c.PyRun_StringFlags [3] https://docs.python.org/3/c-api/veryhigh.html#c.PyCompilerFlags ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 11:14:53 2020 From: report at bugs.python.org (Kagami Sascha Rosylight) Date: Sat, 20 Jun 2020 15:14:53 +0000 Subject: [issue41053] open() fails to read app exec links Message-ID: <1592666093.57.0.217193955367.issue41053@roundup.psfhosted.org> New submission from Kagami Sascha Rosylight : After installing Python from Microsoft Store, this fails: ``` >>> open('C:\\Users\\Kagami\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\python.exe') Traceback (most recent call last): File "", line 1, in OSError: [Errno 22] Invalid argument: 'C:\\Users\\Kagami\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\python.exe' ``` This causes virtualenv to fail on it: ``` INFO: Traceback (most recent call last): INFO: File "C:/Users/Kagami/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/9a6d8fc/mozjs\third_party\python\virtualenv\virtualenv.py", line 2349, in INFO: main() INFO: File "C:/Users/Kagami/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/9a6d8fc/mozjs\third_party\python\virtualenv\virtualenv.py", line 703, in main INFO: create_environment(home_dir, INFO: File "C:/Users/Kagami/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/9a6d8fc/mozjs\third_party\python\virtualenv\virtualenv.py", line 925, in create_environment INFO: py_executable = os.path.abspath(install_python( INFO: File "C:/Users/Kagami/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/9a6d8fc/mozjs\third_party\python\virtualenv\virtualenv.py", line 1239, in install_python INFO: shutil.copyfile(executable, py_executable) INFO: File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1008.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 261, in copyfile INFO: with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst: INFO: OSError: [Errno 22] Invalid argument: 'C:\\Users\\Kagami\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\python.exe' ``` ---------- components: Windows messages: 371939 nosy: paul.moore, saschanaz, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: open() fails to read app exec links type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 11:45:54 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 20 Jun 2020 15:45:54 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1592667954.49.0.988743619687.issue40939@roundup.psfhosted.org> Lysandros Nikolaou added the comment: I'm currently testing a commit that removes all these files on my fork, before I push it upstream. A question that I'm not 100% sure about is if we can already remove the symbol module. I guess it's okay since it got deprecated in 3.9 (bpo-40759) and the old parser is also out, but just to make sure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 12:25:11 2020 From: report at bugs.python.org (Nikita Nemkin) Date: Sat, 20 Jun 2020 16:25:11 +0000 Subject: [issue41054] Simplify resource compilation on Windows Message-ID: <1592670311.94.0.80143826005.issue41054@roundup.psfhosted.org> New submission from Nikita Nemkin : Every Windows project has a custom target (included from pyproject.props) that generates a header with definitions for resource files. Those definitions (PYTHON_DLL_NAME and FIELD3) can be passed directly to resource compiler. Another definition (MS_DLL_ID) doesn't need to be a resource at all. It was used in the past to initialize PyWin_DLLVersionString in dl_nt.c, but that code is now dead. ---------- components: Windows messages: 371941 nosy: nnemkin, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Simplify resource compilation on Windows type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 12:31:55 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Jun 2020 16:31:55 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1592670715.6.0.0344897956943.issue40939@roundup.psfhosted.org> Guido van Rossum added the comment: You can delete symbol.py -- it has no use now that the old parser is gone. We should probably also update the regeneration targets in the Makefile. (At least review them.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 12:32:55 2020 From: report at bugs.python.org (Nikita Nemkin) Date: Sat, 20 Jun 2020 16:32:55 +0000 Subject: [issue41054] Simplify resource compilation on Windows In-Reply-To: <1592670311.94.0.80143826005.issue41054@roundup.psfhosted.org> Message-ID: <1592670775.21.0.71134803061.issue41054@roundup.psfhosted.org> Change by Nikita Nemkin : ---------- keywords: +patch pull_requests: +20178 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21004 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 12:38:19 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Jun 2020 16:38:19 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1592671099.21.0.202536996378.issue35975@roundup.psfhosted.org> Guido van Rossum added the comment: But it's a bug, right? The intention for sure is that the cf_feature_version field is only used when the PyCF_ONLY_AST flags is set in cf_flags, per the docs you cite as [3]. Why wouldn't it be possible to fix that? ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 12:53:14 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 20 Jun 2020 16:53:14 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1592671994.94.0.37224122153.issue40939@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +20179 pull_request: https://github.com/python/cpython/pull/21005 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 13:26:58 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Jun 2020 17:26:58 +0000 Subject: [issue41055] Remove outdated tests for tp_print Message-ID: <1592674018.02.0.658996067478.issue41055@roundup.psfhosted.org> New submission from Serhiy Storchaka : There are ancient tests for printing some basic types: str (actually a mix of Python 2 str and unicode), list, tuple, bool, set, deque, defaultdict. They are essentially tests for the tp_print slot. But since the tp_print slot is no longer used, they are virtually repeat tests for str or repr. These tests are outdated and no longer serve the initial purpose. To avoid confusion it is worth to remove them. ---------- components: Tests messages: 371944 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Remove outdated tests for tp_print type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 13:30:07 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Jun 2020 17:30:07 +0000 Subject: [issue41055] Remove outdated tests for tp_print In-Reply-To: <1592674018.02.0.658996067478.issue41055@roundup.psfhosted.org> Message-ID: <1592674207.54.0.629336798576.issue41055@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +20180 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21006 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 13:35:07 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Jun 2020 17:35:07 +0000 Subject: [issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c In-Reply-To: <1591958551.05.0.683053178898.issue40958@roundup.psfhosted.org> Message-ID: <1592674507.19.0.664223387752.issue40958@roundup.psfhosted.org> miss-islington added the comment: New changeset c9f83c173b0cc62d6fcdc363e9ab05f6664ff8f3 by Miss Islington (bot) in branch '3.9': bpo-40958: Avoid 'possible loss of data' warning on Windows (GH-20970) https://github.com/python/cpython/commit/c9f83c173b0cc62d6fcdc363e9ab05f6664ff8f3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 13:38:30 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 20 Jun 2020 17:38:30 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity Message-ID: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> New submission from Gregory P. Smith : ________________________________________________________________________________________________________ *** CID 1464693: Null pointer dereferences (REVERSE_INULL) /Modules/_zoneinfo.c: 1625 in parse_abbr() 1619 ptr++; 1620 } 1621 str_end = ptr; 1622 } 1623 1624 *abbr = PyUnicode_FromStringAndSize(str_start, str_end - str_start); >>> CID 1464693: Null pointer dereferences (REVERSE_INULL) >>> Null-checking "abbr" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. 1625 if (abbr == NULL) { 1626 return -1; 1627 } 1628 1629 return ptr - p; 1630 } ________________________________________________________________________________________________________ *** CID 1464687: Null pointer dereferences (FORWARD_NULL) /Modules/_ssl/debughelpers.c: 138 in _PySSL_keylog_callback() 132 * critical debug helper. 133 */ 134 if (lock == NULL) { 135 lock = PyThread_allocate_lock(); 136 if (lock == NULL) { 137 PyErr_SetString(PyExc_MemoryError, "Unable to allocate lock"); >>> CID 1464687: Null pointer dereferences (FORWARD_NULL) >>> Passing null pointer "&ssl_obj->exc_type" to "PyErr_Fetch", which dereferences it. 138 PyErr_Fetch(&ssl_obj->exc_type, &ssl_obj->exc_value, 139 &ssl_obj->exc_tb); 140 return; 141 } 142 } 143 ________________________________________________________________________________________________________ *** CID 1464684: Integer handling issues (NEGATIVE_RETURNS) /Modules/clinic/posixmodule.c.h: 6813 in os_fpathconf() 6807 if (fd == -1 && PyErr_Occurred()) { 6808 goto exit; 6809 } 6810 if (!conv_path_confname(args[1], &name)) { 6811 goto exit; 6812 } >>> CID 1464684: Integer handling issues (NEGATIVE_RETURNS) >>> "fd" is passed to a parameter that cannot be negative. 6813 _return_value = os_fpathconf_impl(module, fd, name); 6814 if ((_return_value == -1) && PyErr_Occurred()) { 6815 goto exit; 6816 } 6817 return_value = PyLong_FromLong(_return_value); 6818 ---------- assignee: gregory.p.smith messages: 371946 nosy: gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: minor NULL pointer and sign issues reported by Coverity type: crash versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 13:39:22 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 20 Jun 2020 17:39:22 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592674762.37.0.487757230926.issue41056@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- keywords: +patch pull_requests: +20181 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21007 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 13:40:10 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Jun 2020 17:40:10 +0000 Subject: [issue41044] Pegen: double trailing comma on optional+sequence rules at python generator In-Reply-To: <1592607439.16.0.781875892842.issue41044@roundup.psfhosted.org> Message-ID: <1592674810.56.0.200183235045.issue41044@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 55460ee6dc9a4f16bd68d6b6be3a8398c7d4a596 by Batuhan Taskaya in branch 'master': bpo-41044: Generate valid PEG python parsers for opt+seq rules (GH-20995) https://github.com/python/cpython/commit/55460ee6dc9a4f16bd68d6b6be3a8398c7d4a596 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 13:40:24 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Jun 2020 17:40:24 +0000 Subject: [issue41044] Pegen: double trailing comma on optional+sequence rules at python generator In-Reply-To: <1592607439.16.0.781875892842.issue41044@roundup.psfhosted.org> Message-ID: <1592674824.99.0.617459195227.issue41044@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +20182 pull_request: https://github.com/python/cpython/pull/21008 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 13:45:23 2020 From: report at bugs.python.org (Fenn Ehk) Date: Sat, 20 Jun 2020 17:45:23 +0000 Subject: [issue41057] Division error Message-ID: <1592675123.96.0.415795942046.issue41057@roundup.psfhosted.org> New submission from Fenn Ehk : When performing some basic calculations, the result is wrong. 0.4 + 8/100 Out[43]: 0.48000000000000004 0.3 + 8/100 Out[44]: 0.38 I thought it could be processor related and tried the same operation with R, but the result was correct. So I tried it on some online repls: https://repl.it/languages/python3 https://www.learnpython.org/en/Basic_Operators And the bug is there, it seems to exist in 3.7.6 and 3.8.3 (and probably all versions in between Other examples of the error: 0.3 + 8/100 Out[50]: 0.38 0.4 + 8/100 Out[51]: 0.48000000000000004 0.4 + a Out[52]: 0.48000000000000004 0.4 + 9/100 Out[53]: 0.49 0.7 + 9/100 Out[54]: 0.7899999999999999 0.7 + 10/100 Out[55]: 0.7999999999999999 0.7 + 10/100 Out[56]: 0.7999999999999999 0.7 + 11/100 Out[57]: 0.8099999999999999 0.7 + 12/100 Out[58]: 0.82 0.8 + 8/100 Out[59]: 0.88 0.8 + 9/100 Out[60]: 0.89 0.6 + 9/100 Out[61]: 0.69 0.7 + 9/100 Out[62]: 0.7899999999999999 ---------- components: Interpreter Core messages: 371948 nosy: Fenn Ehk priority: normal severity: normal status: open title: Division error type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 13:44:55 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 20 Jun 2020 17:44:55 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592675095.32.0.618014209048.issue41056@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +20183 pull_request: https://github.com/python/cpython/pull/21009 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 13:47:55 2020 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 20 Jun 2020 17:47:55 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1592675275.89.0.298694277638.issue35975@roundup.psfhosted.org> Stefan Behnel added the comment: I wasn't sure which is better ? solve it or leave it. But it seems a) easy to adapt to on user side, and b) solvable in CPython in a way that allows code that wants to adapt to work across 3.8.x versions. Only code that does not get adapted would risk failure in existing 3.8.x versions, and benefit from a fix in future 3.8.x releases. So, yeah, I think we should fix it then. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 13:51:40 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Jun 2020 17:51:40 +0000 Subject: [issue41044] Pegen: double trailing comma on optional+sequence rules at python generator In-Reply-To: <1592607439.16.0.781875892842.issue41044@roundup.psfhosted.org> Message-ID: <1592675500.65.0.260962504397.issue41044@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 Sat Jun 20 13:54:13 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Jun 2020 17:54:13 +0000 Subject: [issue41058] pdb reads source files using the locale encoding Message-ID: <1592675653.2.0.61878894167.issue41058@roundup.psfhosted.org> New submission from Serhiy Storchaka : find_function() in pdb uses the locale encoding for reading source files. It should use the encoding specified by the coding cookie or UTF-8 if it is not specified. ---------- components: Library (Lib) messages: 371950 nosy: serhiy.storchaka priority: normal severity: normal status: open title: pdb reads source files using the locale encoding type: behavior versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 13:59:31 2020 From: report at bugs.python.org (Brett Cannon) Date: Sat, 20 Jun 2020 17:59:31 +0000 Subject: [issue41035] zipfile.Path does not work properly with zip archives where paths start with / In-Reply-To: <1592568836.11.0.709805363189.issue41035@roundup.psfhosted.org> Message-ID: <1592675971.8.0.0141976938829.issue41035@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 13:59:39 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Jun 2020 17:59:39 +0000 Subject: [issue41044] Pegen: double trailing comma on optional+sequence rules at python generator In-Reply-To: <1592607439.16.0.781875892842.issue41044@roundup.psfhosted.org> Message-ID: <1592675979.21.0.933989673784.issue41044@roundup.psfhosted.org> miss-islington added the comment: New changeset 98621817504add1e985e2526614921bbe0d24fb6 by Miss Islington (bot) in branch '3.9': bpo-41044: Generate valid PEG python parsers for opt+seq rules (GH-20995) https://github.com/python/cpython/commit/98621817504add1e985e2526614921bbe0d24fb6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 13:59:45 2020 From: report at bugs.python.org (Brett Cannon) Date: Sat, 20 Jun 2020 17:59:45 +0000 Subject: [issue41035] zipfile.Path does not work properly with zip archives where paths start with / In-Reply-To: <1592568836.11.0.709805363189.issue41035@roundup.psfhosted.org> Message-ID: <1592675985.11.0.347359241228.issue41035@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +alanmcintyre, serhiy.storchaka, twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 14:00:07 2020 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 20 Jun 2020 18:00:07 +0000 Subject: [issue41057] Division error In-Reply-To: <1592675123.96.0.415795942046.issue41057@roundup.psfhosted.org> Message-ID: <1592676007.65.0.396774514674.issue41057@roundup.psfhosted.org> Mark Dickinson added the comment: This isn't a bug in Python; it's a consequence of the what-you-see-is-not-what-you-get nature of binary floating-point. The behaviour is explained in the tutorial, here: https://docs.python.org/3/tutorial/floatingpoint.html ---------- nosy: +mark.dickinson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 14:06:06 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Jun 2020 18:06:06 +0000 Subject: [issue41058] pdb reads source files using the locale encoding In-Reply-To: <1592675653.2.0.61878894167.issue41058@roundup.psfhosted.org> Message-ID: <1592676366.04.0.758991147267.issue41058@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +20184 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21010 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 14:07:29 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Jun 2020 18:07:29 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1592676449.34.0.597562414033.issue40939@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 314858e2763e76e77029ea0b691d749c32939087 by Lysandros Nikolaou in branch 'master': bpo-40939: Remove the old parser (Part 2) (GH-21005) https://github.com/python/cpython/commit/314858e2763e76e77029ea0b691d749c32939087 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 14:14:59 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 20 Jun 2020 18:14:59 +0000 Subject: [issue41057] Division error In-Reply-To: <1592675123.96.0.415795942046.issue41057@roundup.psfhosted.org> Message-ID: <1592676899.39.0.351982142194.issue41057@roundup.psfhosted.org> Steven D'Aprano added the comment: Further to what Mark said, I'm afraid you are mistaken when you thought that "the result was correct" on R. R cheats by not printing the full precision of the number, they just stop printing digits, giving a false impression of accuracy. You can prove this for yourself: > 0.4 + 8/100 [1] 0.48 > (0.4 + 8/100) == 0.48 [1] FALSE So even though the printed result *looks* like 0.48, it actually isn't. If you investigate carefully, you will probably find that the number R calculates is the same as Python. And the same as Javascript: js> 0.4 + 8/100 0.48000000000000004 and pretty much every programming language that uses 64-bit floats. BTW, this is a FAQ: https://docs.python.org/3/faq/design.html#why-are-floating-point-calculations-so-inaccurate There are a ton of other resources on the web explaining this, since it occurs virtually everywhere, in every language with fixed-precision floating point numbers. For example: https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html https://randomascii.wordpress.com/2012/05/20/thats-not-normalthe-performance-of-odd-floats/ https://randomascii.wordpress.com/2012/04/05/floating-point-complexities/ ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 14:27:34 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 20 Jun 2020 18:27:34 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592677654.09.0.907357946718.issue41056@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +20185 pull_request: https://github.com/python/cpython/pull/21011 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 14:34:56 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 20 Jun 2020 18:34:56 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1592678096.89.0.88675168212.issue40939@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +20186 pull_request: https://github.com/python/cpython/pull/21012 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 14:43:37 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 20 Jun 2020 18:43:37 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592678617.81.0.891778975921.issue41056@roundup.psfhosted.org> Gregory P. Smith added the comment: those were the three in the email (20 of 106), i need to figure out how to login to coverity again to see the rest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 14:56:31 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 20 Jun 2020 18:56:31 +0000 Subject: [issue41059] Large number of Coverity reports for parser.c Message-ID: <1592679391.13.0.913540149945.issue41059@roundup.psfhosted.org> New submission from Gregory P. Smith : Here's an example: *** CID 1464688: Control flow issues (DEADCODE) /Parser/parser.c: 24243 in _tmp_147_rule() 24237 && 24238 (z = disjunction_rule(p)) // disjunction 24239 ) 24240 { 24241 D(fprintf(stderr, "%*c+ _tmp_147[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); 24242 _res = z; >>> CID 1464688: Control flow issues (DEADCODE) >>> Execution cannot reach the expression "PyErr_Occurred()" inside this statement: "if (_res == NULL && PyErr_O...". 24243 if (_res == NULL && PyErr_Occurred()) { 24244 p->error_indicator = 1; 24245 D(p->level--); 24246 return NULL; 24247 } 24248 goto done; A lot of them are of that form, which seems harmless if they are true - it means a compiler may deduce the same thing and omit code generation for an impossible to trigger error block. OTOH this could just be a weakness in the scanner. (i don't know how to silence it via markers in the code, but i assume it is possible) You'll need to login to Coverity to see the full report. https://scan.coverity.com/projects/python?tab=overview. (it has been ages since i've logged in, they appear to support Github logins now. yay.) As the parser.c code is new for 3.9, I'm marking this as deferred blocker. We should pay closer attention to the reports and update the parser generator code to generate code that passes analysis cleanly before we exit the beta phase. ---------- assignee: gvanrossum messages: 371956 nosy: gregory.p.smith, gvanrossum, lys.nikolaou, p-ganssle priority: deferred blocker severity: normal stage: needs patch status: open title: Large number of Coverity reports for parser.c versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 14:56:50 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 20 Jun 2020 18:56:50 +0000 Subject: [issue41059] Large number of Coverity reports for parser.c In-Reply-To: <1592679391.13.0.913540149945.issue41059@roundup.psfhosted.org> Message-ID: <1592679410.84.0.00445457470783.issue41059@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- components: +Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 15:08:15 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 20 Jun 2020 19:08:15 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592680095.67.0.175859411503.issue41056@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +20187 pull_request: https://github.com/python/cpython/pull/21013 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 15:15:07 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Jun 2020 19:15:07 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592680507.67.0.275785225518.issue41056@roundup.psfhosted.org> miss-islington added the comment: New changeset eb0d5c38de7f970d8cd8524f4163d831c7720f51 by Gregory P. Smith in branch 'master': bpo-41056: Fix a NULL pointer dereference on MemoryError within the ssl module. (GH-21009) https://github.com/python/cpython/commit/eb0d5c38de7f970d8cd8524f4163d831c7720f51 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 15:15:19 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Jun 2020 19:15:19 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592680519.21.0.805334425574.issue41056@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20188 pull_request: https://github.com/python/cpython/pull/21014 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 15:15:27 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Jun 2020 19:15:27 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592680527.17.0.908491015593.issue41056@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20189 pull_request: https://github.com/python/cpython/pull/21015 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 15:15:33 2020 From: report at bugs.python.org (Paul Ganssle) Date: Sat, 20 Jun 2020 19:15:33 +0000 Subject: [issue41059] Large number of Coverity reports for parser.c In-Reply-To: <1592679391.13.0.913540149945.issue41059@roundup.psfhosted.org> Message-ID: <1592680533.55.0.805656756849.issue41059@roundup.psfhosted.org> Change by Paul Ganssle : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 15:17:20 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 20 Jun 2020 19:17:20 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592680640.75.0.85246199618.issue41056@roundup.psfhosted.org> Christian Heimes added the comment: I figured out how to run coverity scan builds again. It turned out the tool chain doesn't like GCC 10. clang 10 works, though. By the way I'm using login with Github. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 15:26:43 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 20 Jun 2020 19:26:43 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1592681203.77.0.575154017907.issue40939@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +20190 pull_request: https://github.com/python/cpython/pull/21016 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 15:43:18 2020 From: report at bugs.python.org (Ido Michael) Date: Sat, 20 Jun 2020 19:43:18 +0000 Subject: [issue19670] SimpleCookie Generates Non-RFC6265-Compliant Cookies In-Reply-To: <1384979004.61.0.0353093814459.issue19670@psf.upfronthosting.co.za> Message-ID: <1592682198.56.0.0998445012332.issue19670@roundup.psfhosted.org> Change by Ido Michael : ---------- keywords: +patch pull_requests: +20191 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21017 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 15:49:24 2020 From: report at bugs.python.org (Ido Michael) Date: Sat, 20 Jun 2020 19:49:24 +0000 Subject: [issue19670] SimpleCookie Generates Non-RFC6265-Compliant Cookies In-Reply-To: <1384979004.61.0.0353093814459.issue19670@psf.upfronthosting.co.za> Message-ID: <1592682564.63.0.456266013393.issue19670@roundup.psfhosted.org> Ido Michael added the comment: Opened a PR: GH-21017 The documentation in the internal functions was helpful. Should I also add it once decided on the format in here? Doc/library/http.cookies.rst:55 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 15:53:02 2020 From: report at bugs.python.org (Ido Michael) Date: Sat, 20 Jun 2020 19:53:02 +0000 Subject: [issue40065] py39: remove deprecation note for xml.etree.cElementTree In-Reply-To: <1585163379.04.0.795433622529.issue40065@roundup.psfhosted.org> Message-ID: <1592682782.77.0.240499197545.issue40065@roundup.psfhosted.org> Ido Michael added the comment: Thanks Tal. Yes, I also got the impression we want to clean this, sorry Christian. Please let me know how to follow up on this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 16:28:16 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 20 Jun 2020 20:28:16 +0000 Subject: [issue41035] zipfile.Path does not work properly with zip archives where paths start with / In-Reply-To: <1592568836.11.0.709805363189.issue41035@roundup.psfhosted.org> Message-ID: <1592684896.22.0.661277940554.issue41035@roundup.psfhosted.org> Jason R. Coombs added the comment: Thanks sorrow for filing a report. I primarily developed this functionality. As I did, I found the 'zip' format to be under-specified, so I used real-world examples as models to infer a spec. It seems you may have discovered a use-case that violates that expectation, a case where `/a.txt` is identical to `a.txt`. My instinct is that `zipfile.Path` should support 99% of real-world use-cases and that other use-cases may not be supported or may require additional consideration (wrappers, subclasses) to support. Can you tell me more about your use-case and why zipp.Path/zipfile.Path should support it? Is this behavior a result of a real-world example (please share details about the origin) or contrived? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 16:55:30 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Jun 2020 20:55:30 +0000 Subject: [issue41059] Large number of Coverity reports for parser.c In-Reply-To: <1592679391.13.0.913540149945.issue41059@roundup.psfhosted.org> Message-ID: <1592686530.24.0.376017662884.issue41059@roundup.psfhosted.org> Guido van Rossum added the comment: Good catch! Are all the coverity complaints about this kind of code? if (_res == NULL && PyErr_Occurred()) { ... } (Mostly for Pablo and Lysandros:) This comes from emit_action(). It is preceded by a line of the form _res = ; Most of the time the action is a function call, so this looks like _res = ; But occasionally the action is just pulling a named item from the alternative that was just recognized, and those variables are generally known to be non-NULL (because otherwise the alternative would fail). There seem to be a whole bunch of actions of the form { }. A typical example: else_block[asdl_seq*]: 'else' ':' b=block { b } We could probably recognize actions that take the form of a single variable and suppress the error check for the result. However, there's a wrinkle. Sometimes a variable may legitimately be NULL when an alternative is recognized! This could occur if the name refers to an optional item. I even found an example: | 'class' a=NAME b=['(' z=[arguments] ')' { z }] ':' c=block { Look closely at the part starting with b=: b=['(' z=[arguments] ')' { z }] In the sub-rule we see z=[arguments] and the action is { z } so it is possible that we reach the `_res = z` part while z is NULL. In my copy of parser.c (current master) this is in _tmp_69_rule(). IMO this makes it difficult to omit the error check in exactly the right situations. Moreover, isn't it the job of the compiler to optimize code so we don't have to? The code generator is complex enough as it is; I would prefer not to have to complexificate it just so Coverity won't complain about unreachable code (no matter how right it is!). I know nothing about Coverity any more. Is it possible to exempt this giant generated file from warnings about unreachable code? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 17:02:31 2020 From: report at bugs.python.org (Eryk Sun) Date: Sat, 20 Jun 2020 21:02:31 +0000 Subject: [issue41053] open() fails to read app exec links In-Reply-To: <1592666093.57.0.217193955367.issue41053@roundup.psfhosted.org> Message-ID: <1592686951.14.0.329462976999.issue41053@roundup.psfhosted.org> Eryk Sun added the comment: By design, appexec links (i.e. app execution aliases) cannot be followed automatically. There is no handler for them in the kernel. WinAPI CreateFileW fails with ERROR_CANT_ACCESS_FILE (1920), and the underlying NT status value is STATUS_IO_REPARSE_TAG_NOT_HANDLED (0xC0000279). Since 3.8, os.stat handles ERROR_CANT_ACCESS_FILE in all cases by trying to return the result for the reparse point instead. This at least allows getting the st_file_attributes and st_reparse_tag values. For example: >>> s = os.stat(sys.executable) >>> s.st_file_attributes & stat.FILE_ATTRIBUTE_REPARSE_POINT 1024 >>> s.st_reparse_tag == stat.IO_REPARSE_TAG_APPEXECLINK True CreateProcessW follows app-exec links manually by reading the reparse point. But it's not that simple. The link target under "%ProgramFiles%\WindowsApps" isn't unconditionally executable by standard users. In other words, unless a particular condition is met, trying to execute the target file fails with access denied. Execute access depends on a conditional access-control entry (conditional ACEs are supported in the kernel since Windows 8) that grants access if the user's access token contains a "WIN://SYSAPPID" attribute that identifies the package. Here's the SDDL definition of this ACE for the app distribution of Python 3.9: (XA;ID;0x1200a9;;;BU;(WIN://SYSAPPID Contains "PYTHONSOFTWAREFOUNDATION.PYTHON.3.9_QBZ5N2KFRA8P0") "XA" is an access-allowed callback (conditional) ACE "ID" means the ACE is inherited from the parent directory "BU" is the security principal BUILTIN\Users (local group) Access Mask 0x1200a9: FILE_GENERIC_READ | FILE_GENERIC_EXECUTE: SYNCHRONIZE READ_CONTROL FILE_READ_ATTRIBUTES FILE_EXECUTE FILE_READ_EA FILE_READ_DATA If the app is installed for the user, CreateProcessW handles the access denied result by creating and impersonating a custom access token to execute the app, which includes the required WIN://SYSAPPID security attribute. You can attach a debugger to see the security attributes added to the app token: 0:003> !token [...] Security Attributes Information: 00 Attribute Name: WIN://SYSAPPID Value Type : TOKEN_SECURITY_ATTRIBUTE_TYPE_STRING Value[0] : PythonSoftwareFoundation.Python.3.9_3.9.179.0_x64__qbz5n2kfra8p0 Value[1] : Python Value[2] : PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0 [...] ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 17:36:11 2020 From: report at bugs.python.org (Steve Stagg) Date: Sat, 20 Jun 2020 21:36:11 +0000 Subject: [issue41060] `with a as b` segfault in new peg parser Message-ID: <1592688971.14.0.300854552931.issue41060@roundup.psfhosted.org> New submission from Steve Stagg : Hi Fuzzing found the following: $ ./python/bin/python3 Python 3.10.0a0 (heads/master:eb0d5c38de, Jun 20 2020, 21:35:36) [Clang 10.0.0 ] on linux Type "help", "copyright", "credits" or "license" for more information. >>> with a as b fish: ?./python/bin/python3? terminated by signal SIGSEGV (Address boundary error) with stacktrace: * thread #1, name = 'run', stop reason = signal SIGSEGV: invalid address (fault address: 0x20) * frame #0: 0x0000555555a08feb run`with_item_rule at parser.c:15382:20 frame #1: 0x0000555555a08e96 run`with_item_rule(p=0x00007ffff78b9e40) at parser.c:4330 frame #2: 0x00005555559d22e9 run`compound_stmt_rule at parser.c:17930:21 frame #3: 0x00005555559d227c run`compound_stmt_rule at parser.c:4139 frame #4: 0x00005555559d1a64 run`compound_stmt_rule(p=) at parser.c:1931 frame #5: 0x00005555559d016c run`statements_rule at parser.c:1230:18 frame #6: 0x00005555559d00fb run`statements_rule at parser.c:16156 frame #7: 0x00005555559cff4d run`statements_rule(p=) at parser.c:1189 frame #8: 0x00005555559cb2bc run`_PyPegen_parse at parser.c:722:18 frame #9: 0x00005555559cb28d run`_PyPegen_parse(p=0x00007ffff78b9e40) at parser.c:24688 frame #10: 0x00005555559c5349 run`_PyPegen_run_parser(p=0x00007ffff78b9e40) at pegen.c:1083:17 frame #11: 0x00005555559c6458 run`_PyPegen_run_parser_from_string(str=, start_rule=, filename_ob=0x00007ffff788db30, flags=, arena=) at pegen.c:1201:14 frame #12: 0x00005555555eea84 run`PyPegen_ASTFromStringObject(str="with'lZ'', globals=0x00007ffff788d940, locals=0x00007ffff788d940, flags=0x0000000000000000) at pythonrun.c:1029:11 frame #14: 0x00005555555a8202 run`PyRun_SimpleStringFlags(command="with'lZ'', argv=) at run.c:19:3 frame #16: 0x00007ffff7c35002 libc.so.6`__libc_start_main + 242 frame #17: 0x000055555559568e run`_start + 46 This appears to be similar to: https://bugs.python.org/issue40903, where GET_INVALID_TARGET is being called with an Attribute Node, which returns None, and this result is passed, unchecked into `PyPegen_get_expr_name` ---------- components: Interpreter Core messages: 371964 nosy: stestagg priority: normal severity: normal status: open title: `with a as b` segfault in new peg parser type: crash versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 18:01:11 2020 From: report at bugs.python.org (Steve Stagg) Date: Sat, 20 Jun 2020 22:01:11 +0000 Subject: [issue41060] `with a as b` segfault in new peg parser In-Reply-To: <1592688971.14.0.300854552931.issue41060@roundup.psfhosted.org> Message-ID: <1592690471.34.0.051021874242.issue41060@roundup.psfhosted.org> Steve Stagg added the comment: Appears to have been introduced by: bpo-40334: Produce better error messages on invalid targets (GH-20106) 01ece63d42b830df106948db0aefa6c1ba24416a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 18:06:44 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 20 Jun 2020 22:06:44 +0000 Subject: [issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line In-Reply-To: <1592400054.74.0.017392691783.issue41005@roundup.psfhosted.org> Message-ID: <1592690804.81.0.271873515249.issue41005@roundup.psfhosted.org> R?mi Lapeyre added the comment: Can you give more information about your issue here. This part of the code was written like this on purpose as the comment says: # OS X can use below Unix support (but we prefer using the OS X # specific stuff) We have to be sure that there is a bug here before changing the code, that changing the code will definitely fix the issue and that it won't create others. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 18:07:03 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Jun 2020 22:07:03 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592690823.56.0.858738713404.issue41056@roundup.psfhosted.org> miss-islington added the comment: New changeset 3ccb96c9782480e5ce646a4a130569fb92f2965d by Gregory P. Smith in branch 'master': bpo-41056: Use the fildes converter for fd to please Coverity. (GH-21011) https://github.com/python/cpython/commit/3ccb96c9782480e5ce646a4a130569fb92f2965d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 18:24:39 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Jun 2020 22:24:39 +0000 Subject: [issue41060] `with a as b` segfault in new peg parser In-Reply-To: <1592688971.14.0.300854552931.issue41060@roundup.psfhosted.org> Message-ID: <1592691879.85.0.162381298122.issue41060@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 18:35:01 2020 From: report at bugs.python.org (Kagami Sascha Rosylight) Date: Sat, 20 Jun 2020 22:35:01 +0000 Subject: [issue41053] open() fails to read app exec links In-Reply-To: <1592666093.57.0.217193955367.issue41053@roundup.psfhosted.org> Message-ID: <1592692501.01.0.998394718086.issue41053@roundup.psfhosted.org> Kagami Sascha Rosylight added the comment: It seems libuv and pwsh decided to detect and read them just as symlinks: https://github.com/libuv/libuv/pull/2812 https://github.com/PowerShell/PowerShell/pull/10331 Could Python do the same? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 18:50:23 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Jun 2020 22:50:23 +0000 Subject: [issue41060] `with a as b` segfault in new peg parser In-Reply-To: <1592688971.14.0.300854552931.issue41060@roundup.psfhosted.org> Message-ID: <1592693423.22.0.394680486582.issue41060@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: +gvanrossum, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 18:52:09 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 20 Jun 2020 22:52:09 +0000 Subject: [issue41060] `with a as b` segfault in new peg parser In-Reply-To: <1592688971.14.0.300854552931.issue41060@roundup.psfhosted.org> Message-ID: <1592693529.22.0.0942343679249.issue41060@roundup.psfhosted.org> Lysandros Nikolaou added the comment: On it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 18:53:00 2020 From: report at bugs.python.org (Steve Stagg) Date: Sat, 20 Jun 2020 22:53:00 +0000 Subject: [issue40965] Segfault when importing unittest module via C API In-Reply-To: <1592015395.95.0.70978961228.issue40965@roundup.psfhosted.org> Message-ID: <1592693580.18.0.0665994963355.issue40965@roundup.psfhosted.org> Steve Stagg added the comment: This appears to have been introduced in 13915a3100 bpo-36356: Fix memory leak in _asynciomodule.c (GH-16598). Cannot reproduce on master ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 19:03:50 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 20 Jun 2020 23:03:50 +0000 Subject: [issue41060] `with a as b` segfault in new peg parser In-Reply-To: <1592688971.14.0.300854552931.issue41060@roundup.psfhosted.org> Message-ID: <1592694230.2.0.218556950855.issue41060@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- keywords: +patch pull_requests: +20192 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21020 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 19:07:38 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 20 Jun 2020 23:07:38 +0000 Subject: [issue41060] `with a as b` segfault in new peg parser In-Reply-To: <1592688971.14.0.300854552931.issue41060@roundup.psfhosted.org> Message-ID: <1592694458.59.0.427820067307.issue41060@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- assignee: -> lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 19:10:45 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 20 Jun 2020 23:10:45 +0000 Subject: [issue41060] `with a as b` segfault in new peg parser In-Reply-To: <1592688971.14.0.300854552931.issue41060@roundup.psfhosted.org> Message-ID: <1592694645.78.0.0392760037019.issue41060@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Thanks for the report, Steve. I've now opened a PR that should fix this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 18:06:56 2020 From: report at bugs.python.org (Steve Stagg) Date: Sat, 20 Jun 2020 22:06:56 +0000 Subject: [issue40965] Segfault when importing unittest module via C API In-Reply-To: <1592015395.95.0.70978961228.issue40965@roundup.psfhosted.org> Message-ID: <1592690816.97.0.698073259524.issue40965@roundup.psfhosted.org> Steve Stagg added the comment: I was able to reproduce, follows is the raw LLDB output, I don't think this fails on master, will try some bisecting: * thread #1, name = 'runtest', stop reason = signal SIGSEGV: invalid address (fault address: 0x0) frame #0: 0x00007ffff7079ae7 _asyncio.cpython-38d-x86_64-linux-gnu.so`PyInit__asyncio [inlined] _Py_INCREF(op=0x0000000000000000) at object.h:459:18 456 static inline void _Py_INCREF(PyObject *op) 457 { 458 _Py_INC_REFTOTAL; -> 459 op->ob_refcnt++; 460 } 461 462 #define Py_INCREF(op) _Py_INCREF(_PyObject_CAST(op)) (lldb) bt * thread #1, name = 'runtest', stop reason = signal SIGSEGV: invalid address (fault address: 0x0) * frame #0: 0x00007ffff7079ae7 _asyncio.cpython-38d-x86_64-linux-gnu.so`PyInit__asyncio [inlined] _Py_INCREF(op=0x0000000000000000) at object.h:459:18 frame #1: 0x00007ffff7079ad6 _asyncio.cpython-38d-x86_64-linux-gnu.so`PyInit__asyncio at _asynciomodule.c:3405 frame #2: 0x0000555555720766 runtest`_PyImport_LoadDynamicModuleWithSpec(spec=0x00007ffff6e33780, fp=) at importdl.c:164:9 frame #3: 0x000055555571e471 runtest`_imp_create_dynamic_impl(module=, spec=0x00007ffff6e33780, file=) at import.c:2220:11 frame #4: 0x000055555571e60b runtest`_imp_create_dynamic(module=0x00007ffff76ec830, args=0x00007ffff6e336f8, nargs=1) at import.c.h:330:20 frame #5: 0x0000555555645fbe runtest`cfunction_vectorcall_FASTCALL(func=0x00007ffff7753050, args=0x00007ffff6e336f8, nargsf=, kwnames=0x0000000000000000) at methodobject.c:421:24 frame #6: 0x00005555556042ca runtest`PyVectorcall_Call(callable=0x00007ffff7753050, tuple=, kwargs=) at call.c:199:24 frame #7: 0x0000555555604771 runtest`PyCFunction_Call(func=, args=, kwargs=) at call.c:774:12 frame #8: 0x00005555556eabf0 runtest`do_call_core(tstate=0x000055555593f3c0, func=0x00007ffff7753050, callargs=0x00007ffff6e336e0, kwdict=0x00007ffff6e20ad0) at ceval.c:5007:9 frame #9: 0x00005555556f8897 runtest`_PyEval_EvalFrameDefault(f=0x00005555559fa330, throwflag=) at ceval.c:3559:22 frame #10: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #11: 0x00005555556ecd40 runtest`_PyEval_EvalCodeWithName(_co=0x00007ffff7725860, globals=, locals=, args=, argcount=2, kwnames=0x0000000000000000, kwargs=0x00007ffff76bf5b0, kwcount=0, kwstep=1, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000, name=0x00007ffff792fdd0, qualname=0x00007ffff792fdd0) at ceval.c:4298:14 frame #12: 0x0000555555601dbd runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:435:12 frame #13: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775810, args=0x00007ffff76bf5a0, callable=0x00007ffff7763b90) at abstract.h:127:11 frame #14: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffff79a0, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #15: 0x00005555556f834c runtest`_PyEval_EvalFrameDefault(f=0x00007ffff76bf410, throwflag=) at ceval.c:3469:23 frame #16: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #17: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x00007ffff7fa63a0, nargs=2, globals=) at call.c:283:14 frame #18: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #19: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775810, args=0x00007ffff7fa6390, callable=0x00007ffff76eaa50) at abstract.h:127:11 frame #20: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffff7b80, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #21: 0x00005555556f8296 runtest`_PyEval_EvalFrameDefault(f=0x00007ffff7fa6210, throwflag=) at ceval.c:3486:23 frame #22: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #23: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x0000555555a18ef8, nargs=1, globals=) at call.c:283:14 frame #24: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #25: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775809, args=0x0000555555a18ef0, callable=0x00007ffff77624b0) at abstract.h:127:11 frame #26: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffff7d68, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #27: 0x00005555556f83d4 runtest`_PyEval_EvalFrameDefault(f=0x0000555555a18d70, throwflag=) at ceval.c:3500:19 frame #28: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #29: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x0000555555ad9088, nargs=1, globals=) at call.c:283:14 frame #30: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #31: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775809, args=0x0000555555ad9080, callable=0x00007ffff7762230) at abstract.h:127:11 frame #32: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffff7f48, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #33: 0x00005555556f83d4 runtest`_PyEval_EvalFrameDefault(f=0x0000555555ad8ed0, throwflag=) at ceval.c:3500:19 frame #34: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #35: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x0000555555acca18, nargs=2, globals=) at call.c:283:14 frame #36: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #37: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775810, args=0x0000555555acca08, callable=0x00007ffff7671230) at abstract.h:127:11 frame #38: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffff8128, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #39: 0x00005555556f83d4 runtest`_PyEval_EvalFrameDefault(f=0x0000555555acc870, throwflag=) at ceval.c:3500:19 frame #40: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #41: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x00007fffffff8250, nargs=2, globals=) at call.c:283:14 frame #42: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #43: 0x000055555560269e runtest`object_vacall at abstract.h:127:11 frame #44: 0x0000555555602649 runtest`object_vacall [inlined] _PyObject_FastCall(nargs=2, args=0x00007fffffff8240, func=0x00007ffff7671190) at abstract.h:147 frame #45: 0x0000555555602646 runtest`object_vacall(base=0x0000000000000000, callable=0x00007ffff7671190, vargs=) at call.c:1186 frame #46: 0x00005555556029c5 runtest`_PyObject_CallMethodIdObjArgs(obj=0x0000000000000000, name=) at call.c:1244:24 frame #47: 0x000055555571b710 runtest`import_find_and_load(abs_name=0x00007ffff6e07760) at import.c:1697:11 frame #48: 0x000055555571f5ed runtest`PyImport_ImportModuleLevelObject(name=0x00007ffff6e07760, globals=, locals=, fromlist=0x00007ffff6e07590, level=0) at import.c:1797:15 frame #49: 0x00005555556e87ea runtest`import_name(tstate=0x000055555593f3c0, f=0x00005555559b5e00, name=0x00007ffff6e07760, fromlist=0x00007ffff6e07590, level=0x00005555558faf80) at ceval.c:5163:15 frame #50: 0x00005555556f5f3b runtest`_PyEval_EvalFrameDefault(f=0x00005555559b5e00, throwflag=) at ceval.c:2993:19 frame #51: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #52: 0x00005555556ecd40 runtest`_PyEval_EvalCodeWithName(_co=0x00007ffff6e34110, globals=, locals=, args=, argcount=0, kwnames=0x0000000000000000, kwargs=0x0000000000000000, kwcount=0, kwstep=2, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000, name=0x0000000000000000, qualname=0x0000000000000000) at ceval.c:4298:14 frame #53: 0x00005555556ecf38 runtest`PyEval_EvalCodeEx(_co=, globals=, locals=, args=, argcount=, kws=, kwcount=0, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000) at ceval.c:4327:12 frame #54: 0x00005555556ecf66 runtest`PyEval_EvalCode(co=, globals=, locals=) at ceval.c:718:12 frame #55: 0x00005555556e385b runtest`builtin_exec_impl(module=, source=0x00007ffff6e34110, globals=0x00007ffff6f1f470, locals=0x00007ffff6f1f470) at bltinmodule.c:1033:13 frame #56: 0x00005555556e399e runtest`builtin_exec(module=0x00007ffff76d0a70, args=0x00007ffff6e18608, nargs=2) at bltinmodule.c.h:396:20 frame #57: 0x0000555555645fbe runtest`cfunction_vectorcall_FASTCALL(func=0x00007ffff76d0830, args=0x00007ffff6e18608, nargsf=, kwnames=0x0000000000000000) at methodobject.c:421:24 frame #58: 0x00005555556042ca runtest`PyVectorcall_Call(callable=0x00007ffff76d0830, tuple=, kwargs=) at call.c:199:24 frame #59: 0x0000555555604771 runtest`PyCFunction_Call(func=, args=, kwargs=) at call.c:774:12 frame #60: 0x00005555556eabf0 runtest`do_call_core(tstate=0x000055555593f3c0, func=0x00007ffff76d0830, callargs=0x00007ffff6e185f0, kwdict=0x00007ffff6e0fd10) at ceval.c:5007:9 frame #61: 0x00005555556f8897 runtest`_PyEval_EvalFrameDefault(f=0x0000555555992ff0, throwflag=) at ceval.c:3559:22 frame #62: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #63: 0x00005555556ecd40 runtest`_PyEval_EvalCodeWithName(_co=0x00007ffff7725860, globals=, locals=, args=, argcount=3, kwnames=0x0000000000000000, kwargs=0x00007ffff7540798, kwcount=0, kwstep=1, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000, name=0x00007ffff792fdd0, qualname=0x00007ffff792fdd0) at ceval.c:4298:14 frame #64: 0x0000555555601dbd runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:435:12 frame #65: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775811, args=0x00007ffff7540780, callable=0x00007ffff7763b90) at abstract.h:127:11 frame #66: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffff8b90, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #67: 0x00005555556f834c runtest`_PyEval_EvalFrameDefault(f=0x00007ffff75405f0, throwflag=) at ceval.c:3469:23 frame #68: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #69: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x00007ffff76d5de0, nargs=2, globals=) at call.c:283:14 frame #70: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #71: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775810, args=0x00007ffff76d5dd0, callable=0x00007ffff7910370) at abstract.h:127:11 frame #72: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffff8d70, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #73: 0x00005555556f8296 runtest`_PyEval_EvalFrameDefault(f=0x00007ffff76d5c50, throwflag=) at ceval.c:3486:23 frame #74: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #75: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x00005555559fc038, nargs=1, globals=) at call.c:283:14 frame #76: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #77: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775809, args=0x00005555559fc030, callable=0x00007ffff7762230) at abstract.h:127:11 frame #78: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffff8f58, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #79: 0x00005555556f83d4 runtest`_PyEval_EvalFrameDefault(f=0x00005555559fbe80, throwflag=) at ceval.c:3500:19 frame #80: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #81: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x0000555555acb2f8, nargs=2, globals=) at call.c:283:14 frame #82: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #83: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775810, args=0x0000555555acb2e8, callable=0x00007ffff7671230) at abstract.h:127:11 frame #84: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffff9138, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #85: 0x00005555556f83d4 runtest`_PyEval_EvalFrameDefault(f=0x0000555555acb150, throwflag=) at ceval.c:3500:19 frame #86: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #87: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x00007fffffff9260, nargs=2, globals=) at call.c:283:14 frame #88: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #89: 0x000055555560269e runtest`object_vacall at abstract.h:127:11 frame #90: 0x0000555555602649 runtest`object_vacall [inlined] _PyObject_FastCall(nargs=2, args=0x00007fffffff9250, func=0x00007ffff7671190) at abstract.h:147 frame #91: 0x0000555555602646 runtest`object_vacall(base=0x0000000000000000, callable=0x00007ffff7671190, vargs=) at call.c:1186 frame #92: 0x00005555556029c5 runtest`_PyObject_CallMethodIdObjArgs(obj=0x0000000000000000, name=) at call.c:1244:24 frame #93: 0x000055555571b710 runtest`import_find_and_load(abs_name=0x00007ffff74d5b80) at import.c:1697:11 frame #94: 0x000055555571f5ed runtest`PyImport_ImportModuleLevelObject(name=0x00007ffff74d5b80, globals=, locals=, fromlist=0x0000000000000000, level=0) at import.c:1797:15 frame #95: 0x00005555556e2068 runtest`builtin___import__(self=, args=, kwds=) at bltinmodule.c:279:12 frame #96: 0x0000555555601749 runtest`cfunction_call_varargs(func=0x00007ffff76d0fb0, args=0x00007ffff7822a00, kwargs=0x00007ffff76d3b30) at call.c:742:19 frame #97: 0x000055555560477b runtest`PyCFunction_Call(func=, args=, kwargs=) at call.c:772:16 frame #98: 0x00005555556eabf0 runtest`do_call_core(tstate=0x000055555593f3c0, func=0x00007ffff76d0fb0, callargs=0x00007ffff7822a00, kwdict=0x00007ffff76d3b30) at ceval.c:5007:9 frame #99: 0x00005555556f8897 runtest`_PyEval_EvalFrameDefault(f=0x00007ffff6eb5220, throwflag=) at ceval.c:3559:22 frame #100: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #101: 0x00005555556ecd40 runtest`_PyEval_EvalCodeWithName(_co=0x00007ffff7725860, globals=, locals=, args=, argcount=2, kwnames=0x0000000000000000, kwargs=0x0000555555aa7908, kwcount=0, kwstep=1, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000, name=0x00007ffff792fdd0, qualname=0x00007ffff792fdd0) at ceval.c:4298:14 frame #102: 0x0000555555601dbd runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:435:12 frame #103: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775810, args=0x0000555555aa78f8, callable=0x00007ffff7763b90) at abstract.h:127:11 frame #104: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffff9858, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #105: 0x00005555556f83d4 runtest`_PyEval_EvalFrameDefault(f=0x0000555555aa7740, throwflag=) at ceval.c:3500:19 frame #106: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #107: 0x00005555556ecd40 runtest`_PyEval_EvalCodeWithName(_co=0x00007ffff78ef450, globals=, locals=, args=, argcount=3, kwnames=0x0000000000000000, kwargs=0x00007fffffff9a48, kwcount=0, kwstep=1, defs=0x0000000000000000, defcount=0, kwdefs=0x00007ffff777ab90, closure=0x0000000000000000, name=0x00007ffff7959700, qualname=0x00007ffff7959700) at ceval.c:4298:14 frame #108: 0x0000555555601dbd runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:435:12 frame #109: 0x000055555560269e runtest`object_vacall at abstract.h:127:11 frame #110: 0x0000555555602649 runtest`object_vacall [inlined] _PyObject_FastCall(nargs=3, args=0x00007fffffff9a30, func=0x00007ffff7671410) at abstract.h:147 frame #111: 0x0000555555602646 runtest`object_vacall(base=0x0000000000000000, callable=0x00007ffff7671410, vargs=) at call.c:1186 frame #112: 0x00005555556029c5 runtest`_PyObject_CallMethodIdObjArgs(obj=0x0000000000000000, name=) at call.c:1244:24 frame #113: 0x000055555571f97f runtest`PyImport_ImportModuleLevelObject(name=0x00007ffff7fc7040, globals=, locals=, fromlist=0x00007ffff78bc820, level=1) at import.c:1869:25 frame #114: 0x00005555556e87ea runtest`import_name(tstate=0x000055555593f3c0, f=0x00007ffff78e7410, name=0x00007ffff7fc7040, fromlist=0x00007ffff78bc820, level=0x00005555558fafa0) at ceval.c:5163:15 frame #115: 0x00005555556f5f3b runtest`_PyEval_EvalFrameDefault(f=0x00007ffff78e7410, throwflag=) at ceval.c:2993:19 frame #116: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #117: 0x00005555556ecd40 runtest`_PyEval_EvalCodeWithName(_co=0x00007ffff75f8c70, globals=, locals=, args=, argcount=0, kwnames=0x0000000000000000, kwargs=0x0000000000000000, kwcount=0, kwstep=2, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000, name=0x0000000000000000, qualname=0x0000000000000000) at ceval.c:4298:14 frame #118: 0x00005555556ecf38 runtest`PyEval_EvalCodeEx(_co=, globals=, locals=, args=, argcount=, kws=, kwcount=0, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000) at ceval.c:4327:12 frame #119: 0x00005555556ecf66 runtest`PyEval_EvalCode(co=, globals=, locals=) at ceval.c:718:12 frame #120: 0x00005555556e385b runtest`builtin_exec_impl(module=, source=0x00007ffff75f8c70, globals=0x00007ffff76d39b0, locals=0x00007ffff76d39b0) at bltinmodule.c:1033:13 frame #121: 0x00005555556e399e runtest`builtin_exec(module=0x00007ffff76d0a70, args=0x00007ffff7822ba8, nargs=2) at bltinmodule.c.h:396:20 frame #122: 0x0000555555645fbe runtest`cfunction_vectorcall_FASTCALL(func=0x00007ffff76d0830, args=0x00007ffff7822ba8, nargsf=, kwnames=0x0000000000000000) at methodobject.c:421:24 frame #123: 0x00005555556042ca runtest`PyVectorcall_Call(callable=0x00007ffff76d0830, tuple=, kwargs=) at call.c:199:24 frame #124: 0x0000555555604771 runtest`PyCFunction_Call(func=, args=, kwargs=) at call.c:774:12 frame #125: 0x00005555556eabf0 runtest`do_call_core(tstate=0x000055555593f3c0, func=0x00007ffff76d0830, callargs=0x00007ffff7822b90, kwdict=0x00007ffff76d3a70) at ceval.c:5007:9 frame #126: 0x00005555556f8897 runtest`_PyEval_EvalFrameDefault(f=0x00007ffff75fbb90, throwflag=) at ceval.c:3559:22 frame #127: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #128: 0x00005555556ecd40 runtest`_PyEval_EvalCodeWithName(_co=0x00007ffff7725860, globals=, locals=, args=, argcount=3, kwnames=0x0000000000000000, kwargs=0x00007ffff765a5f8, kwcount=0, kwstep=1, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000, name=0x00007ffff792fdd0, qualname=0x00007ffff792fdd0) at ceval.c:4298:14 frame #129: 0x0000555555601dbd runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:435:12 frame #130: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775811, args=0x00007ffff765a5e0, callable=0x00007ffff7763b90) at abstract.h:127:11 frame #131: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffffa340, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #132: 0x00005555556f834c runtest`_PyEval_EvalFrameDefault(f=0x00007ffff765a450, throwflag=) at ceval.c:3469:23 frame #133: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #134: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x00005555559b0f00, nargs=2, globals=) at call.c:283:14 frame #135: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #136: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775810, args=0x00005555559b0ef0, callable=0x00007ffff7910370) at abstract.h:127:11 frame #137: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffffa520, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #138: 0x00005555556f8296 runtest`_PyEval_EvalFrameDefault(f=0x00005555559b0d70, throwflag=) at ceval.c:3486:23 frame #139: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #140: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x0000555555a18ce8, nargs=1, globals=) at call.c:283:14 frame #141: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #142: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775809, args=0x0000555555a18ce0, callable=0x00007ffff7762230) at abstract.h:127:11 frame #143: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffffa708, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #144: 0x00005555556f83d4 runtest`_PyEval_EvalFrameDefault(f=0x0000555555a18b30, throwflag=) at ceval.c:3500:19 frame #145: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #146: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x00005555559b0208, nargs=2, globals=) at call.c:283:14 frame #147: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #148: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775810, args=0x00005555559b01f8, callable=0x00007ffff7671230) at abstract.h:127:11 frame #149: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffffa8e8, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #150: 0x00005555556f83d4 runtest`_PyEval_EvalFrameDefault(f=0x00005555559b0060, throwflag=) at ceval.c:3500:19 frame #151: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #152: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x00007fffffffaa10, nargs=2, globals=) at call.c:283:14 frame #153: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #154: 0x000055555560269e runtest`object_vacall at abstract.h:127:11 frame #155: 0x0000555555602649 runtest`object_vacall [inlined] _PyObject_FastCall(nargs=2, args=0x00007fffffffaa00, func=0x00007ffff7671190) at abstract.h:147 frame #156: 0x0000555555602646 runtest`object_vacall(base=0x0000000000000000, callable=0x00007ffff7671190, vargs=) at call.c:1186 frame #157: 0x00005555556029c5 runtest`_PyObject_CallMethodIdObjArgs(obj=0x0000000000000000, name=) at call.c:1244:24 frame #158: 0x000055555571b710 runtest`import_find_and_load(abs_name=0x00007ffff77d54c0) at import.c:1697:11 frame #159: 0x000055555571f5ed runtest`PyImport_ImportModuleLevelObject(name=0x00007ffff77d56a0, globals=, locals=, fromlist=0x00007ffff78b7550, level=1) at import.c:1797:15 frame #160: 0x00005555556e87ea runtest`import_name(tstate=0x000055555593f3c0, f=0x00007ffff75fb9b0, name=0x00007ffff77d56a0, fromlist=0x00007ffff78b7550, level=0x00005555558fafa0) at ceval.c:5163:15 frame #161: 0x00005555556f5f3b runtest`_PyEval_EvalFrameDefault(f=0x00007ffff75fb9b0, throwflag=) at ceval.c:2993:19 frame #162: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #163: 0x00005555556ecd40 runtest`_PyEval_EvalCodeWithName(_co=0x00007ffff76271e0, globals=, locals=, args=, argcount=0, kwnames=0x0000000000000000, kwargs=0x0000000000000000, kwcount=0, kwstep=2, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000, name=0x0000000000000000, qualname=0x0000000000000000) at ceval.c:4298:14 frame #164: 0x00005555556ecf38 runtest`PyEval_EvalCodeEx(_co=, globals=, locals=, args=, argcount=, kws=, kwcount=0, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000) at ceval.c:4327:12 frame #165: 0x00005555556ecf66 runtest`PyEval_EvalCode(co=, globals=, locals=) at ceval.c:718:12 frame #166: 0x00005555556e385b runtest`builtin_exec_impl(module=, source=0x00007ffff76271e0, globals=0x00007ffff77b9290, locals=0x00007ffff77b9290) at bltinmodule.c:1033:13 frame #167: 0x00005555556e399e runtest`builtin_exec(module=0x00007ffff76d0a70, args=0x00007ffff770a9c8, nargs=2) at bltinmodule.c.h:396:20 frame #168: 0x0000555555645fbe runtest`cfunction_vectorcall_FASTCALL(func=0x00007ffff76d0830, args=0x00007ffff770a9c8, nargsf=, kwnames=0x0000000000000000) at methodobject.c:421:24 frame #169: 0x00005555556042ca runtest`PyVectorcall_Call(callable=0x00007ffff76d0830, tuple=, kwargs=) at call.c:199:24 frame #170: 0x0000555555604771 runtest`PyCFunction_Call(func=, args=, kwargs=) at call.c:774:12 frame #171: 0x00005555556eabf0 runtest`do_call_core(tstate=0x000055555593f3c0, func=0x00007ffff76d0830, callargs=0x00007ffff770a9b0, kwdict=0x00007ffff77d5b90) at ceval.c:5007:9 frame #172: 0x00005555556f8897 runtest`_PyEval_EvalFrameDefault(f=0x00007ffff7663790, throwflag=) at ceval.c:3559:22 frame #173: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #174: 0x00005555556ecd40 runtest`_PyEval_EvalCodeWithName(_co=0x00007ffff7725860, globals=, locals=, args=, argcount=3, kwnames=0x0000000000000000, kwargs=0x00007ffff78e73d8, kwcount=0, kwstep=1, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000, name=0x00007ffff792fdd0, qualname=0x00007ffff792fdd0) at ceval.c:4298:14 frame #175: 0x0000555555601dbd runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:435:12 frame #176: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775811, args=0x00007ffff78e73c0, callable=0x00007ffff7763b90) at abstract.h:127:11 frame #177: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffffb350, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #178: 0x00005555556f834c runtest`_PyEval_EvalFrameDefault(f=0x00007ffff78e7230, throwflag=) at ceval.c:3469:23 frame #179: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #180: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x00007ffff789dde0, nargs=2, globals=) at call.c:283:14 frame #181: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #182: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775810, args=0x00007ffff789ddd0, callable=0x00007ffff7910370) at abstract.h:127:11 frame #183: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffffb530, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #184: 0x00005555556f8296 runtest`_PyEval_EvalFrameDefault(f=0x00007ffff789dc50, throwflag=) at ceval.c:3486:23 frame #185: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #186: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x0000555555a7db08, nargs=1, globals=) at call.c:283:14 frame #187: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #188: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775809, args=0x0000555555a7db00, callable=0x00007ffff7762230) at abstract.h:127:11 frame #189: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffffb718, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #190: 0x00005555556f83d4 runtest`_PyEval_EvalFrameDefault(f=0x0000555555a7d950, throwflag=) at ceval.c:3500:19 frame #191: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #192: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x00005555559a69f8, nargs=2, globals=) at call.c:283:14 frame #193: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #194: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775810, args=0x00005555559a69e8, callable=0x00007ffff7671230) at abstract.h:127:11 frame #195: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffffb8f8, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #196: 0x00005555556f83d4 runtest`_PyEval_EvalFrameDefault(f=0x00005555559a6850, throwflag=) at ceval.c:3500:19 frame #197: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #198: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x00007fffffffba20, nargs=2, globals=) at call.c:283:14 frame #199: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #200: 0x000055555560269e runtest`object_vacall at abstract.h:127:11 frame #201: 0x0000555555602649 runtest`object_vacall [inlined] _PyObject_FastCall(nargs=2, args=0x00007fffffffba10, func=0x00007ffff7671190) at abstract.h:147 frame #202: 0x0000555555602646 runtest`object_vacall(base=0x0000000000000000, callable=0x00007ffff7671190, vargs=) at call.c:1186 frame #203: 0x00005555556029c5 runtest`_PyObject_CallMethodIdObjArgs(obj=0x0000000000000000, name=) at call.c:1244:24 frame #204: 0x000055555571b710 runtest`import_find_and_load(abs_name=0x00007ffff78b77c0) at import.c:1697:11 frame #205: 0x000055555571f5ed runtest`PyImport_ImportModuleLevelObject(name=0x00007ffff78b77c0, globals=, locals=, fromlist=0x00005555558d4380, level=0) at import.c:1797:15 frame #206: 0x00005555556e87ea runtest`import_name(tstate=0x000055555593f3c0, f=0x00005555559dc6f0, name=0x00007ffff78b77c0, fromlist=0x00005555558d4380, level=0x00005555558faf80) at ceval.c:5163:15 frame #207: 0x00005555556f5f3b runtest`_PyEval_EvalFrameDefault(f=0x00005555559dc6f0, throwflag=) at ceval.c:2993:19 frame #208: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #209: 0x00005555556ecd40 runtest`_PyEval_EvalCodeWithName(_co=0x00007ffff76d86c0, globals=, locals=, args=, argcount=0, kwnames=0x0000000000000000, kwargs=0x0000000000000000, kwcount=0, kwstep=2, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000, name=0x0000000000000000, qualname=0x0000000000000000) at ceval.c:4298:14 frame #210: 0x00005555556ecf38 runtest`PyEval_EvalCodeEx(_co=, globals=, locals=, args=, argcount=, kws=, kwcount=0, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000) at ceval.c:4327:12 frame #211: 0x00005555556ecf66 runtest`PyEval_EvalCode(co=, globals=, locals=) at ceval.c:718:12 frame #212: 0x00005555556e385b runtest`builtin_exec_impl(module=, source=0x00007ffff76d86c0, globals=0x00007ffff6ed37d0, locals=0x00007ffff6ed37d0) at bltinmodule.c:1033:13 frame #213: 0x00005555556e399e runtest`builtin_exec(module=0x00007ffff76d0a70, args=0x00007ffff770ac98, nargs=2) at bltinmodule.c.h:396:20 frame #214: 0x0000555555645fbe runtest`cfunction_vectorcall_FASTCALL(func=0x00007ffff76d0830, args=0x00007ffff770ac98, nargsf=, kwnames=0x0000000000000000) at methodobject.c:421:24 frame #215: 0x00005555556042ca runtest`PyVectorcall_Call(callable=0x00007ffff76d0830, tuple=, kwargs=) at call.c:199:24 frame #216: 0x0000555555604771 runtest`PyCFunction_Call(func=, args=, kwargs=) at call.c:774:12 frame #217: 0x00005555556eabf0 runtest`do_call_core(tstate=0x000055555593f3c0, func=0x00007ffff76d0830, callargs=0x00007ffff770ac80, kwdict=0x00007ffff77b9350) at ceval.c:5007:9 frame #218: 0x00005555556f8897 runtest`_PyEval_EvalFrameDefault(f=0x00005555559657c0, throwflag=) at ceval.c:3559:22 frame #219: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #220: 0x00005555556ecd40 runtest`_PyEval_EvalCodeWithName(_co=0x00007ffff7725860, globals=, locals=, args=, argcount=3, kwnames=0x0000000000000000, kwargs=0x00007ffff76e31f8, kwcount=0, kwstep=1, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000, name=0x00007ffff792fdd0, qualname=0x00007ffff792fdd0) at ceval.c:4298:14 frame #221: 0x0000555555601dbd runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:435:12 frame #222: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775811, args=0x00007ffff76e31e0, callable=0x00007ffff7763b90) at abstract.h:127:11 frame #223: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffffc360, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #224: 0x00005555556f834c runtest`_PyEval_EvalFrameDefault(f=0x00007ffff76e3050, throwflag=) at ceval.c:3469:23 frame #225: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #226: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x00007ffff77dc9e0, nargs=2, globals=) at call.c:283:14 frame #227: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #228: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775810, args=0x00007ffff77dc9d0, callable=0x00007ffff7910370) at abstract.h:127:11 frame #229: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffffc540, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #230: 0x00005555556f8296 runtest`_PyEval_EvalFrameDefault(f=0x00007ffff77dc850, throwflag=) at ceval.c:3486:23 frame #231: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #232: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x0000555555a20108, nargs=1, globals=) at call.c:283:14 frame #233: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #234: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775809, args=0x0000555555a20100, callable=0x00007ffff7762230) at abstract.h:127:11 frame #235: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffffc728, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #236: 0x00005555556f83d4 runtest`_PyEval_EvalFrameDefault(f=0x0000555555a1ff50, throwflag=) at ceval.c:3500:19 frame #237: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #238: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x0000555555a1fc48, nargs=2, globals=) at call.c:283:14 frame #239: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #240: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775810, args=0x0000555555a1fc38, callable=0x00007ffff7671230) at abstract.h:127:11 frame #241: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffffc908, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #242: 0x00005555556f83d4 runtest`_PyEval_EvalFrameDefault(f=0x0000555555a1faa0, throwflag=) at ceval.c:3500:19 frame #243: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #244: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x00007fffffffca30, nargs=2, globals=) at call.c:283:14 frame #245: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #246: 0x000055555560269e runtest`object_vacall at abstract.h:127:11 frame #247: 0x0000555555602649 runtest`object_vacall [inlined] _PyObject_FastCall(nargs=2, args=0x00007fffffffca20, func=0x00007ffff7671190) at abstract.h:147 frame #248: 0x0000555555602646 runtest`object_vacall(base=0x0000000000000000, callable=0x00007ffff7671190, vargs=) at call.c:1186 frame #249: 0x00005555556029c5 runtest`_PyObject_CallMethodIdObjArgs(obj=0x0000000000000000, name=) at call.c:1244:24 frame #250: 0x000055555571b710 runtest`import_find_and_load(abs_name=0x00007ffff6ed3640) at import.c:1697:11 frame #251: 0x000055555571f5ed runtest`PyImport_ImportModuleLevelObject(name=0x00007ffff6ed3d60, globals=, locals=, fromlist=0x00007ffff7636b90, level=1) at import.c:1797:15 frame #252: 0x00005555556e87ea runtest`import_name(tstate=0x000055555593f3c0, f=0x0000555555a226e0, name=0x00007ffff6ed3d60, fromlist=0x00007ffff7636b90, level=0x00005555558fafa0) at ceval.c:5163:15 frame #253: 0x00005555556f5f3b runtest`_PyEval_EvalFrameDefault(f=0x0000555555a226e0, throwflag=) at ceval.c:2993:19 frame #254: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #255: 0x00005555556ecd40 runtest`_PyEval_EvalCodeWithName(_co=0x00007ffff7897ad0, globals=, locals=, args=, argcount=0, kwnames=0x0000000000000000, kwargs=0x0000000000000000, kwcount=0, kwstep=2, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000, name=0x0000000000000000, qualname=0x0000000000000000) at ceval.c:4298:14 frame #256: 0x00005555556ecf38 runtest`PyEval_EvalCodeEx(_co=, globals=, locals=, args=, argcount=, kws=, kwcount=0, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000) at ceval.c:4327:12 frame #257: 0x00005555556ecf66 runtest`PyEval_EvalCode(co=, globals=, locals=) at ceval.c:718:12 frame #258: 0x00005555556e385b runtest`builtin_exec_impl(module=, source=0x00007ffff7897ad0, globals=0x00007ffff787f0b0, locals=0x00007ffff787f0b0) at bltinmodule.c:1033:13 frame #259: 0x00005555556e399e runtest`builtin_exec(module=0x00007ffff76d0a70, args=0x00007ffff774b1a8, nargs=2) at bltinmodule.c.h:396:20 frame #260: 0x0000555555645fbe runtest`cfunction_vectorcall_FASTCALL(func=0x00007ffff76d0830, args=0x00007ffff774b1a8, nargsf=, kwnames=0x0000000000000000) at methodobject.c:421:24 frame #261: 0x00005555556042ca runtest`PyVectorcall_Call(callable=0x00007ffff76d0830, tuple=, kwargs=) at call.c:199:24 frame #262: 0x0000555555604771 runtest`PyCFunction_Call(func=, args=, kwargs=) at call.c:774:12 frame #263: 0x00005555556eabf0 runtest`do_call_core(tstate=0x000055555593f3c0, func=0x00007ffff76d0830, callargs=0x00007ffff774b190, kwdict=0x00007ffff6edcc50) at ceval.c:5007:9 frame #264: 0x00005555556f8897 runtest`_PyEval_EvalFrameDefault(f=0x00007ffff7930450, throwflag=) at ceval.c:3559:22 frame #265: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #266: 0x00005555556ecd40 runtest`_PyEval_EvalCodeWithName(_co=0x00007ffff7725860, globals=, locals=, args=, argcount=3, kwnames=0x0000000000000000, kwargs=0x00007ffff76bff18, kwcount=0, kwstep=1, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000, name=0x00007ffff792fdd0, qualname=0x00007ffff792fdd0) at ceval.c:4298:14 frame #267: 0x0000555555601dbd runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:435:12 frame #268: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775811, args=0x00007ffff76bff00, callable=0x00007ffff7763b90) at abstract.h:127:11 frame #269: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffffd370, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #270: 0x00005555556f834c runtest`_PyEval_EvalFrameDefault(f=0x00007ffff76bfd70, throwflag=) at ceval.c:3469:23 frame #271: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #272: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x0000555555987660, nargs=2, globals=) at call.c:283:14 frame #273: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #274: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775810, args=0x0000555555987650, callable=0x00007ffff7910370) at abstract.h:127:11 frame #275: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffffd550, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #276: 0x00005555556f8296 runtest`_PyEval_EvalFrameDefault(f=0x00005555559874d0, throwflag=) at ceval.c:3486:23 frame #277: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #278: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x0000555555ad14d8, nargs=1, globals=) at call.c:283:14 frame #279: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #280: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775809, args=0x0000555555ad14d0, callable=0x00007ffff7762230) at abstract.h:127:11 frame #281: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffffd738, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #282: 0x00005555556f83d4 runtest`_PyEval_EvalFrameDefault(f=0x0000555555ad1320, throwflag=) at ceval.c:3500:19 frame #283: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #284: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x00005555559c80d8, nargs=2, globals=) at call.c:283:14 frame #285: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #286: 0x00005555556eb811 runtest`call_function [inlined] _PyObject_Vectorcall(kwnames=0x0000000000000000, nargsf=9223372036854775810, args=0x00005555559c80c8, callable=0x00007ffff7671230) at abstract.h:127:11 frame #287: 0x00005555556eb79f runtest`call_function(tstate=0x000055555593f3c0, pp_stack=0x00007fffffffd918, oparg=, kwnames=0x0000000000000000) at ceval.c:4987 frame #288: 0x00005555556f83d4 runtest`_PyEval_EvalFrameDefault(f=0x00005555559c7f30, throwflag=) at ceval.c:3500:19 frame #289: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #290: 0x000055555560134e runtest`function_code_fastcall(co=, args=0x00007fffffffda40, nargs=2, globals=) at call.c:283:14 frame #291: 0x0000555555601eb6 runtest`_PyFunction_Vectorcall(func=, stack=, nargsf=, kwnames=) at call.c:410:20 frame #292: 0x000055555560269e runtest`object_vacall at abstract.h:127:11 frame #293: 0x0000555555602649 runtest`object_vacall [inlined] _PyObject_FastCall(nargs=2, args=0x00007fffffffda30, func=0x00007ffff7671190) at abstract.h:147 frame #294: 0x0000555555602646 runtest`object_vacall(base=0x0000000000000000, callable=0x00007ffff7671190, vargs=) at call.c:1186 frame #295: 0x00005555556029c5 runtest`_PyObject_CallMethodIdObjArgs(obj=0x0000000000000000, name=) at call.c:1244:24 frame #296: 0x000055555571b710 runtest`import_find_and_load(abs_name=0x00007ffff77ef580) at import.c:1697:11 frame #297: 0x000055555571f5ed runtest`PyImport_ImportModuleLevelObject(name=0x00007ffff77ef580, globals=, locals=, fromlist=0x00005555558d4380, level=0) at import.c:1797:15 frame #298: 0x00005555556e87ea runtest`import_name(tstate=0x000055555593f3c0, f=0x00005555559c8cc0, name=0x00007ffff77ef580, fromlist=0x00005555558d4380, level=0x00005555558faf80) at ceval.c:5163:15 frame #299: 0x00005555556f5f3b runtest`_PyEval_EvalFrameDefault(f=0x00005555559c8cc0, throwflag=) at ceval.c:2993:19 frame #300: 0x00005555556ec25a runtest`PyEval_EvalFrameEx(f=, throwflag=) at ceval.c:741:12 frame #301: 0x00005555556ecd40 runtest`_PyEval_EvalCodeWithName(_co=0x00007ffff78f5380, globals=, locals=, args=, argcount=0, kwnames=0x0000000000000000, kwargs=0x0000000000000000, kwcount=0, kwstep=2, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000, name=0x0000000000000000, qualname=0x0000000000000000) at ceval.c:4298:14 frame #302: 0x00005555556ecf38 runtest`PyEval_EvalCodeEx(_co=, globals=, locals=, args=, argcount=, kws=, kwcount=0, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000) at ceval.c:4327:12 frame #303: 0x00005555556ecf66 runtest`PyEval_EvalCode(co=, globals=, locals=) at ceval.c:718:12 frame #304: 0x00005555555bc7ff runtest`run_eval_code_obj(co=0x00007ffff78f5380, globals=0x00007ffff79374d0, locals=0x00007ffff79374d0) at pythonrun.c:1117:9 frame #305: 0x00005555555bcc12 runtest`run_mod(mod=, filename=, globals=0x00007ffff79374d0, locals=0x00007ffff79374d0, flags=, arena=) at pythonrun.c:1139:9 frame #306: 0x00005555555bef69 runtest`PyRun_StringFlags(str=, start=257, globals=0x00007ffff79374d0, locals=0x00007ffff79374d0, flags=0x0000000000000000) at pythonrun.c:1026:15 frame #307: 0x00005555555befcb runtest`PyRun_SimpleStringFlags(command="import unittest", flags=0x0000000000000000) at pythonrun.c:460:9 frame #308: 0x00005555555b574c runtest`main + 92 frame #309: 0x00007ffff7c6f002 libc.so.6`__libc_start_main + 242 frame #310: 0x00005555555b561e runtest`_start + 46 ---------- nosy: +stestagg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 19:32:43 2020 From: report at bugs.python.org (Steve Stagg) Date: Sat, 20 Jun 2020 23:32:43 +0000 Subject: [issue40965] Segfault when importing unittest module via C API In-Reply-To: <1592015395.95.0.70978961228.issue40965@roundup.psfhosted.org> Message-ID: <1592695963.74.0.345229087489.issue40965@roundup.psfhosted.org> Steve Stagg added the comment: Fix was here: a75e730075 bpo-40294: Fix _asyncio when module is loaded/unloaded multiple times (GH-19542) Backport commit was: 6b0ca0aeab04d7b7b54086248ca9d5e70f770f2f >From my end, the issue seems to be resovled on tag v.3.8.3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 19:58:31 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Jun 2020 23:58:31 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1592697511.07.0.724218523195.issue35975@roundup.psfhosted.org> Change by Guido van Rossum : ---------- pull_requests: +20193 pull_request: https://github.com/python/cpython/pull/21021 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 20:01:24 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 21 Jun 2020 00:01:24 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1592697684.46.0.0973572685307.issue35975@roundup.psfhosted.org> Change by Guido van Rossum : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 20:02:23 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 21 Jun 2020 00:02:23 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1592697743.77.0.0292914586871.issue35975@roundup.psfhosted.org> Guido van Rossum added the comment: I'm fixing it -- can you verify? I have no easy way to test this. DO you think we should also add a note to the docs that this was broken in 3.8.0-3? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 20:05:40 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 21 Jun 2020 00:05:40 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1592697940.62.0.533382638702.issue35975@roundup.psfhosted.org> Guido van Rossum added the comment: Hm, the backports have to be done manually, since the 3.8 parser and the 3.10 parser don't overlap, and 3.9 has both versions... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 20:19:32 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 21 Jun 2020 00:19:32 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1592698772.17.0.0130003063781.issue35975@roundup.psfhosted.org> Change by Guido van Rossum : ---------- pull_requests: +20194 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/21022 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 20:25:56 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 21 Jun 2020 00:25:56 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1592699156.38.0.342242442165.issue35975@roundup.psfhosted.org> Change by Guido van Rossum : ---------- pull_requests: +20195 pull_request: https://github.com/python/cpython/pull/21023 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 20:41:10 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 21 Jun 2020 00:41:10 +0000 Subject: [issue33927] Allow json.tool to have identical infile and outfile In-Reply-To: <1529577940.46.0.56676864532.issue33927@psf.upfronthosting.co.za> Message-ID: <1592700070.38.0.119357733236.issue33927@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- components: +Library (Lib) versions: +Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 20:43:19 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 21 Jun 2020 00:43:19 +0000 Subject: [issue35232] Add `module`/`qualname` arguments to make_dataclass for picklability In-Reply-To: <1542119446.33.0.788709270274.issue35232@psf.upfronthosting.co.za> Message-ID: <1592700199.56.0.781108286544.issue35232@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 20:43:53 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 21 Jun 2020 00:43:53 +0000 Subject: [issue35232] Add `module`/`qualname` arguments to make_dataclass for picklability In-Reply-To: <1542119446.33.0.788709270274.issue35232@psf.upfronthosting.co.za> Message-ID: <1592700233.3.0.413960386841.issue35232@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- versions: +Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 20:46:22 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 21 Jun 2020 00:46:22 +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: <1592700382.44.0.35556410142.issue39783@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 20:50:33 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 21 Jun 2020 00:50:33 +0000 Subject: [issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?) In-Reply-To: <1584138664.49.0.0727456636956.issue39960@roundup.psfhosted.org> Message-ID: <1592700633.8.0.41120636723.issue39960@roundup.psfhosted.org> Guido van Rossum added the comment: See also test_carloverre() in test_descr.py. I don't recall exactly what this was about, but that test is definitely relevant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 21:16:01 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 21 Jun 2020 01:16:01 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1592702161.04.0.142873372073.issue40939@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset d301d9473e9a9b78d6e6678e9fe5ef66d46084e1 by Lysandros Nikolaou in branch '3.9': [3.9] bpo-40939: Deprecate the PyParser_SimpleParse* functions (GH-21012) https://github.com/python/cpython/commit/d301d9473e9a9b78d6e6678e9fe5ef66d46084e1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 22:18:07 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 21 Jun 2020 02:18:07 +0000 Subject: [issue41060] `with a as b` segfault in new peg parser In-Reply-To: <1592688971.14.0.300854552931.issue41060@roundup.psfhosted.org> Message-ID: <1592705887.62.0.624817548897.issue41060@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 6c4e0bd974f2895d42b63d9d004587e74b286c88 by Lysandros Nikolaou in branch 'master': bpo-41060: Avoid SEGFAULT when calling GET_INVALID_TARGET in the grammar (GH-21020) https://github.com/python/cpython/commit/6c4e0bd974f2895d42b63d9d004587e74b286c88 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 22:28:44 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 21 Jun 2020 02:28:44 +0000 Subject: [issue41060] `with a as b` segfault in new peg parser In-Reply-To: <1592688971.14.0.300854552931.issue41060@roundup.psfhosted.org> Message-ID: <1592706524.56.0.900536084143.issue41060@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +20196 pull_request: https://github.com/python/cpython/pull/21024 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 22:30:45 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 21 Jun 2020 02:30:45 +0000 Subject: [issue41060] `with a as b` segfault in new peg parser In-Reply-To: <1592688971.14.0.300854552931.issue41060@roundup.psfhosted.org> Message-ID: <1592706645.46.0.403583961014.issue41060@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 22:47:28 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jun 2020 02:47:28 +0000 Subject: [issue41060] `with a as b` segfault in new peg parser In-Reply-To: <1592688971.14.0.300854552931.issue41060@roundup.psfhosted.org> Message-ID: <1592707648.79.0.546442868457.issue41060@roundup.psfhosted.org> miss-islington added the comment: New changeset 71bb921829c33c30b2e111e18948df8c2b6731e4 by Lysandros Nikolaou in branch '3.9': [3.9] bpo-41060: Avoid SEGFAULT when calling GET_INVALID_TARGET in the grammar (GH-21020) (GH-21024) https://github.com/python/cpython/commit/71bb921829c33c30b2e111e18948df8c2b6731e4 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 23:06:33 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 21 Jun 2020 03:06:33 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1592708793.48.0.599075038795.issue40939@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +20197 pull_request: https://github.com/python/cpython/pull/21025 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 23:17:54 2020 From: report at bugs.python.org (paul j3) Date: Sun, 21 Jun 2020 03:17:54 +0000 Subject: [issue41047] argparse: misbehavior when combining positionals and choices In-Reply-To: <1592619323.37.0.243911882097.issue41047@roundup.psfhosted.org> Message-ID: <1592709474.47.0.964910869548.issue41047@roundup.psfhosted.org> paul j3 added the comment: The error is raised in ._get_values with this section: # when nargs='*' on a positional, if there were no command-line # args, use the default if it is anything other than None elif (not arg_strings and action.nargs == ZERO_OR_MORE and not action.option_strings): if action.default is not None: value = action.default else: value = arg_strings self._check_value(action, value) An empty 'arg_strings' satisfies the nargs='*', so 'value' is set to that, and passed to _check_value. We could avoid this by setting the default to one of the valid choices, e.g. 'a'. But then the attribute would be that string, not a list with that string. I suspect this issue has come up before, since I don't this code has been changed in a long time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 23:22:12 2020 From: report at bugs.python.org (paul j3) Date: Sun, 21 Jun 2020 03:22:12 +0000 Subject: [issue41047] argparse: misbehavior when combining positionals and choices In-Reply-To: <1592619323.37.0.243911882097.issue41047@roundup.psfhosted.org> Message-ID: <1592709732.58.0.143311430954.issue41047@roundup.psfhosted.org> paul j3 added the comment: It is an old unresolved issue (which resurfaced a few months ago) https://bugs.python.org/issue9625 argparse: Problem with defaults for variable nargs when using choices ---------- resolution: -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 20 23:22:38 2020 From: report at bugs.python.org (paul j3) Date: Sun, 21 Jun 2020 03:22:38 +0000 Subject: [issue41047] argparse: misbehavior when combining positionals and choices In-Reply-To: <1592619323.37.0.243911882097.issue41047@roundup.psfhosted.org> Message-ID: <1592709758.19.0.860184973931.issue41047@roundup.psfhosted.org> Change by paul j3 : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 01:12:41 2020 From: report at bugs.python.org (sorrow) Date: Sun, 21 Jun 2020 05:12:41 +0000 Subject: [issue41035] zipfile.Path does not work properly with zip archives where paths start with / In-Reply-To: <1592568836.11.0.709805363189.issue41035@roundup.psfhosted.org> Message-ID: <1592716361.14.0.333417312334.issue41035@roundup.psfhosted.org> sorrow added the comment: >It seems you may have discovered a use-case that violates that expectation, a case where `/a.txt` is identical to `a.txt`. The thing is: it's not. >Can you tell me more about your use-case and why zipp.Path/zipfile.Path should support it? I received a .zip file and zipfile.Path in my code didn't work with it. I did some testing and discovered that id does not work properly with these archives. It cannot list the contents of such archive. >Is this behavior a result of a real-world example Yes, it is. >(please share details about the origin) I can't. First, the origin of this archive is not totally clear to me (and I do not want to investigate). And second, I'm under NDA. I provided minimal example where archive created with zipfile.ZipFile itself reproduces this behaviour. Just prerpend all paths with / an it does not work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 02:36:56 2020 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 21 Jun 2020 06:36:56 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1592721416.8.0.236839791187.issue35975@roundup.psfhosted.org> Stefan Behnel added the comment: PRs look good to me. Here is a test that fails for me with the master branch and works with your fixes. It has a slightly odd place in the subinterpreter tests, but I would argue that it's not entirely misplaced there. You would want to know when subinterpreters start rejecting valid code, wouldn't you? :) diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index 73e167a0b0..9bed8255e1 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -627,6 +627,24 @@ class SubinterpreterTest(unittest.TestCase): self.assertNotEqual(pickle.load(f), id(sys.modules)) self.assertNotEqual(pickle.load(f), id(builtins)) + def test_subinterps_recent_language_features(self): + r, w = os.pipe() + code = """if 1: + import pickle + with open({:d}, "wb") as f: + + @(lambda x:x) # Py 3.9 + def noop(x): return x + + a = (b := f'1{{2}}3') + noop('x') # Py3.8 (:=) / 3.6 (f'') + pickle.dump(dict(a=a, b=b), f) + """.format(w) + + with open(r, "rb") as f: + ret = support.run_in_subinterp(code) + self.assertEqual(ret, 0) + self.assertEqual(pickle.load(f), {'a': '123x', 'b': '123'}) + def test_mutate_exception(self): """ Exceptions saved in global module state get shared between diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 808483ebd7..468e25ff9e 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -3468,6 +3468,8 @@ run_in_subinterp(PyObject *self, PyObject *args) const char *code; int r; PyThreadState *substate, *mainstate; + /* only initialise 'cflags.cf_flags' to test backwards compatibility */ + PyCompilerFlags cflags = {0}; if (!PyArg_ParseTuple(args, "s:run_in_subinterp", &code)) @@ -3486,7 +3488,7 @@ run_in_subinterp(PyObject *self, PyObject *args) PyErr_SetString(PyExc_RuntimeError, "sub-interpreter creation failed"); return NULL; } - r = PyRun_SimpleString(code); + r = PyRun_SimpleStringFlags(code, &cflags); Py_EndInterpreter(substate); PyThreadState_Swap(mainstate); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 04:08:09 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Jun 2020 08:08:09 +0000 Subject: [issue41058] pdb reads source files using the locale encoding In-Reply-To: <1592675653.2.0.61878894167.issue41058@roundup.psfhosted.org> Message-ID: <1592726889.28.0.545307744756.issue41058@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 19fcffa92773e008e4f5efb80047420a0cfafeec by Serhiy Storchaka in branch 'master': bpo-41058: Use source file encoding in pdb.find_function(). (GH-21010) https://github.com/python/cpython/commit/19fcffa92773e008e4f5efb80047420a0cfafeec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 04:08:12 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jun 2020 08:08:12 +0000 Subject: [issue41058] pdb reads source files using the locale encoding In-Reply-To: <1592675653.2.0.61878894167.issue41058@roundup.psfhosted.org> Message-ID: <1592726892.14.0.010758134087.issue41058@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +20198 pull_request: https://github.com/python/cpython/pull/21026 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 04:08:19 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jun 2020 08:08:19 +0000 Subject: [issue41058] pdb reads source files using the locale encoding In-Reply-To: <1592675653.2.0.61878894167.issue41058@roundup.psfhosted.org> Message-ID: <1592726899.54.0.999173698276.issue41058@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20199 pull_request: https://github.com/python/cpython/pull/21027 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 04:11:21 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Jun 2020 08:11:21 +0000 Subject: [issue41055] Remove outdated tests for tp_print In-Reply-To: <1592674018.02.0.658996067478.issue41055@roundup.psfhosted.org> Message-ID: <1592727081.33.0.0613893693794.issue41055@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset f9bab74d5b34c64cf061e1629ff5f3092a4ca9b3 by Serhiy Storchaka in branch 'master': bpo-41055: Remove outdated tests for the tp_print slot. (GH-21006) https://github.com/python/cpython/commit/f9bab74d5b34c64cf061e1629ff5f3092a4ca9b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 04:12:28 2020 From: report at bugs.python.org (SBC King) Date: Sun, 21 Jun 2020 08:12:28 +0000 Subject: [issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line In-Reply-To: <1592400054.74.0.017392691783.issue41005@roundup.psfhosted.org> Message-ID: <1592727148.61.0.14915564371.issue41005@roundup.psfhosted.org> SBC King added the comment: yeah there is a bug as web browsers won't open when you launch them from python code please have a look at this issue posted on jupyternotebook github : https://github.com/jupyter/notebook/issues/3746 It was posted on the wrong place as it was not an issue with Jupiter but an issue with python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 04:52:57 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 21 Jun 2020 08:52:57 +0000 Subject: [issue41061] Incorrect expressions / assert with side effect in hashtable Message-ID: <1592729577.35.0.278051056824.issue41061@roundup.psfhosted.org> New submission from Christian Heimes : Coverity has found four issues in hashtable implementation and tests Py_hashtable_get_entry_generic(_Py_hashtable_t *ht, const void *key) CID 1464680 (#1 of 1): Evaluation order violation (EVALUATION_ORDER)write_write_typo: In entry = entry = (_Py_hashtable_entry_t *)((_Py_slist_t *)&ht->buckets[index])->head, entry is written twice with the same value. _Py_hashtable_get_entry_ptr(_Py_hashtable_t *ht, const void *key) CID 1464602 (#1 of 1): Evaluation order violation (EVALUATION_ORDER)write_write_typo: In entry = entry = (_Py_hashtable_entry_t *)((_Py_slist_t *)&ht->buckets[index])->head, entry is written twice with the same value. test_hashtable(PyObject *self, PyObject *Py_UNUSED(args)) CID 1464668 (#1 of 1): Side effect in assertion (ASSERT_SIDE_EFFECT)assignment_where_comparison_intended: Assignment entry->key = (void *)(uintptr_t)key has a side effect. This code will work differently in a non-debug build. CID 1464664 (#1 of 1): Side effect in assertion (ASSERT_SIDE_EFFECT)assignment_where_comparison_intended: Assignment entry->value = (void *)(uintptr_t)(1 + ((int)key - 97)) has a side effect. This code will work differently in a non-debug build. ---------- assignee: christian.heimes components: Interpreter Core messages: 371987 nosy: christian.heimes priority: normal severity: normal status: open title: Incorrect expressions / assert with side effect in hashtable type: compile error versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 04:53:48 2020 From: report at bugs.python.org (Andrei Pashkin) Date: Sun, 21 Jun 2020 08:53:48 +0000 Subject: [issue41062] Advanced Debugger Support C-API is useless without HEAD_LOCK()/HEAD_UNLOCK() Message-ID: <1592729628.06.0.446212297946.issue41062@roundup.psfhosted.org> New submission from Andrei Pashkin : To me it seems like Advanced Debugger Support C-API doesn't make sense without HEAD_LOCK() and HEAD_UNLOCK() which are private right now. When researching how C-API works I've found this comment in the source code: https://github.com/python/cpython/blob/e838a9324c1719bb917ca81ede8d766b5cb551f4/Python/pystate.c#L1176 It says that the lists of interpreter-state and thread-state objects (that Adv. Debugger Support API operates on) could be mutated even when GIL is held so there is need to acquire head mutex when accessing them. But there is no way to acquire head mutex using public C-API. Am I right? If yes - it seems like HEAD_(UN)LOCK() should be made public. ---------- components: C API messages: 371988 nosy: pashkin priority: normal severity: normal status: open title: Advanced Debugger Support C-API is useless without HEAD_LOCK()/HEAD_UNLOCK() 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 Sun Jun 21 04:58:57 2020 From: report at bugs.python.org (Andrei Pashkin) Date: Sun, 21 Jun 2020 08:58:57 +0000 Subject: [issue41062] Advanced Debugger Support C-API is useless without HEAD_LOCK()/HEAD_UNLOCK() In-Reply-To: <1592729628.06.0.446212297946.issue41062@roundup.psfhosted.org> Message-ID: <1592729937.1.0.287196516596.issue41062@roundup.psfhosted.org> Andrei Pashkin added the comment: Here is what I mean by "Advanced Debugger Support" API: https://docs.python.org/dev/c-api/init.html#advanced-debugger-support ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 04:59:17 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 21 Jun 2020 08:59:17 +0000 Subject: [issue41061] Incorrect expressions / assert with side effect in hashtable In-Reply-To: <1592729577.35.0.278051056824.issue41061@roundup.psfhosted.org> Message-ID: <1592729957.98.0.473804084327.issue41061@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +20200 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21028 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 05:01:29 2020 From: report at bugs.python.org (SilentGhost) Date: Sun, 21 Jun 2020 09:01:29 +0000 Subject: [issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line In-Reply-To: <1592400054.74.0.017392691783.issue41005@roundup.psfhosted.org> Message-ID: <1592730089.02.0.131889701453.issue41005@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 05:18:43 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 21 Jun 2020 09:18:43 +0000 Subject: [issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line In-Reply-To: <1592400054.74.0.017392691783.issue41005@roundup.psfhosted.org> Message-ID: <1592731123.56.0.526670214169.issue41005@roundup.psfhosted.org> Ronald Oussoren added the comment: I've commented on the attached PR. IMHO a correct fix is to catch and ignore PermissionError when calling xdg-settings (on all platforms). An xdg-settings executable that cannot be started due to permission problems is similar to that executable not being available at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 05:27:32 2020 From: report at bugs.python.org (SBC King) Date: Sun, 21 Jun 2020 09:27:32 +0000 Subject: [issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line In-Reply-To: <1592400054.74.0.017392691783.issue41005@roundup.psfhosted.org> Message-ID: <1592731652.76.0.0686451110601.issue41005@roundup.psfhosted.org> SBC King added the comment: yeah I've updated the pr please review ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 05:32:55 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Jun 2020 09:32:55 +0000 Subject: [issue41055] Remove outdated tests for tp_print In-Reply-To: <1592674018.02.0.658996067478.issue41055@roundup.psfhosted.org> Message-ID: <1592731975.45.0.87585311084.issue41055@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 05:44:05 2020 From: report at bugs.python.org (Antony Lee) Date: Sun, 21 Jun 2020 09:44: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: <1592732645.96.0.23387237641.issue39783@roundup.psfhosted.org> Change by Antony Lee : ---------- nosy: -Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 05:45:05 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 21 Jun 2020 09:45:05 +0000 Subject: [issue41052] Opt out serialization/deserialization for heap type In-Reply-To: <1592659049.98.0.596314769567.issue41052@roundup.psfhosted.org> Message-ID: <1592732705.77.0.0671942893703.issue41052@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 6989af0bc7ea1e9a1acea16794e6f723d7b44110 by Dong-hee Na in branch 'master': bpo-41052: Opt out serialization/deserialization for _random.Random (GH-21002) https://github.com/python/cpython/commit/6989af0bc7ea1e9a1acea16794e6f723d7b44110 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 05:58:01 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 21 Jun 2020 09:58:01 +0000 Subject: [issue41052] Opt out serialization/deserialization for heap type In-Reply-To: <1592659049.98.0.596314769567.issue41052@roundup.psfhosted.org> Message-ID: <1592733481.11.0.913089076255.issue41052@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +20201 pull_request: https://github.com/python/cpython/pull/21030 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 06:33:14 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 21 Jun 2020 10:33:14 +0000 Subject: [issue41052] Opt out serialization/deserialization for heap type In-Reply-To: <1592659049.98.0.596314769567.issue41052@roundup.psfhosted.org> Message-ID: <1592735594.16.0.523312272951.issue41052@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 814b07bf814a804f60b897d18f1dbb5578b2c7fd by Dong-hee Na in branch '3.9': [3.9] bpo-41052: Opt out serialization/deserialization for _random.Random (GH-21002). (GH-21030) https://github.com/python/cpython/commit/814b07bf814a804f60b897d18f1dbb5578b2c7fd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 07:04:15 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Jun 2020 11:04:15 +0000 Subject: [issue41063] Avoid using the locale encoding for open() in tests Message-ID: <1592737455.62.0.0102457706835.issue41063@roundup.psfhosted.org> New submission from Serhiy Storchaka : Many tests use open() with the locale encoding for writing or reading files. They are passed because the written and read data a ASCII, and file paths are ASCII. But they do not test the case of non-ASCII data and file paths. In general, most of uses of the locale encoding should be changed. 1. In some cases it is enough to open the file in binary mode. For example when create an empty file, or use just fileno of the opened file. 2. In some cases the file should be opened in binary mode. For example, when compile the content of the file or parse it as XML, because the correct encoding is determined by the content (BOM, encoding coockie, XML declaration). 3. tokenize.open() or tokenize.detect_encoding() should be used when we read a Python source as a text. 4. os.fsdecode() and os.fsencode() may be used if the test file contains file paths and is read by bash or other external program. 5. encoding='ascii' should be specified if the test data always ASCII-only. 6. encoding='utf-8' should be specified if the test data can contain arbitrary Unicode characters. 7. Encoding different from 'ascii', 'latin1' and 'utf-8' should be used if arbitrary encodings should be supported. 8. Implicit locale encoding should be only used if the test is purposed to test the implicit encoding. It is preferable to add non-ASCII characters in the test data. I am working on a large patch for this (>50% is ready). Some parts of it may be extracted as separate PRs, and the rest will be exposed as a large PR. If changes are required not only in tests. separate issues will be opened. ---------- components: Tests messages: 371994 nosy: inada.naoki, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Avoid using the locale encoding for open() in tests type: enhancement versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 07:07:17 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Jun 2020 11:07:17 +0000 Subject: [issue41063] Avoid using the locale encoding for open() in tests In-Reply-To: <1592737455.62.0.0102457706835.issue41063@roundup.psfhosted.org> Message-ID: <1592737637.25.0.970511529852.issue41063@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- dependencies: +Remove outdated tests for tp_print, pdb reads source files using the locale encoding, read_mime_types() should read the rule file using UTF-8, not the locale encoding _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 08:32:38 2020 From: report at bugs.python.org (JNCressey) Date: Sun, 21 Jun 2020 12:32:38 +0000 Subject: [issue41064] IDLE highlights wrong place when code has syntax error of ** unpacking dict in f-string Message-ID: <1592742758.57.0.680300455155.issue41064@roundup.psfhosted.org> New submission from JNCressey : Compare f"{*my_tuple}" with f"{**my_dict}". Both are syntax errors since you can't use unpacking here, but the bug is as follows: - For the tuple, IDLE highlights the asterisk and has the helpful message 'SyntaxError: can't use starred expression here', - But for the dictionary, the first few characters of your code are highlighted, regardless of where the syntax error is located, and the message only says 'SyntaxError: invalid syntax'. Bug occurs in both 3.8.3 and 3.7.7, I haven't tested it in 3.6 nor in-development versions. ---------- assignee: terry.reedy components: IDLE messages: 371995 nosy: JNCressey, terry.reedy priority: normal severity: normal status: open title: IDLE highlights wrong place when code has syntax error of ** unpacking dict in f-string type: compile error versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 08:39:22 2020 From: report at bugs.python.org (hai shi) Date: Sun, 21 Jun 2020 12:39:22 +0000 Subject: [issue1944] Document PyUnicode_* API In-Reply-To: <1201415203.65.0.272410099804.issue1944@psf.upfronthosting.co.za> Message-ID: <1592743162.14.0.637094318584.issue1944@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 08:57:09 2020 From: report at bugs.python.org (SilentGhost) Date: Sun, 21 Jun 2020 12:57:09 +0000 Subject: [issue41064] IDLE highlights wrong place when code has syntax error of ** unpacking dict in f-string In-Reply-To: <1592742758.57.0.680300455155.issue41064@roundup.psfhosted.org> Message-ID: <1592744229.21.0.788852952314.issue41064@roundup.psfhosted.org> Change by SilentGhost : ---------- type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 09:59:12 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Jun 2020 13:59:12 +0000 Subject: [issue41055] Remove outdated tests for tp_print In-Reply-To: <1592674018.02.0.658996067478.issue41055@roundup.psfhosted.org> Message-ID: <1592747952.89.0.425700626475.issue41055@roundup.psfhosted.org> Terry J. Reedy added the comment: Nice. I would have found the removed tests confusing. I presume tp_print had something to do with print as a statement. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 10:05:37 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 21 Jun 2020 14:05:37 +0000 Subject: [issue41065] Use zip-strict in zoneinfo Message-ID: <1592748337.97.0.906987974024.issue41065@roundup.psfhosted.org> New submission from Ram Rachum : Writing the PR now. ---------- components: Library (Lib) messages: 371997 nosy: brandtbucher, cool-RR priority: normal severity: normal status: open title: Use zip-strict in zoneinfo type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 10:07:54 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 21 Jun 2020 14:07:54 +0000 Subject: [issue41065] Use zip-strict in zoneinfo In-Reply-To: <1592748337.97.0.906987974024.issue41065@roundup.psfhosted.org> Message-ID: <1592748474.26.0.645941922802.issue41065@roundup.psfhosted.org> Change by Ram Rachum : ---------- keywords: +patch pull_requests: +20202 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21031 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 10:23:17 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 21 Jun 2020 14:23:17 +0000 Subject: [issue41035] zipfile.Path does not work properly with zip archives where paths start with / In-Reply-To: <1592568836.11.0.709805363189.issue41035@roundup.psfhosted.org> Message-ID: <1592749397.28.0.800952724116.issue41035@roundup.psfhosted.org> Jason R. Coombs added the comment: I created [jaraco/zipp#56](https://github.com/jaraco/zipp/issues/56) to track the issue in the backport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 11:29:00 2020 From: report at bugs.python.org (E. Paine) Date: Sun, 21 Jun 2020 15:29:00 +0000 Subject: [issue41064] Specialise syntax error of ** unpacking dict In-Reply-To: <1592742758.57.0.680300455155.issue41064@roundup.psfhosted.org> Message-ID: <1592753340.97.0.774931572382.issue41064@roundup.psfhosted.org> E. Paine added the comment: This isn't an IDLE issue and is instead due to the core interpreter. This isn't a bug, there just isn't a more specialised error message for the dictionary unpacking failure. Changing the error message to something more helpful would be an enhancement and therefore would not be back-ported to Python 3.9 and before. ---------- components: +Interpreter Core -IDLE nosy: +epaine title: IDLE highlights wrong place when code has syntax error of ** unpacking dict in f-string -> Specialise syntax error of ** unpacking dict type: behavior -> enhancement versions: +Python 3.10 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 11:37:03 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 21 Jun 2020 15:37:03 +0000 Subject: [issue41035] zipfile.Path does not work properly with zip archives where paths start with / In-Reply-To: <1592568836.11.0.709805363189.issue41035@roundup.psfhosted.org> Message-ID: <1592753823.28.0.574128161636.issue41035@roundup.psfhosted.org> Jason R. Coombs added the comment: >>It seems you may have discovered a use-case that violates that expectation, a case where `/a.txt` is identical to `a.txt`. > The thing is: it's not. I think maybe you misunderstood. I mean that the zipfile you have seems to be treating `/a.txt` as a file `a.txt` at the root of the zipfile, identical to another zipfile that has an item named `a.txt`. I'm not saying that zipfile.Path handles that situation; your example clearly contradicts that notion. > I provided minimal example where archive created with zipfile.ZipFile itself reproduces this behaviour. Just prerpend all paths with / an it does not work. Thank you. I'm grateful for the minimal example. What I'm trying to assess here is the impact - how common is this use-case and should it be supported. One option here might be to document the library as not supporting files whose names begin with a leading slash. Digging into [the spec](https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT), Section 4.4.17.1 explicitly states: > The path stored MUST NOT contain a drive or device letter, or a leading slash. It appears the file your client has sent and the minimal example you've generated represents an invalid zip file. In [this branch](https://github.com/jaraco/zipp/tree/bugfix/bpo-41035), I started exploring what it would take to support this format. Unfortunately, just patching the namelist was not enough. Supporting this change interacts with behaviors across a number of methods, so would add substantial complexity to the implementation. It becomes inelegant to manage the position in the file (`.at` property) when there's ambiguity about the underlying format. It opens up lots of questions, like: - should `at` include the leading slash? - should the class support zip files with mixed leading and non-leading slashes? - at what point does `Path` become aware of the format used? - are there emergent performance concerns? In other words, the design relies heavily on the assumption that there's one way to store a file and two ways to store a directory (explicitly and implicitly). Based on these findings, I'm disinclined to support the format in the canonical Path implementation. What I recommend is that you develop a subclass of zipfile.Path that supports the abnormal format, use that for your work, and publish it (perhaps here, perhaps as a library) for others with the same problem to use. If enough people report it having usefulness, then I'd definitely consider incorporating it into the library, either as a separate implementation or perhaps integrating it (especially if that can be done without substantially complicating the canonical implementation). Alternately, ask if the client can generate valid zip files. I'm eager to hear your thoughts in light of my work. Can we close this as invalid? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 12:22:19 2020 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Sun, 21 Jun 2020 16:22:19 +0000 Subject: [issue41066] Update documentation for Pathlib Message-ID: <1592756539.0.0.672795473082.issue41066@roundup.psfhosted.org> New submission from Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : The correspondence section between os, os.path vs pathlib is missing two entries. https://docs.python.org/3/library/pathlib.html#correspondence-to-tools-in-the-os-module 1. os.link vs path.link_to 2. os.path.listdir vs path.iterdir I think adding them would be a good addition. ---------- assignee: docs at python components: Documentation messages: 372001 nosy: docs at python, thatiparthy priority: normal severity: normal status: open title: Update documentation for Pathlib type: enhancement versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 12:28:03 2020 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Sun, 21 Jun 2020 16:28:03 +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: <1592756883.08.0.174112518371.issue40025@roundup.psfhosted.org> Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) added the comment: We can close this? ---------- nosy: +thatiparthy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 12:41:30 2020 From: report at bugs.python.org (sorrow) Date: Sun, 21 Jun 2020 16:41:30 +0000 Subject: [issue41035] zipfile.Path does not work properly with zip archives where paths start with / In-Reply-To: <1592568836.11.0.709805363189.issue41035@roundup.psfhosted.org> Message-ID: <1592757690.51.0.0254997174166.issue41035@roundup.psfhosted.org> sorrow added the comment: >how common is this use-case I don't know about that. I just know that I have to make my program work with these files. Asking the clients to stop using this (presumably incorrect) format (or the program that makes it) is not an option. >It appears the file your client has sent and the minimal example you've generated represents an invalid zip file. Well, I didn't know that. But it doesn't change the matter for me. >What I recommend is that you develop a subclass of zipfile.Path that supports the abnormal format, use that for your work, and publish it (perhaps here, perhaps as a library) for others with the same problem to use. I guess I'll have to go this way. >It opens up lots of questions, like: I'll share my considerations about how I see it should be implemented. >- should `at` include the leading slash? I think it doesn't matter, because `at` property is not part of `Path` public AP. Ideally, the files with leading slashes and without them should be treated exactly the same (as if they didn't have the leading slash). So, the only thing I'm concerned with is `at` argument of `Path.__init__`. It shouldn't require leading slash in any case. >- should the class support zip files with mixed leading and non-leading slashes? No, this is definitely an error and shouldn't work. >- at what point does `Path` become aware of the format used? When the class is created? >- are there emergent performance concerns? For me - no, there aren't. I don't know how this kind of questions is resolved in python community though. >Can we close this as invalid? I guess you can. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 12:43:54 2020 From: report at bugs.python.org (sorrow) Date: Sun, 21 Jun 2020 16:43:54 +0000 Subject: [issue41035] zipfile.Path does not work properly with zip archives where paths start with / In-Reply-To: <1592568836.11.0.709805363189.issue41035@roundup.psfhosted.org> Message-ID: <1592757834.93.0.419939791752.issue41035@roundup.psfhosted.org> sorrow added the comment: >`Path` public AP. API of course ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 12:45:48 2020 From: report at bugs.python.org (sorrow) Date: Sun, 21 Jun 2020 16:45:48 +0000 Subject: [issue41035] zipfile.Path does not work properly with zip archives where paths start with / In-Reply-To: <1592568836.11.0.709805363189.issue41035@roundup.psfhosted.org> Message-ID: <1592757948.92.0.544336957579.issue41035@roundup.psfhosted.org> sorrow added the comment: >When the class is created? I mean the class instance ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 13:01:58 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 21 Jun 2020 17:01:58 +0000 Subject: [issue41065] Use zip-strict in zoneinfo In-Reply-To: <1592748337.97.0.906987974024.issue41065@roundup.psfhosted.org> Message-ID: <1592758918.72.0.96118014545.issue41065@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 13:08:19 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 21 Jun 2020 17:08:19 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1592759299.83.0.370122410093.issue35975@roundup.psfhosted.org> Guido van Rossum added the comment: Okay, I will add that diff (I'll probably add async def to the set of features tested). Do you mind if I just incorporate it in my diff? I could add an acknowledgment in the commit message. Otherwise you could send a separate PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 13:23:51 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Jun 2020 17:23:51 +0000 Subject: [issue41064] f-string SyntaxError gives offset within fake line, other issues In-Reply-To: <1592742758.57.0.680300455155.issue41064@roundup.psfhosted.org> Message-ID: <1592760231.96.0.00944322549995.issue41064@roundup.psfhosted.org> Terry J. Reedy added the comment: IDLE highlights the location of a SyntaxError according to its .lineno and .offset attributes. For expressions within braces within f strings, the reported offset is respect to the expression augmented with surrounding ()s added, not the actual physical line. From my perspective as IDLE maintainer, I consider this undocumented 'feature' a design bug. Pablo, I know you did not do this, but you helped design and understand the new compiler. If we cannot change .offset to report the real offset, can we add a new attribute, .line_offset for 3.9 and 3.10? Does the new compiler know where within the line the expression starts? Are there any other cases where .offset is not the real offset with respect to the actual code? Or rather, are there other cases where the actual line is replaced with a constructed line? Is so, are confusing fake ()s always added, that make the replacement *not* a substring of the original? Are there any plans to add new cases like this? In the absence of compile providing the line offset, every IDE that marks errors in the actual line has to separately code a workaround. However, a change in 3.9 makes this harder. In 3.8, errors within fstring expressions were tagged with .filename ''. In 3.9, this is attribute is ''. The REPL in 3.7 (very soon security fixes only) and 3.8: >>> f'{*a}' File "", line 1 SyntaxError: can't use starred expression here >>> f'{**a}' File "", line 1 (**a) ^ SyntaxError: invalid syntax >>> f'{a a}' File "", line 1 (a a) ^ SyntaxError: invalid syntax The REPL in 3.9/3.10 with the new parser is more consistent. >>> f'{*a}' File "", line 1 (*a) # Does not ^ belong under *? See below. ^ SyntaxError: invalid syntax >>> f"{'abc' + *a}" File "", line 1 ('abc' + *a) # This was the same in 3.8. ^ SyntaxError: invalid syntax ---------- components: +IDLE nosy: +pablogsal -epaine title: Specialise syntax error of ** unpacking dict -> f-string SyntaxError gives offset within fake line, other issues type: enhancement -> behavior versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 13:24:30 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Jun 2020 17:24:30 +0000 Subject: [issue41064] f-string SyntaxError gives offset within fake line, other issues In-Reply-To: <1592742758.57.0.680300455155.issue41064@roundup.psfhosted.org> Message-ID: <1592760270.54.0.992501136918.issue41064@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 13:35:06 2020 From: report at bugs.python.org (David CARLIER) Date: Sun, 21 Jun 2020 17:35:06 +0000 Subject: [issue41067] Haiku build fix - posix module Message-ID: <1592760906.5.0.377880149054.issue41067@roundup.psfhosted.org> Change by David CARLIER : ---------- components: Extension Modules nosy: devnexen priority: normal pull_requests: 20203 severity: normal status: open title: Haiku build fix - posix module type: compile error versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 13:41:31 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 21 Jun 2020 17:41:31 +0000 Subject: [issue40814] Update typing module documentation based on PEP 585 In-Reply-To: <1590755313.42.0.558710518983.issue40814@roundup.psfhosted.org> Message-ID: <1592761291.28.0.56622436169.issue40814@roundup.psfhosted.org> Guido van Rossum added the comment: I don't think we should deprecate List etc. (PEP 585 specifically punts on the topic) but it's good to start mentioning list[t] etc. in the docs. Do you want to volunteer to write some docs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 13:46:22 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 21 Jun 2020 17:46:22 +0000 Subject: [issue39891] [difflib] Improve get_close_matches() to better match when casing of words are different In-Reply-To: <1583623675.84.0.678348320324.issue39891@roundup.psfhosted.org> Message-ID: <1592761582.37.0.498274329082.issue39891@roundup.psfhosted.org> R?mi Lapeyre added the comment: I fell like it's a bit weird to have a new function just for ignoring case, will a new function be required for every possible normalization like removing accents. One possible make the API handle those use cases would be to have a keyword-argument for this: >>> difflib.get_close_matches('apple', ['APPLE'], normalization=str.lower) ['APPLE'] Then it could work with other normalization too without requiring a new function every time: >>> difflib.get_close_matches('Remi', ['R?mi'], normalization=remove_a ccents) ['R?mi'] ---------- components: +Library (Lib) nosy: +remi.lapeyre versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 14:08:12 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 21 Jun 2020 18:08:12 +0000 Subject: [issue41064] f-string SyntaxError gives offset within fake line, other issues In-Reply-To: <1592742758.57.0.680300455155.issue41064@roundup.psfhosted.org> Message-ID: <1592762892.66.0.527030239257.issue41064@roundup.psfhosted.org> Change by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 14:16:32 2020 From: report at bugs.python.org (Ethan Furman) Date: Sun, 21 Jun 2020 18:16:32 +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: <1592763392.57.0.715243536486.issue40025@roundup.psfhosted.org> Ethan Furman added the comment: Not yet. I want to investigate the idea Ankesh Saha had some more. ---------- versions: +Python 3.10 -Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 14:57:18 2020 From: report at bugs.python.org (Ravi Teja P) Date: Sun, 21 Jun 2020 18:57:18 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1592765838.3.0.780269674124.issue41004@roundup.psfhosted.org> Change by Ravi Teja P : ---------- nosy: +rvteja92 nosy_count: 4.0 -> 5.0 pull_requests: +20204 pull_request: https://github.com/python/cpython/pull/21033 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 15:11:37 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jun 2020 19:11:37 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592766697.58.0.803370070376.issue41056@roundup.psfhosted.org> miss-islington added the comment: New changeset 10bf6e482328f622f4b2659e4ad5e3d88f57ba58 by Miss Islington (bot) in branch '3.8': bpo-41056: Fix a NULL pointer dereference on MemoryError within the ssl module. (GH-21009) https://github.com/python/cpython/commit/10bf6e482328f622f4b2659e4ad5e3d88f57ba58 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 15:11:44 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jun 2020 19:11:44 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592766704.49.0.128151997146.issue41056@roundup.psfhosted.org> miss-islington added the comment: New changeset fbf94af2af3c09493481b8559b84f6e9f0628c37 by Miss Islington (bot) in branch '3.9': bpo-41056: Fix a NULL pointer dereference on MemoryError within the ssl module. (GH-21009) https://github.com/python/cpython/commit/fbf94af2af3c09493481b8559b84f6e9f0628c37 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 15:21:47 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 21 Jun 2020 19:21:47 +0000 Subject: [issue41059] Large number of Coverity reports for parser.c In-Reply-To: <1592679391.13.0.913540149945.issue41059@roundup.psfhosted.org> Message-ID: <1592767307.17.0.124327909128.issue41059@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 15:25:40 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 21 Jun 2020 19:25:40 +0000 Subject: [issue41035] zipfile.Path does not work properly with zip archives where paths start with / In-Reply-To: <1592568836.11.0.709805363189.issue41035@roundup.psfhosted.org> Message-ID: <1592767540.56.0.668441648263.issue41035@roundup.psfhosted.org> Jason R. Coombs added the comment: Yes, I generally agree with your assessment. Let me know if you have any questions about the implementation as you're exploring a solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 15:26:04 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 21 Jun 2020 19:26:04 +0000 Subject: [issue41035] zipfile.Path does not work properly with zip archives where paths start with / In-Reply-To: <1592568836.11.0.709805363189.issue41035@roundup.psfhosted.org> Message-ID: <1592767564.66.0.0996527194748.issue41035@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 15:32:01 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 21 Jun 2020 19:32:01 +0000 Subject: [issue41067] Haiku build fix - posix module Message-ID: <1592767921.67.0.13070581176.issue41067@roundup.psfhosted.org> New submission from Gregory P. Smith : This type of change might make more sense to integrate into configure.ac and pyconfig.h.in. (does haiku use autoconf?) But even if not, lets not scatter haiku ifdef HAIKU references all over the codebase. Such ifdef's to redefine things should be lumped in a single maintainable spot in a given file, and if needed in multiple files they belong in a header. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 15:34:35 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jun 2020 19:34:35 +0000 Subject: [issue41058] pdb reads source files using the locale encoding In-Reply-To: <1592675653.2.0.61878894167.issue41058@roundup.psfhosted.org> Message-ID: <1592768075.5.0.300058260005.issue41058@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20205 pull_request: https://github.com/python/cpython/pull/21034 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 15:36:30 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jun 2020 19:36:30 +0000 Subject: [issue41058] pdb reads source files using the locale encoding In-Reply-To: <1592675653.2.0.61878894167.issue41058@roundup.psfhosted.org> Message-ID: <1592768190.74.0.418177359459.issue41058@roundup.psfhosted.org> miss-islington added the comment: New changeset 14195597b3a877209c20d00e0ec844234e624d13 by Miss Islington (bot) in branch '3.8': bpo-41058: Use source file encoding in pdb.find_function(). (GH-21010) https://github.com/python/cpython/commit/14195597b3a877209c20d00e0ec844234e624d13 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 15:52:09 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jun 2020 19:52:09 +0000 Subject: [issue41058] pdb reads source files using the locale encoding In-Reply-To: <1592675653.2.0.61878894167.issue41058@roundup.psfhosted.org> Message-ID: <1592769129.27.0.513911185665.issue41058@roundup.psfhosted.org> miss-islington added the comment: New changeset 26f6126b2aa116b5c613c104bde0bb5b791a0bfc by Miss Islington (bot) in branch '3.9': bpo-41058: Use source file encoding in pdb.find_function(). (GH-21010) https://github.com/python/cpython/commit/26f6126b2aa116b5c613c104bde0bb5b791a0bfc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 15:57:08 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 21 Jun 2020 19:57:08 +0000 Subject: [issue41058] pdb reads source files using the locale encoding In-Reply-To: <1592675653.2.0.61878894167.issue41058@roundup.psfhosted.org> Message-ID: <1592769428.72.0.2232935865.issue41058@roundup.psfhosted.org> Gregory P. Smith added the comment: The 3.7 PR is up to the release manager to decide on, it probably isn't worth merging there as this i not security related. thanks for the fix Serhiy! ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 15:57:18 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 21 Jun 2020 19:57:18 +0000 Subject: [issue41058] pdb reads source files using the locale encoding In-Reply-To: <1592675653.2.0.61878894167.issue41058@roundup.psfhosted.org> Message-ID: <1592769438.0.0.681980488606.issue41058@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 16:08:04 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Jun 2020 20:08:04 +0000 Subject: [issue41068] zipfile: read after write fails for non-ascii files Message-ID: <1592770084.24.0.0586983888963.issue41068@roundup.psfhosted.org> New submission from Serhiy Storchaka : When open a ZIP archive, write a file with non-ascii name in it, and, not closing the archive, read that file back, it fails: >>> import zipfile >>> with zipfile.ZipFile('test.zip', 'w') as zf: ... zf.writestr('??????', '') ... zf.read('??????') ... Traceback (most recent call last): File "", line 3, in File "/usr/lib/python3.8/zipfile.py", line 1440, in read with self.open(name, "r", pwd) as fp: File "/usr/lib/python3.8/zipfile.py", line 1521, in open raise BadZipFile( zipfile.BadZipFile: File name in directory '??????' and header b'\xd0\xb9\xd1\x86\xd1\x83\xd0\xba\xd0\xb5\xd0\xbd' differ. ---------- components: Library (Lib) messages: 372018 nosy: serhiy.storchaka priority: normal severity: normal status: open title: zipfile: read after write fails for non-ascii files type: behavior versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 16:23:38 2020 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 21 Jun 2020 20:23:38 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1592771018.3.0.159953107157.issue35975@roundup.psfhosted.org> Stefan Behnel added the comment: Feel free to use the patch in any way you like. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 16:40:53 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Jun 2020 20:40:53 +0000 Subject: [issue41068] zipfile: read after write fails for non-ascii files In-Reply-To: <1592770084.24.0.0586983888963.issue41068@roundup.psfhosted.org> Message-ID: <1592772053.75.0.472837093035.issue41068@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 16:55:07 2020 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 21 Jun 2020 20:55:07 +0000 Subject: [issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?) In-Reply-To: <1584138664.49.0.0727456636956.issue39960@roundup.psfhosted.org> Message-ID: <1592772907.42.0.551232229548.issue39960@roundup.psfhosted.org> Stefan Behnel added the comment: This SO answer by Martijn Pieters explains the background: https://stackoverflow.com/a/44854477 and links to the original python-dev discussion: https://mail.python.org/pipermail/python-dev/2003-April/034535.html The current implementation checks that the function being called is the one defined in the first non-heap type up the hierarchy. As long as heap types are only Python types, this is the first builtin/native/C-implemented (super)type. With extension types as heap types, however, it's no longer necessarily the type that defines the correct slot function. IMHO, Greg Ewing gives the right direction here: https://mail.python.org/pipermail/python-dev/2003-April/034569.html > Providing some way for objects to prevent superclass > methods from being called on them when they're not looking So, I think we should do something like walking up the hierarchy to find the C function in it that is currently being called, and then check if it's the one we would expect or if a subclass defines a different one. The current check does not bother to search and just assumes that it knows which (super)type defines the right function to call. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 17:17:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Jun 2020 21:17:29 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm In-Reply-To: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> Message-ID: <1592774249.5.0.486374125776.issue38377@roundup.psfhosted.org> STINNER Victor added the comment: Ok, macOS buildbots are back to green, I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 17:18:39 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Jun 2020 21:18:39 +0000 Subject: [issue41069] Use non-ascii file names in tests by default Message-ID: <1592774319.03.0.379358214671.issue41069@roundup.psfhosted.org> New submission from Serhiy Storchaka : The following PR increases coverage of tests by making some paths non-ascii: 1. test.support.TESTFN now contains non-ascii characters if possible. 2. The temporary directory used as current working directory in tests also contains non-ascii characters if possible. This helped to catch and fix one bug in zipfile and two bugs in handling PYTHONSTARTUP. ---------- components: Tests messages: 372022 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Use non-ascii file names in tests by default type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 17:23:43 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Jun 2020 21:23:43 +0000 Subject: [issue41069] Use non-ascii file names in tests by default In-Reply-To: <1592774319.03.0.379358214671.issue41069@roundup.psfhosted.org> Message-ID: <1592774623.79.0.9025941136.issue41069@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +20206 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21035 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 17:34:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Jun 2020 21:34:14 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1592775254.42.0.860233635858.issue40939@roundup.psfhosted.org> STINNER Victor added the comment: > bpo-40939: Remove the old parser (Part 2) (GH-21005) This change removes PyNode_Compile() which is part of the public C API. Would you mind to also deprecate it, as you did for PyParser_xxx() functions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 18:00:47 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 21 Jun 2020 22:00:47 +0000 Subject: [issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?) In-Reply-To: <1584138664.49.0.0727456636956.issue39960@roundup.psfhosted.org> Message-ID: <1592776847.06.0.322066536988.issue39960@roundup.psfhosted.org> Guido van Rossum added the comment: That sounds like the right thing to do. You should be able to recognize pure Python __setattr__ implementations by the presence of slot_tp_setattro in the tp_setattro slot. (Likewise for __delattr__.) It's been really long since I looked at this -- do we still only support single inheritance at the C level? Because otherwise there would be another backdoor. There's also tp_setattr (no 'o') but I think that's basically unused, and we ignored that in 2003 so we should be able to ignore it now. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 19:46:43 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 21 Jun 2020 23:46:43 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1592783203.83.0.837615296879.issue40939@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +20207 pull_request: https://github.com/python/cpython/pull/21036 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 19:47:50 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 21 Jun 2020 23:47:50 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1592783270.26.0.922524875718.issue40939@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 564cd187677ae8d1488c4d8ae649aea34ebbde07 by Lysandros Nikolaou in branch 'master': bpo-40939: Rename PyPegen* functions to PyParser* (GH-21016) https://github.com/python/cpython/commit/564cd187677ae8d1488c4d8ae649aea34ebbde07 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 19:49:04 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 21 Jun 2020 23:49:04 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1592783344.53.0.2765153615.issue40939@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Thanks Victor for the catch! I've opened a PR that deprecates PyNode_Compile in 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 20:07:49 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 00:07:49 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1592784469.04.0.0974825893438.issue40939@roundup.psfhosted.org> miss-islington added the comment: New changeset 8ae5e8ec8147e6434454e66953c25848b848711a by Lysandros Nikolaou in branch '3.9': [3.9] bpo-40939: Deprecate PyNode_Compile (GH-21036) https://github.com/python/cpython/commit/8ae5e8ec8147e6434454e66953c25848b848711a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 22:27:27 2020 From: report at bugs.python.org (Eryk Sun) Date: Mon, 22 Jun 2020 02:27:27 +0000 Subject: [issue41053] open() fails to read app exec links In-Reply-To: <1592666093.57.0.217193955367.issue41053@roundup.psfhosted.org> Message-ID: <1592792847.81.0.946589331875.issue41053@roundup.psfhosted.org> Eryk Sun added the comment: Where the POSIX specification uses the term "symbolic link" [1], it means one and only one type of symlink, not multiple types of symlink with divergent behavior depending on the context. To be consistent, only one type of Windows reparse point [2] is classified as a POSIX symlink, the one that's designed to behave like a POSIX symlink in the kernel and API: IO_REPARSE_TAG_SYMLINK. It's particularly important that given os.path.islink is true, then os.readlink and os.symlink can create an equivalent copy. This is only implemented for IO_REPARSE_TAG_SYMLINK. That said, Windows has a variety of filesystem link types, which it calls name-surrogate reparse points. Of this set, in most systems you're only likely to encounter IO_REPARSE_TAG_SYMLINK and IO_REPARSE_TAG_MOUNT_POINT. But Microsoft has a growing list of name-surrogate types, including: IO_REPARSE_TAG_IIS_CACHE, IO_REPARSE_TAG_GLOBAL_REPARSE (NPFS named-pipe symlink from server silo into host silo), IO_REPARSE_TAG_WCI_LINK and IO_REPARSE_TAG_WCI_TOMBSTONE (Windows container isolation), IO_REPARSE_TAG_PROJFS_TOMBSTONE (Projected filesystem tombstone, such as in VFS for Git), IO_REPARSE_TAG_LX_SYMLINK (WSL symlink created on a drvfs volume). In some cases these are used transparently behind the scenes (e.g. tombstones that mark deleted files), or there may be no handler for Windows callers (e.g. WSL symlinks are meaningless in Windows). Note that the latter list does not include IO_REPARSE_TAG_APPEXECLINK. Even though "LINK" is in the name, this reparse point type is not any kind of filesystem link in practice since it is not handled by the I/O manager or a filter driver in the kernel. As discussed in my first message, all of the intended behavior of an app-exec link is implemented instead by user-mode API functions such as CreateProcessW. In that respect, an app-exec link is more like a shell link (i.e. a LNK file), which gets handled by ShellExecuteExW. I wouldn't expect the standard library to handle LNK files as symlinks. --- The vast majority of registered reparse-point types are not link types (e.g. cloud files are dehydrated placeholder reparse points). The base Windows API has no special handling for the non-link cases. For example, MoveFileExW opens a non-link reparse point as a regular file. If it operated on the reparse point itself, like it does for a symbolic link, it would ignore the handler and potentially break something. This is why we can't even rename an app-exec link, since there's no handler for the reparse tag: >>> src = os.path.join(os.path.dirname(sys.executable), 'idle3.exe') >>> dst = os.path.join(os.path.dirname(sys.executable), 'spam3.exe') >>> try: os.rename(src, dst) ... except OSError as e: print('winerror:', e.winerror) ... winerror: 1920 --- The standard library is not limited to just IO_REPARSE_TAG_SYMLINK links. It supports the broader category of Windows name-surrogate links in certain cases. For example, os.lstat doesn't follow them; os.readlink supports symlinks and mountpoints [*]; os.unlink operates on symlinks and mountpoints; and shutil.rmtree doesn't traverse mountpoints (unlike the POSIX implementation). Caveat emptor regarding os.readlink, however. There are significant differences between symlinks and mountpoints. They're designed to behave like Unix symlinks and bind mountpoints, which have similar behavioral differences. Also, mountpoints are always evaluated on the server, so a remote mountpoint *must* be treated as opaque data [1]: The following reparse tags, with the exception of IO_REPARSE_TAG_SYMLINK, are processed on the server and are not processed by a client after transmission over the wire. Clients SHOULD treat associated reparse data as opaque data. --- [1] https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap03.html#tag_21_03_00_75 [2] https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/c8e77b37-3909-4fe6-a4ea-2b9d423b1ee4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 21 23:45:50 2020 From: report at bugs.python.org (Ravi Teja P) Date: Mon, 22 Jun 2020 03:45:50 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1592797550.71.0.460645177487.issue41004@roundup.psfhosted.org> Ravi Teja P added the comment: Hi I have raised a PR for this. But my PLA is yet to be updated (I have singed it). But add the fix to the existing versions (3.8, 3.9 and 3.10), do I need to raise PR for each of those branches? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 01:13:36 2020 From: report at bugs.python.org (Amir Mohamadi) Date: Mon, 22 Jun 2020 05:13:36 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1592802816.28.0.0339711417786.issue41004@roundup.psfhosted.org> Amir Mohamadi added the comment: No @rvteja92, you don't need open multiple PRs, only make your changes on master branch. for more informations read this: https://devguide.python.org/ And for the CLA sign it will take a while to be updated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 02:00:23 2020 From: report at bugs.python.org (Nikita Nemkin) Date: Mon, 22 Jun 2020 06:00:23 +0000 Subject: [issue41070] Simplify pyshellext.dll build Message-ID: <1592805623.25.0.00409293845235.issue41070@roundup.psfhosted.org> New submission from Nikita Nemkin : pyshellext uses MIDL to generate a header, whose only purpose is to define a class GUID. MIDL generation step can be replaced with a simple #define. This doesn't really matter for VS, but other build systems (CMake, probably Meson too) will benefit. pyshellext has separate .def files for debug and release builds. One .def file is sufficient, because LIBRARY statement is optional. Using __declspec(dllexport) isn't an option, because Windows headers misdeclare DllCanUnloadNow and DllGetClassObject... ---------- components: Windows messages: 372032 nosy: nnemkin, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Simplify pyshellext.dll build type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 02:02:19 2020 From: report at bugs.python.org (Nikita Nemkin) Date: Mon, 22 Jun 2020 06:02:19 +0000 Subject: [issue41070] Simplify pyshellext.dll build In-Reply-To: <1592805623.25.0.00409293845235.issue41070@roundup.psfhosted.org> Message-ID: <1592805739.09.0.519533202183.issue41070@roundup.psfhosted.org> Change by Nikita Nemkin : ---------- keywords: +patch pull_requests: +20209 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21037 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:01:18 2020 From: report at bugs.python.org (mike stern) Date: Mon, 22 Jun 2020 07:01:18 +0000 Subject: [issue41071] from an int to a float , why Message-ID: <1592809278.7.0.712153884721.issue41071@roundup.psfhosted.org> New submission from mike stern : please I would like to know why python changes an integer result in a division to a float even in the result is even like print(2 / 2) gives 2.0 instead of 2 or a = 2 / 2 print(a) ---------- components: Interpreter Core messages: 372033 nosy: rskiredj at hotmail.com priority: normal severity: normal status: open title: from an int to a float , why type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:07:55 2020 From: report at bugs.python.org (Nick Canfield) Date: Mon, 22 Jun 2020 07:07:55 +0000 Subject: [issue34553] Python Crashes when trying to access any date related fields in MailItem In-Reply-To: <1535701663.99.0.56676864532.issue34553@psf.upfronthosting.co.za> Message-ID: <1592809675.75.0.857456247717.issue34553@roundup.psfhosted.org> Nick Canfield added the comment: I'm having trouble with the .ReceivedTime breaking the program when I compile the .py script to an .exe using auto-py-to-exe. Here's where the error occurs underneath this try: statement try: received_year = str(email.ReceivedTime)[0:4] received_month = str(email.ReceivedTime)[5:7] received_day = str(email.ReceivedTime)[8:10] This works PERFECTLY well inside of my IDE (PyCharm), but once I've compiled it to .exe, it breaks here. I've updated pywin32 to the most up-to-date version (228) and also tried using 224 to see if it was a version issue (it wasn't). BUT!! Going through this, I FOUND THE BUG! When you compile to .exe with auto-py-to-exe, it does not include the package "win32timezone" which the .ReceivedTime portion needs to run correctly. All you have to do to fix this is include this at the top of your .py script before compiling to .exe: import win32timezone Let me know if this works for anyone else facing this issue! ---------- nosy: +Nick Canfield _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:14:19 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jun 2020 07:14:19 +0000 Subject: [issue41071] from an int to a float , why In-Reply-To: <1592809278.7.0.712153884721.issue41071@roundup.psfhosted.org> Message-ID: <1592810059.65.0.0683976778717.issue41071@roundup.psfhosted.org> Serhiy Storchaka added the comment: I cannot reproduce. 2 / 2 gives 1.0 to me. As for reasons for changing the division operator, read PEP 238. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:27:24 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 07:27:24 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592810844.38.0.683531842042.issue41056@roundup.psfhosted.org> miss-islington added the comment: New changeset 81328f30703bd7225e7e73aedb0994a7293ce190 by Gregory P. Smith in branch 'master': bpo-41056: Fix reference to deallocated stack in pathconfig (Coverity) (GH-21013) https://github.com/python/cpython/commit/81328f30703bd7225e7e73aedb0994a7293ce190 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:27:42 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 07:27:42 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592810862.15.0.288164316298.issue41056@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20210 pull_request: https://github.com/python/cpython/pull/21039 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:27:42 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jun 2020 07:27:42 +0000 Subject: [issue41068] zipfile: read after write fails for non-ascii files In-Reply-To: <1592770084.24.0.0586983888963.issue41068@roundup.psfhosted.org> Message-ID: <1592810862.49.0.629030240681.issue41068@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +20211 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21040 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:27:49 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 07:27:49 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592810869.59.0.491131905475.issue41056@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20212 pull_request: https://github.com/python/cpython/pull/21041 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:29:16 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jun 2020 07:29:16 +0000 Subject: [issue41069] Use non-ascii file names in tests by default In-Reply-To: <1592774319.03.0.379358214671.issue41069@roundup.psfhosted.org> Message-ID: <1592810956.91.0.51173663717.issue41069@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- dependencies: +zipfile: read after write fails for non-ascii files _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:30:58 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jun 2020 07:30:58 +0000 Subject: [issue41063] Avoid using the locale encoding for open() in tests In-Reply-To: <1592737455.62.0.0102457706835.issue41063@roundup.psfhosted.org> Message-ID: <1592811058.85.0.827362418063.issue41063@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- dependencies: +Use non-ascii file names in tests by default _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:32:29 2020 From: report at bugs.python.org (xcl) Date: Mon, 22 Jun 2020 07:32:29 +0000 Subject: [issue41072] Python Message-ID: <1592811149.94.0.354270357022.issue41072@roundup.psfhosted.org> Change by xcl <1318683902 at qq.com>: ---------- nosy: xcl priority: normal severity: normal status: open title: Python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:37:23 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jun 2020 07:37:23 +0000 Subject: [issue41072] Python Message-ID: <1592811443.09.0.915085913641.issue41072@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:39:39 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 07:39:39 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592811579.35.0.728479054638.issue41056@roundup.psfhosted.org> miss-islington added the comment: New changeset d780fa7931d8ce94994827232d7cca79b0be3bf1 by Gregory P. Smith in branch 'master': bpo-41056: Fix a possible MemoryError leak within zoneinfo. (GH-21007) https://github.com/python/cpython/commit/d780fa7931d8ce94994827232d7cca79b0be3bf1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:42:03 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 07:42:03 +0000 Subject: [issue41061] Incorrect expressions / assert with side effect in hashtable In-Reply-To: <1592729577.35.0.278051056824.issue41061@roundup.psfhosted.org> Message-ID: <1592811723.37.0.435068393048.issue41061@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20213 pull_request: https://github.com/python/cpython/pull/21042 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:41:52 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 07:41:52 +0000 Subject: [issue41061] Incorrect expressions / assert with side effect in hashtable In-Reply-To: <1592729577.35.0.278051056824.issue41061@roundup.psfhosted.org> Message-ID: <1592811712.56.0.437108442734.issue41061@roundup.psfhosted.org> miss-islington added the comment: New changeset 4901ea952691ad70aae21cfe04b6bd363b5a6aff by Christian Heimes in branch 'master': bpo-41061: Fix incorrect expressions in hashtable (GH-21028) https://github.com/python/cpython/commit/4901ea952691ad70aae21cfe04b6bd363b5a6aff ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:42:11 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jun 2020 07:42:11 +0000 Subject: [issue41040] Fix test_modulefinder In-Reply-To: <1592597202.88.0.995685925684.issue41040@roundup.psfhosted.org> Message-ID: <1592811731.93.0.566692907837.issue41040@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 Jun 22 03:43:39 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jun 2020 07:43:39 +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: <1592811819.41.0.241510913208.issue40824@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset cafe1b6e9d3594a34aba50e872d4198296ffaadf by Serhiy Storchaka in branch 'master': bpo-40824: Do not mask errors in __iter__ in "in" and the operator module. (GH-20537) https://github.com/python/cpython/commit/cafe1b6e9d3594a34aba50e872d4198296ffaadf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:43:45 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 07:43:45 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592811825.54.0.70149321772.issue41056@roundup.psfhosted.org> miss-islington added the comment: New changeset d5ee9b9940ba24120838b07061058afe931cfff1 by Miss Islington (bot) in branch '3.8': bpo-41056: Fix reference to deallocated stack in pathconfig (Coverity) (GH-21013) https://github.com/python/cpython/commit/d5ee9b9940ba24120838b07061058afe931cfff1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:43:49 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 07:43:49 +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: <1592811829.63.0.0529901892728.issue40824@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +20214 pull_request: https://github.com/python/cpython/pull/21043 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:44:01 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 07:44:01 +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: <1592811841.8.0.925156657114.issue40824@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20215 pull_request: https://github.com/python/cpython/pull/21044 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:44:16 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 07:44:16 +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: <1592811856.95.0.0674749929068.issue40824@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20217 pull_request: https://github.com/python/cpython/pull/21046 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:44:09 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 07:44:09 +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: <1592811849.42.0.610794064468.issue40824@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20216 pull_request: https://github.com/python/cpython/pull/21045 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:48:01 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 07:48:01 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592812081.4.0.328154682575.issue41056@roundup.psfhosted.org> miss-islington added the comment: New changeset 9fe5decf5f38ae247f4f354dee27e4bfbe8bc5f8 by Miss Islington (bot) in branch '3.9': bpo-41056: Fix reference to deallocated stack in pathconfig (Coverity) (GH-21013) https://github.com/python/cpython/commit/9fe5decf5f38ae247f4f354dee27e4bfbe8bc5f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 03:59:08 2020 From: report at bugs.python.org (xcl) Date: Mon, 22 Jun 2020 07:59:08 +0000 Subject: [issue41072] Python 3.8.3 passively introduced open source software contains CVE vulnerability Message-ID: <1592812748.09.0.71716339611.issue41072@roundup.psfhosted.org> New submission from xcl <1318683902 at qq.com>: Open source software introduced passively in Python 3.8.3? sqlite3(Documents involved sqlite3.dll)?involve CVE-2020-11656?CVE-2020-11655?CVE-2020-13630?CVE-2020-13871?CVE-2020-9327?CVE-2020-13434?CVE-2020-13435?CVE-2020-13631?CVE-2020-13632 zlib 1.2.3(Documents involved wininst-7.1.exe?wininst-6.0.exe?wininst-9.0.exe?wininst-8.0.exe?wininst-9.0-amd64.exe).involve CVE-2016-9841?CVE-2016-9843?CVE-2016-9840?CVE-2016-9842 zlib 1.2.5(Documents involved wininst-14.0.exe?wininst-14.0-amd64.exe).involve CVE-2016-9841?CVE-2016-9843?CVE-2016-9840?CVE-2016-9842 zlib 1.2.8(Documents involved wininst-10.0.exe?wininst-10.0-amd64.exe).involve CVE-2016-9841?CVE-2016-9843?CVE-2016-9840?CVE-2016-9842 bzip2 1.0.6(Documents involved _bz2.pyd).involve CVE-2016-9841?CVE-2016-9843?CVE-2016-9840?CVE-2016-9842 openssl 1.1.1d(Documents involved _psycopg.cp38-win_amd64.pyd?_openssl.cp38-win_amd64.pyd).involve CVE-2020-1967?CVE-2019-1551 openssl 1.1.1f(Documents involved libcrypto-1_1.dll?libssl-1_1.dll).involve CVE-2020-1967 Does the above vulnerability pose a security risk to products using python 3.8.3, or is there a fix ---------- resolution: not a bug -> status: closed -> open title: Python -> Python 3.8.3 passively introduced open source software contains CVE vulnerability type: -> security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 04:01:52 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 08:01:52 +0000 Subject: [issue41061] Incorrect expressions / assert with side effect in hashtable In-Reply-To: <1592729577.35.0.278051056824.issue41061@roundup.psfhosted.org> Message-ID: <1592812912.72.0.282639844098.issue41061@roundup.psfhosted.org> miss-islington added the comment: New changeset f19ed6b0c77ba3bdaa1d8c304a61f2fa90b5d6ac by Miss Islington (bot) in branch '3.9': bpo-41061: Fix incorrect expressions in hashtable (GH-21028) https://github.com/python/cpython/commit/f19ed6b0c77ba3bdaa1d8c304a61f2fa90b5d6ac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 04:21:06 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 08:21:06 +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: <1592814066.74.0.613608843488.issue40824@roundup.psfhosted.org> miss-islington added the comment: New changeset 353c4bab7d103cb66391a83f3c27cd75ae13a754 by Miss Islington (bot) in branch '3.9': bpo-40824: Do not mask errors in __iter__ in "in" and the operator module. (GH-20537) https://github.com/python/cpython/commit/353c4bab7d103cb66391a83f3c27cd75ae13a754 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 04:21:14 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 08:21:14 +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: <1592814074.65.0.541145582643.issue40824@roundup.psfhosted.org> miss-islington added the comment: New changeset b99824a8e14d94c3c5c29499a08fe70deb477d0c by Miss Islington (bot) in branch '3.8': bpo-40824: Do not mask errors in __iter__ in "in" and the operator module. (GH-20537) https://github.com/python/cpython/commit/b99824a8e14d94c3c5c29499a08fe70deb477d0c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 04:22:07 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jun 2020 08:22:07 +0000 Subject: [issue26407] csv.writer.writerows masks exceptions from __iter__ In-Reply-To: <1456144733.82.0.26880413097.issue26407@psf.upfronthosting.co.za> Message-ID: <1592814127.67.0.233296783048.issue26407@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset c88239f864a27f673c0f0a9e62d2488563f9d081 by Serhiy Storchaka in branch 'master': bpo-26407: Do not mask errors in csv. (GH-20536) https://github.com/python/cpython/commit/c88239f864a27f673c0f0a9e62d2488563f9d081 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 04:22:16 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 08:22:16 +0000 Subject: [issue26407] csv.writer.writerows masks exceptions from __iter__ In-Reply-To: <1456144733.82.0.26880413097.issue26407@psf.upfronthosting.co.za> Message-ID: <1592814136.0.0.170748016009.issue26407@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +20218 pull_request: https://github.com/python/cpython/pull/21047 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 04:24:20 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jun 2020 08:24:20 +0000 Subject: [issue41068] zipfile: read after write fails for non-ascii files In-Reply-To: <1592770084.24.0.0586983888963.issue41068@roundup.psfhosted.org> Message-ID: <1592814260.42.0.832187771598.issue41068@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 36ff513f82e372ed3cea0bf7cbdf15a1ef6dab9e by Serhiy Storchaka in branch 'master': bpo-41068: Fix read after write in zipfile for non-ASCII files names. (GH-21040) https://github.com/python/cpython/commit/36ff513f82e372ed3cea0bf7cbdf15a1ef6dab9e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 04:24:30 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 08:24:30 +0000 Subject: [issue41068] zipfile: read after write fails for non-ascii files In-Reply-To: <1592770084.24.0.0586983888963.issue41068@roundup.psfhosted.org> Message-ID: <1592814270.49.0.433460208547.issue41068@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +20219 pull_request: https://github.com/python/cpython/pull/21048 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 04:24:37 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 08:24:37 +0000 Subject: [issue41068] zipfile: read after write fails for non-ascii files In-Reply-To: <1592770084.24.0.0586983888963.issue41068@roundup.psfhosted.org> Message-ID: <1592814277.39.0.230875963257.issue41068@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20220 pull_request: https://github.com/python/cpython/pull/21049 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 04:26:37 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 08:26:37 +0000 Subject: [issue41068] zipfile: read after write fails for non-ascii files In-Reply-To: <1592770084.24.0.0586983888963.issue41068@roundup.psfhosted.org> Message-ID: <1592814397.67.0.592916874282.issue41068@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20221 pull_request: https://github.com/python/cpython/pull/21050 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 04:27:18 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 22 Jun 2020 08:27:18 +0000 Subject: [issue33738] PyIndex_Check conflicts with PEP 384 In-Reply-To: <1527873299.01.0.81473610881.issue33738@psf.upfronthosting.co.za> Message-ID: <1592814438.19.0.964354920539.issue33738@roundup.psfhosted.org> Ned Deily added the comment: @serhiy, @Christian: Is there anything more needed to be done for this issue or can we close it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 04:38:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 08:38:14 +0000 Subject: [issue41073] [C API] PyType_GetSlot() should accept static types Message-ID: <1592815094.33.0.264745776024.issue41073@roundup.psfhosted.org> New submission from STINNER Victor : To fix bpo-40170, I would like to modify Py_TRASHCAN_BEGIN() macro to use PyType_GetSlot() to get the deallocator function, rather than accessing directly the PyTypeObject.tp_dealloc member. The problem is that currently PyType_GetSlot() only works on heap allocated types. Would it be possible to add support for statically allocated types to PyType_GetSlot()? Py_TRASHCAN_BEGIN() is currently defined as: #define Py_TRASHCAN_BEGIN(op, dealloc) \ Py_TRASHCAN_BEGIN_CONDITION(op, \ Py_TYPE(op)->tp_dealloc == (destructor)(dealloc)) ---------- components: C API messages: 372049 nosy: vstinner priority: normal severity: normal status: open title: [C API] PyType_GetSlot() should accept static types versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 04:39:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 08:39:12 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1592815152.94.0.0966848336498.issue40170@roundup.psfhosted.org> STINNER Victor added the comment: > Py_TRASHCAN_BEGIN() access directly PyTypeObject.tp_dealloc (...) currently, PyType_GetSlot() can only be used on a heap allocated types I created bpo-41073: [C API] PyType_GetSlot() should accept static types. ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 04:40:18 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 08:40:18 +0000 Subject: [issue41068] zipfile: read after write fails for non-ascii files In-Reply-To: <1592770084.24.0.0586983888963.issue41068@roundup.psfhosted.org> Message-ID: <1592815218.12.0.683215975937.issue41068@roundup.psfhosted.org> miss-islington added the comment: New changeset d7f37d1ed4fd38555e3e5aad32d515c96b528df5 by Miss Islington (bot) in branch '3.8': bpo-41068: Fix read after write in zipfile for non-ASCII files names. (GH-21040) https://github.com/python/cpython/commit/d7f37d1ed4fd38555e3e5aad32d515c96b528df5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 04:40:59 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 08:40:59 +0000 Subject: [issue26407] csv.writer.writerows masks exceptions from __iter__ In-Reply-To: <1456144733.82.0.26880413097.issue26407@psf.upfronthosting.co.za> Message-ID: <1592815259.52.0.358220573774.issue26407@roundup.psfhosted.org> miss-islington added the comment: New changeset 5606d555b6e797625be9b0368472a86d8ad5252e by Miss Islington (bot) in branch '3.9': bpo-26407: Do not mask errors in csv. (GH-20536) https://github.com/python/cpython/commit/5606d555b6e797625be9b0368472a86d8ad5252e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 04:46:15 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 08:46:15 +0000 Subject: [issue41068] zipfile: read after write fails for non-ascii files In-Reply-To: <1592770084.24.0.0586983888963.issue41068@roundup.psfhosted.org> Message-ID: <1592815575.15.0.352642542556.issue41068@roundup.psfhosted.org> miss-islington added the comment: New changeset c916c48afc02c26a50843c7b381a2b567bb72e46 by Miss Islington (bot) in branch '3.9': bpo-41068: Fix read after write in zipfile for non-ASCII files names. (GH-21040) https://github.com/python/cpython/commit/c916c48afc02c26a50843c7b381a2b567bb72e46 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:04:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:04:46 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1592816686.27.0.813508552993.issue40170@roundup.psfhosted.org> STINNER Victor added the comment: PyIter_Check() and PySequence_ITEM() macros access directly PyTypeObject members and must be converted to opaque functions: #define PyIter_Check(obj) \ (Py_TYPE(obj)->tp_iternext != NULL && \ Py_TYPE(obj)->tp_iternext != &_PyObject_NextNotImplemented) #define PySequence_ITEM(o, i)\ ( Py_TYPE(o)->tp_as_sequence->sq_item(o, i) ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:06:14 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 22 Jun 2020 09:06:14 +0000 Subject: [issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line In-Reply-To: <1592400054.74.0.017392691783.issue41005@roundup.psfhosted.org> Message-ID: <1592816774.43.0.0620617505319.issue41005@roundup.psfhosted.org> Ronald Oussoren added the comment: New changeset 9e27bc0c1efc7478872f98729f87886e9333548f by Krishna Chivukula in branch 'master': bpo-41005: Fixed perrmission error (GH-20936) https://github.com/python/cpython/commit/9e27bc0c1efc7478872f98729f87886e9333548f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:06:28 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 09:06:28 +0000 Subject: [issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line In-Reply-To: <1592400054.74.0.017392691783.issue41005@roundup.psfhosted.org> Message-ID: <1592816788.7.0.227818805143.issue41005@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20223 pull_request: https://github.com/python/cpython/pull/21052 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:06:21 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jun 2020 09:06:21 +0000 Subject: [issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line In-Reply-To: <1592400054.74.0.017392691783.issue41005@roundup.psfhosted.org> Message-ID: <1592816781.03.0.868897856892.issue41005@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +20222 pull_request: https://github.com/python/cpython/pull/21051 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:10:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:10:40 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1592817040.04.0.21076850736.issue40170@roundup.psfhosted.org> STINNER Victor added the comment: > PyIter_Check() and PySequence_ITEM() macros access directly PyTypeObject members and must be converted to opaque functions: (...) PyIter_Check() and PySequence_ITEM() are declared as functions in the limited C API, but overriden with macros in the CPython C API. I suggest to simply remove the macros to always declare them as functions. See bpo-33738 "PyIndex_Check conflicts with PEP 384" which added the functions. See also Tools/scripts/pep384_macrocheck.py script. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:12:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:12:20 +0000 Subject: [issue33738] PyIndex_Check conflicts with PEP 384 In-Reply-To: <1527873299.01.0.81473610881.issue33738@psf.upfronthosting.co.za> Message-ID: <1592817140.64.0.951564107358.issue33738@roundup.psfhosted.org> STINNER Victor added the comment: Ned: > @serhiy, @Christian: Is there anything more needed to be done for this issue or can we close it? The issue is fixed in Python 3.8, I close it. See also bpo-40170 "[C API] Make PyTypeObject structure an opaque structure in the public C API" which goes further. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:14:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:14:47 +0000 Subject: [issue38116] Make select module PEP-384 compatible In-Reply-To: <1568213295.38.0.552886185542.issue38116@roundup.psfhosted.org> Message-ID: <1592817287.53.0.362590892905.issue38116@roundup.psfhosted.org> STINNER Victor added the comment: > PR 15971 is merged, what else is needed @dino.viehland? Nothing, I close the issue. ---------- nosy: +vstinner resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:15:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:15:00 +0000 Subject: [issue38073] Make pwd module PEP-384 compatible In-Reply-To: <1568042155.96.0.920833676792.issue38073@roundup.psfhosted.org> Message-ID: <1592817300.44.0.00746795264163.issue38073@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:18:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:18:50 +0000 Subject: [issue15654] PEP 384 Refactoring applied to bz2 module In-Reply-To: <1344970058.86.0.178955604138.issue15654@psf.upfronthosting.co.za> Message-ID: <1592817530.65.0.333937825861.issue15654@roundup.psfhosted.org> STINNER Victor added the comment: Issue fixed by these two changes. commit 5d38517aa1836542a5417b724c093bcb245f0f47 Author: Hai Shi Date: Tue Feb 18 19:17:39 2020 +0800 bpo-1635741: Port _bz2 extension module to multiphase initialization(PEP 489) (GH-18050) commit ec689187957cc80af56b9a63251bbc295bafd781 Author: Dong-hee Na Date: Sat Jun 20 00:56:13 2020 +0900 bpo-40077: Convert _bz2 module to use PyType_FromSpec (GH-20960) ---------- nosy: +corona10, shihai1991, vstinner resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.10 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:20:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:20:19 +0000 Subject: [issue15655] PEP 384 Refactoring applied to json module In-Reply-To: <1344970398.16.0.223655068768.issue15655@psf.upfronthosting.co.za> Message-ID: <1592817619.68.0.2863710824.issue15655@roundup.psfhosted.org> STINNER Victor added the comment: Issue fixed in Python 3.9 with: commit 33f15a16d40cb8010a8c758952cbf88d7912ee2d Author: Dong-hee Na Date: Fri Mar 27 19:59:59 2020 +0900 bpo-40077: Convert _json module to use PyType_FromSpec() (GH-19177) Replace statically allocated types with heap allocated types: use PyType_FromSpec(). Add a module state to store the Scanner and Encoder types. Add traverse, clear and free functions to the module. ---------- nosy: +corona10, vstinner resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.9 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:21:01 2020 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 22 Jun 2020 09:21:01 +0000 Subject: [issue15655] PEP 384 Refactoring applied to json module In-Reply-To: <1344970398.16.0.223655068768.issue15655@psf.upfronthosting.co.za> Message-ID: <1592817661.52.0.238635206146.issue15655@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- nosy: -pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:22:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:22:23 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1592817743.23.0.129097684694.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: See also the 48 open issues with "pep3121" keyword: https://bugs.python.org/issue?%40search_text=&ignore=file%3Acontent&title=&%40columns=title&id=&%40columns=id&stage=&creation=&creator=&activity=&%40columns=activity&%40sort=activity&actor=&nosy=&type=&components=&versions=&dependencies=&assignee=&keywords=13&priority=&status=1&%40columns=status&resolution=&nosy_count=&message_count=&%40group=&%40pagesize=50&%40startwith=0&%40sortdir=on&%40queryname=&%40old-queryname=&%40action=search (yeah enjoy the ugly Roundup URL...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:22:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:22:55 +0000 Subject: [issue15688] PEP 3121 Refactoring applied to nis module In-Reply-To: <1345108030.82.0.709168426802.issue15688@psf.upfronthosting.co.za> Message-ID: <1592817775.39.0.0684389557883.issue15688@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by: commit ddef3bdc7b254a7e1129a52c17d79cb7c73a88f5 Author: Dong-hee Na Date: Fri Jun 12 11:26:00 2020 +0900 bpo-40950: Port nis module to multiphase initialization (GH-20811) ---------- nosy: +vstinner resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:23:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:23:50 +0000 Subject: [issue15691] PEP 3121, 384 Refactoring applied to posix module In-Reply-To: <1345110485.53.0.856598198463.issue15691@psf.upfronthosting.co.za> Message-ID: <1592817830.86.0.702773639994.issue15691@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by: commit 1c2fa781560608aa4be50c748d4b3f403cfa5035 Author: Victor Stinner Date: Sun May 10 11:05:29 2020 +0200 bpo-40549: Convert posixmodule.c to multiphase init (GH-19982) Convert posixmodule.c ("posix" or "nt" module) to the multiphase initialization (PEP 489). * Create the module using PyModuleDef_Init(). * Create ScandirIteratorType and DirEntryType with the new PyType_FromModuleAndSpec() (PEP 573) * Get the module state from ScandirIteratorType and DirEntryType with the new PyType_GetModule() (PEP 573) * Pass module to functions which access the module state. * convert_sched_param() gets a new module parameter. It is now called directly since Argument Clinic doesn't support passing the module to an argument converter callback. * Remove _posixstate_global macro. ---------- nosy: +vstinner resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:25:15 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:25:15 +0000 Subject: [issue15690] PEP 3121, 384 Refactoring applied to parser module In-Reply-To: <1345108967.12.0.878524641332.issue15690@psf.upfronthosting.co.za> Message-ID: <1592817915.46.0.251497938631.issue15690@roundup.psfhosted.org> STINNER Victor added the comment: The parser module was removed in Python 3.10 (PEP 617). ---------- nosy: +vstinner resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.10 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:25:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:25:50 +0000 Subject: [issue15685] PEP 3121, 384 Refactoring applied to itertools module In-Reply-To: <1345107130.15.0.109791509014.issue15685@psf.upfronthosting.co.za> Message-ID: <1592817950.56.0.283940948175.issue15685@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by: commit 514c469719f149e1722a91a9d0c63bf89dfefb2a Author: Dong-hee Na Date: Wed Mar 18 02:46:24 2020 +0900 bpo-1635741: Port itertools module to multiphase initialization (GH-19044) ---------- nosy: +corona10, vstinner resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:25:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:25:54 +0000 Subject: [issue15685] PEP 3121, 384 Refactoring applied to itertools module In-Reply-To: <1345107130.15.0.109791509014.issue15685@psf.upfronthosting.co.za> Message-ID: <1592817954.8.0.444165550204.issue15685@roundup.psfhosted.org> Change by STINNER Victor : ---------- versions: +Python 3.10 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:26:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:26:32 +0000 Subject: [issue15687] PEP 3121, 384 Refactoring applied to mmap module In-Reply-To: <1345107854.44.0.304444585248.issue15687@psf.upfronthosting.co.za> Message-ID: <1592817992.33.0.804317443153.issue15687@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by: commit 3ad52e366fea37b02a3f619e6b7cffa7dfbdfa2e Author: Dong-hee Na Date: Sat Jun 6 00:01:02 2020 +0900 bpo-1635741: Port mmap module to multiphase initialization (GH-19459) ---------- nosy: +corona10, vstinner resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.10 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:27:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:27:02 +0000 Subject: [issue15689] PEP 3121, 384 Refactoring applied to operator module In-Reply-To: <1345108270.08.0.792336890272.issue15689@psf.upfronthosting.co.za> Message-ID: <1592818022.53.0.348313990579.issue15689@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by: commit f3d5ac47720045a72f7ef5af13046d9531e6007b Author: Paulo Henrique Silva Date: Tue Mar 24 23:18:47 2020 -0300 bpo-1635741: Port operator module to multiphase initialization (PEP 489) (GH-19150) ---------- nosy: +vstinner resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.10 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:27:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:27:46 +0000 Subject: [issue15700] PEP 3121, 384 Refactoring applied to resource module In-Reply-To: <1345147675.99.0.556449209112.issue15700@psf.upfronthosting.co.za> Message-ID: <1592818066.17.0.380859777923.issue15700@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by: commit 45f7008a66a30cdf749ec03e580bd2692be9a8df Author: Hai Shi Date: Thu Apr 2 20:35:08 2020 +0800 bpo-1635741: Port resource extension module to multiphase initialization (PEP 489) (GH-19252) Fix also reference leaks on error. ---------- nosy: +shihai1991, vstinner resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.10 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:28:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:28:51 +0000 Subject: [issue38116] Make select module PEP-384 compatible In-Reply-To: <1568213295.38.0.552886185542.issue38116@roundup.psfhosted.org> Message-ID: <1592818131.86.0.885893766412.issue38116@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-15703 as a duplicate of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:28:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:28:36 +0000 Subject: [issue15703] PEP 3121, 384 Refactoring applied to select module In-Reply-To: <1345150869.96.0.605458116599.issue15703@psf.upfronthosting.co.za> Message-ID: <1592818116.07.0.215168298038.issue15703@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by: New changeset f919054e539a5c1afde1b31c9fd7a8f5b2313311 by Dino Viehland in branch 'master': bpo-38116: Convert select module to PEP-384 (#15971) https://github.com/python/cpython/commit/f919054e539a5c1afde1b31c9fd7a8f5b2313311 I mark this issue as a duplicate of bpo-38116. ---------- nosy: +vstinner resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Make select module PEP-384 compatible _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:30:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:30:02 +0000 Subject: [issue15849] PEP 3121, 384 Refactoring applied to xx module In-Reply-To: <1346596353.57.0.974507844943.issue15849@psf.upfronthosting.co.za> Message-ID: <1592818202.59.0.379592105495.issue15849@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by: commit d5cacbb1d9c3edc02bf0ba01702e7c06da5bc318 Author: Nick Coghlan Date: Sat May 23 22:24:10 2015 +1000 PEP 489: Multi-phase extension module initialization Known limitations of the current implementation: - documentation changes are incomplete - there's a reference leak I haven't tracked down yet The leak is most visible by running: ./python -m test -R3:3 test_importlib However, you can also see it by running: ./python -X showrefcount Importing the array or _testmultiphase modules, and then deleting them from both sys.modules and the local namespace shows significant increases in the total number of active references each cycle. By contrast, with _testcapi (which continues to use single-phase initialisation) the global refcounts stabilise after a couple of cycles. ---------- nosy: +vstinner resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:31:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:31:45 +0000 Subject: [issue15849] PEP 3121, 384 Refactoring applied to xx module In-Reply-To: <1346596353.57.0.974507844943.issue15849@psf.upfronthosting.co.za> Message-ID: <1592818305.6.0.270824257461.issue15849@roundup.psfhosted.org> STINNER Victor added the comment: Hum, I reopen the issue: the xx module still defines types statically and so the "PEP 384" part of this issue is not fixed yet. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:33:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:33:12 +0000 Subject: [issue40077] Convert static types to PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1592818392.43.0.856823136994.issue40077@roundup.psfhosted.org> STINNER Victor added the comment: Search also for issues with "384" in their title (34 open issues): https://bugs.python.org/issue?%40search_text=&ignore=file%3Acontent&title=384&%40columns=title&id=&%40columns=id&stage=&creation=&creator=&activity=&%40columns=activity&%40sort=activity&actor=&nosy=&type=&components=&versions=&dependencies=&assignee=&keywords=&priority=&status=1&%40columns=status&resolution=&nosy_count=&message_count=&%40group=&%40pagesize=50&%40startwith=0&%40sortdir=on&%40queryname=&%40old-queryname=&%40action=search Search for issues with pep3121 keyword (40 open issues): https://bugs.python.org/issue?%40search_text=&ignore=file%3Acontent&title=&%40columns=title&id=&%40columns=id&stage=&creation=&creator=&activity=&%40columns=activity&%40sort=activity&actor=&nosy=&type=&components=&versions=&dependencies=&assignee=&keywords=13&priority=&status=1&%40columns=status&resolution=&nosy_count=&message_count=&%40group=&%40pagesize=50&%40startwith=0&%40sortdir=on&%40queryname=&%40old-queryname=&%40action=search ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:33:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:33:27 +0000 Subject: [issue40077] Convert static types to PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1592818407.45.0.345319527235.issue40077@roundup.psfhosted.org> STINNER Victor added the comment: For example, see bpo-15849 for the xx module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:33:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:33:41 +0000 Subject: [issue15849] PEP 3121, 384 Refactoring applied to xx module In-Reply-To: <1346596353.57.0.974507844943.issue15849@psf.upfronthosting.co.za> Message-ID: <1592818421.81.0.0112088857336.issue15849@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 Jun 22 05:34:31 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jun 2020 09:34:31 +0000 Subject: [issue41068] zipfile: read after write fails for non-ascii files In-Reply-To: <1592770084.24.0.0586983888963.issue41068@roundup.psfhosted.org> Message-ID: <1592818471.13.0.107227840296.issue41068@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 Jun 22 05:35:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:35:00 +0000 Subject: [issue40077] Convert static types to PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1592818500.28.0.0500495477706.issue40077@roundup.psfhosted.org> STINNER Victor added the comment: See meta bpo-15787 "PEP 3121, 384 Refactoring" which tracks all these issues as dependencies. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:35:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:35:12 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1592818512.09.0.627317536316.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: See meta bpo-15787 "PEP 3121, 384 Refactoring" which tracks all these issues as dependencies. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:35:14 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jun 2020 09:35:14 +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: <1592818514.86.0.795748451001.issue40824@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 Jun 22 05:36:05 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:36:05 +0000 Subject: [issue15711] PEP 3121, 384 Refactoring applied to time module In-Reply-To: <1345152968.9.0.714502729899.issue15711@psf.upfronthosting.co.za> Message-ID: <1592818565.24.0.253709662539.issue15711@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by: commit bd409bb5b78e7ccac5fcda9ab4cec770552f3090 Author: Paulo Henrique Silva Date: Mon Mar 23 15:58:23 2020 -0300 bpo-1635741: Port time module to multiphase initialization (PEP 489) (GH-19107) ---------- nosy: +vstinner resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.10 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:37:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:37:08 +0000 Subject: [issue15668] PEP 3121, 384 Refactoring applied to random module In-Reply-To: <1345039836.78.0.438193538839.issue15668@psf.upfronthosting.co.za> Message-ID: <1592818628.02.0.800618309789.issue15668@roundup.psfhosted.org> STINNER Victor added the comment: The PEP 384 part was fixed by: commit 04f0bbfbedf8d2bb69b012f853de6648b1a9f27f Author: Dino Viehland Date: Fri Sep 13 11:12:27 2019 +0100 bpo-38075: Port _randommodule.c to PEP-384 (GH-15798) - Migrate `Random_Type` to `PyType_FromSpec` - To simulate an old use of `PyLong_Type.tp_as_number->nb_absolute`, I added code to the module init function to stash `int.__abs__` for later use. Ideally we'd use `PyType_GetSlot()` instead, but it doesn't currently work for static types in CPython, and implementing it just for this case doesn't seem worth it. - Do exact check for long and dispatch to PyNumber_Absolute, use vector call when not exact. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:38:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:38:38 +0000 Subject: [issue15652] PEP 3121, 384 refactoring applied to gdbm module In-Reply-To: <1344969100.54.0.643991722265.issue15652@psf.upfronthosting.co.za> Message-ID: <1592818718.49.0.0660532786377.issue15652@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by: commit c4862e333ab405dd5789b4061222db1982147de4 Author: Dong-hee Na Date: Wed Jun 17 01:41:23 2020 +0900 bpo-1635741: Port _gdbm module to multiphase initialization (GH-20920) ---------- nosy: +corona10, vstinner resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.10 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:40:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:40:33 +0000 Subject: [issue15675] PEP 3121, 384 Refactoring applied to array module In-Reply-To: <1345043626.95.0.208765115861.issue15675@psf.upfronthosting.co.za> Message-ID: <1592818833.41.0.495268182681.issue15675@roundup.psfhosted.org> STINNER Victor added the comment: The PEP 384 part is fixed by: commit d5cacbb1d9c3edc02bf0ba01702e7c06da5bc318 Author: Nick Coghlan Date: Sat May 23 22:24:10 2015 +1000 PEP 489: Multi-phase extension module initialization Known limitations of the current implementation: - documentation changes are incomplete - there's a reference leak I haven't tracked down yet The leak is most visible by running: ./python -m test -R3:3 test_importlib However, you can also see it by running: ./python -X showrefcount Importing the array or _testmultiphase modules, and then deleting them from both sys.modules and the local namespace shows significant increases in the total number of active references each cycle. By contrast, with _testcapi (which continues to use single-phase initialisation) the global refcounts stabilise after a couple of cycles. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:41:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 09:41:41 +0000 Subject: [issue15848] PEP 3121, 384 Refactoring applied to xxsubtype module In-Reply-To: <1346596167.75.0.401355088857.issue15848@psf.upfronthosting.co.za> Message-ID: <1592818901.45.0.390339421678.issue15848@roundup.psfhosted.org> STINNER Victor added the comment: The PEP 3121 part is fixed by: commit d5cacbb1d9c3edc02bf0ba01702e7c06da5bc318 Author: Nick Coghlan Date: Sat May 23 22:24:10 2015 +1000 PEP 489: Multi-phase extension module initialization Known limitations of the current implementation: - documentation changes are incomplete - there's a reference leak I haven't tracked down yet The leak is most visible by running: ./python -m test -R3:3 test_importlib However, you can also see it by running: ./python -X showrefcount Importing the array or _testmultiphase modules, and then deleting them from both sys.modules and the local namespace shows significant increases in the total number of active references each cycle. By contrast, with _testcapi (which continues to use single-phase initialisation) the global refcounts stabilise after a couple of cycles. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:49:24 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jun 2020 09:49:24 +0000 Subject: [issue41074] msilib does not work correctly with non-ASCII names Message-ID: <1592819364.77.0.204133335843.issue41074@roundup.psfhosted.org> New submission from Serhiy Storchaka : It encodes input string arguments with utf-8 and pass encoded strings to 8-bit API which expect they be encoded using the locale encoding. It may pass tests, create and read files, but these files will just have wrong names. ---------- components: Extension Modules, Windows messages: 372083 nosy: paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: msilib does not work correctly with non-ASCII names type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 05:49:53 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jun 2020 09:49:53 +0000 Subject: [issue41069] Use non-ascii file names in tests by default In-Reply-To: <1592774319.03.0.379358214671.issue41069@roundup.psfhosted.org> Message-ID: <1592819393.66.0.808473659555.issue41069@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- dependencies: +msilib does not work correctly with non-ASCII names _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 06:41:23 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Mon, 22 Jun 2020 10:41:23 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1592822483.71.0.691991325593.issue38870@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- pull_requests: +20224 pull_request: https://github.com/python/cpython/pull/21053 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 07:02:58 2020 From: report at bugs.python.org (hai shi) Date: Mon, 22 Jun 2020 11:02:58 +0000 Subject: [issue41073] [C API] PyType_GetSlot() should accept static types In-Reply-To: <1592815094.33.0.264745776024.issue41073@roundup.psfhosted.org> Message-ID: <1592823778.87.0.021922248188.issue41073@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 07:07:48 2020 From: report at bugs.python.org (hai shi) Date: Mon, 22 Jun 2020 11:07:48 +0000 Subject: [issue41073] [C API] PyType_GetSlot() should accept static types In-Reply-To: <1592815094.33.0.264745776024.issue41073@roundup.psfhosted.org> Message-ID: <1592824068.72.0.0775791824944.issue41073@roundup.psfhosted.org> hai shi added the comment: Hi, victor. If you have much bpo need to manage, I could take a look in this week :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 07:16:27 2020 From: report at bugs.python.org (wyz23x2) Date: Mon, 22 Jun 2020 11:16:27 +0000 Subject: [issue41075] Add support of navigating through prev. commands in IDLE Message-ID: <1592824587.6.0.226335506835.issue41075@roundup.psfhosted.org> New submission from wyz23x2 : Terminals like CMD have support of navigating through commands with ??. While directly implementing the arrows is not good in IDLE (the use for jumping to the prev. line in GUI is needed), there should be a good way. Some ways: 1. Alt+??. The current behavior is exactly like ??. 2. A "Previous input" option in the right-click menu. 3. A "Navigate" option in the right-click menu. A GUI like this will pop up: ?????????????????????????? ? Navigate ? ? ? The [4]th command ? ? O [1] command before ? ? _______ ? ? ?Paste? ? ? ??????? ? ?????????????????????????? It would be better if 2&3 are together. ---------- assignee: terry.reedy components: IDLE messages: 372085 nosy: terry.reedy, wyz23x2 priority: normal severity: normal status: open title: Add support of navigating through prev. commands in IDLE type: enhancement versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 08:20:14 2020 From: report at bugs.python.org (Nathaniel Manista) Date: Mon, 22 Jun 2020 12:20:14 +0000 Subject: [issue27721] distutils strtobool returns 0 and 1 rather than False and True In-Reply-To: <1470771352.57.0.859185223412.issue27721@psf.upfronthosting.co.za> Message-ID: <1592828414.97.0.535855380722.issue27721@roundup.psfhosted.org> Change by Nathaniel Manista : ---------- nosy: +Nathaniel Manista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 08:54:04 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 22 Jun 2020 12:54:04 +0000 Subject: [issue41076] Pre-feed the parser with the f-string location Message-ID: <1592830444.28.0.715795634223.issue41076@roundup.psfhosted.org> New submission from Lysandros Nikolaou : Inspired by bpo-41064, I sat down to try and find problems with f-string locations in the new parser. I was able to come up with a way to compute the locations of the f-string expressions that I think is more consistent and allows us to delete all the code that was fixing the expression locations after the actual parsing, which accounted for about 1/6 of string_parser.c. A high-level explanation of the change: Before this change we were pre-feeding the parser with the location of the f-string itself. The parser was then parsing the expression and was computing the locations of all the nodes based on the offset of the f-string. After the parsing was done, we were identifying the offset and the lineno of the expression *within* the fstring and were fixing the node locations accordingly. For example, for an f-string like `a = 0; f'irrelevant {a}'` we were doing the following: - Pre-feed the parser with lineno=0 and col_offset=7 (the offset of the f-string itself in the current line). - Parse the expression (adding 7 to the col_offset of each parsed node, lineno remains the same since it's 0). - Fix the node locations by shifting the Name node by 14, which is the number of characters in the f-string (counting the `f` and the opening quote) before the start of the expression. With this change we now pre-feed the parser with the exact lineno and offset of the expression itself, not the f-string. This allows us to completely skip the third step of shifting the node locations. ---------- assignee: lys.nikolaou components: Interpreter Core messages: 372086 nosy: eric.smith, gvanrossum, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: Pre-feed the parser with the f-string location type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 08:57:41 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 22 Jun 2020 12:57:41 +0000 Subject: [issue41076] Pre-feed the parser with the f-string location In-Reply-To: <1592830444.28.0.715795634223.issue41076@roundup.psfhosted.org> Message-ID: <1592830661.84.0.626829621086.issue41076@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- keywords: +patch pull_requests: +20225 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21054 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 09:21:59 2020 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Mon, 22 Jun 2020 13:21:59 +0000 Subject: [issue41077] Make Cookiejar a bit more pythonic Message-ID: <1592832119.29.0.934428532499.issue41077@roundup.psfhosted.org> New submission from Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : Title says it all. ---------- messages: 372087 nosy: thatiparthy priority: normal severity: normal status: open title: Make Cookiejar a bit more pythonic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 09:27:18 2020 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Mon, 22 Jun 2020 13:27:18 +0000 Subject: [issue41077] Make Cookiejar a bit more pythonic In-Reply-To: <1592832119.29.0.934428532499.issue41077@roundup.psfhosted.org> Message-ID: <1592832438.01.0.446916822451.issue41077@roundup.psfhosted.org> Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) added the comment: I am not sure this PR will be accepted. If you are a core dev, and thinks this is not Okay, please feel free close this issue. ---------- keywords: +patch message_count: 1.0 -> 2.0 pull_requests: +20226 stage: -> patch review versions: +Python 3.10 pull_request: https://github.com/python/cpython/pull/20872 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 09:33:51 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 22 Jun 2020 13:33:51 +0000 Subject: [issue41075] Add support of navigating through prev. commands in IDLE In-Reply-To: <1592824587.6.0.226335506835.issue41075@roundup.psfhosted.org> Message-ID: <1592832831.92.0.272428620231.issue41075@roundup.psfhosted.org> Terry J. Reedy added the comment: There is an old issue proposing making ?? navigate through history in Shell, with cntl/alt ??, for instance, navigating through lines. In the meanwhile, one is supposed to be able to redefine the abstract and keys in the Keys tab of the settings dialog. For instance, to Alt-Down and Alt-Up. However, it is not currently working as I expect and I need to investigate more. A new history list mechanism is a possibility, but I would want to first change Shell to only add syntactically correct entries to the permanent list. One should be able to edit a statement until it is correct, just as when trying to run from the editor. This would reduce the need to retrieve history by perhaps half (depending on one's syntax knowledge and typing accuracy). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 09:36:21 2020 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Mon, 22 Jun 2020 13:36:21 +0000 Subject: [issue41077] Make Cookiejar a bit more pythonic In-Reply-To: <1592832119.29.0.934428532499.issue41077@roundup.psfhosted.org> Message-ID: <1592832981.08.0.804603974675.issue41077@roundup.psfhosted.org> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 09:38:47 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 22 Jun 2020 13:38:47 +0000 Subject: [issue41077] Make Cookiejar a bit more pythonic In-Reply-To: <1592832119.29.0.934428532499.issue41077@roundup.psfhosted.org> Message-ID: <1592833127.97.0.372827321678.issue41077@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Srinivas, as I said on the PR, cosmetic changes are usually not accepted. You can have a look at the other opened bug reports to find issues you can work on and at the Python Dev Guide (https://devguide.python.org/) for help to get started hacking Python! ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 09:45:54 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 22 Jun 2020 13:45:54 +0000 Subject: [issue41076] Pre-feed the parser with the f-string expression location In-Reply-To: <1592830444.28.0.715795634223.issue41076@roundup.psfhosted.org> Message-ID: <1592833554.03.0.839387374743.issue41076@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- title: Pre-feed the parser with the f-string location -> Pre-feed the parser with the f-string expression location _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 10:50:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 14:50:13 +0000 Subject: [issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function Message-ID: <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org> New submission from STINNER Victor : PyTuple_GET_ITEM() can be abused to access directly the PyTupleObject.ob_item member: PyObject **items = &PyTuple_GET_ITEM(0); Giving a direct access to an array or PyObject* (PyObject**) is causing issues with other Python implementations, like PyPy, which don't use PyObject internally. I propose to convert the PyTuple_GET_ITEM() and PyList_GET_ITEM() macros to static inline functions to disallow that. ---------- components: C API messages: 372091 nosy: vstinner priority: normal severity: normal status: open title: [C API] Convert PyTuple_GET_ITEM() macro to a static inline function versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 10:53:54 2020 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 22 Jun 2020 14:53:54 +0000 Subject: [issue16623] argparse help formatter does not honor non-breaking space In-Reply-To: <1354745001.59.0.580615965604.issue16623@psf.upfronthosting.co.za> Message-ID: <1592837634.43.0.052981874774.issue16623@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 Jun 22 11:04:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 15:04:17 +0000 Subject: [issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function In-Reply-To: <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org> Message-ID: <1592838257.45.0.345176785515.issue41078@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +20227 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21056 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 11:12:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 15:12:04 +0000 Subject: [issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function In-Reply-To: <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org> Message-ID: <1592838724.45.0.430088312114.issue41078@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20228 pull_request: https://github.com/python/cpython/pull/21057 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 11:27:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 15:27:44 +0000 Subject: [issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function In-Reply-To: <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org> Message-ID: <1592839664.52.0.274832401681.issue41078@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 384621c42f9102e31ba2c47feba144af09c989e5 by Victor Stinner in branch 'master': bpo-41078: Rename pycore_tupleobject.h to pycore_tuple.h (GH-21056) https://github.com/python/cpython/commit/384621c42f9102e31ba2c47feba144af09c989e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 11:29:35 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 22 Jun 2020 15:29:35 +0000 Subject: [issue41071] from an int to a float , why In-Reply-To: <1592809278.7.0.712153884721.issue41071@roundup.psfhosted.org> Message-ID: <1592839775.92.0.250738381859.issue41071@roundup.psfhosted.org> Steven D'Aprano added the comment: Mike, the bug tracker is not a help-desk for questions. There are many other forums where you can ask for help: - the python-list and tutor mailing lists https://www.python.org/community/lists/ - Stackoverflow - The Python IRC channel https://www.python.org/community/irc/ - Reddit's r/learnpython - https://python-forum.io/ ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 11:38:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 15:38:41 +0000 Subject: [issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function In-Reply-To: <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org> Message-ID: <1592840321.23.0.864647475042.issue41078@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20229 pull_request: https://github.com/python/cpython/pull/21058 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 11:39:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 15:39:40 +0000 Subject: [issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function In-Reply-To: <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org> Message-ID: <1592840380.1.0.333274418819.issue41078@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c45dbe93b7094fe014442c198727ee38b25541c4 by Victor Stinner in branch 'master': bpo-41078: Add pycore_list.h internal header file (GH-21057) https://github.com/python/cpython/commit/c45dbe93b7094fe014442c198727ee38b25541c4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 11:53:14 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 22 Jun 2020 15:53:14 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1592841194.91.0.524411500197.issue1635741@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 1937edd376274cb26090d71253191502a9de32d6 by Dong-hee Na in branch 'master': bpo-1635741: Port _lzma module to multiphase initialization (GH-19382) https://github.com/python/cpython/commit/1937edd376274cb26090d71253191502a9de32d6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 12:02:56 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 16:02:56 +0000 Subject: [issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function In-Reply-To: <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org> Message-ID: <1592841776.53.0.573470640954.issue41078@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c96d00e88ead8f99bb6aa1357928ac4545d9287c by Victor Stinner in branch 'master': bpo-41078: Fix bltinmodule.c with Py_TRACE_REFS (GH-21058) https://github.com/python/cpython/commit/c96d00e88ead8f99bb6aa1357928ac4545d9287c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 12:10:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 16:10:53 +0000 Subject: [issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function In-Reply-To: <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org> Message-ID: <1592842253.02.0.110463684666.issue41078@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20230 pull_request: https://github.com/python/cpython/pull/21059 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 12:15:51 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 22 Jun 2020 16:15:51 +0000 Subject: [issue15666] PEP 3121, 384 refactoring applied to lzma module In-Reply-To: <1345037071.28.0.307240191092.issue15666@psf.upfronthosting.co.za> Message-ID: <1592842551.15.0.849214163677.issue15666@roundup.psfhosted.org> Dong-hee Na added the comment: Fixed by: commit 1937edd376274cb26090d71253191502a9de32d6 Author: Dong-hee Na Date: Tue Jun 23 00:53:07 2020 +0900 bpo-1635741: Port _lzma module to multiphase initialization (GH-19382) ---------- nosy: +corona10, vstinner resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.10 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 12:19:31 2020 From: report at bugs.python.org (Tomasz Pytel) Date: Mon, 22 Jun 2020 16:19:31 +0000 Subject: [issue41079] _PyAsyncGenWrappedValue_Type is never Readied Message-ID: <1592842771.21.0.286644744652.issue41079@roundup.psfhosted.org> New submission from Tomasz Pytel : A call is never made to PyType_Ready(&_PyAsyncGenWrappedValue_Type) on initialization unlike for all other Python type objects I can see. Does not seem to have any negative effects at the moment except to mess up my Python type instrumentation. May turn into a bug in the future if all types are assumed readied, is this intended behavior? ---------- components: Interpreter Core messages: 372099 nosy: Tomasz Pytel priority: normal severity: normal status: open title: _PyAsyncGenWrappedValue_Type is never Readied type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 12:31:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 16:31:52 +0000 Subject: [issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function In-Reply-To: <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org> Message-ID: <1592843512.48.0.901318195372.issue41078@roundup.psfhosted.org> STINNER Victor added the comment: The PR 21059 breaks Cython. I reported the issue to Cython upstream: https://github.com/cython/cython/issues/3701 numpy is also affected: code generated by Cython (numpy/random/_mt19937.c) contains the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 12:32:41 2020 From: report at bugs.python.org (E. Paine) Date: Mon, 22 Jun 2020 16:32:41 +0000 Subject: [issue41075] Add support of navigating through prev. commands in IDLE In-Reply-To: <1592824587.6.0.226335506835.issue41075@roundup.psfhosted.org> Message-ID: <1592843561.27.0.00890657277869.issue41075@roundup.psfhosted.org> E. Paine added the comment: The issue I found, which I assume you are referencing Terry, is #2704. Even if we don't do all of what is proposed there, I think the default bindings for the history should be changed (I have not used any terminals that don't use ??). In my experience, very few people know of the history functionality (especially people new to Python - which is IDLE's main audience) and even many of those who teach Python don't know about it! As for the other features suggested, I am not sure about a "previous input" option in the right-click menu, though it may be nice to have a separate history for commands and inputs (I didn't look that closely at 2704 so it is possible this is proposed there). I am not sure I understand the feature proposed in '3'. ---------- nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 12:57:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 16:57:12 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1592845032.41.0.20419768781.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: Current status: 60 stdlib extensions (51%) are ported to PEP 489 multiphase initialization, 58 stdlib extensions (49%) are still using the legacy API: $ grep -E '\' $(find Modules/ -name "*.c")|wc -l 60 $ grep -E '\' $(find Modules/ -name "*.c")|wc -l 58 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 12:58:26 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 16:58:26 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1592845106.68.0.872990743317.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: List of the 58 C extensions using the legacy API: _asynciomodule.c _bisectmodule.c _blake2/blake2module.c cjkcodecs/multibytecodec.c cmathmodule.c _csv.c _ctypes/_ctypes.c _cursesmodule.c _curses_panel.c _datetimemodule.c _decimal/_decimal.c _elementtree.c faulthandler.c gcmodule.c grpmodule.c _hashopenssl.c _io/_iomodule.c _lsprof.c md5module.c _multiprocessing/multiprocessing.c _multiprocessing/posixshmem.c _opcode.c ossaudiodev.c overlapped.c _pickle.c _posixsubprocess.c pwdmodule.c pyexpat.c _queuemodule.c _randommodule.c readline.c _scproxy.c selectmodule.c sha1module.c sha256module.c _sha3/sha3module.c sha512module.c signalmodule.c socketmodule.c spwdmodule.c _sqlite/module.c _sre.c _ssl.c _struct.c symtablemodule.c termios.c _testbuffer.c _testcapimodule.c _testimportmultiple.c _testinternalcapi.c _threadmodule.c _tkinter.c _tracemalloc.c unicodedata.c _winapi.c _xxsubinterpretersmodule.c _xxtestfuzz/_xxtestfuzz.c zlibmodule.c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 13:00:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 17:00:08 +0000 Subject: [issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order In-Reply-To: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> Message-ID: <1592845208.73.0.194264348802.issue19270@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 13:28:11 2020 From: report at bugs.python.org (Ryan Westlund) Date: Mon, 22 Jun 2020 17:28:11 +0000 Subject: [issue41080] re.sub treats * incorrectly? Message-ID: <1592846891.21.0.0506467079294.issue41080@roundup.psfhosted.org> New submission from Ryan Westlund : ``` >>> re.sub('a*', '-', 'a') '--' >>> re.sub('a*', '-', 'aa') '--' >>> re.sub('a*', '-', 'aaa') '--' ``` Shouldn't it be returning one dash, not two, since the greedy quantifier will match all the a's? I understand why substituting on 'b' returns '-a-', but shouldn't this constitute only one match? In Python 2.7, it behaves as I expect: ``` >>> re.sub('a*', '-', 'a') '-' >>> re.sub('a*', '-', 'aa') '-' >>> re.sub('a*', '-', 'aaa') '-' ``` The original case that led me to this was trying to normalize a path to end in one slash. I used `re.sub('/*$', '/', path)`, but a nonzero number of slashes came out as two. ---------- components: Regular Expressions messages: 372104 nosy: Yujiri, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: re.sub treats * incorrectly? type: behavior versions: Python 3.10, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 13:54:14 2020 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 22 Jun 2020 17:54:14 +0000 Subject: [issue41080] re.sub treats * incorrectly? In-Reply-To: <1592846891.21.0.0506467079294.issue41080@roundup.psfhosted.org> Message-ID: <1592848454.56.0.661343299041.issue41080@roundup.psfhosted.org> Ezio Melotti added the comment: This behavior was changed in 3.7: "Empty matches for the pattern are replaced only when not adjacent to a previous empty match, so sub('x*', '-', 'abxd') returns '-a-b--d-'." [0] See also bpo-32308 and bpo-25054. [0]: https://docs.python.org/3/library/re.html#re.sub ---------- resolution: -> not a bug stage: -> resolved status: open -> closed superseder: -> Replace empty matches adjacent to a previous non-empty match in re.sub() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 14:04:10 2020 From: report at bugs.python.org (Ryan Westlund) Date: Mon, 22 Jun 2020 18:04:10 +0000 Subject: [issue41080] re.sub treats * incorrectly? In-Reply-To: <1592848454.56.0.661343299041.issue41080@roundup.psfhosted.org> Message-ID: Ryan Westlund added the comment: Sorry, I forgot the pydoc docs don't have as much information as the online docs. On Mon, Jun 22, 2020 at 1:54 PM Ezio Melotti wrote: > > Ezio Melotti added the comment: > > This behavior was changed in 3.7: "Empty matches for the pattern are > replaced only when not adjacent to a previous empty match, so sub('x*', > '-', 'abxd') returns '-a-b--d-'." [0] > > See also bpo-32308 and bpo-25054. > > > [0]: https://docs.python.org/3/library/re.html#re.sub > > ---------- > resolution: -> not a bug > stage: -> resolved > status: open -> closed > superseder: -> Replace empty matches adjacent to a previous non-empty > match in re.sub() > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 14:39:36 2020 From: report at bugs.python.org (sorrow) Date: Mon, 22 Jun 2020 18:39:36 +0000 Subject: [issue41035] zipfile.Path does not work properly with zip archives where paths start with / In-Reply-To: <1592568836.11.0.709805363189.issue41035@roundup.psfhosted.org> Message-ID: <1592851176.68.0.855581585068.issue41035@roundup.psfhosted.org> sorrow added the comment: Here's what I came up with: ```python class ZipPath(zipfile.Path): def __init__(self, root, at=""): super().__init__(root, at) if not at.startswith("/") and self.root.namelist()[0].startswith("/"): self.at = f"/{at}" def __repr__(self): return ( f"{self.__class__.__name__}({self.root.filename!r}, " f"{self.at.lstrip('/')!r})" ) def __str__(self): return posixpath.join(self.root.filename, self.at.lstrip("/")) def _is_child(self, path): return posixpath.dirname(path.at.strip("/")) == self.at.strip("/") def _next(self, at): return self.__class__(self.root, at) ``` Pretty simple. The main things are going on in `__init__` and `_is_child` methods. These changes are enough for `iteritems()` to work. I decided to include the leading slash in the `at`, but strip it for the outside world (__str__ and __repr__). Also, I had to override the `_next` method because it makes `Path` objects no matter what class it's called from. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 14:47:08 2020 From: report at bugs.python.org (sorrow) Date: Mon, 22 Jun 2020 18:47:08 +0000 Subject: [issue41035] zipfile.Path does not work properly with zip archives where paths start with / In-Reply-To: <1592568836.11.0.709805363189.issue41035@roundup.psfhosted.org> Message-ID: <1592851628.09.0.315686114871.issue41035@roundup.psfhosted.org> sorrow added the comment: >`iteritems()` I meant `iterdir()` of course. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 15:39:43 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Mon, 22 Jun 2020 19:39:43 +0000 Subject: [issue41081] Exclude __pycache__ directories from backups using CACHEDIR.TAG Message-ID: <1592854782.97.0.179658439261.issue41081@roundup.psfhosted.org> New submission from Jakub Stasiak : It'd be nice of __pycache__ directories didn't pollute backups. Granted, one can add __pycache__ directory to their backup-tool-of-choice exclusion list, but those lists are ever growing and maybe it'd be good to help the tools and the users. There's a Cache Directory Tagging Specification[1] which some backup tools like Borg, restic, GNU Tar and attic use out of the box (well, with a switch) and other tools (like rsync, Bacula, rdiff-backup and I imagine others) can be made to use it with a generic exclude-directories-with-this-file-present option (partially, just the existence of the tag file is used, not its content). I wasn't sure what to select in Components, so I went with Library. [1] https://bford.info/cachedir/ ---------- components: Library (Lib) messages: 372109 nosy: jstasiak priority: normal severity: normal status: open title: Exclude __pycache__ directories from backups using CACHEDIR.TAG type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 15:47:20 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Mon, 22 Jun 2020 19:47:20 +0000 Subject: [issue41081] Exclude __pycache__ directories from backups using CACHEDIR.TAG In-Reply-To: <1592854782.97.0.179658439261.issue41081@roundup.psfhosted.org> Message-ID: <1592855240.12.0.0549535001057.issue41081@roundup.psfhosted.org> Change by Jakub Stasiak : ---------- keywords: +patch pull_requests: +20231 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21060 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 16:03:14 2020 From: report at bugs.python.org (E. Paine) Date: Mon, 22 Jun 2020 20:03:14 +0000 Subject: [issue40893] tkinter: integrate TkDND support In-Reply-To: <1591474190.65.0.383574909158.issue40893@roundup.psfhosted.org> Message-ID: <1592856194.47.0.226908550885.issue40893@roundup.psfhosted.org> E. Paine added the comment: Addressing Ned's issues: I have emailed round "Linux-sig" about adding an optional dependency and Guido recommended I put it on "Python-dev" instead (which I hope to do in the coming days). As for the buildbots, is this something I could help with, or does it just require someone with permission to remote-logon and change as necessary? As a side-note, I currently looking at better ways of getting binding returns to TkDND as the current method (https://github.com/python/cpython/pull/20896/commits/9a27b147239c3326046ac439abccc07127b16f91#diff-3eeb1d6bdd82965287a553385c879693R1449) is not that clear ('dndrtn' does nothing - the set method simply returns the variable contents without trying to evaluate it). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 16:14:30 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 22 Jun 2020 20:14:30 +0000 Subject: [issue40893] tkinter: integrate TkDND support In-Reply-To: <1591474190.65.0.383574909158.issue40893@roundup.psfhosted.org> Message-ID: <1592856870.48.0.0372285011435.issue40893@roundup.psfhosted.org> Ned Deily added the comment: > As for the buildbots, is this something I could help with @zach.ware is the best person to work with on any buildbot requirements. I've Nosyed him here. For the record, I haven't yet tried to test TkDND with the various current macOS Tk on current versions of macOS; there are a lot of variables there and a lot of ways it may have issues. I hope to take a first look soon. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 16:35:43 2020 From: report at bugs.python.org (Patrick Valibus 410 Gone) Date: Mon, 22 Jun 2020 20:35:43 +0000 Subject: [issue36207] robotsparser deny all with some rules In-Reply-To: <1551865321.24.0.407834320039.issue36207@roundup.psfhosted.org> Message-ID: <1592858143.87.0.713102361399.issue36207@roundup.psfhosted.org> Patrick Valibus 410 Gone added the comment: Bonjour, nous n'avons pas r?ussi ? le faire fonctionner. Nous l'avons utilis? dans le cadre d'un test seo car nous essayons e reproduire des alternatives ? scrappy. Par exemple le robots devrait bine crawler la page de notre agence seo https://www.410-gone.fr/seo.html mais ne devrait pas accepter les pages finissant par /*.php$ et pourtant si malgr? qu'elles soient bloqu?es en r?f?rencement dans notre robots.txt, merci. ---------- nosy: +Patrick Valibus 410 Gone -Fred AYERS, artasca, cheryl.sabella, lagustais, mathias44, quentin-maire _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 16:54:25 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 22 Jun 2020 20:54:25 +0000 Subject: [issue41081] Exclude __pycache__ directories from backups using CACHEDIR.TAG In-Reply-To: <1592854782.97.0.179658439261.issue41081@roundup.psfhosted.org> Message-ID: <1592859265.8.0.224367743457.issue41081@roundup.psfhosted.org> Eric V. Smith added the comment: To spoil it for other readers: the linked page says to create a file named CACHEDIR.TAG with a specific first line. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 17:07:24 2020 From: report at bugs.python.org (mike stern) Date: Mon, 22 Jun 2020 21:07:24 +0000 Subject: [issue41071] from an int to a float , why In-Reply-To: <1592809278.7.0.712153884721.issue41071@roundup.psfhosted.org> Message-ID: <1592860044.37.0.527465489506.issue41071@roundup.psfhosted.org> mike stern added the comment: Not satisfied with that reply you can't just decide to close the ticket without even giving a reasonable answer, or even try that on 2.7 or 3.7 to see if it is true what I said. Besides, that is not a convincing answer, that is actually no answer at all!!! I made my research and this is what is it https://stackoverflow.com/questions/183853/what-is-the-difference-between-and-when-used-for-division in python 2.7 print((20 / 3)) ----> 6 but print((20.0 / 3)) or print((20 / 3.0)) or print((20.0 / 3.0)) ----> 6.66666666667 however print((20 / 2)) ----> 10 # integer number in python 3.7 print((20 / 3)) ----> 6.66666666667 not only that but even print((20 / 2)) ----> 10.0 # float number unless you use // print((20 // 2)) ----> 10 can someone really explain this ? ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 17:10:02 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 22 Jun 2020 21:10:02 +0000 Subject: [issue41039] Simplify python3.dll build In-Reply-To: <1592584036.23.0.347214520388.issue41039@roundup.psfhosted.org> Message-ID: <1592860202.19.0.175991377436.issue41039@roundup.psfhosted.org> Steve Dower added the comment: Thanks for the change. It looks good, though I would like to have a NEWS entry for this so that people can find that we made a deliberate change to this DLL. I'd also like to do some manual testing to make sure that we aren't going to break any obscure uses. That's basically blocked on me, sorry, but I'll try and get to it asap. Feel free to ping me in a week if I haven't gotten to it. ---------- assignee: -> steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 17:13:41 2020 From: report at bugs.python.org (Tim Hoffmann) Date: Mon, 22 Jun 2020 21:13:41 +0000 Subject: [issue41082] Error handling and documentation of Path.home() Message-ID: <1592860421.93.0.490449762565.issue41082@roundup.psfhosted.org> New submission from Tim Hoffmann : Path.home() may fail un (https://github.com/matplotlib/matplotlib/issues/17707#issuecomment-647180252). 1. I think the raised key error is too low-level, and it should be something else; what exactly t.b.d. 2. The documentation (https://docs.python.org/3/library/pathlib.html#pathlib.Path.home) should specify what happens in case of failure. 3. The documentation links to https://docs.python.org/3/library/os.path.html#os.path.expanduser, but that's not correct. _PosixFlavor.gethomedir() implements it's own user lookup, which is slightly different from os.path.expanduser() ---------- components: Library (Lib) messages: 372116 nosy: timhoffm priority: normal severity: normal status: open title: Error handling and documentation of Path.home() type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 17:20:30 2020 From: report at bugs.python.org (Tim Peters) Date: Mon, 22 Jun 2020 21:20:30 +0000 Subject: [issue41071] from an int to a float , why In-Reply-To: <1592809278.7.0.712153884721.issue41071@roundup.psfhosted.org> Message-ID: <1592860830.11.0.517623261444.issue41071@roundup.psfhosted.org> Tim Peters added the comment: Read the PEP Serhiy already linked to: https://www.python.org/dev/peps/pep-0238/ This was a deliberate change to how "integer / integer" works, introduced with Python 3. ---------- nosy: +tim.peters status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 17:24:24 2020 From: report at bugs.python.org (The Comet) Date: Mon, 22 Jun 2020 21:24:24 +0000 Subject: [issue40965] Segfault when importing unittest module via C API In-Reply-To: <1592015395.95.0.70978961228.issue40965@roundup.psfhosted.org> Message-ID: <1592861064.74.0.653621044221.issue40965@roundup.psfhosted.org> The Comet added the comment: Thanks for the input! I should have been more specific. I was running python 3.8.2 when I got this segfault. I upgraded to 3.8.3 and the issue is no longer present, so it seems this has already been fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 17:27:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 21:27:42 +0000 Subject: [issue40965] Segfault when importing unittest module via C API In-Reply-To: <1592015395.95.0.70978961228.issue40965@roundup.psfhosted.org> Message-ID: <1592861262.69.0.992028836165.issue40965@roundup.psfhosted.org> STINNER Victor added the comment: I mark this issue as a duplicate of bpo-40294. Right, please upgrade to Python 3.8.3 which includes the fix. ---------- nosy: +vstinner resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Use-after-free crash if multiple interpreters import asyncio module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 17:28:11 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 22 Jun 2020 21:28:11 +0000 Subject: [issue41054] Simplify resource compilation on Windows In-Reply-To: <1592670311.94.0.80143826005.issue41054@roundup.psfhosted.org> Message-ID: <1592861291.48.0.29180995269.issue41054@roundup.psfhosted.org> Steve Dower added the comment: Looks good. Let's rename PYTHON_DLL_NAME to ORIGINAL_FILENAME, since it took me 10 minutes to figure out that that's how it's used... We'll backport this one to 3.9 before RC. No NEWS file required. ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 17:30:50 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 22 Jun 2020 21:30:50 +0000 Subject: [issue41070] Simplify pyshellext.dll build In-Reply-To: <1592805623.25.0.00409293845235.issue41070@roundup.psfhosted.org> Message-ID: <1592861450.42.0.555774316661.issue41070@roundup.psfhosted.org> Steve Dower added the comment: Looks good, but I'll want to manually test this, as it's not covered by automated tests. (If you happen to know how to test drag-drop of multiple files and non-MBCS filenames in Explorer, would love to have some tests, but given the low churn on this part I suspect it's not worthwhile.) Ping me in a week if I haven't gotten to this. ---------- assignee: -> steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 17:30:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 21:30:46 +0000 Subject: [issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function In-Reply-To: <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org> Message-ID: <1592861446.22.0.0111589573695.issue41078@roundup.psfhosted.org> STINNER Victor added the comment: PySequence_Fast_ITEMS() must also be deprecated since it also gives a direct access to PyTupleObject.ob_item and PyListObject.ob_item members (PyObject**). PySequence_Fast_GET_ITEM() should be used instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 17:38:18 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 21:38:18 +0000 Subject: [issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function In-Reply-To: <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org> Message-ID: <1592861898.93.0.100413398496.issue41078@roundup.psfhosted.org> STINNER Victor added the comment: PySequence_Fast_ITEMS() is used in numpy at 7 lines: numpy/core/src/common/ufunc_override.c:118: *out_objs = PySequence_Fast_ITEMS(seq); --- PyUFuncOverride_GetOutObjects(PyObject *kwds, PyObject **out_kwd_obj, PyObject ***out_objs) --- => PyObject** is part of the numpy C API (it's even a pointer to a PyObject** array)! numpy/core/src/multiarray/arrayfunction_override.c:80: PyObject **items = PySequence_Fast_ITEMS(relevant_args); --- static int get_implementing_args_and_methods(PyObject *relevant_args, PyObject **implementing_args, PyObject **methods) { int num_implementing_args = 0; Py_ssize_t i; int j; PyObject **items = PySequence_Fast_ITEMS(relevant_args); Py_ssize_t length = PySequence_Fast_GET_SIZE(relevant_args); for (i = 0; i < length; i++) { int new_class = 1; PyObject *argument = items[i]; ---- => here PySequence_Fast_GET_ITEM() can be used instead. numpy/core/src/multiarray/arrayfunction_override.c:167: PyObject **items = PySequence_Fast_ITEMS(types); numpy/core/src/multiarray/common.c:434: objects = PySequence_Fast_ITEMS(seq); numpy/core/src/multiarray/iterators.c:1368: ret = multiiter_new_impl(n, PySequence_Fast_ITEMS(fast_seq)); numpy/core/src/multiarray/methods.c:1015: in_objs = PySequence_Fast_ITEMS(fast); numpy/core/src/umath/override.c:38: arg_objs = PySequence_Fast_ITEMS(args); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 17:52:26 2020 From: report at bugs.python.org (mike stern) Date: Mon, 22 Jun 2020 21:52:26 +0000 Subject: [issue41071] from an int to a float , why In-Reply-To: <1592860830.11.0.517623261444.issue41071@roundup.psfhosted.org> Message-ID: mike stern added the comment: I appreciate your answer I just didn't like how she answered earlier saying I cannot reproduce. 2 / 2 gives 1.0 to me. which is not true thanks anyway, now i am gonna have to do some reading ________________________________ From: report=bugs.python.org at roundup.psfhosted.org on behalf of Tim Peters Sent: Monday, June 22, 2020 5:20 PM To: rskiredj at hotmail.com Subject: [issue41071] from an int to a float , why Tim Peters added the comment: Read the PEP Serhiy already linked to: https://www.python.org/dev/peps/pep-0238/ This was a deliberate change to how "integer / integer" works, introduced with Python 3. ---------- nosy: +tim.peters status: open -> closed _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 17:54:25 2020 From: report at bugs.python.org (mike stern) Date: Mon, 22 Jun 2020 21:54:25 +0000 Subject: [issue41071] from an int to a float , why In-Reply-To: <1592860830.11.0.517623261444.issue41071@roundup.psfhosted.org> Message-ID: mike stern added the comment: sorry but that article was about version 2.2 in 2000 Created: 11-Mar-2001 Python-Version: 2.2 where is the one for 3.7 ________________________________ From: report=bugs.python.org at roundup.psfhosted.org on behalf of Tim Peters Sent: Monday, June 22, 2020 5:20 PM To: rskiredj at hotmail.com Subject: [issue41071] from an int to a float , why Tim Peters added the comment: Read the PEP Serhiy already linked to: https://www.python.org/dev/peps/pep-0238/ This was a deliberate change to how "integer / integer" works, introduced with Python 3. ---------- nosy: +tim.peters status: open -> closed _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 17:55:57 2020 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 22 Jun 2020 21:55:57 +0000 Subject: [issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function In-Reply-To: <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org> Message-ID: <1592862957.16.0.975180204668.issue41078@roundup.psfhosted.org> Stefan Behnel added the comment: > Giving a direct access to an array or PyObject* (PyObject**) is causing issues with other Python implementations, like PyPy, which don't use PyObject internally. I'm wondering ? if the intention is to help other implementations, then why do we need to break extensions in *CPython* for that? In CPython, this usage seems perfectly valid with the current data structure. If that ever changes, we can still make this change as well, but do you really see the internal layout of tuples change at some point? (Lists are a different case, I'd say, but tuples?) ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 17:59:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 21:59:58 +0000 Subject: [issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function In-Reply-To: <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org> Message-ID: <1592863198.32.0.481641219578.issue41078@roundup.psfhosted.org> STINNER Victor added the comment: The long rationale is explained in PEP 620: https://www.python.org/dev/peps/pep-0620/ PyTupleObject and PyListObject structures must become opaque. Also, later, these structures may change to be more efficient. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 17:59:57 2020 From: report at bugs.python.org (Tim Peters) Date: Mon, 22 Jun 2020 21:59:57 +0000 Subject: [issue41071] from an int to a float , why In-Reply-To: <1592809278.7.0.712153884721.issue41071@roundup.psfhosted.org> Message-ID: <1592863197.81.0.811101285366.issue41071@roundup.psfhosted.org> Tim Peters added the comment: Mike, read that exchange again. You originally wrote "print(2 / 2) gives 2.0 instead of 2" but you didn't _mean_ that. You meant to say it "gives 1.0 instead of 1", or you meant something other than "2 / 2"). In Python 3, >>> print(2 / 2) 1.0 Which is what Serhiy said it does. For the rest, read the PEP again after you calm down. In particular, "Classic division will remain the default in the Python 2.x series; true division will be standard in Python 3.0." Also all true. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 18:20:18 2020 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 22 Jun 2020 22:20:18 +0000 Subject: [issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function In-Reply-To: <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org> Message-ID: <1592864418.72.0.983145574701.issue41078@roundup.psfhosted.org> Stefan Behnel added the comment: > Also, later, these structures may change to be more efficient. Tuples? Really? Ok, quoting PEP-620: > Members of ? PyTupleObject structures have not changed since the "Initial revision" commit (1990) I honestly think the reason for that might simply be that there's not so much to improve for tuples. > nothing prevents a C extension to get or set directly > PyTupleObject.ob_item[0] (the first item of a tuple). I certainly understand that that is a problem, especially if "PyObject" may change in the future. And this is essentially what the current "PyTuple_GET_ITEM()" macro does in a binary module. Should we also turn "_PyTuple_ITEMS()" into a public inline function then to make up for the loss of the "&PyTuple_GET_ITEM(t, 0)" pattern? It would make it explicit what is intended. I think that should be our main goal in the CPython side. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 18:30:16 2020 From: report at bugs.python.org (Nikita Nemkin) Date: Mon, 22 Jun 2020 22:30:16 +0000 Subject: [issue41039] Simplify python3.dll build In-Reply-To: <1592584036.23.0.347214520388.issue41039@roundup.psfhosted.org> Message-ID: <1592865016.72.0.18492709919.issue41039@roundup.psfhosted.org> Nikita Nemkin added the comment: Please take your time. FWIW, I tested this patch by 1) comparing dumpbin /exports output; 2) comparing bunaries themselves (.dll and .lib) and 3) linking xxlmited module. It helps that 7-zip can open .dll and .lib files files as if they were archives. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 18:42:45 2020 From: report at bugs.python.org (Michael Shields) Date: Mon, 22 Jun 2020 22:42:45 +0000 Subject: [issue41083] plistlib can't decode date from year 0 Message-ID: <1592865765.42.0.949299240899.issue41083@roundup.psfhosted.org> New submission from Michael Shields : On macOS 10.5.5: /tmp $ defaults export com.apple.security.KCN - absentCircleWithNoReason applicationDate 0000-12-30T00:00:00Z lastCircleStatus -1 lastWritten 2019-10-15T17:23:33Z pendingApplicationReminder 4001-01-01T00:00:00Z pendingApplicationReminderInterval 86400 /tmp $ cat plist_date_reduction.py #!/usr/bin/env python3 import plistlib import subprocess if __name__ == "__main__": plist = subprocess.check_output(["defaults", "export", "com.apple.security.KCN", "-"]) print(plistlib.loads(plist, fmt=plistlib.FMT_XML)) /tmp $ python3.8 plist_date_reduction.py Traceback (most recent call last): File "plist_date_reduction.py", line 8, in print(plistlib.loads(plist, fmt=plistlib.FMT_XML)) File "/usr/local/Cellar/python at 3.8/3.8.3/Frameworks/Python.framework/Versions/3.8/lib/python3.8/plistlib.py", line 1000, in loads return load( File "/usr/local/Cellar/python at 3.8/3.8.3/Frameworks/Python.framework/Versions/3.8/lib/python3.8/plistlib.py", line 992, in load return p.parse(fp) File "/usr/local/Cellar/python at 3.8/3.8.3/Frameworks/Python.framework/Versions/3.8/lib/python3.8/plistlib.py", line 288, in parse self.parser.ParseFile(fileobj) File "/private/tmp/python at 3.8-20200527-50093-16hak5w/Python-3.8.3/Modules/pyexpat.c", line 461, in EndElement File "/usr/local/Cellar/python at 3.8/3.8.3/Frameworks/Python.framework/Versions/3.8/lib/python3.8/plistlib.py", line 300, in handle_end_element handler() File "/usr/local/Cellar/python at 3.8/3.8.3/Frameworks/Python.framework/Versions/3.8/lib/python3.8/plistlib.py", line 376, in end_date self.add_object(_date_from_string(self.get_data())) File "/usr/local/Cellar/python at 3.8/3.8.3/Frameworks/Python.framework/Versions/3.8/lib/python3.8/plistlib.py", line 254, in _date_from_string return datetime.datetime(*lst) ValueError: year 0 is out of range ---------- components: Library (Lib) messages: 372131 nosy: shields-fn priority: normal severity: normal status: open title: plistlib can't decode date from year 0 type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 18:43:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jun 2020 22:43:11 +0000 Subject: [issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function In-Reply-To: <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org> Message-ID: <1592865791.23.0.993029557545.issue41078@roundup.psfhosted.org> STINNER Victor added the comment: I suggest you to discuss the PEP 620 on python-dev, rather than on the bug tracker. I just posted it there today. This issue tracks the implemetation of one part of the PEP 620. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 18:44:42 2020 From: report at bugs.python.org (mike stern) Date: Mon, 22 Jun 2020 22:44:42 +0000 Subject: [issue41071] from an int to a float , why In-Reply-To: <1592863197.81.0.811101285366.issue41071@roundup.psfhosted.org> Message-ID: mike stern added the comment: i am calm but sometimes I am wondering if the philosophy behind python is really like they claimed to make it very simple. Well I see a lot of confusions sometimes , and this is one ________________________________ From: report=bugs.python.org at roundup.psfhosted.org on behalf of Tim Peters Sent: Monday, June 22, 2020 5:59 PM To: rskiredj at hotmail.com Subject: [issue41071] from an int to a float , why Tim Peters added the comment: Mike, read that exchange again. You originally wrote "print(2 / 2) gives 2.0 instead of 2" but you didn't _mean_ that. You meant to say it "gives 1.0 instead of 1", or you meant something other than "2 / 2"). In Python 3, >>> print(2 / 2) 1.0 Which is what Serhiy said it does. For the rest, read the PEP again after you calm down. In particular, "Classic division will remain the default in the Python 2.x series; true division will be standard in Python 3.0." Also all true. ---------- _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 19:41:26 2020 From: report at bugs.python.org (Chenyoo Hao) Date: Mon, 22 Jun 2020 23:41:26 +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: <1592869286.54.0.865819288777.issue40773@roundup.psfhosted.org> Change by Chenyoo Hao : ---------- keywords: +patch nosy: +Chenyoo Hao nosy_count: 3.0 -> 4.0 pull_requests: +20232 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21055 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 19:53:42 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 22 Jun 2020 23:53:42 +0000 Subject: [issue41084] Signify that a SyntaxError comes from an fstring in the error message Message-ID: <1592870022.32.0.609883413471.issue41084@roundup.psfhosted.org> New submission from Lysandros Nikolaou : It's relatively easy to identify if a SyntaxError occurs when parsing an fstring expression or not. The idea is to slightly change the error message to start with "f-string: " when it does (in the same way in which SyntaxError messages are produced by the hand-written fstring parser). I have a working PR that produces the following: $ cat a.py f'{a $ b}' $ ./python.exe a.py File "/Users/lysnikolaou/Repositories/cpython/a.py", line 1 (a $ b) ^ SyntaxError: f-string: invalid syntax Thoughts? ---------- components: Interpreter Core messages: 372134 nosy: eric.smith, gvanrossum, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: Signify that a SyntaxError comes from an fstring in the error message type: enhancement versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 20:44:44 2020 From: report at bugs.python.org (William Pickard) Date: Tue, 23 Jun 2020 00:44:44 +0000 Subject: [issue41085] Array regression test fails Message-ID: <1592873084.36.0.333815567836.issue41085@roundup.psfhosted.org> New submission from William Pickard : Here's the verbose stack trace of the failing test: ====================================================================== FAIL: test_index (test.test_array.LargeArrayTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "L:\GIT\cpython\lib\test\support\__init__.py", line 837, in wrapper return f(self, maxsize) File "L:\GIT\cpython\lib\test\test_array.py", line 1460, in test_index self.assertEqual(example.index(11), size+3) AssertionError: -2147483645 != 2147483651 ---------- components: Tests files: test_output.log messages: 372135 nosy: WildCard65 priority: normal severity: normal status: open title: Array regression test fails type: behavior versions: Python 3.10 Added file: https://bugs.python.org/file49257/test_output.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 20:49:06 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 23 Jun 2020 00:49:06 +0000 Subject: [issue41084] Signify that a SyntaxError comes from an fstring in the error message In-Reply-To: <1592870022.32.0.609883413471.issue41084@roundup.psfhosted.org> Message-ID: <1592873346.25.0.213508630561.issue41084@roundup.psfhosted.org> Eric V. Smith added the comment: I think it's a good idea. My only reservation would be: if the parsing of f-strings is moved into the parser, would it be possible to maintain the error new messages? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 21:27:56 2020 From: report at bugs.python.org (xcl) Date: Tue, 23 Jun 2020 01:27:56 +0000 Subject: [issue41072] Python 3.8.3 passively introduced open source software contains CVE vulnerability In-Reply-To: <1592812748.09.0.71716339611.issue41072@roundup.psfhosted.org> Message-ID: <1592875676.95.0.307218249578.issue41072@roundup.psfhosted.org> Change by xcl <1318683902 at qq.com>: ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 21:28:41 2020 From: report at bugs.python.org (Brian Faherty) Date: Tue, 23 Jun 2020 01:28:41 +0000 Subject: [issue41086] Exception for uninstantiated interpolation (configparser) Message-ID: <1592875721.54.0.0419083877118.issue41086@roundup.psfhosted.org> New submission from Brian Faherty : The ConfigParser in Lib has a parameter called `interpolation`, that expects an instance of a subclass of Interpolation. However, when ConfigParser is given an argument of an uninstantiated subclass of Interpolation, the __init__ function of ConfigParser accepts it and continues on. This results in a later receiving an error message along the lines of `TypeError: before_set() missing 1 required positional argument: 'value'` when functions are later called on the ConfigParser instance. This delay between the feedback and the original mistake has led to a few bugs open on the issue tracker (https://bugs.python.org/issue26831 and https://bugs.python.org/issue26469. Both of which were closed after a quick and simple explanation, which can be easily implemented in the library itself. I've created a PR for this work and will attach it shortly. Please let me know if there is a better name for the exception other than `InterpolationIsNotInstantiatedError`. It seems long, but also in line with the other Errors already in configparser. ---------- components: Library (Lib) messages: 372137 nosy: Brian Faherty priority: normal severity: normal status: open title: Exception for uninstantiated interpolation (configparser) 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 Jun 22 21:29:42 2020 From: report at bugs.python.org (Roundup Robot) Date: Tue, 23 Jun 2020 01:29:42 +0000 Subject: [issue41086] Exception for uninstantiated interpolation (configparser) In-Reply-To: <1592875721.54.0.0419083877118.issue41086@roundup.psfhosted.org> Message-ID: <1592875782.27.0.104930569325.issue41086@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +20233 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21062 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 22:13:38 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 23 Jun 2020 02:13:38 +0000 Subject: [issue41083] plistlib can't decode date from year 0 In-Reply-To: <1592865765.42.0.949299240899.issue41083@roundup.psfhosted.org> Message-ID: <1592878418.05.0.698837473757.issue41083@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +macOS nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 23:10:20 2020 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 23 Jun 2020 03:10:20 +0000 Subject: [issue31938] Convert selectmodule.c to Argument Clinic In-Reply-To: <1509744030.41.0.213398074469.issue31938@psf.upfronthosting.co.za> Message-ID: <1592881820.24.0.66882058502.issue31938@roundup.psfhosted.org> Change by Anthony Sottile : ---------- nosy: +Anthony Sottile nosy_count: 4.0 -> 5.0 pull_requests: +20235 pull_request: https://github.com/python/cpython/pull/21066 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 22 23:11:11 2020 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 23 Jun 2020 03:11:11 +0000 Subject: [issue31938] Convert selectmodule.c to Argument Clinic In-Reply-To: <1509744030.41.0.213398074469.issue31938@psf.upfronthosting.co.za> Message-ID: <1592881871.32.0.614866353739.issue31938@roundup.psfhosted.org> Anthony Sottile added the comment: This appears to have broken pydoc of the select module, I've attached a patch $ python3.8 -m pydoc select Traceback (most recent call last): File "/usr/lib/python3.8/inspect.py", line 2004, in wrap_value value = eval(s, module_dict) File "", line 1, in NameError: name 'EPOLLIN' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.8/inspect.py", line 2007, in wrap_value value = eval(s, sys_module_dict) File "", line 1, in NameError: name 'EPOLLIN' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 193, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 86, in _run_code exec(code, run_globals) File "/usr/lib/python3.8/pydoc.py", line 2769, in cli() File "/usr/lib/python3.8/pydoc.py", line 2731, in cli help.help(arg) File "/usr/lib/python3.8/pydoc.py", line 1971, in help elif request: doc(request, 'Help on %s:', output=self._output) File "/usr/lib/python3.8/pydoc.py", line 1694, in doc pager(render_doc(thing, title, forceload)) File "/usr/lib/python3.8/pydoc.py", line 1687, in render_doc return title % desc + '\n\n' + renderer.document(object, name) File "/usr/lib/python3.8/pydoc.py", line 384, in document if inspect.ismodule(object): return self.docmodule(*args) File "/usr/lib/python3.8/pydoc.py", line 1183, in docmodule contents.append(self.document(value, key, name)) File "/usr/lib/python3.8/pydoc.py", line 385, in document if inspect.isclass(object): return self.docclass(*args) File "/usr/lib/python3.8/pydoc.py", line 1352, in docclass attrs = spill("Methods %s:\n" % tag, attrs, File "/usr/lib/python3.8/pydoc.py", line 1298, in spill push(self.document(value, File "/usr/lib/python3.8/pydoc.py", line 386, in document if inspect.isroutine(object): return self.docroutine(*args) File "/usr/lib/python3.8/pydoc.py", line 1411, in docroutine signature = inspect.signature(object) File "/usr/lib/python3.8/inspect.py", line 3093, in signature return Signature.from_callable(obj, follow_wrapped=follow_wrapped) File "/usr/lib/python3.8/inspect.py", line 2842, in from_callable return _signature_from_callable(obj, sigcls=cls, File "/usr/lib/python3.8/inspect.py", line 2296, in _signature_from_callable return _signature_from_builtin(sigcls, obj, File "/usr/lib/python3.8/inspect.py", line 2109, in _signature_from_builtin return _signature_fromstr(cls, func, s, skip_bound_arg) File "/usr/lib/python3.8/inspect.py", line 2057, in _signature_fromstr p(name, default) File "/usr/lib/python3.8/inspect.py", line 2039, in p default_node = RewriteSymbolics().visit(default_node) File "/usr/lib/python3.8/ast.py", line 360, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 445, in generic_visit new_node = self.visit(old_value) File "/usr/lib/python3.8/ast.py", line 360, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 445, in generic_visit new_node = self.visit(old_value) File "/usr/lib/python3.8/ast.py", line 360, in visit return visitor(node) File "/usr/lib/python3.8/inspect.py", line 2031, in visit_Name return wrap_value(node.id) File "/usr/lib/python3.8/inspect.py", line 2009, in wrap_value raise RuntimeError() RuntimeError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 00:27:34 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Jun 2020 04:27:34 +0000 Subject: [issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order In-Reply-To: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> Message-ID: <1592886454.9.0.514446014735.issue19270@roundup.psfhosted.org> Raymond Hettinger added the comment: > Cancelling an unintended event instead of the one we wanted is a bug, > and prevents me from using the library at all That problem is certainly worth fixing even if we have to break a few eggs to do it (this module has been around for a very long time and almost certainly every little detail is being relied on by some users). The docstring for enter() and enterabs() only promises that it returns an ID for an event and that the ID can be used to remove the event. The regular docs for enter() and enterabs() make a stronger promise that they return an "event" but doesn't specify what that means. The Event class name doesn't has a leading underscore but is not listed in __all__ and is not in the main docs. The *queue* property is documented to return an ordered list of upcoming events which are defined to be named tuples with fields for: time, priority, action, arguments, kwargs. That is the most specific and restrictive of the documented promises, one that presumably is being relied on in a myriad of ways (a repr suitable for logging, a pretty printable list, a sortable list, named access to fields, unpackable tuples, etc). If we respect those published promises, one way to go is to add a unique identifier field to the Event class. If the that unique id is consecutively numbered, it would also allow us to guarantee FIFO ordering (not sure whether that is actually need though). Here's a preliminary sketch: scheduler.__init__(): + self.event_sequence = 0 # updated as events are created ... scheduler.enterabs(): - event = Event(time, priority, action, argument, kwargs) + self.event_sequence += 1 + event = Event(time, priority, self.event_sequence, action, argument, kwargs) - class Event(namedtuple('Event', 'time, priority, action, argument, kwargs')): - __slots__ = [] - def __eq__(s, o): return (s.time, s.priority) == (o.time, o.priority) - def __lt__(s, o): return (s.time, s.priority) < (o.time, o.priority) - def __le__(s, o): return (s.time, s.priority) <= (o.time, o.priority) - def __gt__(s, o): return (s.time, s.priority) > (o.time, o.priority) - def __ge__(s, o): return (s.time, s.priority) >= (o.time, o.priority) + Event = namedtuple('Event', 'time, priority, sequence, action, argument, kwargs') The user visible effects are: * A new field would be displayed. * Any code that constructs Event objects manually would break instantly. * Any code using tuple unpacking on Event objects would break instantly. * Slightly slower Event creation time. * Faster heap updates (because native tuple ordering is faster than pure python rich comparisons). However, outside the mention in the documentation for the *queue* property, Event objects are not part of the public API. Also, we do have precedent for adding new fields without a negative consequence (argument and kwargs were added in Python 3.3). An alternative solution for removing exact events (not for FIFO stability) is to have enter() and enterabs() return an opaque, unique event identifier. Then the code for cancel() would need to be changed to something like: self._queue = [e for e in self._queue if id(e) != event] heapq.heapify(self._queue) The user visible effects are: * enter() and enterabs() no longer return an event object (it was implied that they would, but not explictly promised). Any code relying on an actual Event object being returned would break. * cancel() would only accept the opaque IDs (again, it was only implied that actual Event objects would be used). Code would break that took Event objects out of the *queue* listing and passed those into cancel(). * cancel() would run a bit faster (because calling id() is cheaper that calling the pure python rich comparisons and having them extract the time and priority fields). Either way breaks a few eggs but makes the module safer to use. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 00:50:03 2020 From: report at bugs.python.org (SilentGhost) Date: Tue, 23 Jun 2020 04:50:03 +0000 Subject: [issue41072] Python 3.8.3 passively introduced open source software contains CVE vulnerability In-Reply-To: <1592812748.09.0.71716339611.issue41072@roundup.psfhosted.org> Message-ID: <1592887803.62.0.312107414065.issue41072@roundup.psfhosted.org> Change by SilentGhost : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 01:16:04 2020 From: report at bugs.python.org (SilentGhost) Date: Tue, 23 Jun 2020 05:16:04 +0000 Subject: [issue41085] Array regression test fails In-Reply-To: <1592873084.36.0.333815567836.issue41085@roundup.psfhosted.org> Message-ID: <1592889364.49.0.524165837208.issue41085@roundup.psfhosted.org> SilentGhost added the comment: This looks like an overflow failure in a bigmem test (though the given limit 24Gb should accommodate that?). Do bigmem tests work on Windows? William, you've made some sort of modifications to the versioned files, what are those? ---------- components: +Windows nosy: +SilentGhost, paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 02:03:43 2020 From: report at bugs.python.org (Michael Felt) Date: Tue, 23 Jun 2020 06:03:43 +0000 Subject: [issue40878] Use c99 on the aixtools bot In-Reply-To: <011dc8ec-4d75-9cc9-ec88-23fc9a634b33@felt.demon.nl> Message-ID: <23768e64-6c74-5693-e1d5-f357a0877195@felt.demon.nl> Michael Felt added the comment: I have been doing manual tests - and it seems build is broken for AIX and xlc. I shall be working on a git bisect to try and identify what broke it for xlc-v11. Finding what broke xlc-v13 will require more time. Note: it is no longer limited to _decimal not being built - builds (i.e., compile) fail completely atm. regards, Michael On 15/06/2020 18:55, Michael Felt wrote: > Michael Felt added the comment: > > I'll switch my bot https://buildbot.python.org/all/#/builders/119 to use > c99_r rather than xlc_r. > > Test 1129 will b e the first with c99_r (and xlc v13). > > On 11/06/2020 00:37, Stefan Krah wrote: >> Stefan Krah added the comment: >> >> So it would still be interesting to see what happens if you compile >> libmpdec with c99_r (emphasis mine): >> >> >> """ >> This command supports all ISO >> C99 language features, but does >> not support IBM language >> extensions. Use this invocation for >> *strict* conformance to the C99 >> standard. >> """ >> >> ---------- >> >> _______________________________________ >> Python tracker >> >> _______________________________________ >> > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 03:38:23 2020 From: report at bugs.python.org (Bar Harel) Date: Tue, 23 Jun 2020 07:38:23 +0000 Subject: [issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order In-Reply-To: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> Message-ID: <1592897903.18.0.953210046138.issue19270@roundup.psfhosted.org> Bar Harel added the comment: @Raymond your first idea sounds good and was the first thing that came to my mind. I only worried about breaking things, so I gave the more conservative suggestion. If breaking a few eggs isn't an issue and the implications of your idea are agreed upon, I'll patch and add a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 04:42:21 2020 From: report at bugs.python.org (Bryan) Date: Tue, 23 Jun 2020 08:42:21 +0000 Subject: [issue41087] Argparse int / float default Message-ID: <1592901741.64.0.424311777369.issue41087@roundup.psfhosted.org> New submission from Bryan : parser.add_argument('-e', '--Edge', type = int, default = 0.005, metavar = 'Edge') Runs fine. Script uses default of 0.005 even when int specified. But if user tries to change, not an int.... ---------- messages: 372143 nosy: Bryan priority: normal severity: normal status: open title: Argparse int / float default versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 04:47:23 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 23 Jun 2020 08:47:23 +0000 Subject: [issue41087] Argparse int / float default In-Reply-To: <1592901741.64.0.424311777369.issue41087@roundup.psfhosted.org> Message-ID: <1592902043.67.0.632667051457.issue41087@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: There is a documentation note on type casting along with an example similar to the report https://docs.python.org/3.8/library/argparse.html#default > If the default value is a string, the parser parses the value as if it were a command-line argument. In particular, the parser applies any type conversion argument, if provided, before setting the attribute on the Namespace return value. Otherwise, the parser uses the value as is: ---------- nosy: +paul.j3, rhettinger, xtreak type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 04:49:50 2020 From: report at bugs.python.org (Bryan) Date: Tue, 23 Jun 2020 08:49:50 +0000 Subject: [issue41087] Argparse int / float default In-Reply-To: <1592902043.67.0.632667051457.issue41087@roundup.psfhosted.org> Message-ID: Bryan added the comment: Maybe so, But, the issue is, if it trips up a user when they try to use the option, it should trip up the dev when the default is used... On Tue, 23 Jun 2020 18:47 Karthikeyan Singaravelan, wrote: > > Karthikeyan Singaravelan added the comment: > > There is a documentation note on type casting along with an example > similar to the report > https://docs.python.org/3.8/library/argparse.html#default > > > If the default value is a string, the parser parses the value as if it > were a command-line argument. In particular, the parser applies any type > conversion argument, if provided, before setting the attribute on the > Namespace return value. Otherwise, the parser uses the value as is: > > ---------- > nosy: +paul.j3, rhettinger, xtreak > type: -> behavior > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 04:58:36 2020 From: report at bugs.python.org (=?utf-8?b?0JLQuNC60YLQvtGA?=) Date: Tue, 23 Jun 2020 08:58:36 +0000 Subject: [issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak In-Reply-To: <1565194972.64.0.065323919799.issue37788@roundup.psfhosted.org> Message-ID: <1592902716.55.0.132414413317.issue37788@roundup.psfhosted.org> Change by ?????? : ---------- nosy: +ViktorPegy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 05:33:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 09:33:34 +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: <1592904814.18.0.331528218832.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b4e85cadfbc2b1b24ec5f3159e351dbacedaa5e0 by Victor Stinner in branch 'master': bpo-40521: Make dict free lists per-interpreter (GH-20645) https://github.com/python/cpython/commit/b4e85cadfbc2b1b24ec5f3159e351dbacedaa5e0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 05:37:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 09:37:03 +0000 Subject: [issue40887] Free lists are still used after being finalized (cleared) In-Reply-To: <1591431836.65.0.780118303952.issue40887@roundup.psfhosted.org> Message-ID: <1592905023.39.0.402653289704.issue40887@roundup.psfhosted.org> STINNER Victor added the comment: All free lists now have assertions to ensure that they are no longer used after their finalization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 05:38:05 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 09:38:05 +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: <1592905085.16.0.825532026114.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: All free lists are now per-interpreter! See Modules/gcmodule.c: static void clear_freelists(PyThreadState *tstate) { _PyFrame_ClearFreeList(tstate); _PyTuple_ClearFreeList(tstate); _PyFloat_ClearFreeList(tstate); _PyList_ClearFreeList(tstate); _PyDict_ClearFreeList(tstate); _PyAsyncGen_ClearFreeLists(tstate); _PyContext_ClearFreeList(tstate); } I'm still working on the Unicode caches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 05:42:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 09:42:55 +0000 Subject: [issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function In-Reply-To: <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org> Message-ID: <1592905375.0.0.92765632592.issue41078@roundup.psfhosted.org> STINNER Victor added the comment: See "(PEP 620) C API for efficient loop iterating on a sequence of PyObject** or other C types" thread on python-dev: https://mail.python.org/archives/list/python-dev at python.org/thread/632CV42376SWVYAZTHG4ROOV2HRHOVZ7/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 05:46:00 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Tue, 23 Jun 2020 09:46:00 +0000 Subject: [issue41084] Signify that a SyntaxError comes from an fstring in the error message In-Reply-To: <1592870022.32.0.609883413471.issue41084@roundup.psfhosted.org> Message-ID: <1592905560.95.0.223987243974.issue41084@roundup.psfhosted.org> Lysandros Nikolaou added the comment: > My only reservation would be: if the parsing of f-strings is moved into the parser, would it be possible to maintain the error new messages? Probably without a single change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 05:46:18 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 09:46:18 +0000 Subject: [issue31938] Convert selectmodule.c to Argument Clinic In-Reply-To: <1509744030.41.0.213398074469.issue31938@psf.upfronthosting.co.za> Message-ID: <1592905578.69.0.00335513760442.issue31938@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20236 pull_request: https://github.com/python/cpython/pull/21067 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 05:58:24 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Jun 2020 09:58:24 +0000 Subject: [issue41083] plistlib can't decode date from year 0 In-Reply-To: <1592865765.42.0.949299240899.issue41083@roundup.psfhosted.org> Message-ID: <1592906304.33.0.564318862164.issue41083@roundup.psfhosted.org> Christian Heimes added the comment: There is no year 0. It does not exist. The year after 1 BC is the year 1 AD. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 06:13:36 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Jun 2020 10:13:36 +0000 Subject: [issue41083] plistlib can't decode date from year 0 In-Reply-To: <1592865765.42.0.949299240899.issue41083@roundup.psfhosted.org> Message-ID: <1592907216.36.0.0963119681158.issue41083@roundup.psfhosted.org> Christian Heimes added the comment: By the way most datetime libraries will give you incorrect values for dates before 1582, 1752, 1926, 1949 or any dates in that range depending on your country and the predominant religion of your country, county, state, or principality. Dates before 1970 are generally problematic unless the date format also references a calendar system. It's ... messy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 06:41:07 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 10:41:07 +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: <1592908867.6.0.335569127985.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20237 pull_request: https://github.com/python/cpython/pull/21068 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 06:42:42 2020 From: report at bugs.python.org (William Pickard) Date: Tue, 23 Jun 2020 10:42:42 +0000 Subject: [issue41085] Array regression test fails In-Reply-To: <1592873084.36.0.333815567836.issue41085@roundup.psfhosted.org> Message-ID: <1592908962.17.0.766661782424.issue41085@roundup.psfhosted.org> William Pickard added the comment: The only modification I made was to "rt.bat" to have the value of '-u' work properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 06:44:57 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 23 Jun 2020 10:44:57 +0000 Subject: [issue41088] Extend the AST Validator to validate all identifiers Message-ID: <1592909097.69.0.0792029823665.issue41088@roundup.psfhosted.org> New submission from Batuhan Taskaya : These identifiers include; - 'name' of FunctionDef/ClassDef/AsyncFunctionDef/ExceptHandler - 'name' and 'asname' of import aliases within ImportFrom and Import nodes. Any of these cases will crash the interpreter (abort) when used with a constant (such as True). This is a follow-up issue on 40870 ---------- messages: 372154 nosy: BTaskaya priority: normal severity: normal status: open title: Extend the AST Validator to validate all identifiers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 06:47:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 10:47:37 +0000 Subject: [issue41085] Array regression test fails In-Reply-To: <1592873084.36.0.333815567836.issue41085@roundup.psfhosted.org> Message-ID: <1592909257.55.0.857956504773.issue41085@roundup.psfhosted.org> STINNER Victor added the comment: That's a bug in array_array_index() which downcasts "Py_ssize_t i" to long: static PyObject * array_array_index(arrayobject *self, PyObject *v) /*[clinic end generated code: output=d48498d325602167 input=cf619898c6649d08]*/ { Py_ssize_t i; for (i = 0; i < Py_SIZE(self); i++) { PyObject *selfi; int cmp; selfi = getarrayitem((PyObject *)self, i); if (selfi == NULL) return NULL; cmp = PyObject_RichCompareBool(selfi, v, Py_EQ); Py_DECREF(selfi); if (cmp > 0) { return PyLong_FromLong((long)i); // <===== HERE === } else if (cmp < 0) return NULL; } PyErr_SetString(PyExc_ValueError, "array.index(x): x not in array"); return NULL; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 06:47:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 10:47:08 +0000 Subject: [issue41085] Array regression test fails In-Reply-To: <1592873084.36.0.333815567836.issue41085@roundup.psfhosted.org> Message-ID: <1592909228.89.0.982875351344.issue41085@roundup.psfhosted.org> STINNER Victor added the comment: It's Python 3.10 on Windows built in 64-bit with Visual Studio. Extract of test_output.log: L:\GIT\cpython\PCbuild>"L:\GIT\cpython\PCbuild\amd64\python_d.exe" -u -Wd -E -bb -m test -u all,-curses -v -M 24Gb --header == CPython 3.10.0a0 (heads/master-dirty:c96d00e88e, Jun 22 2020, 19:15:48) [MSC v.1926 64 bit (AMD64)] == Windows-10-10.0.19041-SP0 little-endian == cwd: L:\GIT\cpython\build\test_python_20756 == CPU count: 8 == encodings: locale=cp1252, FS=utf-8 (...) test_index (test.test_array.LargeArrayTest) ... ... expected peak memory use: 4.2G FAIL (...) ====================================================================== FAIL: test_index (test.test_array.LargeArrayTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "L:\GIT\cpython\lib\test\support\__init__.py", line 837, in wrapper return f(self, maxsize) File "L:\GIT\cpython\lib\test\test_array.py", line 1460, in test_index self.assertEqual(example.index(11), size+3) AssertionError: -2147483645 != 2147483651 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 06:47:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 10:47:49 +0000 Subject: [issue41085] [easy C] Array regression test fails In-Reply-To: <1592873084.36.0.333815567836.issue41085@roundup.psfhosted.org> Message-ID: <1592909269.1.0.953131997929.issue41085@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +easy (C) title: Array regression test fails -> [easy C] Array regression test fails _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 06:47:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 10:47:55 +0000 Subject: [issue41085] [easy C] Array regression test fails In-Reply-To: <1592873084.36.0.333815567836.issue41085@roundup.psfhosted.org> Message-ID: <1592909275.59.0.254639414462.issue41085@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +newcomer friendly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 06:48:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 10:48:20 +0000 Subject: [issue41085] [easy C] array.array.index() method downcasts Py_ssize_t to long In-Reply-To: <1592873084.36.0.333815567836.issue41085@roundup.psfhosted.org> Message-ID: <1592909300.33.0.195811057345.issue41085@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: [easy C] Array regression test fails -> [easy C] array.array.index() method downcasts Py_ssize_t to long _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 06:57:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 10:57:41 +0000 Subject: [issue23427] Add sys.orig_argv: original command line arguments passed to the Python executable In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1592909861.2.0.334811348481.issue23427@roundup.psfhosted.org> STINNER Victor added the comment: The setproctitle project uses Py_GetArgcArgv() and would benefit of PyConfig.orig_argv, see: * https://bugs.python.org/issue15577#msg370965 * https://github.com/dvarrazzo/py-setproctitle/issues/8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 07:01:11 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 23 Jun 2020 11:01:11 +0000 Subject: [issue41088] Extend the AST Validator to validate all identifiers In-Reply-To: <1592909097.69.0.0792029823665.issue41088@roundup.psfhosted.org> Message-ID: <1592910071.2.0.115165443444.issue41088@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +pablogsal, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 07:02:24 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 23 Jun 2020 11:02:24 +0000 Subject: [issue41088] Extend the AST Validator to validate all identifiers In-Reply-To: <1592909097.69.0.0792029823665.issue41088@roundup.psfhosted.org> Message-ID: <1592910144.78.0.175162840262.issue41088@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +20238 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21069 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 07:09:26 2020 From: report at bugs.python.org (Nikita Nemkin) Date: Tue, 23 Jun 2020 11:09:26 +0000 Subject: [issue41089] Filters and other issues in Visual Studio projects Message-ID: <1592910566.56.0.465564486619.issue41089@roundup.psfhosted.org> New submission from Nikita Nemkin : Visual Studio projects need a bit of grooming. * File filters don't reflect recent file movements and additions. * Solution file is missing _zoneinfo project entries, resulting in dirty repo on every save. * bdist_wininst project hasn't been updated with the new zlib location. ---------- components: Windows messages: 372158 nosy: nnemkin, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Filters and other issues in Visual Studio projects type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 07:14:07 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 23 Jun 2020 11:14:07 +0000 Subject: [issue41083] plistlib can't decode date from year 0 In-Reply-To: <1592865765.42.0.949299240899.issue41083@roundup.psfhosted.org> Message-ID: <1592910847.17.0.146313399182.issue41083@roundup.psfhosted.org> Ronald Oussoren added the comment: Year 0 does exist in ISO 8601 though, but that wouldn't help us here as year 0 in that standard is year 1 BCE which is not representable in Python's datetime module. I'm not sure what we can do about this. The best we could do with plistlib is probably to add an option to either set unrepresentable dates to None or represent those dates as strings. A more comprehensive fix is to change datetime to be able to represent these dates, but that's a much larger change that likely requires a PEP. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 07:18:11 2020 From: report at bugs.python.org (Nikita Nemkin) Date: Tue, 23 Jun 2020 11:18:11 +0000 Subject: [issue41089] Filters and other issues in Visual Studio projects In-Reply-To: <1592910566.56.0.465564486619.issue41089@roundup.psfhosted.org> Message-ID: <1592911091.07.0.981012746733.issue41089@roundup.psfhosted.org> Change by Nikita Nemkin : ---------- keywords: +patch pull_requests: +20239 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21070 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 07:53:05 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 23 Jun 2020 11:53:05 +0000 Subject: [issue41090] Support for "Apple Silicon" Message-ID: <1592913185.49.0.15166324196.issue41090@roundup.psfhosted.org> New submission from Ronald Oussoren : The attached patch implements "universal2" as an option for "--with-univeral-archs" to enable building "Universal 2" binaries on macOS (with x86_64 and arm64 code). This is an extension of the already existing support for other flavours of fat binaries on macOS. NOTE: I've attached a patch instead of creating a PR because I'm not logged on to GitHub in the macOS 11 VM where I created this patch. I'll obviously create a PR later. ---------- assignee: ronaldoussoren components: macOS files: universal2.patch keywords: patch messages: 372160 nosy: ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Support for "Apple Silicon" versions: Python 3.10, Python 3.9 Added file: https://bugs.python.org/file49258/universal2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 07:59:05 2020 From: report at bugs.python.org (William Pickard) Date: Tue, 23 Jun 2020 11:59:05 +0000 Subject: [issue41085] [easy C] array.array.index() method downcasts Py_ssize_t to long In-Reply-To: <1592873084.36.0.333815567836.issue41085@roundup.psfhosted.org> Message-ID: <1592913545.85.0.928981075026.issue41085@roundup.psfhosted.org> Change by William Pickard : ---------- keywords: +patch pull_requests: +20240 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21071 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 08:08:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 12:08:00 +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: <1592914080.13.0.457014042105.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 261cfedf7657a515e04428bba58eba2a9bb88208 by Victor Stinner in branch 'master': bpo-40521: Make the empty frozenset per interpreter (GH-21068) https://github.com/python/cpython/commit/261cfedf7657a515e04428bba58eba2a9bb88208 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 08:30:31 2020 From: report at bugs.python.org (Goheakan) Date: Tue, 23 Jun 2020 12:30:31 +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: <1592915431.39.0.639515098977.issue40605@roundup.psfhosted.org> Goheakan added the comment: Bonjour Isa, Hello Terry ! "/usr/bin/env: ?python?: Aucun fichier ou dossier de ce type" or "/usr/bin/env: ?python?: No such file or directory" I was in the same trouble of you today and I solved it. So it's not a bug, some Unix Systems Operating (like Ubuntu and derivetives) need a little help to start the compilation in Python. A sort of link between Python and Python3. You can do it by installing this package => python-is-python3 by the simple command : sudo apt install python-is-python3 Now run your program as usual with : ./[your_program] Isa (sab1703) : Si tu as besoin d'aide en fran?ais n'h?site pas ??? Hope it's gonna help (^?^) ---------- nosy: +Goheakan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 08:54:33 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 23 Jun 2020 12:54:33 +0000 Subject: [issue41090] Support for "Apple Silicon" In-Reply-To: <1592913185.49.0.15166324196.issue41090@roundup.psfhosted.org> Message-ID: <1592916873.42.0.384528176008.issue41090@roundup.psfhosted.org> Mark Dickinson added the comment: @Ronald: a bit off-topic for this issue, but do you know if there are or will be any publicly available developer resources for people moving to Apple Silicon? For obvious reasons, I'm interested in what the floating-point and libm situation is going to look like. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 09:12:37 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Jun 2020 13:12:37 +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: <1592917957.15.0.936420353113.issue40521@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- nosy: +rhettinger nosy_count: 4.0 -> 5.0 pull_requests: +20241 pull_request: https://github.com/python/cpython/pull/21073 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 09:14:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 13:14:11 +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: <1592918051.27.0.226015420012.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20242 pull_request: https://github.com/python/cpython/pull/21074 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 09:20:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 13:20:12 +0000 Subject: [issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable In-Reply-To: <1556110680.79.0.127639989845.issue36710@roundup.psfhosted.org> Message-ID: <1592918412.54.0.572456770205.issue36710@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20243 pull_request: https://github.com/python/cpython/pull/21075 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 09:21:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 13:21:20 +0000 Subject: [issue41085] [easy C] array.array.index() method downcasts Py_ssize_t to long In-Reply-To: <1592873084.36.0.333815567836.issue41085@roundup.psfhosted.org> Message-ID: <1592918480.31.0.421539058437.issue41085@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1d3dad5f96ed445b958ec53dfa0d46812f2162d9 by WildCard65 in branch 'master': bpo-41085: Fix array.array.index() on 64-bit Windows (GH-21071) https://github.com/python/cpython/commit/1d3dad5f96ed445b958ec53dfa0d46812f2162d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 09:21:51 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Jun 2020 13:21:51 +0000 Subject: [issue41085] [easy C] array.array.index() method downcasts Py_ssize_t to long In-Reply-To: <1592873084.36.0.333815567836.issue41085@roundup.psfhosted.org> Message-ID: <1592918511.46.0.989984512166.issue41085@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20245 pull_request: https://github.com/python/cpython/pull/21077 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 09:21:42 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Jun 2020 13:21:42 +0000 Subject: [issue41085] [easy C] array.array.index() method downcasts Py_ssize_t to long In-Reply-To: <1592873084.36.0.333815567836.issue41085@roundup.psfhosted.org> Message-ID: <1592918502.13.0.300186789128.issue41085@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +20244 pull_request: https://github.com/python/cpython/pull/21076 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 09:24:41 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 23 Jun 2020 13:24:41 +0000 Subject: [issue41090] Support for "Apple Silicon" In-Reply-To: <1592913185.49.0.15166324196.issue41090@roundup.psfhosted.org> Message-ID: <1592918681.14.0.095016126899.issue41090@roundup.psfhosted.org> Mark Dickinson added the comment: > a bit off-topic for this issue Apologies: on reflection, it's way off-topic. Please ignore this and the last message; I'll find a more appropriate place to take this up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 09:40:55 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Jun 2020 13:40:55 +0000 Subject: [issue41085] [easy C] array.array.index() method downcasts Py_ssize_t to long In-Reply-To: <1592873084.36.0.333815567836.issue41085@roundup.psfhosted.org> Message-ID: <1592919655.28.0.891244580417.issue41085@roundup.psfhosted.org> miss-islington added the comment: New changeset c6e24e7420a03a1751004e255a6f6c14265b9ea1 by Miss Islington (bot) in branch '3.8': bpo-41085: Fix array.array.index() on 64-bit Windows (GH-21071) https://github.com/python/cpython/commit/c6e24e7420a03a1751004e255a6f6c14265b9ea1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 09:41:31 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Jun 2020 13:41:31 +0000 Subject: [issue41085] [easy C] array.array.index() method downcasts Py_ssize_t to long In-Reply-To: <1592873084.36.0.333815567836.issue41085@roundup.psfhosted.org> Message-ID: <1592919691.87.0.480841627395.issue41085@roundup.psfhosted.org> miss-islington added the comment: New changeset 92f8b480bab408be09bc1631cf2e0e5a4641b731 by Miss Islington (bot) in branch '3.9': bpo-41085: Fix array.array.index() on 64-bit Windows (GH-21071) https://github.com/python/cpython/commit/92f8b480bab408be09bc1631cf2e0e5a4641b731 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 09:46:39 2020 From: report at bugs.python.org (Chenyoo Hao) Date: Tue, 23 Jun 2020 13:46:39 +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: <1592919999.05.0.829235818571.issue40773@roundup.psfhosted.org> Change by Chenyoo Hao : ---------- pull_requests: +20246 pull_request: https://github.com/python/cpython/pull/21080 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 09:50:23 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Jun 2020 13:50:23 +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: <1592920223.88.0.381252160451.issue40521@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 32f2eda85957365d208f499b730d30b7eb419741 by Raymond Hettinger in branch 'master': bpo-40521: Remove freelist from collections.deque() (GH-21073) https://github.com/python/cpython/commit/32f2eda85957365d208f499b730d30b7eb419741 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 09:52:54 2020 From: report at bugs.python.org (William Pickard) Date: Tue, 23 Jun 2020 13:52:54 +0000 Subject: [issue41085] [easy C] array.array.index() method downcasts Py_ssize_t to long In-Reply-To: <1592873084.36.0.333815567836.issue41085@roundup.psfhosted.org> Message-ID: <1592920374.53.0.585701990418.issue41085@roundup.psfhosted.org> Change by William Pickard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 09:54:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 13:54:44 +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: <1592920484.57.0.881478144614.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c41eed1a874e2f22bde45c3c89418414b7a37f46 by Victor Stinner in branch 'master': bpo-40521: Make bytes singletons per interpreter (GH-21074) https://github.com/python/cpython/commit/c41eed1a874e2f22bde45c3c89418414b7a37f46 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 09:55:13 2020 From: report at bugs.python.org (Chenyoo Hao) Date: Tue, 23 Jun 2020 13:55:13 +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: <1592920513.94.0.741309146614.issue40773@roundup.psfhosted.org> Change by Chenyoo Hao : ---------- pull_requests: +20247 pull_request: https://github.com/python/cpython/pull/21081 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 09:55:15 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 13:55:15 +0000 Subject: [issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable In-Reply-To: <1556110680.79.0.127639989845.issue36710@roundup.psfhosted.org> Message-ID: <1592920515.42.0.777559205436.issue36710@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 61b649296110dcb38e67db382a7e8427c5eb75d0 by Victor Stinner in branch 'master': bpo-36710: Pass tstate explicitly in abstract.c (GH-21075) https://github.com/python/cpython/commit/61b649296110dcb38e67db382a7e8427c5eb75d0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 09:55:36 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 23 Jun 2020 13:55:36 +0000 Subject: [issue41090] Support for "Apple Silicon" In-Reply-To: <1592913185.49.0.15166324196.issue41090@roundup.psfhosted.org> Message-ID: <1592920536.15.0.109478878536.issue41090@roundup.psfhosted.org> Ronald Oussoren added the comment: I only know what's on Apple website. There will be documentation, and there is developer hardware. I do have a VM running the new macOS with a version of Xcode that can compile for the new hardware, but that's where it ends for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 09:57:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 13:57:08 +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: <1592920628.81.0.450499607769.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20248 pull_request: https://github.com/python/cpython/pull/21082 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 09:58:55 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 23 Jun 2020 13:58:55 +0000 Subject: [issue39699] Some CIs silence potentially useful output from make In-Reply-To: <1582201406.96.0.183994759448.issue39699@roundup.psfhosted.org> Message-ID: <1592920735.25.0.484210627173.issue39699@roundup.psfhosted.org> Mark Dickinson added the comment: The text "TEST CHANGE TO BE UNDONE" is currently visible here: https://docs.python.org/3/whatsnew/3.0.html It was introduced in commit 343bc06d8047e4a2e675394528dbb5155be1b3b5. Should this test change have been undone? ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 10:09:59 2020 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 23 Jun 2020 14:09:59 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1592921399.26.0.289638582078.issue41056@roundup.psfhosted.org> Change by Paul Ganssle : ---------- nosy: +p-ganssle nosy_count: 3.0 -> 4.0 pull_requests: +20249 pull_request: https://github.com/python/cpython/pull/21083 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 10:21:35 2020 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 23 Jun 2020 14:21:35 +0000 Subject: [issue41065] Use zip-strict in zoneinfo In-Reply-To: <1592748337.97.0.906987974024.issue41065@roundup.psfhosted.org> Message-ID: <1592922095.14.0.790078593884.issue41065@roundup.psfhosted.org> Paul Ganssle added the comment: New changeset bc43f6e21244f31d25896875430174cd4ac7604c by Ram Rachum in branch 'master': bpo-41065: Use zip-strict in zoneinfo (GH-21031) https://github.com/python/cpython/commit/bc43f6e21244f31d25896875430174cd4ac7604c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 10:36:55 2020 From: report at bugs.python.org (Chris Withers) Date: Tue, 23 Jun 2020 14:36:55 +0000 Subject: [issue40133] Provide additional matchers for unittest.mock In-Reply-To: <1585735205.76.0.306632606173.issue40133@roundup.psfhosted.org> Message-ID: <1592923015.94.0.578544839808.issue40133@roundup.psfhosted.org> Chris Withers added the comment: Okay, but to be up-front about this, I don't see any place in the stdlib for any more "helpers" that could more easily be maintained on pypi and wouldn't incur further support burden for anyone looking after this part of the standard library. The only "helper" in the section you refer to is https://docs.python.org/3/library/unittest.mock.html#mock-open which I'd consider vestigal and a bit of a maintenance magnet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 10:37:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 14:37:17 +0000 Subject: [issue41085] [easy C] array.array.index() method downcasts Py_ssize_t to long In-Reply-To: <1592873084.36.0.333815567836.issue41085@roundup.psfhosted.org> Message-ID: <1592923037.56.0.0219506630554.issue41085@roundup.psfhosted.org> STINNER Victor added the comment: Thanks William Pickard for the bug report and the fix! ---------- components: +Library (Lib) -Tests, Windows versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 10:40:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 14:40:49 +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: <1592923249.69.0.807153969848.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 522691c46e2ae51faaad5bbbce7d959dd61770df by Victor Stinner in branch 'master': bpo-40521: Cleanup code of free lists (GH-21082) https://github.com/python/cpython/commit/522691c46e2ae51faaad5bbbce7d959dd61770df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 10:43:54 2020 From: report at bugs.python.org (Beuc) Date: Tue, 23 Jun 2020 14:43:54 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1592923434.24.0.545112581884.issue41004@roundup.psfhosted.org> Change by Beuc : ---------- nosy: +Beuc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 11:01:56 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Tue, 23 Jun 2020 15:01:56 +0000 Subject: [issue41084] Signify that a SyntaxError comes from an fstring in the error message In-Reply-To: <1592870022.32.0.609883413471.issue41084@roundup.psfhosted.org> Message-ID: <1592924516.14.0.686480221672.issue41084@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- keywords: +patch pull_requests: +20250 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21084 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 11:02:57 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Jun 2020 15:02:57 +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: <1592924577.71.0.550881471697.issue40521@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +20251 pull_request: https://github.com/python/cpython/pull/21085 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 11:11:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 15:11:50 +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: <1592925110.45.0.615324953284.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20252 pull_request: https://github.com/python/cpython/pull/21086 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 11:21:14 2020 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 23 Jun 2020 15:21:14 +0000 Subject: [issue36921] Deprecate yield from and @coroutine in asyncio In-Reply-To: <1558018338.65.0.625435116263.issue36921@roundup.psfhosted.org> Message-ID: <1592925674.49.0.588069779887.issue36921@roundup.psfhosted.org> Josh Rosenberg added the comment: Was this supposed to deprecate using types.coroutine as a decorator as well? Because that's not clearly documented, which means people can still use it to make generator-based coroutines without async def. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 11:26:57 2020 From: report at bugs.python.org (Manuel Jacob) Date: Tue, 23 Jun 2020 15:26:57 +0000 Subject: [issue41091] Remove recommendation in curses module documentation to initialize LC_ALL and encode strings Message-ID: <1592926017.53.0.619449435613.issue41091@roundup.psfhosted.org> New submission from Manuel Jacob : The documentation for the curses module (https://docs.python.org/3.9/library/curses.html) has the following note: > Since version 5.4, the ncurses library decides how to interpret non-ASCII data using the nl_langinfo function. That means that you have to call locale.setlocale() in the application and encode Unicode strings using one of the system?s available encodings. This example uses the system?s default encoding: > > import locale > locale.setlocale(locale.LC_ALL, '') > code = locale.getpreferredencoding() > > Then use code as the encoding for str.encode() calls. The recommendation to call `locale.setlocale(locale.LC_ALL, '')` is problematic as it initializes all locale categories to the user settings, which might be unintended and is not necessary for curses to work correctly. Initializing LC_CTYPE is sufficient for nl_langinfo() to return the correct encoding. Current versions of Python (*) initialize LC_CTYPE at interpreter startup. Therefore calling locale.setlocale() should not be necessary at all. The curses module automatically encodes strings. Therefore the recommendation to manually encode strings is outdated. (*) It seems to be the case since 177d921c8c03d30daa32994362023f777624b10d. Why was is not previously done on Python 2 and on Python 3 on Windows? ---------- assignee: docs at python components: Documentation messages: 372178 nosy: docs at python, mjacob priority: normal severity: normal status: open title: Remove recommendation in curses module documentation to initialize LC_ALL and encode strings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 11:34:31 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 23 Jun 2020 15:34:31 +0000 Subject: [issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?) In-Reply-To: <1584138664.49.0.0727456636956.issue39960@roundup.psfhosted.org> Message-ID: <1592926471.85.0.495050261996.issue39960@roundup.psfhosted.org> Petr Viktorin added the comment: > do we still only support single inheritance at the C level? Not any more. Heap types may have multiple bases, and they can be created at the C level (since Python 3.2, PEP 384). > So, I think we should do something like walking up the hierarchy to find the C function in it that is currently being called, and then check if it's the one we would expect or if a subclass defines a different one. The current check does not bother to search and just assumes that it knows which (super)type defines the right function to call. Should we be bold and skip the check for heap types? That would mean that when/if `str` is converted to a heap type, you could do `object.__delattr__(str, "lower")`. That would break your Python, but only at the Python level (similar to things like `import builtins; del builtins.__build_class__`). Heap types are not shared between interpreters, so that reason is gone. But Guido's [2003 mail] suggests there are other reasons to prevent changing built-in types. What are they? [2003 mail] https://mail.python.org/pipermail/python-dev/2003-April/034535.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 11:39:25 2020 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 23 Jun 2020 15:39:25 +0000 Subject: [issue25257] In subject line email library inserts unwanted space after a thousands comma in a number In-Reply-To: <1443464392.64.0.380133301442.issue25257@psf.upfronthosting.co.za> Message-ID: <1592926765.89.0.595053925752.issue25257@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 Tue Jun 23 11:43:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 15:43:03 +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: <1592926982.99.0.0478823234561.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f9bd05e83e32bece49de5af0c9a232325c57648a by Raymond Hettinger in branch 'master': bpo-40521: Empty frozenset is no longer a singleton (GH-21085) https://github.com/python/cpython/commit/f9bd05e83e32bece49de5af0c9a232325c57648a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 11:51:47 2020 From: report at bugs.python.org (hai shi) Date: Tue, 23 Jun 2020 15:51:47 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1592927507.32.0.338927210487.issue1635741@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +20253 pull_request: https://github.com/python/cpython/pull/21087 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 11:58:21 2020 From: report at bugs.python.org (SilentGhost) Date: Tue, 23 Jun 2020 15:58:21 +0000 Subject: [issue25257] In subject line email library inserts unwanted space after a thousands comma in a number In-Reply-To: <1443464392.64.0.380133301442.issue25257@psf.upfronthosting.co.za> Message-ID: <1592927901.28.0.714537468542.issue25257@roundup.psfhosted.org> Change by SilentGhost : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 12:20:44 2020 From: report at bugs.python.org (paul j3) Date: Tue, 23 Jun 2020 16:20:44 +0000 Subject: [issue41087] Argparse int / float default In-Reply-To: <1592901741.64.0.424311777369.issue41087@roundup.psfhosted.org> Message-ID: <1592929244.92.0.656168653058.issue41087@roundup.psfhosted.org> paul j3 added the comment: No, parameters like `type` let the developer control what his users provides. Violating that produces a runtime error, and exit. But in general argparse does not try to control values that the developer uses. There's plenty of time during development to catch error such as this - if they are errors at all. 'type' does not 'declare' what the attribute will be. It is a function that is applied to the input string, and converts that to something or other, or raises a TypeError. It is used only if there is a string value to work on, either from the user, or a string default. This is not a bug, so should be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 12:44:46 2020 From: report at bugs.python.org (Stephen Finucane) Date: Tue, 23 Jun 2020 16:44:46 +0000 Subject: [issue41092] Report actual size from 'os.path.getsize' Message-ID: <1592930686.73.0.679149711266.issue41092@roundup.psfhosted.org> New submission from Stephen Finucane : The 'os.path.getsize' API returns the apparent size of the file at *path*, that is, the number of bytes the file reports itself as consuming. However, it's often useful to get the actual size of the file, or the size of file on disk. It would be helpful if one could get this same information from 'os.path.getsize'. ---------- components: Library (Lib) messages: 372183 nosy: stephenfin priority: normal severity: normal status: open title: Report actual size from 'os.path.getsize' type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 12:53:38 2020 From: report at bugs.python.org (Stephen Finucane) Date: Tue, 23 Jun 2020 16:53:38 +0000 Subject: [issue41092] Report actual size from 'os.path.getsize' In-Reply-To: <1592930686.73.0.679149711266.issue41092@roundup.psfhosted.org> Message-ID: <1592931218.13.0.0212960987733.issue41092@roundup.psfhosted.org> Change by Stephen Finucane : ---------- keywords: +patch pull_requests: +20254 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21088 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 13:06:00 2020 From: report at bugs.python.org (Bryan) Date: Tue, 23 Jun 2020 17:06:00 +0000 Subject: [issue41087] Argparse int / float default In-Reply-To: <1592929244.92.0.656168653058.issue41087@roundup.psfhosted.org> Message-ID: Bryan added the comment: This sort of ambiguity is why I like strongly typed languages and languages where timtoady is not seen often. I can guarantee you, that if argparse was implemented in Pascal (and copt most probably has been), that if type was specified and a default given, that the default would have to adhere to that type. It is just programming common sense.... On Wed, 24 Jun 2020 02:20 paul j3, wrote: > > paul j3 added the comment: > > No, parameters like `type` let the developer control what his users > provides. Violating that produces a runtime error, and exit. > > But in general argparse does not try to control values that the developer > uses. There's plenty of time during development to catch error such as > this - if they are errors at all. > > 'type' does not 'declare' what the attribute will be. It is a function > that is applied to the input string, and converts that to something or > other, or raises a TypeError. It is used only if there is a string value > to work on, either from the user, or a string default. > > This is not a bug, so should be closed. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 13:24:51 2020 From: report at bugs.python.org (Michael Shields) Date: Tue, 23 Jun 2020 17:24:51 +0000 Subject: [issue41083] plistlib can't decode date from year 0 In-Reply-To: <1592865765.42.0.949299240899.issue41083@roundup.psfhosted.org> Message-ID: <1592933091.58.0.133289007194.issue41083@roundup.psfhosted.org> Michael Shields added the comment: You're correct that there is no year 0, but as you see Apple does use 0000-12-30T00:00:00Z in their plists. I did not set that in order to test plistlib; it's what I found on my system. If it's a goal that plistlib be able to parse system-generated plists and round-trip them to an equivalent serialization -- and I think that should be a goal -- then using strings or None also won't work. Maybe there could be a plistlib.Datetime for dates which are outside what datetime can represent? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 13:31:52 2020 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 23 Jun 2020 17:31:52 +0000 Subject: [issue41087] Argparse int / float default In-Reply-To: <1592901741.64.0.424311777369.issue41087@roundup.psfhosted.org> Message-ID: <1592933512.57.0.257114404355.issue41087@roundup.psfhosted.org> Vedran ?a?i? added the comment: Yes, it is common sense in statically typed languages. Python is not statically typed. Many other things are also "common sense" in various paradigms, which doesn't mean they should also be in Python. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 13:32:40 2020 From: report at bugs.python.org (Ammar Askar) Date: Tue, 23 Jun 2020 17:32:40 +0000 Subject: [issue39699] Some CIs silence potentially useful output from make In-Reply-To: <1582201406.96.0.183994759448.issue39699@roundup.psfhosted.org> Message-ID: <1592933560.94.0.993738972338.issue39699@roundup.psfhosted.org> Change by Ammar Askar : ---------- pull_requests: +20255 pull_request: https://github.com/python/cpython/pull/21089 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 13:35:55 2020 From: report at bugs.python.org (Ammar Askar) Date: Tue, 23 Jun 2020 17:35:55 +0000 Subject: [issue39699] Some CIs silence potentially useful output from make In-Reply-To: <1582201406.96.0.183994759448.issue39699@roundup.psfhosted.org> Message-ID: <1592933755.44.0.853228635144.issue39699@roundup.psfhosted.org> Ammar Askar added the comment: Thanks for finding this Mark, looks like this was accidentally introduced in the 3.8 backport for testing the changes: https://github.com/python/cpython/pull/18670 The master (6aa1f1ecf7142a4117eedb8c570f30da1598616c) and 3.7 (3bf9de2fb954bd1131f4f41517d7d5c316fb95f8) commits look clean. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 13:41:13 2020 From: report at bugs.python.org (Ammar Askar) Date: Tue, 23 Jun 2020 17:41:13 +0000 Subject: [issue39699] Some CIs silence potentially useful output from make In-Reply-To: <1582201406.96.0.183994759448.issue39699@roundup.psfhosted.org> Message-ID: <1592934073.02.0.0348943352644.issue39699@roundup.psfhosted.org> Ammar Askar added the comment: Opened up a quick pull request to fix it: https://github.com/python/cpython/pull/21089 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 13:46:09 2020 From: report at bugs.python.org (Bryan) Date: Tue, 23 Jun 2020 17:46:09 +0000 Subject: [issue41087] Argparse int / float default In-Reply-To: <1592933512.57.0.257114404355.issue41087@roundup.psfhosted.org> Message-ID: Bryan added the comment: So you agree, Python lacks common sense... On Wed, 24 Jun 2020 at 03:32, Vedran ?a?i? wrote: > > Vedran ?a?i? added the comment: > > Yes, it is common sense in statically typed languages. Python is not > statically typed. Many other things are also "common sense" in various > paradigms, which doesn't mean they should also be in Python. > > ---------- > nosy: +veky > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 13:55:49 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Jun 2020 17:55:49 +0000 Subject: [issue41087] Argparse int / float default In-Reply-To: <1592901741.64.0.424311777369.issue41087@roundup.psfhosted.org> Message-ID: <1592934949.93.0.890580657777.issue41087@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 14:28:33 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Jun 2020 18:28:33 +0000 Subject: [issue39699] Some CIs silence potentially useful output from make In-Reply-To: <1582201406.96.0.183994759448.issue39699@roundup.psfhosted.org> Message-ID: <1592936913.08.0.297915228019.issue39699@roundup.psfhosted.org> Steve Dower added the comment: New changeset 6eab52ffadb2836adb59d0578c84d247f05e19b1 by Ammar Askar in branch '3.8': bpo-39699: Remove accidentally committed test change (GH-21089) https://github.com/python/cpython/commit/6eab52ffadb2836adb59d0578c84d247f05e19b1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 14:34:35 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Jun 2020 18:34:35 +0000 Subject: [issue41072] Python 3.8.3 passively introduced open source software contains CVE vulnerability In-Reply-To: <1592812748.09.0.71716339611.issue41072@roundup.psfhosted.org> Message-ID: <1592937275.01.0.909476385731.issue41072@roundup.psfhosted.org> Steve Dower added the comment: It depends on your application. Almost all of these are exposed directly, so you will be vulnerable if your application uses them in the way described by the CVE. I'm not familiar enough with the vulnerabilities in question to tell you for sure, and I doubt any of the other volunteers here are either. I do seem to recall that one of the OpenSSL vulnerabilities only applied if you were serving a particular TLS version, which won't impact most Python apps. And the wininst*.exe files are only used with bdist_wininst packages, which nobody should be using anymore. If you're not able to evaluate them yourself, you might look for a paid company or consultant who can help you out. We've already updated the dependencies that need to be updated for upcoming releases. ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 14:41:57 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Jun 2020 18:41:57 +0000 Subject: [issue41089] Filters and other issues in Visual Studio projects In-Reply-To: <1592910566.56.0.465564486619.issue41089@roundup.psfhosted.org> Message-ID: <1592937717.13.0.578996978032.issue41089@roundup.psfhosted.org> Steve Dower added the comment: New changeset fe2a48c605d98ac02ab2b9593cb87ce364aeae2d by Nikita Nemkin in branch 'master': bpo-41089: Filters and other issues in Visual Studio projects (GH-21070) https://github.com/python/cpython/commit/fe2a48c605d98ac02ab2b9593cb87ce364aeae2d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 14:48:36 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Jun 2020 18:48:36 +0000 Subject: [issue41089] Filters and other issues in Visual Studio projects In-Reply-To: <1592910566.56.0.465564486619.issue41089@roundup.psfhosted.org> Message-ID: <1592938116.28.0.368301814469.issue41089@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +20256 pull_request: https://github.com/python/cpython/pull/21090 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 14:49:19 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Jun 2020 18:49:19 +0000 Subject: [issue41089] Filters and other issues in Visual Studio projects In-Reply-To: <1592910566.56.0.465564486619.issue41089@roundup.psfhosted.org> Message-ID: <1592938159.73.0.430068473727.issue41089@roundup.psfhosted.org> Change by Steve Dower : ---------- assignee: -> steve.dower resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 14:49:27 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Jun 2020 18:49:27 +0000 Subject: [issue41089] Filters and other issues in Visual Studio projects In-Reply-To: <1592910566.56.0.465564486619.issue41089@roundup.psfhosted.org> Message-ID: <1592938167.97.0.350469325413.issue41089@roundup.psfhosted.org> Steve Dower added the comment: Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 15:01:13 2020 From: report at bugs.python.org (Tony) Date: Tue, 23 Jun 2020 19:01:13 +0000 Subject: [issue41093] BaseServer's server_forever() shutdown immediately when calling shutdown() Message-ID: <1592938873.08.0.742314253675.issue41093@roundup.psfhosted.org> New submission from Tony : Currently calling BaseServer's shutdown() function will not make serve_forever() return immediately from it's select(). I suggest adding a new function called server_shutdown() that will make serve_forever() shutdown immediately. Then in TCPServer(BaseServer) all we need to do is call self.socket.shutdown(socket.SHUT_RDWR) in server_shutdown()'s implementation. To test this I made a simple script: import threading import time from functools import partial from http.server import HTTPServer, SimpleHTTPRequestHandler def serve_http(server): server.serve_forever(poll_interval=2.5) def main(): with HTTPServer(('', 8000), SimpleHTTPRequestHandler) as server: t = threading.Thread(target=partial(serve_http, server)) t.start() time.sleep(3) start = time.time() print('shutdown') server.shutdown() print(f'time it took: {time.time() - start}') if __name__ == "__main__": main() ---------- components: Library (Lib) messages: 372194 nosy: tontinton priority: normal severity: normal status: open title: BaseServer's server_forever() shutdown immediately when calling shutdown() type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 15:02:32 2020 From: report at bugs.python.org (Tony) Date: Tue, 23 Jun 2020 19:02:32 +0000 Subject: [issue41093] BaseServer's server_forever() shutdown immediately when calling shutdown() In-Reply-To: <1592938873.08.0.742314253675.issue41093@roundup.psfhosted.org> Message-ID: <1592938952.26.0.288685424566.issue41093@roundup.psfhosted.org> Tony added the comment: By the way I have to ask, if I want this feature to be merged (this is my first PR) should I make a PR to 3.6/3.7/3.8/3.9 and master? Or should I create a PR to master only? thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 15:06:04 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Jun 2020 19:06:04 +0000 Subject: [issue41054] Simplify resource compilation on Windows In-Reply-To: <1592670311.94.0.80143826005.issue41054@roundup.psfhosted.org> Message-ID: <1592939164.84.0.896084357838.issue41054@roundup.psfhosted.org> Steve Dower added the comment: New changeset 4efc3360c9a83d5891f27ed67b4f0ab7275d2ab4 by Nikita Nemkin in branch 'master': bpo-41054: Simplify resource compilation on Windows (GH-21004) https://github.com/python/cpython/commit/4efc3360c9a83d5891f27ed67b4f0ab7275d2ab4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 15:06:11 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Jun 2020 19:06:11 +0000 Subject: [issue41054] Simplify resource compilation on Windows In-Reply-To: <1592670311.94.0.80143826005.issue41054@roundup.psfhosted.org> Message-ID: <1592939171.0.0.116131831323.issue41054@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +20257 pull_request: https://github.com/python/cpython/pull/21091 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 15:27:38 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Jun 2020 19:27:38 +0000 Subject: [issue41054] Simplify resource compilation on Windows In-Reply-To: <1592670311.94.0.80143826005.issue41054@roundup.psfhosted.org> Message-ID: <1592940458.01.0.832711408794.issue41054@roundup.psfhosted.org> miss-islington added the comment: New changeset cebd43fbfd25a80404728f73edc301f9558d9410 by Miss Islington (bot) in branch '3.9': bpo-41054: Simplify resource compilation on Windows (GH-21004) https://github.com/python/cpython/commit/cebd43fbfd25a80404728f73edc301f9558d9410 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 15:31:21 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Jun 2020 19:31:21 +0000 Subject: [issue41089] Filters and other issues in Visual Studio projects In-Reply-To: <1592910566.56.0.465564486619.issue41089@roundup.psfhosted.org> Message-ID: <1592940681.4.0.753480834471.issue41089@roundup.psfhosted.org> Steve Dower added the comment: New changeset 47cd931a61146793faa44e01516bf07b0c23380c by Steve Dower in branch '3.9': bpo-41089: Filters and other issues in Visual Studio projects (GH-21070) https://github.com/python/cpython/commit/47cd931a61146793faa44e01516bf07b0c23380c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 15:33:30 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Jun 2020 19:33:30 +0000 Subject: [issue41039] Simplify python3.dll build In-Reply-To: <1592584036.23.0.347214520388.issue41039@roundup.psfhosted.org> Message-ID: <1592940810.37.0.983723868581.issue41039@roundup.psfhosted.org> Steve Dower added the comment: New changeset 2c6e4e91c5a4d3f25908108f4ed32aba936df70c by Nikita Nemkin in branch 'master': bpo-41039: Simplify python3.dll build (GH-20989) https://github.com/python/cpython/commit/2c6e4e91c5a4d3f25908108f4ed32aba936df70c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 15:34:26 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Jun 2020 19:34:26 +0000 Subject: [issue41039] Simplify python3.dll build In-Reply-To: <1592584036.23.0.347214520388.issue41039@roundup.psfhosted.org> Message-ID: <1592940866.26.0.822560030689.issue41039@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 Jun 23 15:34:43 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Jun 2020 19:34:43 +0000 Subject: [issue41054] Simplify resource compilation on Windows In-Reply-To: <1592670311.94.0.80143826005.issue41054@roundup.psfhosted.org> Message-ID: <1592940883.34.0.517946577062.issue41054@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 Jun 23 15:39:10 2020 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 23 Jun 2020 19:39:10 +0000 Subject: [issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?) In-Reply-To: <1584138664.49.0.0727456636956.issue39960@roundup.psfhosted.org> Message-ID: <1592941150.45.0.448498743444.issue39960@roundup.psfhosted.org> Change by Stefan Behnel : ---------- keywords: +patch pull_requests: +20258 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21092 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 15:40:37 2020 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 23 Jun 2020 19:40:37 +0000 Subject: [issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?) In-Reply-To: <1584138664.49.0.0727456636956.issue39960@roundup.psfhosted.org> Message-ID: <1592941237.9.0.311037878497.issue39960@roundup.psfhosted.org> Stefan Behnel added the comment: I chose to go through the MRO, which takes multiple inheritance into account. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 15:40:54 2020 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 23 Jun 2020 19:40:54 +0000 Subject: [issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?) In-Reply-To: <1584138664.49.0.0727456636956.issue39960@roundup.psfhosted.org> Message-ID: <1592941254.91.0.887685707614.issue39960@roundup.psfhosted.org> Change by Stefan Behnel : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 16:10:34 2020 From: report at bugs.python.org (Tony) Date: Tue, 23 Jun 2020 20:10:34 +0000 Subject: [issue41093] BaseServer's server_forever() shutdown immediately when calling shutdown() In-Reply-To: <1592938873.08.0.742314253675.issue41093@roundup.psfhosted.org> Message-ID: <1592943034.21.0.635723575595.issue41093@roundup.psfhosted.org> Change by Tony : ---------- keywords: +patch pull_requests: +20259 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21093 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 16:12:44 2020 From: report at bugs.python.org (Gareth Rees) Date: Tue, 23 Jun 2020 20:12:44 +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: <1592943164.65.0.452849932238.issue40707@roundup.psfhosted.org> Gareth Rees added the comment: Is there anything I can do to move this forward? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 16:23:17 2020 From: report at bugs.python.org (Tony) Date: Tue, 23 Jun 2020 20:23:17 +0000 Subject: [issue41093] BaseServer's server_forever() shutdown immediately when calling shutdown() In-Reply-To: <1592938873.08.0.742314253675.issue41093@roundup.psfhosted.org> Message-ID: <1592943797.53.0.724041826552.issue41093@roundup.psfhosted.org> Change by Tony : ---------- pull_requests: +20260 pull_request: https://github.com/python/cpython/pull/21094 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 16:25:16 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Jun 2020 20:25:16 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale Message-ID: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> New submission from Serhiy Storchaka : There are issues with using PySys_Audit() with non-ASCII data on non-UTF-8 locale. One example is with PYTHONSTARTUP. In pymain_run_startup() in Modules/main.c the value of the PYTHONSTARTUP environment variable is passed to PySys_Audit() as UTF-8 encoded data. If it contains non-ASCII characters and the locale encoding is different from UTF-8, it fails. There are similar bugs in _Py_fopen() and _Py_fopen_obj(). ---------- components: Interpreter Core messages: 372205 nosy: serhiy.storchaka, steve.dower, vstinner priority: normal severity: normal status: open title: Audit does not work with non-ASCII data on non-UTF-8 locale type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 16:32:16 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Jun 2020 20:32:16 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale In-Reply-To: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> Message-ID: <1592944336.05.0.607570553726.issue41094@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +20262 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21095 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 16:47:36 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Jun 2020 20:47:36 +0000 Subject: [issue31938] Convert selectmodule.c to Argument Clinic In-Reply-To: <1509744030.41.0.213398074469.issue31938@psf.upfronthosting.co.za> Message-ID: <1592945256.76.0.500289373223.issue31938@roundup.psfhosted.org> Serhiy Storchaka added the comment: There is no need to change default-value signatures. The root problem is that select.epoll.register does not have the __module__ attribute. Well, seems that all method objects do not have the __module__ attribute. There are two solutions: 1. Make inspect falling back to __objclass__.__module__. 2. Set __module__ for method objects. But this is a separate issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 16:49:44 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Jun 2020 20:49:44 +0000 Subject: [issue41069] Use non-ascii file names in tests by default In-Reply-To: <1592774319.03.0.379358214671.issue41069@roundup.psfhosted.org> Message-ID: <1592945384.64.0.404879884854.issue41069@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- dependencies: +Audit does not work with non-ASCII data on non-UTF-8 locale _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 16:55:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 20:55:53 +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: <1592945753.62.0.103296345863.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 281cce1106568ef9fec17e3c72d289416fac02a5 by Victor Stinner in branch 'master': bpo-40521: Make MemoryError free list per interpreter (GH-21086) https://github.com/python/cpython/commit/281cce1106568ef9fec17e3c72d289416fac02a5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 17:48:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 21:48:46 +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: <1592948926.76.0.044236982204.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20263 pull_request: https://github.com/python/cpython/pull/21096 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 17:50:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 21:50:04 +0000 Subject: [issue31938] Convert selectmodule.c to Argument Clinic In-Reply-To: <1509744030.41.0.213398074469.issue31938@psf.upfronthosting.co.za> Message-ID: <1592949004.38.0.481341288717.issue31938@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d051801052211b533c46a593b1c1bccf649a171c by Anthony Sottile in branch 'master': bpo-31938: Fix default-value signatures of several functions in the select module (GH-21066) https://github.com/python/cpython/commit/d051801052211b533c46a593b1c1bccf649a171c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 17:59:19 2020 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 23 Jun 2020 21:59:19 +0000 Subject: [issue31938] Convert selectmodule.c to Argument Clinic In-Reply-To: <1509744030.41.0.213398074469.issue31938@psf.upfronthosting.co.za> Message-ID: <1592949559.35.0.467863146177.issue31938@roundup.psfhosted.org> Change by Anthony Sottile : ---------- pull_requests: +20264 pull_request: https://github.com/python/cpython/pull/21097 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 18:00:36 2020 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 23 Jun 2020 22:00:36 +0000 Subject: [issue31938] Convert selectmodule.c to Argument Clinic In-Reply-To: <1509744030.41.0.213398074469.issue31938@psf.upfronthosting.co.za> Message-ID: <1592949636.31.0.2511039087.issue31938@roundup.psfhosted.org> Change by Anthony Sottile : ---------- pull_requests: +20265 pull_request: https://github.com/python/cpython/pull/21098 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 18:00:44 2020 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 23 Jun 2020 22:00:44 +0000 Subject: [issue31938] Convert selectmodule.c to Argument Clinic In-Reply-To: <1509744030.41.0.213398074469.issue31938@psf.upfronthosting.co.za> Message-ID: <1592949644.79.0.915024317589.issue31938@roundup.psfhosted.org> Change by Anthony Sottile : ---------- pull_requests: +20265, 20266, 20267 pull_request: https://github.com/python/cpython/pull/21098 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 18:00:44 2020 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 23 Jun 2020 22:00:44 +0000 Subject: [issue31938] Convert selectmodule.c to Argument Clinic In-Reply-To: <1509744030.41.0.213398074469.issue31938@psf.upfronthosting.co.za> Message-ID: <1592949644.72.0.421643559172.issue31938@roundup.psfhosted.org> Change by Anthony Sottile : ---------- pull_requests: +20265, 20266 pull_request: https://github.com/python/cpython/pull/21098 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 18:10:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 22:10:47 +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: <1592950247.65.0.355622703195.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f363d0a6e9cfa50677a6de203735fbc0d06c2f49 by Victor Stinner in branch 'master': bpo-40521: Make empty Unicode string per interpreter (GH-21096) https://github.com/python/cpython/commit/f363d0a6e9cfa50677a6de203735fbc0d06c2f49 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 18:14:05 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 22:14:05 +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: <1592950445.85.0.722937665717.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20268 pull_request: https://github.com/python/cpython/pull/21099 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 18:17:06 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Jun 2020 22:17:06 +0000 Subject: [issue31938] Convert selectmodule.c to Argument Clinic In-Reply-To: <1509744030.41.0.213398074469.issue31938@psf.upfronthosting.co.za> Message-ID: <1592950626.76.0.600816716684.issue31938@roundup.psfhosted.org> miss-islington added the comment: New changeset 60cbdc81d1bd5c175ff890ee4cfdc85c10090b75 by Anthony Sottile in branch '3.8': [3.8] bpo-31938: Fix default-value signatures of several functions in the select module (GH-21066) (GH-21098) https://github.com/python/cpython/commit/60cbdc81d1bd5c175ff890ee4cfdc85c10090b75 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 18:19:49 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Jun 2020 22:19:49 +0000 Subject: [issue31938] Convert selectmodule.c to Argument Clinic In-Reply-To: <1509744030.41.0.213398074469.issue31938@psf.upfronthosting.co.za> Message-ID: <1592950789.96.0.020513844302.issue31938@roundup.psfhosted.org> miss-islington added the comment: New changeset 48fc35ada7c4237f11bb9638387bfe5b4cebfb12 by Anthony Sottile in branch '3.9': [3.9] bpo-31938: Fix default-value signatures of several functions in the select module (GH-21066) (GH-21097) https://github.com/python/cpython/commit/48fc35ada7c4237f11bb9638387bfe5b4cebfb12 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 18:23:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 22:23:19 +0000 Subject: [issue31938] Convert selectmodule.c to Argument Clinic In-Reply-To: <1509744030.41.0.213398074469.issue31938@psf.upfronthosting.co.za> Message-ID: <1592950999.49.0.299989953386.issue31938@roundup.psfhosted.org> STINNER Victor added the comment: > There is no need to change default-value signatures. The root problem is that select.epoll.register does not have the __module__ attribute. Oh, I saw your comment after merging Anthony's PR. At least, I confirm that it fix the reported issue: "./python -m pydoc select" doesn't fail anymore. Maybe open a separated issue for the __module__ attribute issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 18:26:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 22:26:29 +0000 Subject: [issue41095] inspect.signature() doesn't parse __text_signature__ containing a newline character Message-ID: <1592951189.28.0.183993243703.issue41095@roundup.psfhosted.org> New submission from STINNER Victor : $ ./python Python 3.10.0a0 (heads/unicode_latin1:40855c7064, Jun 24 2020, 00:20:07) >>> import select >>> select.epoll.register.__text_signature__ '($self, /, fd,\n eventmask=select.EPOLLIN | select.EPOLLPRI | select.EPOLLOUT)' >>> import inspect >>> inspect.signature(select.epoll.register) => eventmask parameter is gone! Either signature() must raise an exception, or it must handle a __text_signature__ containing a newline character. Issue spotted on bpo-31938 when fixing "./python -m pydoc select". By the way, as expected, pydoc shows: Help on method_descriptor in select.epoll: --- $ ./python -m pydoc select.epoll.register select.epoll.register = register(self, /, fd) Registers a new fd or raises an OSError if the fd is already registered. (...) --- ---------- components: Library (Lib) messages: 372213 nosy: serhiy.storchaka, vstinner, yselivanov priority: normal severity: normal status: open title: inspect.signature() doesn't parse __text_signature__ containing a newline character versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 18:27:18 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 22:27:18 +0000 Subject: [issue31938] Convert selectmodule.c to Argument Clinic In-Reply-To: <1509744030.41.0.213398074469.issue31938@psf.upfronthosting.co.za> Message-ID: <1592951238.74.0.753926638246.issue31938@roundup.psfhosted.org> STINNER Victor added the comment: pydoc doesn't show the eventmask parameter whereas it is in select.epoll.register.__text_signature__. I created bpo-41095: "inspect.signature() doesn't parse __text_signature__ containing a newline character". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 18:27:45 2020 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 23 Jun 2020 22:27:45 +0000 Subject: [issue41095] inspect.signature() doesn't parse __text_signature__ containing a newline character In-Reply-To: <1592951189.28.0.183993243703.issue41095@roundup.psfhosted.org> Message-ID: <1592951265.28.0.129743468786.issue41095@roundup.psfhosted.org> Change by Anthony Sottile : ---------- keywords: +patch nosy: +Anthony Sottile nosy_count: 3.0 -> 4.0 pull_requests: +20269 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21066 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 18:28:18 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 22:28:18 +0000 Subject: [issue31938] Convert selectmodule.c to Argument Clinic In-Reply-To: <1509744030.41.0.213398074469.issue31938@psf.upfronthosting.co.za> Message-ID: <1592951298.29.0.988462227975.issue31938@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Anthony Sottile for fixing pydoc select! The fix is now in 3.8, 3.9 and master branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 18:34:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 22:34:14 +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: <1592951654.97.0.587563365899.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 90ed8a6d71b2d6e0853c14e8e6f85fe730a4329a by Victor Stinner in branch 'master': bpo-40521: Optimize PyUnicode_New(0, maxchar) (GH-21099) https://github.com/python/cpython/commit/90ed8a6d71b2d6e0853c14e8e6f85fe730a4329a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 18:45:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Jun 2020 22:45:54 +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: <1592952354.19.0.654262317571.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20270 pull_request: https://github.com/python/cpython/pull/21101 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 19:15:43 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Jun 2020 23:15:43 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale In-Reply-To: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> Message-ID: <1592954143.73.0.810054412815.issue41094@roundup.psfhosted.org> Steve Dower added the comment: SGTM. Thanks for the PR! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 19:20:37 2020 From: report at bugs.python.org (Eryk Sun) Date: Tue, 23 Jun 2020 23:20:37 +0000 Subject: [issue41021] ctypes callback with structure crashes in Python 3.8 on Windows x86 In-Reply-To: <1592472376.78.0.985098642017.issue41021@roundup.psfhosted.org> Message-ID: <1592954437.52.0.791815293526.issue41021@roundup.psfhosted.org> Change by Eryk Sun : ---------- nosy: +vinay.sajip versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 19:32:30 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Jun 2020 23:32:30 +0000 Subject: [issue41070] Simplify pyshellext.dll build In-Reply-To: <1592805623.25.0.00409293845235.issue41070@roundup.psfhosted.org> Message-ID: <1592955150.55.0.357985088262.issue41070@roundup.psfhosted.org> Steve Dower added the comment: New changeset bbf36e8903f8e86dcad8131c818e122537c30f9e by Nikita Nemkin in branch 'master': bpo-41070: Simplify pyshellext.dll build (GH-21037) https://github.com/python/cpython/commit/bbf36e8903f8e86dcad8131c818e122537c30f9e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 19:32:53 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Jun 2020 23:32:53 +0000 Subject: [issue41070] Simplify pyshellext.dll build In-Reply-To: <1592805623.25.0.00409293845235.issue41070@roundup.psfhosted.org> Message-ID: <1592955173.18.0.375074703692.issue41070@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 Jun 23 20:22:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Jun 2020 00:22:28 +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: <1592958148.31.0.151839423198.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 2f9ada96e0d420fed0d09a032b37197f08ef167a by Victor Stinner in branch 'master': bpo-40521: Make Unicode latin1 singletons per interpreter (GH-21101) https://github.com/python/cpython/commit/2f9ada96e0d420fed0d09a032b37197f08ef167a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 20:23:18 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 24 Jun 2020 00:23:18 +0000 Subject: [issue39891] [difflib] Improve get_close_matches() to better match when casing of words are different In-Reply-To: <1583623675.84.0.678348320324.issue39891@roundup.psfhosted.org> Message-ID: <1592958198.03.0.882737182982.issue39891@roundup.psfhosted.org> Raymond Hettinger added the comment: I concur with the other respondents that this is best left to the application code. Thank you for the suggestion, but I'll mark this as closed. Don't be deterred from making other suggestions :-) ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 20:34:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Jun 2020 00:34:38 +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: <1592958878.47.0.421687473437.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20271 pull_request: https://github.com/python/cpython/pull/21103 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 21:12:14 2020 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 24 Jun 2020 01:12:14 +0000 Subject: [issue41095] inspect.signature() doesn't parse __text_signature__ containing a newline character In-Reply-To: <1592951189.28.0.183993243703.issue41095@roundup.psfhosted.org> Message-ID: <1592961134.81.0.692518714354.issue41095@roundup.psfhosted.org> Anthony Sottile added the comment: Looking into this, it appears to be due to the default value and not due to the newline I've stumbled upon two simplifications to the routines in inspect but not a fix for this 1. https://github.com/python/cpython/pull/21100 2. https://github.com/python/cpython/pull/21104 the following code is hit because `ast.literal_eval(...)` fails for the `|`d expression: https://github.com/python/cpython/blob/2f9ada96e0d420fed0d09a032b37197f08ef167a/Lib/inspect.py#L2069-L2070 this causes the parameter to be skipped entirely ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 21:21:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Jun 2020 01:21: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: <1592961682.89.0.855661399831.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset cde283d16d87024f455e45c6f1b4e4f7d8905836 by Victor Stinner in branch 'master': bpo-40521: Fix _PyContext_Fini() (GH-21103) https://github.com/python/cpython/commit/cde283d16d87024f455e45c6f1b4e4f7d8905836 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 21:32:05 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 24 Jun 2020 01:32:05 +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: <1592962325.54.0.0161987572528.issue40707@roundup.psfhosted.org> Terry J. Reedy added the comment: Will merge after CI passes the addition of 'the'. ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 22:03:38 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Wed, 24 Jun 2020 02:03:38 +0000 Subject: [issue24905] Allow incremental I/O to blobs in sqlite3 In-Reply-To: <1440144321.97.0.0781853247945.issue24905@psf.upfronthosting.co.za> Message-ID: <1592964218.1.0.844091110573.issue24905@roundup.psfhosted.org> Emmanuel Arias added the comment: Hi everybody, I let a comment on github. I was asking about if are there some plans with this PR? Was open 3 years ago and there are not updating Cheers ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 22:04:35 2020 From: report at bugs.python.org (Kerrick Staley) Date: Wed, 24 Jun 2020 02:04:35 +0000 Subject: [issue41096] Need command to exit PDB interactive shell Message-ID: <1592964275.48.0.323547017959.issue41096@roundup.psfhosted.org> New submission from Kerrick Staley : In PDB, when you use "interact" to enter an interactive shell, the only way to exit that shell is to send an end-of-transmission (Ctrl+D) character. In some environments, such as Jupyter, this is awkward to do. Here is a StackOverflow post where a user encountered this issue: https://stackoverflow.com/questions/47522316/exit-pdb-interactive-mode-from-jupyter-notebook/62546186 I think that the user should be able to type quit() in order to exit the interactive Python shell and go back to the PDB shell, similar to a regular interactive Python session. I think you should also support exit() because the Python shell supports that one as well (quit() and exit() do the same thing, I think the alias exists to help discoverability for new users). I confirmed this issue on Python 3.6.9 and 3.8.3. ---------- components: Library (Lib) messages: 372226 nosy: Kerrick Staley priority: normal severity: normal status: open title: Need command to exit PDB interactive shell type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 22:06:13 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Wed, 24 Jun 2020 02:06:13 +0000 Subject: [issue28806] Improve the netrc library In-Reply-To: <1480158810.39.0.736994382472.issue28806@psf.upfronthosting.co.za> Message-ID: <1592964373.46.0.481817604274.issue28806@roundup.psfhosted.org> Emmanuel Arias added the comment: Hi! I let a comment on github. The PR was open 3 years agot, so I was wandering to know if are there some plans with that PR? Are you interested on the PR? Cheers, ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 23:12:20 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 24 Jun 2020 03:12:20 +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: <1592968340.6.0.00530006086436.issue40707@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset bf2e515fa43406d4bd9c4c53ecc9364034d8f9f6 by Gareth Rees in branch 'master': bpo-40707: Document that Popen.communicate sets the returncode attribute (GH-20283) https://github.com/python/cpython/commit/bf2e515fa43406d4bd9c4c53ecc9364034d8f9f6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 23:12:30 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 03:12:30 +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: <1592968350.35.0.883464859563.issue40707@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +20272 pull_request: https://github.com/python/cpython/pull/21105 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 23:12:39 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 03:12:39 +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: <1592968359.51.0.471870404916.issue40707@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20273 pull_request: https://github.com/python/cpython/pull/21106 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 23:19:18 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 03:19:18 +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: <1592968758.65.0.33713624232.issue40707@roundup.psfhosted.org> miss-islington added the comment: New changeset 02d5c74f89709672baa866fcdd04278e59328351 by Miss Islington (bot) in branch '3.9': bpo-40707: Document that Popen.communicate sets the returncode attribute (GH-20283) https://github.com/python/cpython/commit/02d5c74f89709672baa866fcdd04278e59328351 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 23:19:43 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 03:19:43 +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: <1592968783.52.0.694240903842.issue40707@roundup.psfhosted.org> miss-islington added the comment: New changeset 4f5dde463b588fc97cacb4a1905eb422b16daa37 by Miss Islington (bot) in branch '3.8': bpo-40707: Document that Popen.communicate sets the returncode attribute (GH-20283) https://github.com/python/cpython/commit/4f5dde463b588fc97cacb4a1905eb422b16daa37 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 23 23:43:28 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 24 Jun 2020 03:43:28 +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: <1592970208.61.0.571894108522.issue40707@roundup.psfhosted.org> Terry J. Reedy added the comment: Thanks for the fix. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 01:46:27 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 05:46:27 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale In-Reply-To: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> Message-ID: <1592977587.88.0.885327648114.issue41094@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20275 pull_request: https://github.com/python/cpython/pull/21108 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 01:46:21 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Jun 2020 05:46:21 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale In-Reply-To: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> Message-ID: <1592977581.23.0.573314163836.issue41094@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 6c6810d98979add7a89391c3c38990d0859f7a29 by Serhiy Storchaka in branch 'master': bpo-41094: Fix decoding errors with audit when open files. (GH-21095) https://github.com/python/cpython/commit/6c6810d98979add7a89391c3c38990d0859f7a29 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 01:46:20 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 05:46:20 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale In-Reply-To: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> Message-ID: <1592977580.42.0.425025798753.issue41094@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +20274 pull_request: https://github.com/python/cpython/pull/21107 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 02:04:13 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Jun 2020 06:04:13 +0000 Subject: [issue41096] Need command to exit PDB interactive shell In-Reply-To: <1592964275.48.0.323547017959.issue41096@roundup.psfhosted.org> Message-ID: <1592978653.92.0.336961085073.issue41096@roundup.psfhosted.org> Serhiy Storchaka added the comment: Both "exit" and "quit" and even just "q" quit the PDB interactive shell. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 02:24:04 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Jun 2020 06:24:04 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale In-Reply-To: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> Message-ID: <1592979844.62.0.0433431968766.issue41094@roundup.psfhosted.org> Serhiy Storchaka added the comment: Oh, I made a mistake in tests (they do not test with non-ASCII data), but fixed tests fail on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 02:25:55 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Jun 2020 06:25:55 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale In-Reply-To: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> Message-ID: <1592979955.42.0.214303462018.issue41094@roundup.psfhosted.org> Serhiy Storchaka added the comment: The problem is that they pass successfully on my local Windows, but fail on CI. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 03:07:33 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 24 Jun 2020 07:07:33 +0000 Subject: [issue41093] BaseServer's server_forever() shutdown immediately when calling shutdown() In-Reply-To: <1592938873.08.0.742314253675.issue41093@roundup.psfhosted.org> Message-ID: <1592982453.33.0.408735033941.issue41093@roundup.psfhosted.org> Ned Deily added the comment: > By the way I have to ask, if I want this feature to be merged (this is my first PR) Thank you for the PR and your contribution! Unless a PR is for a problem specific to a release, simply submit a PR against the master branch. If and when a core developer chooses to merge the PR, a decision will be made about whether to backport it and we have tools to do that semi-automatically. Be aware that, since we are all volunteers here, some areas in the code base do not receive a lot of attention and http.server is one of them. So don't be discouraged if your PR is not reviewed right away. A ping down the road may help. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 03:29:18 2020 From: report at bugs.python.org (Armin Rigo) Date: Wed, 24 Jun 2020 07:29:18 +0000 Subject: [issue41097] confusing BufferError: Existing exports of data: object cannot be re-sized Message-ID: <1592983758.49.0.230327773422.issue41097@roundup.psfhosted.org> New submission from Armin Rigo : The behavior (tested in 3.6 and 3.9) of io.BytesIO().getbuffer() gives a unexpected exception message: >>> b = io.BytesIO() >>> b.write(b'abc') 3 >>> buf = b.getbuffer() >>> b.seek(0) 0 >>> b.write(b'?') # or anything up to 3 bytes BufferError: Existing exports of data: object cannot be re-sized The error message pretends that the problem is in resizing the BytesIO object, but the write() is not actually causing any resize. I am not sure if the bug is a wrong error message (and all writes are supposed to be forbidden) or a wrongly forbidden write() (after all, we can use the buffer itself to write into the same area of memory). ---------- components: Interpreter Core messages: 372237 nosy: arigo priority: normal severity: normal stage: test needed status: open title: confusing BufferError: Existing exports of data: object cannot be re-sized type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 03:30:14 2020 From: report at bugs.python.org (Armin Rigo) Date: Wed, 24 Jun 2020 07:30:14 +0000 Subject: [issue41097] confusing BufferError: Existing exports of data: object cannot be re-sized In-Reply-To: <1592983758.49.0.230327773422.issue41097@roundup.psfhosted.org> Message-ID: <1592983814.04.0.55266291769.issue41097@roundup.psfhosted.org> Change by Armin Rigo : ---------- nosy: -arigo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 03:36:53 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 24 Jun 2020 07:36:53 +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: <1592984213.59.0.762976540473.issue40824@roundup.psfhosted.org> Ned Deily added the comment: @Serhiy, you have opened PRs for this for 3.7 and 3.6, both of which are now in the security-fix phase of their release cycles. It looks like this behavior has been around for a long time and does not appear to be a security issue. Unless there is some important reason why this behavior should be changed in a security fix release (for 3.6) or as a release critical fix for 3.7.8 final and unless another core developer reviews the changes, I do not think the PRs should be merged to 3.7 or 3.6. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 04:13:13 2020 From: report at bugs.python.org (Nikita Nemkin) Date: Wed, 24 Jun 2020 08:13:13 +0000 Subject: [issue41070] Simplify pyshellext.dll build In-Reply-To: <1592805623.25.0.00409293845235.issue41070@roundup.psfhosted.org> Message-ID: <1592986393.03.0.78710713461.issue41070@roundup.psfhosted.org> Nikita Nemkin added the comment: Thanks for reviewing my patches so quickly, Steve. There's one last Windows-specific patch left (https://bugs.python.org/issue41038). Single-line change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 04:15:36 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Jun 2020 08:15:36 +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: <1592986536.71.0.491466210905.issue40824@roundup.psfhosted.org> Serhiy Storchaka added the comment: Sorry, I was not sure which versions are in security-fix phase now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 04:42:38 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 24 Jun 2020 08:42:38 +0000 Subject: [issue41098] Deprecating PyUnicodeEncodeError_Create Message-ID: <1592988158.78.0.202358099858.issue41098@roundup.psfhosted.org> New submission from Inada Naoki : PyUnicodeEncodeError_Create is using Py_UNICODE and is marked Py_DEPRECATED(3.3). But it is not deprecated in doc yet. There are no alternative API. In CPython code base, UnicodeEncodeError is created by `PyObject_CallFunction(PyExc_UnicodeEncodeError, ...)`. Can we just document it as deprecated since Python 3.3? Or should we add alternative API? ---------- components: C API messages: 372241 nosy: inada.naoki priority: normal severity: normal status: open title: Deprecating PyUnicodeEncodeError_Create versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 04:51:17 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 24 Jun 2020 08:51:17 +0000 Subject: [issue41099] Deprecating PyUnicodeTranslateError_Create Message-ID: <1592988677.6.0.878608342851.issue41099@roundup.psfhosted.org> New submission from Inada Naoki : PyUnicodeTranslateError_Create marked as Py_DEPRECATED since it receives Py_UNICODE* as an argument. But it is not deprecated in the document. On the other hand, we have alternative private API which accepts Unicode object: _PyUnicodeTranslateError_Create. Should we make it public? Otherwise, we can recommend `PyObject_CallFunction(PyExc_UnicodeTranslateError, ...)` as an alternative. ---------- components: C API messages: 372242 nosy: inada.naoki priority: normal severity: normal status: open title: Deprecating PyUnicodeTranslateError_Create versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 05:06:17 2020 From: report at bugs.python.org (Tony) Date: Wed, 24 Jun 2020 09:06:17 +0000 Subject: [issue41093] TCPServer's server_forever() shutdown immediately when calling shutdown() In-Reply-To: <1592938873.08.0.742314253675.issue41093@roundup.psfhosted.org> Message-ID: <1592989577.46.0.905675925212.issue41093@roundup.psfhosted.org> Tony added the comment: Just want to note that this fixes an issue in all TCPServers and not only http.server ---------- title: BaseServer's server_forever() shutdown immediately when calling shutdown() -> TCPServer's server_forever() shutdown immediately when calling shutdown() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 05:11:43 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 24 Jun 2020 09:11:43 +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: <1592989903.79.0.513176649606.issue40824@roundup.psfhosted.org> Change by Ned Deily : ---------- versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 05:12:37 2020 From: report at bugs.python.org (Tony) Date: Wed, 24 Jun 2020 09:12:37 +0000 Subject: [issue41093] TCPServer's server_forever() shutdown immediately when calling shutdown() In-Reply-To: <1592938873.08.0.742314253675.issue41093@roundup.psfhosted.org> Message-ID: <1592989957.96.0.37433953218.issue41093@roundup.psfhosted.org> Tony added the comment: This still leaves the open issue of UDPServer not shutting down immediately though ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 06:36:51 2020 From: report at bugs.python.org (Alexander Mohr) Date: Wed, 24 Jun 2020 10:36:51 +0000 Subject: [issue36098] asyncio: ssl client-server with "slow" read In-Reply-To: <1550967725.88.0.520289067216.issue36098@roundup.psfhosted.org> Message-ID: <1592995011.66.0.615280354539.issue36098@roundup.psfhosted.org> Change by Alexander Mohr : ---------- nosy: +thehesiod _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 07:51:07 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 24 Jun 2020 11:51:07 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) Message-ID: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> New submission from Ronald Oussoren : macOS 11 is darwin 20.0.0. This confuses the configure script, resulting in defining _POSIX_C_SOURCE and friends. ---------- assignee: ronaldoussoren components: Build, macOS messages: 372245 nosy: ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Build failure on macOS 11 (beta) versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 08:10:37 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 24 Jun 2020 12:10:37 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593000637.66.0.791243433108.issue41100@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- keywords: +patch pull_requests: +20276 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21113 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 08:16:28 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 24 Jun 2020 12:16:28 +0000 Subject: [issue41101] Support "arm64" in Mac/Tools/pythonw Message-ID: <1593000988.46.0.0606602806921.issue41101@roundup.psfhosted.org> New submission from Ronald Oussoren : Apple introduced a new CPU architecture for macOS at WWDC, which is arm64. Mac/Tools/pythonw.c launches the real python interpreter in a framework build is and is careful to launch that using the same architecture as it is running (to make it possible to use "arch -x86_64 pythonw" to launch the x86_64 variant when available. The current code does not support ARM64. ---------- components: Build, macOS messages: 372246 nosy: ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Support "arm64" in Mac/Tools/pythonw versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 08:19:05 2020 From: report at bugs.python.org (Xiaolong Liu) Date: Wed, 24 Jun 2020 12:19:05 +0000 Subject: [issue41102] ZipFile.namelist() does not match the actual files in .zip file Message-ID: <1593001145.16.0.222635534542.issue41102@roundup.psfhosted.org> New submission from Xiaolong Liu : I used zipfile module to archive thousands of .geojson file to zip files and access those .geojson file by ZipFile.open() method. In my hundreds of runnings, one of them was abnormal. As the title says, the ZipFile.namelist() did not match all the files in .zip file. And I extracted it by extractall() method and it only got those files included in the namelist. On the other hand, I extracted it by my compress software (360zip). I got the other files unincluded in the namelist(). Only one file (2564.geojson) appeared with these two extract methods. ZipFile.extractall() method got 674 files from '2654.geojson' to '3989.geojson'. 360zip got 1399 files from '0000.geojson' to '2654.geojson'. The abnormal file is too big to upload this page and I uploaded to google drive: https://drive.google.com/file/d/1UE2N2qwjn4m7uE6YF2A1FhdXYHP_7zQr/view?usp=sharing ---------- components: Library (Lib) messages: 372247 nosy: alanmcintyre, longavailable, serhiy.storchaka, twouters priority: normal severity: normal status: open title: ZipFile.namelist() does not match the actual files in .zip file type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 08:26:30 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 24 Jun 2020 12:26:30 +0000 Subject: [issue41101] Support "arm64" in Mac/Tools/pythonw In-Reply-To: <1593000988.46.0.0606602806921.issue41101@roundup.psfhosted.org> Message-ID: <1593001590.26.0.245244968679.issue41101@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- keywords: +patch pull_requests: +20277 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21114 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 08:28:17 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 24 Jun 2020 12:28:17 +0000 Subject: [issue41090] Support for "Universal 2" binary builds In-Reply-To: <1592913185.49.0.15166324196.issue41090@roundup.psfhosted.org> Message-ID: <1593001697.91.0.182689510113.issue41090@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- title: Support for "Apple Silicon" -> Support for "Universal 2" binary builds versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 08:52:31 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 24 Jun 2020 12:52:31 +0000 Subject: [issue41090] Support for "Universal 2" binary builds In-Reply-To: <1592913185.49.0.15166324196.issue41090@roundup.psfhosted.org> Message-ID: <1593003151.07.0.0341356724353.issue41090@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- pull_requests: +20278 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21115 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 08:56:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Jun 2020 12:56:03 +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: <1593003363.45.0.987694536396.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20279 pull_request: https://github.com/python/cpython/pull/21116 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 08:58:45 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 24 Jun 2020 12:58:45 +0000 Subject: [issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line In-Reply-To: <1592400054.74.0.017392691783.issue41005@roundup.psfhosted.org> Message-ID: <1593003525.36.0.56991508277.issue41005@roundup.psfhosted.org> Ronald Oussoren added the comment: New changeset adf8708c44945bfa68db8b02c6a1f560f05a5151 by Miss Islington (bot) in branch '3.8': bpo-41005: Fixed perrmission error (GH-20936) (GH-21052) https://github.com/python/cpython/commit/adf8708c44945bfa68db8b02c6a1f560f05a5151 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 08:59:25 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 24 Jun 2020 12:59:25 +0000 Subject: [issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line In-Reply-To: <1592400054.74.0.017392691783.issue41005@roundup.psfhosted.org> Message-ID: <1593003565.35.0.561603116786.issue41005@roundup.psfhosted.org> Ronald Oussoren added the comment: New changeset d518ed0baaa31ca25cd88ac8996c7a7d563b2a1f by Miss Islington (bot) in branch '3.9': bpo-41005: Fixed perrmission error (GH-20936) (GH-21051) https://github.com/python/cpython/commit/d518ed0baaa31ca25cd88ac8996c7a7d563b2a1f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 09:22:05 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Jun 2020 13:22:05 +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: <1593004925.08.0.948284539838.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0430dfac629b4eb0e899a09b899a494aa92145f6 by Victor Stinner in branch 'master': bpo-40521: Always create the empty tuple singleton (GH-21116) https://github.com/python/cpython/commit/0430dfac629b4eb0e899a09b899a494aa92145f6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 09:43:42 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 24 Jun 2020 13:43:42 +0000 Subject: [issue41103] Removing old buffer support Message-ID: <1593006222.66.0.567274053686.issue41103@roundup.psfhosted.org> New submission from Inada Naoki : https://docs.python.org/3/c-api/objbuffer.html Old buffer protocol has been deprecated since Python 3.0. It was useful to make transition from Python 2 easy. But it's time to remove. ---------- components: C API messages: 372251 nosy: inada.naoki priority: normal severity: normal status: open title: Removing old buffer support versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 09:44:24 2020 From: report at bugs.python.org (skorpeo) Date: Wed, 24 Jun 2020 13:44:24 +0000 Subject: [issue41104] IMAPlib debug errors Message-ID: <1593006264.44.0.612791321942.issue41104@roundup.psfhosted.org> New submission from skorpeo : This line in imaplib.py inside _dump_ur function: l = map(lambda x:'%s: "%s"' % (x[0], x[1][0] and '" "'.join(x[1]) or ''), l) fails because the untagged responses are bytestrings and it expects regular strings. ---------- components: Library (Lib) messages: 372252 nosy: skorpeo priority: normal severity: normal status: open title: IMAPlib debug errors 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 Jun 24 09:55:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Jun 2020 13:55:09 +0000 Subject: [issue40512] [subinterpreters] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1593006909.26.0.00307673576711.issue40512@roundup.psfhosted.org> STINNER Victor added the comment: Update of the EXPERIMENTAL_ISOLATED_SUBINTERPRETERS status. I made many free lists and singletons per interpreter in bpo-40521. TODO: * _PyUnicode_FromId() and interned strings are still shared: typeobject.c requires a workaround for that. * GC is disabled in subinterpreters since some objects are still shared * Type method cache is shared. * pymalloc is shared. * The GIL is shared. I'm investigating performance of my _PyUnicode_FromId() PR: https://github.com/python/cpython/pull/20058 This PR now uses "atomic functions" proposed in a second PR: https://github.com/python/cpython/pull/20766 The "atomic functions" avoids the need to have to declare a variable or a structure member as atomic, which would cause different issues if they are declared in Python public headers (which is the case for _Py_Identifier used by _PyUnicode_FromId()). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 09:58:20 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 24 Jun 2020 13:58:20 +0000 Subject: [issue41103] Removing old buffer support In-Reply-To: <1593006222.66.0.567274053686.issue41103@roundup.psfhosted.org> Message-ID: <1593007100.74.0.647845313656.issue41103@roundup.psfhosted.org> Change by Inada Naoki : ---------- keywords: +patch pull_requests: +20280 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21117 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 10:47:25 2020 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 24 Jun 2020 14:47:25 +0000 Subject: [issue34154] Tkinter __init__ documentations sometimes missing valid keyword values In-Reply-To: <1531969710.94.0.56676864532.issue34154@psf.upfronthosting.co.za> Message-ID: <1593010045.21.0.764944439612.issue34154@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz nosy_count: 5.0 -> 6.0 pull_requests: +20281 pull_request: https://github.com/python/cpython/pull/21118 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 11:16:58 2020 From: report at bugs.python.org (Manjusaka) Date: Wed, 24 Jun 2020 15:16:58 +0000 Subject: [issue41105] Add some extra content check for some who has been deprecated by glibc Message-ID: <1593011818.28.0.182724458451.issue41105@roundup.psfhosted.org> New submission from Manjusaka : Hello everyone When I try to compile the code from the master branch on my Manjaro, one of the Linux system based on the Arch and based on the glibc-2.31 && gcc-10.1.0 . the compiler show me that the fcntl module has been failed to be compiled Here's the message /home/manjusaka/Documents/project/cpython/Modules/fcntlmodule.c:618:33: error: ?I_PUSH? undeclared (first use in this function) 618 | if (PyModule_AddIntMacro(m, I_PUSH)) return -1; | ^~~~~~ ./Include/modsupport.h:146:67: note: in definition of macro ?PyModule_AddIntMacro? 146 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c) | ^ /home/manjusaka/Documents/project/cpython/Modules/fcntlmodule.c:618:33: note: each undeclared identifier is reported only once for each function it appears in 618 | if (PyModule_AddIntMacro(m, I_PUSH)) return -1; | ^~~~~~ ./Include/modsupport.h:146:67: note: in definition of macro ?PyModule_AddIntMacro? 146 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c) | ^ /home/manjusaka/Documents/project/cpython/Modules/fcntlmodule.c:619:33: error: ?I_POP? undeclared (first use in this function) 619 | if (PyModule_AddIntMacro(m, I_POP)) return -1; | ^~~~~ ./Include/modsupport.h:146:67: note: in definition of macro ?PyModule_AddIntMacro? 146 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c) | ^ /home/manjusaka/Documents/project/cpython/Modules/fcntlmodule.c:620:33: error: ?I_LOOK? undeclared (first use in this function); did you mean ?F_LOCK?? 620 | if (PyModule_AddIntMacro(m, I_LOOK)) return -1; | ^~~~~~ I have figured out the reason because the stropts.h has been deprecated since the glic-2.30, but some of the distribution of Linux keep an empty file on the /usr/include, so the configure process will recognize stropts.h is existed and open HAVE_STROPTS_H flag. So should we add an extra content check in the configure process to avoid the empty file problem? ---------- components: Build messages: 372254 nosy: Manjusaka priority: normal severity: normal status: open title: Add some extra content check for some who has been deprecated by glibc type: compile error versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 11:17:18 2020 From: report at bugs.python.org (Manjusaka) Date: Wed, 24 Jun 2020 15:17:18 +0000 Subject: [issue41105] Add some extra content check for some who has been deprecated by glibc In-Reply-To: <1593011818.28.0.182724458451.issue41105@roundup.psfhosted.org> Message-ID: <1593011838.19.0.0746477410621.issue41105@roundup.psfhosted.org> Manjusaka added the comment: Here's the reference https://sourceware.org/legacy-ml/libc-alpha/2019-08/msg00029.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 11:18:52 2020 From: report at bugs.python.org (Manjusaka) Date: Wed, 24 Jun 2020 15:18:52 +0000 Subject: [issue41105] Add some extra content check in configure process for some empty header file who has been deprecated by glibc In-Reply-To: <1593011818.28.0.182724458451.issue41105@roundup.psfhosted.org> Message-ID: <1593011932.08.0.76532517813.issue41105@roundup.psfhosted.org> Change by Manjusaka : ---------- title: Add some extra content check for some who has been deprecated by glibc -> Add some extra content check in configure process for some empty header file who has been deprecated by glibc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 11:28:19 2020 From: report at bugs.python.org (lilydjwg) Date: Wed, 24 Jun 2020 15:28:19 +0000 Subject: [issue41105] Add some extra content check in configure process for some empty header file who has been deprecated by glibc In-Reply-To: <1593011818.28.0.182724458451.issue41105@roundup.psfhosted.org> Message-ID: <1593012499.74.0.278223857973.issue41105@roundup.psfhosted.org> Change by lilydjwg : ---------- nosy: +lilydjwg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 11:58:54 2020 From: report at bugs.python.org (Paul Ganssle) Date: Wed, 24 Jun 2020 15:58:54 +0000 Subject: [issue41056] minor NULL pointer and sign issues reported by Coverity In-Reply-To: <1592674710.76.0.0208418742118.issue41056@roundup.psfhosted.org> Message-ID: <1593014334.32.0.393123567374.issue41056@roundup.psfhosted.org> Paul Ganssle added the comment: New changeset 6c56356109616ea1292aafa48d30536279ec0937 by Paul Ganssle in branch '3.9': [3.9] bpo-41056: Fix a possible MemoryError leak within zoneinfo. (GH-21007) https://github.com/python/cpython/commit/6c56356109616ea1292aafa48d30536279ec0937 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 12:10:55 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Jun 2020 16:10:55 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale In-Reply-To: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> Message-ID: <1593015055.84.0.655812437448.issue41094@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +20282 pull_request: https://github.com/python/cpython/pull/21119 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 12:12:40 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 16:12:40 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale In-Reply-To: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> Message-ID: <1593015160.65.0.18940035089.issue41094@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20283 pull_request: https://github.com/python/cpython/pull/21120 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 12:12:49 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 16:12:49 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale In-Reply-To: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> Message-ID: <1593015169.38.0.528039498635.issue41094@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20284 pull_request: https://github.com/python/cpython/pull/21121 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 12:27:55 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 16:27:55 +0000 Subject: [issue41038] VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale In-Reply-To: <1592579908.38.0.132085999949.issue41038@roundup.psfhosted.org> Message-ID: <1593016075.45.0.950124393992.issue41038@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +20285 pull_request: https://github.com/python/cpython/pull/21122 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 12:28:02 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 16:28:02 +0000 Subject: [issue41038] VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale In-Reply-To: <1592579908.38.0.132085999949.issue41038@roundup.psfhosted.org> Message-ID: <1593016082.6.0.430752813493.issue41038@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20286 pull_request: https://github.com/python/cpython/pull/21123 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 12:27:52 2020 From: report at bugs.python.org (Steve Dower) Date: Wed, 24 Jun 2020 16:27:52 +0000 Subject: [issue41038] VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale In-Reply-To: <1592579908.38.0.132085999949.issue41038@roundup.psfhosted.org> Message-ID: <1593016072.93.0.568852238898.issue41038@roundup.psfhosted.org> Steve Dower added the comment: New changeset 33b79b11b891adea5a916df8e3779505b37aabe7 by Nikita Nemkin in branch 'master': bpo-41038: Fix non-ASCII string corruption in Win32 resource files (GH-20985) https://github.com/python/cpython/commit/33b79b11b891adea5a916df8e3779505b37aabe7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 12:29:08 2020 From: report at bugs.python.org (Steve Dower) Date: Wed, 24 Jun 2020 16:29:08 +0000 Subject: [issue41038] VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale In-Reply-To: <1592579908.38.0.132085999949.issue41038@roundup.psfhosted.org> Message-ID: <1593016148.54.0.324789476235.issue41038@roundup.psfhosted.org> Change by Steve Dower : ---------- assignee: -> steve.dower resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 12:42:59 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 16:42:59 +0000 Subject: [issue41038] VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale In-Reply-To: <1592579908.38.0.132085999949.issue41038@roundup.psfhosted.org> Message-ID: <1593016979.7.0.170621048892.issue41038@roundup.psfhosted.org> miss-islington added the comment: New changeset fb4a6241054ad6b7f24d1b32af6827e02936d568 by Miss Islington (bot) in branch '3.8': bpo-41038: Fix non-ASCII string corruption in Win32 resource files (GH-20985) https://github.com/python/cpython/commit/fb4a6241054ad6b7f24d1b32af6827e02936d568 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 12:45:35 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 16:45:35 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale In-Reply-To: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> Message-ID: <1593017135.98.0.879986102755.issue41094@roundup.psfhosted.org> miss-islington added the comment: New changeset 7329c8c7a263015c5dae04fc9fb7ec9d58508c76 by Miss Islington (bot) in branch '3.9': bpo-41094: Fix decoding errors with audit when open files. (GH-21095) https://github.com/python/cpython/commit/7329c8c7a263015c5dae04fc9fb7ec9d58508c76 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 12:45:42 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 16:45:42 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale In-Reply-To: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> Message-ID: <1593017142.36.0.96404179156.issue41094@roundup.psfhosted.org> miss-islington added the comment: New changeset 1813d318fd4e517042415fa4f59fe8668c17a235 by Miss Islington (bot) in branch '3.8': bpo-41094: Fix decoding errors with audit when open files. (GH-21095) https://github.com/python/cpython/commit/1813d318fd4e517042415fa4f59fe8668c17a235 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 12:46:37 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Jun 2020 16:46:37 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale In-Reply-To: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> Message-ID: <1593017197.76.0.314177998439.issue41094@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset a7dc71470156680f1fd5243290c6d377824b7ef4 by Serhiy Storchaka in branch 'master': bpo-41094: Additional fix for PYTHONSTARTUP. (GH-21119) https://github.com/python/cpython/commit/a7dc71470156680f1fd5243290c6d377824b7ef4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 12:46:56 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 16:46:56 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale In-Reply-To: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> Message-ID: <1593017216.39.0.731983546504.issue41094@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20288 pull_request: https://github.com/python/cpython/pull/21125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 12:46:47 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 16:46:47 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale In-Reply-To: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> Message-ID: <1593017207.14.0.844804898906.issue41094@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20287 pull_request: https://github.com/python/cpython/pull/21124 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 12:47:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Jun 2020 16:47:39 +0000 Subject: [issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration In-Reply-To: <1586183568.2.0.322929459864.issue40204@roundup.psfhosted.org> Message-ID: <1593017259.94.0.0814427713736.issue40204@roundup.psfhosted.org> STINNER Victor added the comment: I look into this issue. It's quite complicated :-( The Sphinx 3.0.0b1 changelog says: * The C domain has been rewritten, with additional directives and roles. The existing ones are now more strict, resulting in new warnings. * The C domain has been rewritten adding for example: * Cross-referencing respecting the current scope. * Possible to document anonymous entities. * More specific directives and roles for each type of entitiy, e.g., handling scoping of enumerators. * New role c:expr for rendering expressions and types in text. The Python documentation has many issues: * Doc/howto/instrumentation.rst: ".. c:function:: function__entry(str filename, str funcname, int lineno)" is not valid => replace "str" with "char*" and explain that "char*" must be read as "str"... The documentation is about DTrace functions, it's not C code. * Doc/library/configparser.rst: "unique" is declared twice => the second declaration must have :noindex: marker * ".. c:function:: PyObject* PyObject_CallMethodObjArgs(PyObject *obj, PyObject *name, ..., NULL)": the "..., NULL" part is invalid in C => remove ", NULL" * .. c:var:: PY_VECTORCALL_ARGUMENTS_OFFSET: a variable must be declared with its type, but PY_VECTORCALL_ARGUMENTS_OFFSET is macro => use ".. c:macro::" instead * ".. c:var:: Py_BytesWarningFlag": the type is missing => ".. c:var:: int Py_BytesWarningFlag" * Doc/c-api/call.rst: vectorcallfunc documentation is not properly indented. => fix indentation * Doc/c-api/buffer.rst: the table with ".. c:macro:: PyBUF_INDIRECT" is wrong. Sphinx fails because PyBUF_SIMPLE is declared twice. => use ":c:macro:`PyBUF_INDIRECT`" instead * :c:type:`PyObject\*` is invalid => use :c:type:`PyObject*` * ... there are many other errors :-( PR 19397 fix some errors, but not all of them. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 12:47:48 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 16:47:48 +0000 Subject: [issue41038] VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale In-Reply-To: <1592579908.38.0.132085999949.issue41038@roundup.psfhosted.org> Message-ID: <1593017268.45.0.766679565881.issue41038@roundup.psfhosted.org> miss-islington added the comment: New changeset 153e20e087577553ad92a4c802c71d96244e508e by Miss Islington (bot) in branch '3.9': bpo-41038: Fix non-ASCII string corruption in Win32 resource files (GH-20985) https://github.com/python/cpython/commit/153e20e087577553ad92a4c802c71d96244e508e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 12:55:03 2020 From: report at bugs.python.org (Cezary Wagner) Date: Wed, 24 Jun 2020 16:55:03 +0000 Subject: [issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing. Message-ID: <1593017703.53.0.919415125728.issue41106@roundup.psfhosted.org> New submission from Cezary Wagner : I have problem with change detection of log during writing under Windows (normal fs and windows share). Probably bad order of Windows API calls - no idea. Test program is attached. You can reproduce it. Try with os.scandir() without os.stats() and os.stat(). Source code responsible for it is probably this -> I do not understand CPython code -> https://github.com/python/cpython/blob/master/Modules/posixmodule.c. Here is full description - many test was done. # os.scandir() Windows bug dir_entry.stat() not works on file during writing. # Such files is for example application log. # No problem with os.stat() # Call of os.stat() before os.scandir() -> dir_entry.stat() is workaround. # Open file during writing other program "fixes" dir_entry.stat(). # Get properties on open file during writing "fixes" dir_entry.stat(). # Notice that I run os.scandir() separately so dir_entry.stat() is not cached. # Steps to reproduce lack of modification update: # 1. Close all explorers or other application using PATH (it has impact). # 2. Set PATH to test folder can be directory or windows share. # 3. Run program without DO_STAT (False). # # Alternative steps (external app force valid modification date): # 4. run 'touch' or 'echo' on file should "fix" problem. 'echo' will throw error not matter. # # Alternative scenario (os.stat() force valid modification date - very slow): # 3. Run program without DO_STAT (True). No problems. # # Error result: # Modification date from dir_entry.stat() is stalled (not changing after modification) # if os.stat() or other Windows application not read file. # # Excepted result: # Modification date from dir_entry.stat() is update from separate calls os.scandir() # or cached if it is same os.scandir() call. # # Notice that os.scandir() must be call before dir_entry.stat() to avoid caching as described in documentation. # And this is done but not work on files during writing.. # # Ask question if you have since is very hard to find bug. ---------- components: Windows files: s03_dir_entry.py messages: 372264 nosy: Cezary.Wagner, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: os.scandir() Windows bug dir_entry.stat() not works on file during writing. type: crash versions: Python 3.8 Added file: https://bugs.python.org/file49259/s03_dir_entry.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 12:57:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Jun 2020 16:57:35 +0000 Subject: [issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration In-Reply-To: <1586183568.2.0.322929459864.issue40204@roundup.psfhosted.org> Message-ID: <1593017855.62.0.916828747872.issue40204@roundup.psfhosted.org> STINNER Victor added the comment: Sphinx documentation of the C domain: https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#the-c-domain ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 12:59:30 2020 From: report at bugs.python.org (Cezary Wagner) Date: Wed, 24 Jun 2020 16:59:30 +0000 Subject: [issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing. In-Reply-To: <1593017703.53.0.919415125728.issue41106@roundup.psfhosted.org> Message-ID: <1593017970.27.0.638889825025.issue41106@roundup.psfhosted.org> Cezary Wagner added the comment: Extra file for for tests with: DO_STAT = False See not changes but file was writing every second. If os.stat() run all between call os.scandir() all works. C:\root\Python38\python.exe C:/Users/Cezary.Wagner/PycharmProjects/dptr-monitoring-v2/sandbox/python/s13_dir_entry/s03_dir_entry.py dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 0.0009987354278564453 2020-06-24 18:57:52.911980 1593017872.91198 dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 1.0078418254852295 2020-06-24 18:57:53.918823 1593017873.918823 dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 2.0103507041931152 2020-06-24 18:57:54.921332 1593017874.921332 dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 3.023340940475464 2020-06-24 18:57:55.934322 1593017875.934322 dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 4.036783933639526 2020-06-24 18:57:56.947765 1593017876.947765 dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 5.049667835235596 2020-06-24 18:57:57.960649 1593017877.960649 dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 6.063947916030884 2020-06-24 18:57:58.974929 1593017878.974929 dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 7.0797247886657715 2020-06-24 18:57:59.990706 1593017879.990706 dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 8.091670751571655 2020-06-24 18:58:01.002652 1593017881.002652 dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 9.1053147315979 2020-06-24 18:58:02.016296 1593017882.016296 dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 10.120086908340454 2020-06-24 18:58:03.031068 1593017883.031068 ---------- Added file: https://bugs.python.org/file49260/s03_dir_entry.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 13:03:56 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 17:03:56 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale In-Reply-To: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> Message-ID: <1593018236.29.0.325933922768.issue41094@roundup.psfhosted.org> miss-islington added the comment: New changeset 1dda40c1d2681a8f03a567b72698d88ced6bbd6c by Miss Islington (bot) in branch '3.8': bpo-41094: Additional fix for PYTHONSTARTUP. (GH-21119) https://github.com/python/cpython/commit/1dda40c1d2681a8f03a567b72698d88ced6bbd6c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 13:06:51 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Jun 2020 17:06:51 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale In-Reply-To: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> Message-ID: <1593018411.21.0.0588098825198.issue41094@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 13:10:08 2020 From: report at bugs.python.org (Jiachen Yang) Date: Wed, 24 Jun 2020 17:10:08 +0000 Subject: [issue41105] Add some extra content check in configure process for some empty header file who has been deprecated by glibc In-Reply-To: <1593011818.28.0.182724458451.issue41105@roundup.psfhosted.org> Message-ID: <1593018608.8.0.253217114101.issue41105@roundup.psfhosted.org> Change by Jiachen Yang : ---------- nosy: +Jiachen Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 13:15:46 2020 From: report at bugs.python.org (Brandt Bucher) Date: Wed, 24 Jun 2020 17:15:46 +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: <1593018946.82.0.180076055515.issue40636@roundup.psfhosted.org> Change by Brandt Bucher : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 13:16:06 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 17:16:06 +0000 Subject: [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale In-Reply-To: <1592943916.33.0.703707686059.issue41094@roundup.psfhosted.org> Message-ID: <1593018966.34.0.334799690182.issue41094@roundup.psfhosted.org> miss-islington added the comment: New changeset 29aa8085e95e106f4b9e312169d4af87e9b5e3e2 by Miss Islington (bot) in branch '3.9': bpo-41094: Additional fix for PYTHONSTARTUP. (GH-21119) https://github.com/python/cpython/commit/29aa8085e95e106f4b9e312169d4af87e9b5e3e2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 13:20:51 2020 From: report at bugs.python.org (Cezary Wagner) Date: Wed, 24 Jun 2020 17:20:51 +0000 Subject: [issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing. In-Reply-To: <1593017703.53.0.919415125728.issue41106@roundup.psfhosted.org> Message-ID: <1593019251.46.0.45264171714.issue41106@roundup.psfhosted.org> Cezary Wagner added the comment: One hint more. Start of new process os.scandir() give invalid modification date for file open for writing until external tool is not called (like explorer, touch, etc.). So (log open for writing and write is done between 1, 2): 1. Run program with os.scandir() -> dir_entry.stat().st_mtime() = t1. 2. Run program with os.scandir() -> dir_entry.stat().st_mtime() = t1. Modification is stalled. Another scenario (log open for writing and write is done between 1, 3): 1. Run program with os.scandir() -> dir_entry.stat().st_mtime() = t1. 2. touch -> dir_entry.path 3. Run program with os.scandir() -> dir_entry.stat().st_mtime() = t2. Modification works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 13:23:50 2020 From: report at bugs.python.org (Kerrick Staley) Date: Wed, 24 Jun 2020 17:23:50 +0000 Subject: [issue41096] Need command to exit PDB interactive shell In-Reply-To: <1592964275.48.0.323547017959.issue41096@roundup.psfhosted.org> Message-ID: <1593019430.61.0.864622284488.issue41096@roundup.psfhosted.org> Kerrick Staley added the comment: Serhiy: I'm referring to the interactive mode that can be entered by typing "interact" in PDB. Here are reproduction instructions: 1. Run "python3" command. 2. In Python shell, type "import pdb; pdb.set_trace()". 3. In PDB shell, type "interact". Now, in this "PDB InteractiveConsole" shell (I'm not sure what it's called), the only way to go back to PDB is to press Ctrl+D. If you type "quit()" or "exit()" it exits the entire Python process. If you type "q" it says "NameError: name 'q' is not defined". In Jupyter, I get different (but still undesirable) behavior: "quit()" raises "NameError: name 'quit' is not defined" (and similar for "exit()"). I think "quit()"/"exit()" in these contexts should return you back to the PDB shell. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 14:17:10 2020 From: report at bugs.python.org (Georg Brandl) Date: Wed, 24 Jun 2020 18:17:10 +0000 Subject: [issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration In-Reply-To: <1586183568.2.0.322929459864.issue40204@roundup.psfhosted.org> Message-ID: <1593022630.47.0.578746903401.issue40204@roundup.psfhosted.org> Georg Brandl added the comment: Don't hesitate to send requests back to the Sphinx tracker if any changes appear to be too restrictive to you. It is a documentation tool, not a compiler. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 14:22:25 2020 From: report at bugs.python.org (SilentGhost) Date: Wed, 24 Jun 2020 18:22:25 +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: <1593022945.69.0.216283428891.issue40636@roundup.psfhosted.org> SilentGhost added the comment: Ram, please fix the typo pointed out on github https://github.com/python/cpython/commit/59cf853332a82ce92875ea3dd6bba08e1305a288#r40044022 ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 14:24:20 2020 From: report at bugs.python.org (Steve Dower) Date: Wed, 24 Jun 2020 18:24:20 +0000 Subject: [issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing. In-Reply-To: <1593017703.53.0.919415125728.issue41106@roundup.psfhosted.org> Message-ID: <1593023060.43.0.442283631707.issue41106@roundup.psfhosted.org> Steve Dower added the comment: I'm going to have to spend more time to analyse this (later), but it seems like Windows deciding not to update the directory's data structures (containing the st_mtime retrieved by scandir) as long as the file is still open. I suspect the answer for your scenario is that you'll just have to use os.stat() to get the information from the file's entry, rather than the directory's entry. It's unlikely there's anything we can do at Python's level without sacrificing all the performance gains of scandir() for all other scenarios. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 14:59:33 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Jun 2020 18:59:33 +0000 Subject: [issue41074] msilib does not work correctly with non-ASCII names In-Reply-To: <1592819364.77.0.204133335843.issue41074@roundup.psfhosted.org> Message-ID: <1593025173.45.0.440760794724.issue41074@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +20289 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21126 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 15:05:57 2020 From: report at bugs.python.org (J. Nick Koston) Date: Wed, 24 Jun 2020 19:05:57 +0000 Subject: [issue36098] asyncio: ssl client-server with "slow" read In-Reply-To: <1550967725.88.0.520289067216.issue36098@roundup.psfhosted.org> Message-ID: <1593025557.59.0.265410994988.issue36098@roundup.psfhosted.org> Change by J. Nick Koston : ---------- nosy: +bdraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 15:27:11 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Jun 2020 19:27:11 +0000 Subject: [issue41096] Need command to exit PDB interactive shell In-Reply-To: <1592964275.48.0.323547017959.issue41096@roundup.psfhosted.org> Message-ID: <1593026831.05.0.083255606534.issue41096@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you, now I understand the problem. It is reasonable request, but a new feature can only be added in Python 3.10. ---------- versions: +Python 3.10 -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 15:44:38 2020 From: report at bugs.python.org (Natsumi H.) Date: Wed, 24 Jun 2020 19:44:38 +0000 Subject: [issue41107] Running a generator in a map-like manner Message-ID: <1593027878.48.0.698199601313.issue41107@roundup.psfhosted.org> New submission from Natsumi H. : I suggest adding a function which behaves like map but without returning anything to iterate over a generator. This is useful in cases where you need to run a function on every element in a list without unnecessarily creating a generator object like map would. I think given the existence of the map function that this should be added to Python. ---------- components: Interpreter Core messages: 372275 nosy: natsuwumi priority: normal severity: normal status: open title: Running a generator in a map-like manner type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 16:09:00 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 24 Jun 2020 20:09:00 +0000 Subject: [issue41107] Running a generator in a map-like manner In-Reply-To: <1593027878.48.0.698199601313.issue41107@roundup.psfhosted.org> Message-ID: <1593029340.27.0.399725069137.issue41107@roundup.psfhosted.org> R?mi Lapeyre added the comment: If I'm understanding correctly you want: def xmap(f, iterable): for e in iterable: f(e) Is that correct? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 16:09:09 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 24 Jun 2020 20:09:09 +0000 Subject: [issue41107] Running a generator in a map-like manner In-Reply-To: <1593027878.48.0.698199601313.issue41107@roundup.psfhosted.org> Message-ID: <1593029349.71.0.65705364916.issue41107@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- components: +Library (Lib) -Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 16:13:32 2020 From: report at bugs.python.org (Vytautas Liuolia) Date: Wed, 24 Jun 2020 20:13:32 +0000 Subject: [issue40986] Async generators are not garbage collected In-Reply-To: <1592231270.66.0.0853044039719.issue40986@roundup.psfhosted.org> Message-ID: <1593029612.48.0.968636714592.issue40986@roundup.psfhosted.org> Vytautas Liuolia added the comment: I've now skimmed through the relevant Trio issue https://github.com/python-trio/trio/issues/265 and the currently deferred https://www.python.org/dev/peps/pep-0533/ and, as I understand, the issue is not trivial and subject to subtle edge cases. Getting back to the issue, it looks like a misunderstanding on my side, sorry! As per PEP-525: The asyncio event loop will use sys.set_asyncgen_hooks() API to maintain a weak set of all scheduled asynchronous generators, and to schedule their aclose() coroutine methods when it is time for generators to be GCed. It seems that my original test case just doesn't give these aclose() coroutines a chance to run. Awaiting an asyncio.sleep() "fixes" that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 16:14:42 2020 From: report at bugs.python.org (Natsumi H.) Date: Wed, 24 Jun 2020 20:14:42 +0000 Subject: [issue41107] Running a generator in a map-like manner In-Reply-To: <1593027878.48.0.698199601313.issue41107@roundup.psfhosted.org> Message-ID: <1593029682.51.0.0113437712732.issue41107@roundup.psfhosted.org> Natsumi H. added the comment: Exactly that was the plan! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 16:18:41 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 24 Jun 2020 20:18:41 +0000 Subject: [issue41107] Running a generator in a map-like manner In-Reply-To: <1593027878.48.0.698199601313.issue41107@roundup.psfhosted.org> Message-ID: <1593029921.56.0.44467343047.issue41107@roundup.psfhosted.org> R?mi Lapeyre added the comment: I don't think something so obvious can be added, if you want a one liner you can write: for e in iterable: f(e) I think it would go in itertools if it were accepted. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 16:22:15 2020 From: report at bugs.python.org (Natsumi H.) Date: Wed, 24 Jun 2020 20:22:15 +0000 Subject: [issue41107] Running a generator in a map-like manner In-Reply-To: <1593027878.48.0.698199601313.issue41107@roundup.psfhosted.org> Message-ID: <1593030135.59.0.80309195856.issue41107@roundup.psfhosted.org> Natsumi H. added the comment: If it won't be added do you reckon creating a library to solve this issue would be appropriate? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 16:26:26 2020 From: report at bugs.python.org (Vytautas Liuolia) Date: Wed, 24 Jun 2020 20:26:26 +0000 Subject: [issue40986] Async generators are not garbage collected In-Reply-To: <1592231270.66.0.0853044039719.issue40986@roundup.psfhosted.org> Message-ID: <1593030386.15.0.356400973086.issue40986@roundup.psfhosted.org> Change by Vytautas Liuolia : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 16:42:00 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 24 Jun 2020 20:42:00 +0000 Subject: [issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing. In-Reply-To: <1593017703.53.0.919415125728.issue41106@roundup.psfhosted.org> Message-ID: <1593031320.77.0.230433671555.issue41106@roundup.psfhosted.org> Eryk Sun added the comment: In FSBO [1] section 6 "Time Stamps", note that the LastWriteTime value gets updated when an IRP_MJ_FLUSH_BUFFERS is processed. In the Windows API, this is a FlushFileBuffers [2] call. In the C runtime, it's a _commit [3] call, which is an os.fsync [4] call in Python. Calling the latter will update the directory entry for the file. For an example implementation in the FAT32 filesystem, see FatCommonFlushBuffers [5]. Note in the UserFileOpen case that it flushes any cached data via FatFlushFile and then updates the directory entry from the file control block (FCB) via FatUpdateDirentFromFcb, and finally it flushes the parent directory control blocks (DCBs) -- and possibly also the volume. Example with os.fsync: import os import time import datetime UPDATE_DIR = True FILEPATH = 'C:/Temp/test/spam.txt' def scan(filepath): dir_path, filename = os.path.split(filepath) with os.scandir(dir_path) as iter_dir: for entry in iter_dir: if entry.name == filename: return entry with open(FILEPATH, 'w') as f: while True: print('spam', file=f, flush=True) if UPDATE_DIR: os.fsync(f.fileno()) entry = scan(FILEPATH) stat_result = entry.stat() now = datetime.datetime.now() print(f'st_mtime: {stat_result.st_mtime:0.3f}, ' f'delta_t: {now.timestamp() - stat_result.st_mtime:0.3f}') time.sleep(1.0) [1] https://go.microsoft.com/fwlink/?LinkId=140636 [2] https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-flushfilebuffers [3] https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/commit?view=vs-2019 [4] https://docs.python.org/3/library/os.html#os.fsync [5] https://github.com/microsoft/Windows-driver-samples/blob/9afd93066dfd9db12f66099cf9ec44b6fd734b2d/filesys/fastfat/flush.c#L145 ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 17:08:47 2020 From: report at bugs.python.org (Enji Cooper) Date: Wed, 24 Jun 2020 21:08:47 +0000 Subject: [issue41108] IN module removed in python 3.x; socket doesn't fill in the gap with IP_PORTRANGE* Message-ID: <1593032927.89.0.779362395362.issue41108@roundup.psfhosted.org> New submission from Enji Cooper : The group that I work with uses the IN.py module to access constants available in netinet/in.h on BSD when adjusting socket port ranges. This compile-time module was never ported forward to 3.x and equivalent functionality doesn't exist in the `socket` module. This bug will address that issue. ---------- components: Extension Modules messages: 372282 nosy: ngie priority: normal pull_requests: 20290 severity: normal status: open title: IN module removed in python 3.x; socket doesn't fill in the gap with IP_PORTRANGE* 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 Wed Jun 24 17:36:54 2020 From: report at bugs.python.org (Steve Dower) Date: Wed, 24 Jun 2020 21:36:54 +0000 Subject: [issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing. In-Reply-To: <1593017703.53.0.919415125728.issue41106@roundup.psfhosted.org> Message-ID: <1593034614.36.0.111046813969.issue41106@roundup.psfhosted.org> Steve Dower added the comment: Does it make the most sense for us to make .flush() also do an implicit .fsync() (when it's actually a file object)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 17:50:56 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 21:50:56 +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: <1593035456.41.0.729898918011.issue40773@roundup.psfhosted.org> miss-islington added the comment: New changeset cf18c9e9d4d44f6671a3fe6011bb53d8ee9bd92b by Arisaka97 in branch 'master': bpo-40773: Fix rendering for 'retval' on the pdb page (GH-21081) https://github.com/python/cpython/commit/cf18c9e9d4d44f6671a3fe6011bb53d8ee9bd92b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 17:51:07 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 21:51:07 +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: <1593035467.42.0.52047388528.issue40773@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20291 pull_request: https://github.com/python/cpython/pull/21128 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 17:51:22 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 21:51:22 +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: <1593035482.15.0.42128260554.issue40773@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20293 pull_request: https://github.com/python/cpython/pull/21130 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 17:51:15 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 21:51:15 +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: <1593035475.22.0.285946026163.issue40773@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20292 pull_request: https://github.com/python/cpython/pull/21129 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 17:53:54 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 24 Jun 2020 21:53:54 +0000 Subject: [issue41107] Running a generator in a map-like manner In-Reply-To: <1593027878.48.0.698199601313.issue41107@roundup.psfhosted.org> Message-ID: <1593035634.21.0.599314200048.issue41107@roundup.psfhosted.org> Raymond Hettinger added the comment: FWIW, you can already do this with map() and deque(): deque(map(f, it), maxsize=0) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 17:56:22 2020 From: report at bugs.python.org (PEW's Corner) Date: Wed, 24 Jun 2020 21:56:22 +0000 Subject: [issue41097] confusing BufferError: Existing exports of data: object cannot be re-sized In-Reply-To: <1592983758.49.0.230327773422.issue41097@roundup.psfhosted.org> Message-ID: <1593035782.04.0.799004767144.issue41097@roundup.psfhosted.org> PEW's Corner added the comment: I'm getting the same error (in 3.8.3) for this code: o = bytearray(1) o += o There's no error if the second line is replaced with: o += bytearray(1) Not sure if this is related. ---------- nosy: +pewscorner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 18:01:11 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 22:01:11 +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: <1593036071.95.0.908113754677.issue40773@roundup.psfhosted.org> miss-islington added the comment: New changeset c1634ac834729eb46caf98efcb7e33b8698d54a7 by Miss Islington (bot) in branch '3.9': bpo-40773: Fix rendering for 'retval' on the pdb page (GH-21081) https://github.com/python/cpython/commit/c1634ac834729eb46caf98efcb7e33b8698d54a7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 18:01:55 2020 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 24 Jun 2020 22:01:55 +0000 Subject: [issue39498] Signpost security considerations in library In-Reply-To: <1580361272.17.0.099312904306.issue39498@roundup.psfhosted.org> Message-ID: <1593036115.38.0.498934868506.issue39498@roundup.psfhosted.org> ?ric Araujo added the comment: I think that we could make this easier with a custom directive that?s rendered into the appropriate markup during build and auto-generates the index page with links to all links. No error-prone manual update needed! ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 18:03:19 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jun 2020 22:03:19 +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: <1593036199.76.0.229202550873.issue40773@roundup.psfhosted.org> miss-islington added the comment: New changeset ec05a7feed120503a3ad2dd4547eea2aa9a81dae by Miss Islington (bot) in branch '3.8': bpo-40773: Fix rendering for 'retval' on the pdb page (GH-21081) https://github.com/python/cpython/commit/ec05a7feed120503a3ad2dd4547eea2aa9a81dae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 18:03:40 2020 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 24 Jun 2020 22:03:40 +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: <1593036220.7.0.154164073879.issue40773@roundup.psfhosted.org> ?ric Araujo added the comment: Thanks for the patch! ---------- nosy: +eric.araujo resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 18:12:37 2020 From: report at bugs.python.org (Julian Berman) Date: Wed, 24 Jun 2020 22:12:37 +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: <1593036757.52.0.362122137048.issue40379@roundup.psfhosted.org> Change by Julian Berman : ---------- nosy: +Julian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 19:02:07 2020 From: report at bugs.python.org (Alexander Mohr) Date: Wed, 24 Jun 2020 23:02:07 +0000 Subject: [issue36098] asyncio: ssl client-server with "slow" read In-Reply-To: <1550967725.88.0.520289067216.issue36098@roundup.psfhosted.org> Message-ID: <1593039727.36.0.0271881081965.issue36098@roundup.psfhosted.org> Alexander Mohr added the comment: as an FYI I've reproduced this with the httpx library as well: https://repl.it/repls/PristineBonyBugs#main.py. It reproduces on this site but I've been unable to reproduce it locally. It does always reproduce on our production systems. what's interesting is that it I can't seem to be able to reproduce it with aiohttp either on that site or locally: https://repl.it/@thehesiod/PristineBonyBugs-1#main.py does aiohttp do something to avoid this scenario? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 19:04:17 2020 From: report at bugs.python.org (Yonatan Goldschmidt) Date: Wed, 24 Jun 2020 23:04:17 +0000 Subject: [issue35823] Use vfork() in subprocess on Linux In-Reply-To: <1548381806.02.0.709569222975.issue35823@roundup.psfhosted.org> Message-ID: <1593039857.19.0.18456251701.issue35823@roundup.psfhosted.org> Change by Yonatan Goldschmidt : ---------- nosy: +Yonatan Goldschmidt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 19:05:25 2020 From: report at bugs.python.org (Stefan Krah) Date: Wed, 24 Jun 2020 23:05:25 +0000 Subject: [issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration In-Reply-To: <1586183568.2.0.322929459864.issue40204@roundup.psfhosted.org> Message-ID: <1593039925.97.0.249192827432.issue40204@roundup.psfhosted.org> Stefan Krah added the comment: """ * Doc/c-api/buffer.rst: the table with ".. c:macro:: PyBUF_INDIRECT" is wrong. Sphinx fails because PyBUF_SIMPLE is declared twice. => use ":c:macro:`PyBUF_INDIRECT`" instead """ Hmm, grep shows: c-api/buffer.rst:123: most cases such a request will be :c:macro:`PyBUF_SIMPLE` or :c:macro:`PyBUF_WRITABLE`. c-api/buffer.rst:144: If :c:member:`~Py_buffer.shape` is ``NULL`` as a result of a :c:macro:`PyBUF_SIMPLE` c-api/buffer.rst:255:Since :c:macro:`PyBUF_SIMPLE` is defined as 0, :c:macro:`PyBUF_WRITABLE` c-api/buffer.rst:258::c:macro:`PyBUF_FORMAT` can be \|'d to any of the flags except :c:macro:`PyBUF_SIMPLE`. c-api/buffer.rst:280:| .. c:macro:: PyBUF_SIMPLE | NULL | NULL | NULL | So I see a single definition ans several references. Whether the definition may occur in a table is more a question for Georg. :) It worked up to now and is quite useful, because you can jump directly into the correct row. Escaping the "\*" was necessary at the time for vim syntax highlighting. I think it is no longer needed. So everything has a reason :) ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 19:28:10 2020 From: report at bugs.python.org (Alexander Mohr) Date: Wed, 24 Jun 2020 23:28:10 +0000 Subject: [issue36098] asyncio: ssl client-server with "slow" read In-Reply-To: <1550967725.88.0.520289067216.issue36098@roundup.psfhosted.org> Message-ID: <1593041290.45.0.507969922316.issue36098@roundup.psfhosted.org> Alexander Mohr added the comment: I've updated https://repl.it/@thehesiod/PristineBonyBugs#main.py to contain both httpx + aiohttp testcases, and now httpx reproduces almost immediately and aiohttp is still ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 19:30:30 2020 From: report at bugs.python.org (Stefan Krah) Date: Wed, 24 Jun 2020 23:30:30 +0000 Subject: [issue39277] _PyTime_FromDouble() fails to detect an integer overflow when converting a C double to a C int64_t In-Reply-To: <1578581025.66.0.18478821427.issue39277@roundup.psfhosted.org> Message-ID: <1593041430.68.0.499211927636.issue39277@roundup.psfhosted.org> Stefan Krah added the comment: Is it a bug in float.__trunc__()? It seems to me that the detailed comment accounts for case of rounding up. That's why < is used instead of <=. ---------- nosy: +skrah, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 20:50:58 2020 From: report at bugs.python.org (wyz23x2) Date: Thu, 25 Jun 2020 00:50:58 +0000 Subject: [issue41075] Make support of navigating through prev. commands in IDLE more conspicuous In-Reply-To: <1592824587.6.0.226335506835.issue41075@roundup.psfhosted.org> Message-ID: <1593046258.57.0.740473212282.issue41075@roundup.psfhosted.org> wyz23x2 added the comment: Doesn't work? The and work perfectly in 3.8.3! Th problem now is that only very few people know it. There should be a clearer way. ---------- title: Add support of navigating through prev. commands in IDLE -> Make support of navigating through prev. commands in IDLE more conspicuous _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 20:52:45 2020 From: report at bugs.python.org (Alexander Mohr) Date: Thu, 25 Jun 2020 00:52:45 +0000 Subject: [issue36098] asyncio: ssl client-server with "slow" read In-Reply-To: <1550967725.88.0.520289067216.issue36098@roundup.psfhosted.org> Message-ID: <1593046365.18.0.141534457278.issue36098@roundup.psfhosted.org> Alexander Mohr added the comment: so I did some investigation into the difference between aiohttp + httpx and it appears that for some reason httpx does an extra read after the connection is closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 20:54:38 2020 From: report at bugs.python.org (Joshua Bronson) Date: Thu, 25 Jun 2020 00:54:38 +0000 Subject: [issue32884] Adding the ability for getpass to print asterisks when password is typed In-Reply-To: <1519122533.37.0.467229070634.issue32884@psf.upfronthosting.co.za> Message-ID: <1593046478.87.0.841173828448.issue32884@roundup.psfhosted.org> Change by Joshua Bronson : ---------- nosy: +jab _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 22:51:23 2020 From: report at bugs.python.org (=?utf-8?q?=C3=89tienne_Pot?=) Date: Thu, 25 Jun 2020 02:51:23 +0000 Subject: [issue41109] subclasses of pathlib.PurePosixPath never call __init__ or __new__ Message-ID: <1593053483.35.0.664517914864.issue41109@roundup.psfhosted.org> New submission from ?tienne Pot : I have a subclass GithubPath of PurePosixPath. ``` class GithubPath(pathlib.PurePosixPath): def __new__(cls, *args, **kwargs): print('New') return super().__new__(cls, *args, **kwargs) def __init__(self, *args, **kwargs): print('Init') super().__init__() ``` Calling `child.parent` create a new GithubPath but without ever calling __new__ nor __init__. So my subclass is never notified it is created. ``` p = GithubPath() # Print "New", "Init" p.parent # Create a new GithubPath but bypass the constructors ``` The reason seems to be that parent calls _from_parts which create a new object through `object.__new__(cls)`: https://github.com/python/cpython/blob/cf18c9e9d4d44f6671a3fe6011bb53d8ee9bd92b/Lib/pathlib.py#L689 A hack is to subclass `_init` but it seems hacky as it relies on internal implementation detail. ---------- messages: 372297 nosy: ?tienne Pot priority: normal severity: normal status: open title: subclasses of pathlib.PurePosixPath never call __init__ or __new__ 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 Wed Jun 24 23:03:34 2020 From: report at bugs.python.org (=?utf-8?q?=C3=89tienne_Pot?=) Date: Thu, 25 Jun 2020 03:03:34 +0000 Subject: [issue41109] subclasses of pathlib.PurePosixPath never call __init__ or __new__ In-Reply-To: <1593053483.35.0.664517914864.issue41109@roundup.psfhosted.org> Message-ID: <1593054214.04.0.655207829722.issue41109@roundup.psfhosted.org> ?tienne Pot added the comment: Note that this likely affect all methods which returns new Path by calling `_from_parts` or `_from_parsed_parts`, like `.absolute`, `.resolve`,... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 24 23:08:40 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 25 Jun 2020 03:08:40 +0000 Subject: [issue41109] subclasses of pathlib.PurePosixPath never call __init__ or __new__ In-Reply-To: <1593053483.35.0.664517914864.issue41109@roundup.psfhosted.org> Message-ID: <1593054520.35.0.16470329063.issue41109@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 00:46:55 2020 From: report at bugs.python.org (Ashley Whetter) Date: Thu, 25 Jun 2020 04:46:55 +0000 Subject: [issue41110] 2to3 reports some files as both not changing and having been modified Message-ID: <1593060415.61.0.690471186098.issue41110@roundup.psfhosted.org> New submission from Ashley Whetter : Many of the fixers cause the tool to report a file as both unchanged and modified. For example when checking a file with the following contents: ``` s = "str" ``` using the following command: `python -m lib2to3 -f unicode unicode_test.py` The following is output: ``` RefactoringTool: No changes to unicode_test.py RefactoringTool: Files that need to be modified: RefactoringTool: unicode_test.py ``` When a fixer returns a node, even if it is the original node without changes, it is considered as a change to the code (https://github.com/python/cpython/blob/cf18c9e9d4d44f6671a3fe6011bb53d8ee9bd92b/Lib/lib2to3/refactor.py#L446-L447) and the file is later added to the list of modified files. I have not yet identified which fixers have this issue. The fix appears to be that fixers need to be aware of when they have not made a change and should `None` when that is the case. ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 372299 nosy: AWhetter priority: normal severity: normal status: open title: 2to3 reports some files as both not changing and having been modified 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 Jun 25 01:32:59 2020 From: report at bugs.python.org (Ram Rachum) Date: Thu, 25 Jun 2020 05:32:59 +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: <1593063179.46.0.00439561608251.issue40636@roundup.psfhosted.org> Ram Rachum added the comment: I'll fix that typo. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 01:34:31 2020 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Jun 2020 05:34:31 +0000 Subject: [issue36098] asyncio: ssl client-server with "slow" read In-Reply-To: <1550967725.88.0.520289067216.issue36098@roundup.psfhosted.org> Message-ID: <1593063271.76.0.410620977577.issue36098@roundup.psfhosted.org> Christian Heimes added the comment: The additional read may read the TLS shutdown alert from the wire. The TLS record layer can send additional messages besides application layer data, e.g. for post handshake authentication, sessions, rekeying, and to indicate that one side is shutting down the current TLS connection. To investigate you can either use the undocumented SSLContext._msg_callback debug hook or Wireshark with SSLKEYLOGFILE env var (available since 3.8). ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 01:40:44 2020 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Jun 2020 05:40:44 +0000 Subject: [issue39498] Signpost security considerations in library In-Reply-To: <1580361272.17.0.099312904306.issue39498@roundup.psfhosted.org> Message-ID: <1593063644.71.0.530987922166.issue39498@roundup.psfhosted.org> Christian Heimes added the comment: +1 ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 01:44:28 2020 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Jun 2020 05:44:28 +0000 Subject: [issue39498] Signpost security considerations in library In-Reply-To: <1580361272.17.0.099312904306.issue39498@roundup.psfhosted.org> Message-ID: <1593063868.89.0.942348092315.issue39498@roundup.psfhosted.org> Christian Heimes added the comment: There are more features that should have security considerations, e.g. builtin functions like eval and exec. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 02:30:29 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 06:30:29 +0000 Subject: [issue41002] HTTPResponse.read with amt is slow In-Reply-To: <1592395696.11.0.156333341881.issue41002@roundup.psfhosted.org> Message-ID: <1593066629.07.0.45825695762.issue41002@roundup.psfhosted.org> miss-islington added the comment: New changeset 152f0b8beea12e6282d284100b600771b968927a by Bruce Merry in branch 'master': bpo-41002: Optimize HTTPResponse.read with a given amount (GH-20943) https://github.com/python/cpython/commit/152f0b8beea12e6282d284100b600771b968927a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 02:31:52 2020 From: report at bugs.python.org (Inada Naoki) Date: Thu, 25 Jun 2020 06:31:52 +0000 Subject: [issue41002] HTTPResponse.read with amt is slow In-Reply-To: <1592395696.11.0.156333341881.issue41002@roundup.psfhosted.org> Message-ID: <1593066712.47.0.868612796714.issue41002@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 02:58:25 2020 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Thu, 25 Jun 2020 06:58:25 +0000 Subject: [issue41087] Argparse int / float default In-Reply-To: <1592901741.64.0.424311777369.issue41087@roundup.psfhosted.org> Message-ID: <1593068305.59.0.215089485345.issue41087@roundup.psfhosted.org> Vedran ?a?i? added the comment: Python _is_ strongly typed. As soon as you try to use that 0.005 as an index into a list or something else that requires an int, you'll get a TypeError. Strong typing is not the same as static typing. It is a common misconception. And common sense is always common to something. For humans it is common sense that we have two eyes, but it's not common to spiders. As I said, what is common sense in statically typed languages is not necessarily common to Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 04:37:20 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 08:37:20 +0000 Subject: [issue41074] msilib does not work correctly with non-ASCII names In-Reply-To: <1592819364.77.0.204133335843.issue41074@roundup.psfhosted.org> Message-ID: <1593074240.34.0.0571594485226.issue41074@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 55939b1708d6fc0d36d2be11ccdc6bf207e1bd41 by Serhiy Storchaka in branch 'master': bpo-41074: Fix support of non-ASCII names and SQL in msilib. (GH-21126) https://github.com/python/cpython/commit/55939b1708d6fc0d36d2be11ccdc6bf207e1bd41 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 04:37:39 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 08:37:39 +0000 Subject: [issue41074] msilib does not work correctly with non-ASCII names In-Reply-To: <1592819364.77.0.204133335843.issue41074@roundup.psfhosted.org> Message-ID: <1593074259.09.0.514675956262.issue41074@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +20294 pull_request: https://github.com/python/cpython/pull/21133 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 04:37:46 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 08:37:46 +0000 Subject: [issue41074] msilib does not work correctly with non-ASCII names In-Reply-To: <1592819364.77.0.204133335843.issue41074@roundup.psfhosted.org> Message-ID: <1593074266.54.0.887091686021.issue41074@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20295 pull_request: https://github.com/python/cpython/pull/21134 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 04:54:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 08:54:20 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API Message-ID: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> New submission from STINNER Victor : Python stdlib has around 139 extension modules. Not all of them *need* to use internal C API. I'm interested to try to convert a bunch of them to the limited C API, as part of my work on the PEP 620. IMHO "Eating your own dog food" is a good practice to ensure that the limited C API is usable. Currently, the stdlib has exactly one extension module using the limited C API: the xxlimited module built with Py_LIMITED_API macro defined as 0x03050000 in setup.py. By the way, maybe Py_LIMITED_API should be defined in xxlimited.c, rather than in setup.py. xxlimited.c is not built if Python is built in debug mode. I'm not sure why. The main limitation to use the limited C API for stdlib is Argument Clinic which attempts to always emit the most efficient code, like using the METH_FASTCALL calling convention and use private functions like _PyArg_CheckPositional() or "static _PyArg_Parser _parser". Argument Clinic could be modified to have an option to only use C API of the limited C API. Cython is working on a similar option (restraint emitted code to the limited C API). I already tried to convert stdlib extensions to the limited C API in bpo-39573. I found other issues: * PyTypeObject is opaque and so it's not possible to implement a deallocator function (tp_dealloc) which calls tp_free like: Py_TYPE(self)->tp_free((PyObject*)self); * _Py_IDENTIFIER() is not part of the limited C API https://bugs.python.org/issue39573#msg361514 ---------- components: Extension Modules messages: 372307 nosy: vstinner priority: normal severity: normal status: open title: Convert a few stdlib extensions to the limited C API versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 04:54:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 08:54:37 +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: <1593075277.96.0.889937929535.issue39573@roundup.psfhosted.org> STINNER Victor added the comment: > Another idea would be to convert some C extensions of the standard library to the limited C API. It would ensure that the limited C API contains enough functions to be useful, but would also notify us directly if the API is broken. I created bpo-41111: "Convert a few stdlib extensions to the limited C API". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 04:55:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 08:55:21 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> Message-ID: <1593075321.37.0.79354928082.issue41111@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-27499 "PY_SSIZE_T_CLEAN conflicts with Py_LIMITED_API". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:00:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:00:48 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> Message-ID: <1593075648.83.0.596141015912.issue41111@roundup.psfhosted.org> STINNER Victor added the comment: Other missing features of the limited C API: * bpo-2897: "PyMemberDef missing in limited API / Deprecate structmember.h" * Stefan Behnel wrote: "Some code cannot even be migrated at all, e.g. because the entire buffer protocol is missing from it. Some bugs were only fixed in Py3.9, time will tell if anything else is missing." https://mail.python.org/archives/list/python-dev at python.org/message/SENQBEJCJ7NYC72ZZ7BGIEDDBTUOXLI4/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:09:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:09:48 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> Message-ID: <1593076188.01.0.344313351375.issue41111@roundup.psfhosted.org> STINNER Victor added the comment: PyType_FromSpec() doesn't support 11 slots: * tp_dict * tp_mro * tp_cache * tp_subclasses * tp_weaklist * tp_vectorcall * tp_weaklistoffset (see PyMemberDef) * tp_dictoffset (see PyMemberDef) * tp_vectorcall_offset (see PyMemberDef) * bf_getbuffer * bf_releasebuffer https://docs.python.org/dev/c-api/type.html#c.PyType_Slot But it is possible to define tp_weaklistoffset, tp_dictoffset and tp_vectorcall_offset via Py_tp_members slot: https://docs.python.org/dev/c-api/structures.html#pymemberdef-offsets * "__dictoffset__" => tp_dictoffset * "__weaklistoffset__" => tp_weaklistoffset * "__vectorcalloffset__" => tp_vectorcall_offset Maybe we can do add new members for the 8 missing slots, especially bf_getbuffer and bf_releasebuffer? commit f7c4e236429606e1c982cacf24e10fc86ef4462f of bpo-40724 added Py_bf_getbuffer and Py_bf_releasebuffer slots to the C API, but these slots are still not available in the limited C API: see bpo-10181. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:12:45 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 09:12:45 +0000 Subject: [issue41074] msilib does not work correctly with non-ASCII names In-Reply-To: <1592819364.77.0.204133335843.issue41074@roundup.psfhosted.org> Message-ID: <1593076365.26.0.648575084769.issue41074@roundup.psfhosted.org> miss-islington added the comment: New changeset 3f4de44cf7f3da754efbbc0e70feabf3b9384dce by Miss Islington (bot) in branch '3.8': bpo-41074: Fix support of non-ASCII names and SQL in msilib. (GH-21126) https://github.com/python/cpython/commit/3f4de44cf7f3da754efbbc0e70feabf3b9384dce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:13:02 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 09:13:02 +0000 Subject: [issue41074] msilib does not work correctly with non-ASCII names In-Reply-To: <1592819364.77.0.204133335843.issue41074@roundup.psfhosted.org> Message-ID: <1593076382.47.0.638167587336.issue41074@roundup.psfhosted.org> miss-islington added the comment: New changeset 0ef6a3fc0eb9337656ef843bbcde09c15267173d by Miss Islington (bot) in branch '3.9': bpo-41074: Fix support of non-ASCII names and SQL in msilib. (GH-21126) https://github.com/python/cpython/commit/0ef6a3fc0eb9337656ef843bbcde09c15267173d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:14:07 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 09:14:07 +0000 Subject: [issue41074] msilib does not work correctly with non-ASCII names In-Reply-To: <1592819364.77.0.204133335843.issue41074@roundup.psfhosted.org> Message-ID: <1593076447.16.0.364293461521.issue41074@roundup.psfhosted.org> Serhiy Storchaka added the comment: There are also problems with FCICreate, but this is a different issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:15:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:15:40 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> Message-ID: <1593076540.3.0.327014419553.issue41111@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-39123: "PyThread_xxx() not available when using limited API". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:17:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:17:35 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> Message-ID: <1593076655.25.0.88818806717.issue41111@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-23903: "Generate PC/python3.def by scraping headers". Steve Dower suggests to convert macros to functions. I'm not sure which functions are still implemented as macro in the limited C API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:25:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:25:43 +0000 Subject: [issue35949] Move PyThreadState into Include/internal/pycore_pystate.h In-Reply-To: <1549677619.84.0.322696563838.issue35949@roundup.psfhosted.org> Message-ID: <1593077143.35.0.795903021657.issue35949@roundup.psfhosted.org> STINNER Victor added the comment: > Py_TRASHCAN_SAFE_BEGIN and Py_TRASHCAN_SAFE_END I excluded the TRASHCAN API from the limited C API: commit 0fa4f43db086ac3459811cca4ec5201ffbee694a Author: Victor Stinner Date: Wed Feb 5 12:23:27 2020 +0100 bpo-39542: Exclude trashcan from the limited C API (GH-18362) Exclude trashcan mechanism from the limited C API: it requires access to PyTypeObject and PyThreadState structure fields, whereas these structures are opaque in the limited C API. The trashcan mechanism never worked with the limited C API. Move it from object.h to cpython/object.h. Then I modified these macros to hide implementation details: commit 38965ec5411da60d312b59be281f3510d58e0cf1 Author: Victor Stinner Date: Fri Mar 13 16:51:52 2020 +0100 bpo-39947: Hide implementation detail of trashcan macros (GH-18971) Py_TRASHCAN_BEGIN_CONDITION and Py_TRASHCAN_END macro no longer access PyThreadState attributes, but call new private _PyTrash_begin() and _PyTrash_end() functions which hide implementation details. > Py_EnterRecursiveCall, Py_LeaveRecursiveCall, _Py_MakeRecCheck Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() are now function calls. I move the "inline" implementation the internal C API. commit 224481a8c988fca12f488544edd2f01c0af2a91d Author: Victor Stinner Date: Fri Mar 13 10:19:38 2020 +0100 bpo-39947: Move Py_EnterRecursiveCall() to internal C API (GH-18972) Move the static inline function flavor of Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() to the internal C API: they access PyThreadState attributes. The limited C API provides regular functions which hide implementation details. > Py_ALLOW_RECURSION, Py_END_ALLOW_RECURSION Oh right, these macros should be modified to not access PyThreadState.recursion_critical member directly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:26:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:26:12 +0000 Subject: [issue35949] Move PyThreadState into Include/internal/pycore_pystate.h In-Reply-To: <1549677619.84.0.322696563838.issue35949@roundup.psfhosted.org> Message-ID: <1593077172.27.0.258164277188.issue35949@roundup.psfhosted.org> STINNER Victor added the comment: I mark this issue as a duplicate of bpo-39947 "[C API] Make the PyThreadState structure opaque (move it to the internal C API)" since I already pushed multiple changes there. But this issue contains interesting technical information! ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> [C API] Make the PyThreadState structure opaque (move it to the internal C API) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:27:07 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:27:07 +0000 Subject: [issue39947] [C API] Make the PyThreadState structure opaque (move it to the internal C API) In-Reply-To: <1584035214.47.0.672795796186.issue39947@roundup.psfhosted.org> Message-ID: <1593077227.04.0.319583718983.issue39947@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-35949 "Move PyThreadState into Include/internal/pycore_pystate.h" as a duplicate of this issue. bpo-35949 lists Py_ALLOW_RECURSION and Py_END_ALLOW_RECURSION which access PyThreadState.recursion_critical member directly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:28:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:28:48 +0000 Subject: =?utf-8?q?=5Bissue23644=5D_g++_module_compile_fails_with_=E2=80=98=5FAtom?= =?utf-8?q?ic=E2=80=99_does_not_name_a_type?= In-Reply-To: <1426172340.82.0.788562357439.issue23644@psf.upfronthosting.co.za> Message-ID: <1593077328.95.0.808369781803.issue23644@roundup.psfhosted.org> STINNER Victor added the comment: Atomic functions are no longer part of the public C API: code was moved to pycore_atomic.h internal C API. I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:29:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:29:32 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> Message-ID: <1593077372.68.0.872456122047.issue41111@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-16731: "xxlimited/xxmodule docstrings ambiguous". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:30:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:30:58 +0000 Subject: [issue21076] Turn signal.SIG* constants into enums In-Reply-To: <1395935330.94.0.38028035584.issue21076@psf.upfronthosting.co.za> Message-ID: <1593077458.36.0.751488523377.issue21076@roundup.psfhosted.org> STINNER Victor added the comment: signal constants are now enum, I close the issue. For further enhancements, please open a separated issue. $ python3 Python 3.8.3 (default, May 15 2020, 00:00:00) >>> import signal; signal.SIGTERM ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:31:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:31:43 +0000 Subject: [issue8212] A tp_dealloc of a subclassed class cannot resurrect an object In-Reply-To: <1269350912.78.0.210466349131.issue8212@psf.upfronthosting.co.za> Message-ID: <1593077503.7.0.130870160506.issue8212@roundup.psfhosted.org> STINNER Victor added the comment: > I think PEP 442 makes this request obsolete: you can simply implement tp_finalize() and incref the object naturally from there. Right. I close the issue. ---------- nosy: +vstinner resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:32:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:32:50 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> Message-ID: <1593077570.13.0.82879232066.issue41111@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-41073: "[C API] PyType_GetSlot() should accept static types". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:34:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:34:27 +0000 Subject: [issue24652] C-API Pure Embedding enhancement In-Reply-To: <1437120649.64.0.570799865816.issue24652@psf.upfronthosting.co.za> Message-ID: <1593077667.38.0.273852354001.issue24652@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +C API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:36:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:36:09 +0000 Subject: [issue23903] Generate PC/python3.def by scraping headers In-Reply-To: <1428637761.13.0.348463350169.issue23903@psf.upfronthosting.co.za> Message-ID: <1593077769.86.0.656493177234.issue23903@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +C API nosy: +paul.moore _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:37:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:37:43 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> Message-ID: <1593077863.37.0.510953237112.issue41111@roundup.psfhosted.org> STINNER Victor added the comment: See also ./Tools/scripts/abitype.py script and bpo-10943: "abitype: Need better support to port C extension modules to the stable C API". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:38:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:38:33 +0000 Subject: [issue40077] Convert static types to PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1593077913.18.0.230713898334.issue40077@roundup.psfhosted.org> STINNER Victor added the comment: The Tools/scripts/abitype.py script can help to port C extensions to PyType_FromSpec(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:38:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:38:50 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> Message-ID: <1593077930.89.0.939164171873.issue41111@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 Thu Jun 25 05:39:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:39:58 +0000 Subject: [issue20224] C API docs need a clear "defining custom extension types" section In-Reply-To: <1389507911.71.0.277009038491.issue20224@psf.upfronthosting.co.za> Message-ID: <1593077998.82.0.0622594109864.issue20224@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +C API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:40:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:40:09 +0000 Subject: [issue21292] C API in debug fails In-Reply-To: <1397771478.75.0.526004579779.issue21292@psf.upfronthosting.co.za> Message-ID: <1593078009.66.0.808798003056.issue21292@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +C API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:40:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:40:40 +0000 Subject: [issue21508] C API PyArg_ParseTuple doc is innacurate In-Reply-To: <1400078023.63.0.359608332224.issue21508@psf.upfronthosting.co.za> Message-ID: <1593078040.04.0.128667122262.issue21508@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +C API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:40:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:40:47 +0000 Subject: [issue8939] Use C type names (PyUnicode etc;) in the C API docs In-Reply-To: <1276002876.44.0.334392966089.issue8939@psf.upfronthosting.co.za> Message-ID: <1593078047.11.0.431368246933.issue8939@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +C API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:41:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:41:11 +0000 Subject: [issue3354] Improve error reporting for the argument parsing C API In-Reply-To: <1216040063.73.0.634067891199.issue3354@psf.upfronthosting.co.za> Message-ID: <1593078071.6.0.812085678376.issue3354@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +C API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:41:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:41:00 +0000 Subject: [issue5141] C API for appending to arrays In-Reply-To: <1233654934.43.0.515749486926.issue5141@psf.upfronthosting.co.za> Message-ID: <1593078060.01.0.514591368913.issue5141@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +C API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:41:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:41:19 +0000 Subject: [issue17589] Make documentation about macros in C API explicit about rvalue vs statement In-Reply-To: <1364758755.79.0.998719447408.issue17589@psf.upfronthosting.co.za> Message-ID: <1593078079.78.0.811534221536.issue17589@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +C API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:43:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:43:48 +0000 Subject: [issue30852] _PyObject_GC_UNTRACK corruption when call a lambda function with C API In-Reply-To: <1499226588.16.0.740981062292.issue30852@psf.upfronthosting.co.za> Message-ID: <1593078228.76.0.75707792222.issue30852@roundup.psfhosted.org> STINNER Victor added the comment: I close the issue since it has no activity since 2017. If you get a similar issue, I suggest to test a debug build of Python. The ABI is compatible with release build since Python 3.8. ---------- nosy: +vstinner resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:45:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:45:27 +0000 Subject: [issue31282] C APIs called without GIL in PyOS_Readline In-Reply-To: <1503723073.13.0.645165249007.issue31282@psf.upfronthosting.co.za> Message-ID: <1593078327.28.0.614431285044.issue31282@roundup.psfhosted.org> STINNER Victor added the comment: I fixed this issue in bpo-40826, especially with this change: commit c353764fd564e401cf47a5d9efab18c72c60014e Author: Victor Stinner Date: Mon Jun 1 20:59:35 2020 +0200 bpo-40826: Fix GIL usage in PyOS_Readline() (GH-20579) Fix GIL usage in PyOS_Readline(): lock the GIL to set an exception. Pass tstate to my_fgets() and _PyOS_WindowsConsoleReadline(). Cleanup these functions. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:46:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:46:44 +0000 Subject: [issue12861] PyOS_Readline uses single lock In-Reply-To: <1314724555.55.0.18633205677.issue12861@psf.upfronthosting.co.za> Message-ID: <1593078404.19.0.058550870299.issue12861@roundup.psfhosted.org> STINNER Victor added the comment: No activity for 9 years, 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 Jun 25 05:47:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:47:19 +0000 Subject: [issue6467] PyOS_Readline: treatment of "1234EOF"; behavior of builtin_raw_input In-Reply-To: <1247399845.7.0.918611986455.issue6467@psf.upfronthosting.co.za> Message-ID: <1593078439.59.0.688323240217.issue6467@roundup.psfhosted.org> STINNER Victor added the comment: No activity for 10 years, I close the issue as out of date. ---------- nosy: +vstinner resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:47:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:47:45 +0000 Subject: [issue29086] Document C API that is not part of the limited API In-Reply-To: <1482865319.03.0.627052322458.issue29086@psf.upfronthosting.co.za> Message-ID: <1593078465.63.0.47195638595.issue29086@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +C API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:47:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:47:41 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> Message-ID: <1593078461.19.0.982795467086.issue41111@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-29086: "Document C API that is not part of the limited API". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:48:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:48:44 +0000 Subject: [issue14189] C API documentation must document if returned object is a borrowed reference or strong reference In-Reply-To: <1330834739.26.0.103894619612.issue14189@psf.upfronthosting.co.za> Message-ID: <1593078524.61.0.20710433848.issue14189@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +C API title: Documentation for some C APIs is missing clear specification of the type of reference they return -> C API documentation must document if returned object is a borrowed reference or strong reference versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:49:30 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 09:49:30 +0000 Subject: [issue35773] test_bdb fails on non-UTF-8 locale In-Reply-To: <1547812678.96.0.834885366728.issue35773@roundup.psfhosted.org> Message-ID: <1593078570.7.0.461525749711.issue35773@roundup.psfhosted.org> Serhiy Storchaka added the comment: test_bdb fails on non-UTF-8 locale because Python executes a Python code from the corresponding "encodings" submodule. There are shortcuts for the UTF-8 codec which avoid using the Python code. ---------- nosy: +serhiy.storchaka title: test_bdb fails on AIX bot (regression) -> test_bdb fails on non-UTF-8 locale versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:51:33 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 09:51:33 +0000 Subject: [issue35773] test_bdb fails on non-UTF-8 locale In-Reply-To: <1547812678.96.0.834885366728.issue35773@roundup.psfhosted.org> Message-ID: <1593078693.15.0.0145773383076.issue35773@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +20296 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21136 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:51:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 09:51:39 +0000 Subject: [issue26774] Elide Py_atomic fences when WITH_THREAD is disabled? In-Reply-To: <1460777364.25.0.14094466129.issue26774@psf.upfronthosting.co.za> Message-ID: <1593078699.02.0.705892732664.issue26774@roundup.psfhosted.org> STINNER Victor added the comment: > I never liked the option to disable thread support. I close the issue. It is not longer possible to build Python without threading support. ---------- resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:52:21 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 09:52:21 +0000 Subject: [issue41069] Use non-ascii file names in tests by default In-Reply-To: <1592774319.03.0.379358214671.issue41069@roundup.psfhosted.org> Message-ID: <1593078741.83.0.686422669335.issue41069@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- dependencies: +test_bdb fails on non-UTF-8 locale _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 05:57:05 2020 From: report at bugs.python.org (Stefan Krah) Date: Thu, 25 Jun 2020 09:57:05 +0000 Subject: [issue39277] _PyTime_FromDouble() fails to detect an integer overflow when converting a C double to a C int64_t In-Reply-To: <1578581025.66.0.18478821427.issue39277@roundup.psfhosted.org> Message-ID: <1593079025.6.0.397265697718.issue39277@roundup.psfhosted.org> Stefan Krah added the comment: C99, 6.3.1.4 Real floating and integer: """ When a value of integer type is converted to a real floating type, if the value being converted can be represented exactly in the new type, it is unchanged. If the value being converted is in the range of values that can be represented but cannot be represented exactly, the result is either the nearest higher or nearest lower representable value, chosen in an implementation-defined manner. If the value being converted is outside the range of values that can be represented, the behavior is undefined. """ So int64_t => double is implementation defined, but not undefined. float___trunc___impl() looks correct to me (of course we can squash that warning). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 06:01:16 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 10:01:16 +0000 Subject: [issue41112] test_peg_generator fails on non-UTF-8 locale Message-ID: <1593079275.98.0.365075470813.issue41112@roundup.psfhosted.org> New submission from Serhiy Storchaka : $ LC_ALL=es_US.iso88591 ./python -m test -v -m test_syntax_error_for_string test_peg_generator ... ====================================================================== ERROR: test_syntax_error_for_string (test.test_peg_generator.test_c_parser.TestCParser) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_peg_generator/test_c_parser.py", line 377, in test_syntax_error_for_string self.run_test(grammar_source, test_source) File "/home/serhiy/py/cpython/Lib/test/test_peg_generator/test_c_parser.py", line 85, in run_test assert_python_ok( File "/home/serhiy/py/cpython/Lib/test/support/script_helper.py", line 156, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/home/serhiy/py/cpython/Lib/test/support/script_helper.py", line 140, in _assert_python res, cmd_line = run_python_until_end(*args, **env_vars) File "/home/serhiy/py/cpython/Lib/test/support/script_helper.py", line 127, in run_python_until_end proc = subprocess.Popen(cmd_line, stdin=subprocess.PIPE, File "/home/serhiy/py/cpython/Lib/subprocess.py", line 947, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/home/serhiy/py/cpython/Lib/subprocess.py", line 1752, in _execute_child self.pid = _posixsubprocess.fork_exec( UnicodeEncodeError: 'latin-1' codec can't encode character '\u540d' in position 962: ordinal not in range(256) ---------------------------------------------------------------------- ---------- components: Tests messages: 372336 nosy: gvanrossum, lys.nikolaou, pablogsal, serhiy.storchaka priority: normal severity: normal status: open title: test_peg_generator fails on non-UTF-8 locale type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 06:06:26 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 10:06:26 +0000 Subject: [issue41112] test_peg_generator fails on non-UTF-8 locale In-Reply-To: <1593079275.98.0.365075470813.issue41112@roundup.psfhosted.org> Message-ID: <1593079586.19.0.882620067095.issue41112@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +20297 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21138 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 06:13:15 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 10:13:15 +0000 Subject: [issue41013] test_os.test_memfd_create() fails on AMD64 FreeBSD Shared 3.x In-Reply-To: <1592434332.74.0.304039490213.issue41013@roundup.psfhosted.org> Message-ID: <1593079995.43.0.452547607223.issue41013@roundup.psfhosted.org> STINNER Victor added the comment: > So in my local repro, Python is looping forever on successful write() for reasons I'm not immediately sure of. io.BufferedWriter.write() (well, especially its flush() method) calls write() until all data is written. Extract of _bufferedwriter_flush_unlocked() code, Modules/_io/buffered.c: while (self->write_pos < self->write_end) { n = _bufferedwriter_raw_write(self, self->buffer + self->write_pos, Py_SAFE_DOWNCAST(self->write_end - self->write_pos, Py_off_t, Py_ssize_t)); if (n == -1) { goto error; } else if (n == -2) { _set_BlockingIOError("write could not complete without blocking", 0); goto error; } self->write_pos += n; self->raw_pos = self->write_pos; written += Py_SAFE_DOWNCAST(n, Py_off_t, Py_ssize_t); /* Partial writes can return successfully when interrupted by a signal (see write(2)). We must run signal handlers before blocking another time, possibly indefinitely. */ if (PyErr_CheckSignals() < 0) goto error; } You are correct: if write() returns 0, write() is called again. If write() always returns 0, the loop never stops... Maybe a BlockingIOError must be raised if write(buffer) returns 0 (and buffer is not empty). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 06:34:17 2020 From: report at bugs.python.org (Nils Philippsen) Date: Thu, 25 Jun 2020 10:34:17 +0000 Subject: [issue34137] Add Path.lexist() to pathlib In-Reply-To: <1531825181.93.0.56676864532.issue34137@psf.upfronthosting.co.za> Message-ID: <1593081257.65.0.390404630112.issue34137@roundup.psfhosted.org> Change by Nils Philippsen : ---------- nosy: +nils _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 06:37:44 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Jun 2020 10:37:44 +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: <1593081464.65.0.0510740558635.issue39580@roundup.psfhosted.org> Ned Deily added the comment: New changeset 5f190d2cc60cd82a604cbffb58b6ca8f40350a7a by Rick Heil in branch 'master': bpo-39580: add check for CLI installation on macOS (GH-20271) https://github.com/python/cpython/commit/5f190d2cc60cd82a604cbffb58b6ca8f40350a7a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 06:37:56 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 10:37:56 +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: <1593081476.03.0.755103989726.issue39580@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +20298 pull_request: https://github.com/python/cpython/pull/21139 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 06:38:03 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 10:38:03 +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: <1593081483.9.0.736986796427.issue39580@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20299 pull_request: https://github.com/python/cpython/pull/21140 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 06:38:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 10:38:55 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1593081535.47.0.887962867928.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f7ba40b505989495c3585ed782070bdae56330ad by Hai Shi in branch 'master': bpo-40275: Use new test.support helper submodules in tests (GH-20849) https://github.com/python/cpython/commit/f7ba40b505989495c3585ed782070bdae56330ad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 06:41:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 10:41:02 +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: <1593081662.82.0.951521989254.issue40058@roundup.psfhosted.org> STINNER Victor added the comment: My PR of bpo-40799 fix this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 06:44:41 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Jun 2020 10:44:41 +0000 Subject: [issue23903] Generate PC/python3.def by scraping headers In-Reply-To: <1428637761.13.0.348463350169.issue23903@psf.upfronthosting.co.za> Message-ID: <1593081881.22.0.122988593417.issue23903@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: -ned.deily versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 06:56:18 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 10:56:18 +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: <1593082578.29.0.32801982571.issue39580@roundup.psfhosted.org> miss-islington added the comment: New changeset 4564ebb1e62378d350d5483b0ae5d0d84082af2b by Miss Islington (bot) in branch '3.8': bpo-39580: add check for CLI installation on macOS (GH-20271) https://github.com/python/cpython/commit/4564ebb1e62378d350d5483b0ae5d0d84082af2b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 06:56:55 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 10:56:55 +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: <1593082615.74.0.122970476104.issue39580@roundup.psfhosted.org> miss-islington added the comment: New changeset bdc55eb55f7a88e374593dea1257566c2db3f5e4 by Miss Islington (bot) in branch '3.9': bpo-39580: add check for CLI installation on macOS (GH-20271) https://github.com/python/cpython/commit/bdc55eb55f7a88e374593dea1257566c2db3f5e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:05:59 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Jun 2020 11:05:59 +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: <1593083159.34.0.247275577128.issue39580@roundup.psfhosted.org> Ned Deily added the comment: Thanks again for the PR. The change will be included in python.org installers for macOS as of 3.9.0b4, 3.8.4, and 3.7.8. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:15:23 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Jun 2020 11:15:23 +0000 Subject: [issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration In-Reply-To: <1586183568.2.0.322929459864.issue40204@roundup.psfhosted.org> Message-ID: <1593083723.44.0.194467974658.issue40204@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +20300 pull_request: https://github.com/python/cpython/pull/21141 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:15:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 11:15:32 +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: <1593083732.84.0.0587407385322.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +20301 pull_request: https://github.com/python/cpython/pull/21142 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:16:47 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 11:16:47 +0000 Subject: [issue41113] test_warnings fails on non-Western locales Message-ID: <1593083807.4.0.45792432465.issue41113@roundup.psfhosted.org> New submission from Serhiy Storchaka : $ LC_ALL=uk_UA.koi8u ./python -m test -v -m test_nonascii test_warnings ... ====================================================================== ERROR: test_nonascii (test.test_warnings.CEnvironmentVariableTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_warnings/__init__.py", line 1201, in test_nonascii rc, stdout, stderr = assert_python_ok("-c", File "/home/serhiy/py/cpython/Lib/test/support/script_helper.py", line 156, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/home/serhiy/py/cpython/Lib/test/support/script_helper.py", line 140, in _assert_python res, cmd_line = run_python_until_end(*args, **env_vars) File "/home/serhiy/py/cpython/Lib/test/support/script_helper.py", line 127, in run_python_until_end proc = subprocess.Popen(cmd_line, stdin=subprocess.PIPE, File "/home/serhiy/py/cpython/Lib/subprocess.py", line 947, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/home/serhiy/py/cpython/Lib/subprocess.py", line 1739, in _execute_child env_list.append(k + b'=' + os.fsencode(v)) File "/home/serhiy/py/cpython/Lib/os.py", line 812, in fsencode return filename.encode(encoding, errors) File "/home/serhiy/py/cpython/Lib/encodings/koi8_u.py", line 12, in encode return codecs.charmap_encode(input,errors,encoding_table) UnicodeEncodeError: 'charmap' codec can't encode character '\xf3' in position 16: character maps to ---------- components: Tests messages: 372344 nosy: serhiy.storchaka priority: normal severity: normal status: open title: test_warnings fails on non-Western locales type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:18:05 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 11:18:05 +0000 Subject: [issue41113] test_warnings fails on non-Western locales In-Reply-To: <1593083807.4.0.45792432465.issue41113@roundup.psfhosted.org> Message-ID: <1593083885.14.0.943989398085.issue41113@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +20302 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21143 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:19:01 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 11:19:01 +0000 Subject: [issue41069] Use non-ascii file names in tests by default In-Reply-To: <1592774319.03.0.379358214671.issue41069@roundup.psfhosted.org> Message-ID: <1593083941.45.0.129010530455.issue41069@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- dependencies: +test_peg_generator fails on non-UTF-8 locale, test_warnings fails on non-Western locales _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:20:47 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Jun 2020 11:20:47 +0000 Subject: [issue40400] Mac build-installer.py doesn't support new plist format In-Reply-To: <1587925038.05.0.935755179102.issue40400@roundup.psfhosted.org> Message-ID: <1593084047.37.0.317386398478.issue40400@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report. There were several issues, including this one, when trying to run build-installer.py under current versions of Python 3. These have been fixed in the version of build-installer.py to be released with 3.9.0b4, 3.8.4, and 3.7.8. ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.10, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:21:29 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 11:21:29 +0000 Subject: [issue35773] test_bdb fails on non-UTF-8 locale In-Reply-To: <1547812678.96.0.834885366728.issue35773@roundup.psfhosted.org> Message-ID: <1593084089.65.0.8898737905.issue35773@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 94eee69e9b3a7e7d33142a47ffea560beb8f1596 by Serhiy Storchaka in branch 'master': bpo-35773: Fix test_bdb on non-UTF-8 locales. (GH-21136) https://github.com/python/cpython/commit/94eee69e9b3a7e7d33142a47ffea560beb8f1596 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:21:39 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 11:21:39 +0000 Subject: [issue35773] test_bdb fails on non-UTF-8 locale In-Reply-To: <1547812678.96.0.834885366728.issue35773@roundup.psfhosted.org> Message-ID: <1593084099.24.0.0846089888407.issue35773@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +20303 pull_request: https://github.com/python/cpython/pull/21144 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:21:46 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 11:21:46 +0000 Subject: [issue35773] test_bdb fails on non-UTF-8 locale In-Reply-To: <1547812678.96.0.834885366728.issue35773@roundup.psfhosted.org> Message-ID: <1593084106.39.0.0761840822391.issue35773@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20304 pull_request: https://github.com/python/cpython/pull/21145 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:22:14 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Jun 2020 11:22:14 +0000 Subject: [issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration In-Reply-To: <1586183568.2.0.322929459864.issue40204@roundup.psfhosted.org> Message-ID: <1593084134.06.0.720488784751.issue40204@roundup.psfhosted.org> Ned Deily added the comment: New changeset 589e8fe07934a8585d6c5c31d12ae5f766b8fec7 by Ned Deily in branch 'master': bpo-40204: Pin Sphinx version to 2.3.1 in ``Doc/Makefile``. (GH-21141) https://github.com/python/cpython/commit/589e8fe07934a8585d6c5c31d12ae5f766b8fec7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:22:27 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 11:22:27 +0000 Subject: [issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration In-Reply-To: <1586183568.2.0.322929459864.issue40204@roundup.psfhosted.org> Message-ID: <1593084147.09.0.608836488971.issue40204@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 16.0 -> 17.0 pull_requests: +20305 pull_request: https://github.com/python/cpython/pull/21146 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:29:03 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 11:29:03 +0000 Subject: [issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration In-Reply-To: <1586183568.2.0.322929459864.issue40204@roundup.psfhosted.org> Message-ID: <1593084543.35.0.107354370505.issue40204@roundup.psfhosted.org> miss-islington added the comment: New changeset 16e79a47ca3b4efb2300f24aa084c20bb5e8ae0d by Miss Islington (bot) in branch '3.9': bpo-40204: Pin Sphinx version to 2.3.1 in ``Doc/Makefile``. (GH-21141) https://github.com/python/cpython/commit/16e79a47ca3b4efb2300f24aa084c20bb5e8ae0d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:31:42 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 11:31:42 +0000 Subject: [issue41112] test_peg_generator fails on non-UTF-8 locale In-Reply-To: <1593079275.98.0.365075470813.issue41112@roundup.psfhosted.org> Message-ID: <1593084702.17.0.352078455027.issue41112@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset aad8f0eeca93b2150760b5e59ed0495e47d1be1e by Serhiy Storchaka in branch 'master': bpo-41112: Fix test_peg_generator on non-UTF-8 locales. (GH-21138) https://github.com/python/cpython/commit/aad8f0eeca93b2150760b5e59ed0495e47d1be1e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:33:44 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Jun 2020 11:33:44 +0000 Subject: [issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration In-Reply-To: <1586183568.2.0.322929459864.issue40204@roundup.psfhosted.org> Message-ID: <1593084824.66.0.718627610684.issue40204@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +20306 pull_request: https://github.com/python/cpython/pull/21147 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:37:42 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 11:37:42 +0000 Subject: [issue35773] test_bdb fails on non-UTF-8 locale In-Reply-To: <1547812678.96.0.834885366728.issue35773@roundup.psfhosted.org> Message-ID: <1593085062.68.0.930831830661.issue35773@roundup.psfhosted.org> miss-islington added the comment: New changeset 84f9c23a12eb091ac5327ebcba0d63794085b7f8 by Miss Islington (bot) in branch '3.8': bpo-35773: Fix test_bdb on non-UTF-8 locales. (GH-21136) https://github.com/python/cpython/commit/84f9c23a12eb091ac5327ebcba0d63794085b7f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:41:50 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 11:41:50 +0000 Subject: [issue35773] test_bdb fails on non-UTF-8 locale In-Reply-To: <1547812678.96.0.834885366728.issue35773@roundup.psfhosted.org> Message-ID: <1593085310.05.0.183327600433.issue35773@roundup.psfhosted.org> miss-islington added the comment: New changeset fdf6872f3893647e52f123ba62431aaf9f24ad3a by Miss Islington (bot) in branch '3.9': bpo-35773: Fix test_bdb on non-UTF-8 locales. (GH-21136) https://github.com/python/cpython/commit/fdf6872f3893647e52f123ba62431aaf9f24ad3a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:43:37 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 11:43:37 +0000 Subject: [issue41113] test_warnings fails on non-Western locales In-Reply-To: <1593083807.4.0.45792432465.issue41113@roundup.psfhosted.org> Message-ID: <1593085417.25.0.449491388287.issue41113@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 0f8ec1fff01173803645ad6a8aea24997bf66fc1 by Serhiy Storchaka in branch 'master': bpo-41113: Fix test_warnings on non-Western locales. (GH-21143) https://github.com/python/cpython/commit/0f8ec1fff01173803645ad6a8aea24997bf66fc1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:43:51 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 11:43:51 +0000 Subject: [issue41113] test_warnings fails on non-Western locales In-Reply-To: <1593083807.4.0.45792432465.issue41113@roundup.psfhosted.org> Message-ID: <1593085431.55.0.743806918067.issue41113@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +20307 pull_request: https://github.com/python/cpython/pull/21148 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:44:18 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Jun 2020 11:44:18 +0000 Subject: [issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration In-Reply-To: <1586183568.2.0.322929459864.issue40204@roundup.psfhosted.org> Message-ID: <1593085458.43.0.383592585314.issue40204@roundup.psfhosted.org> Ned Deily added the comment: New changeset 7318f0ab234e1c60a19eeea4e5968fb5d4fd70af by Ned Deily in branch '3.8': bpo-40204: Pin Sphinx version to 2.3.1 in ``Doc/Makefile``. (GH-21141) (GH-21147) https://github.com/python/cpython/commit/7318f0ab234e1c60a19eeea4e5968fb5d4fd70af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 07:47:37 2020 From: report at bugs.python.org (Cezary Wagner) Date: Thu, 25 Jun 2020 11:47:37 +0000 Subject: [issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing. In-Reply-To: <1593017703.53.0.919415125728.issue41106@roundup.psfhosted.org> Message-ID: <1593085657.85.0.900565884342.issue41106@roundup.psfhosted.org> Cezary Wagner added the comment: I do some test on linux all works - changes are detected and os.scandir() works but in Windows not - probably there is not unit test which check if os.scandir() is working on open files for writing. f.flush() no matter since file can be changed in external Python/Java/C#/C++, ... application - anyone can write logs in Windows. I will explain it in next comment. I just write this code to show only problem. Result from linux STAT = False so only repeat os.scandir() calls. Modification are detected correctly in Linux but not in Windows. [wagnecaz at nsdptrms01 ~]$ python3 s03_dir_entry.py dir_entry.stat() /home/wagnecaz/test.txt 1593085189.1000397 since last change 0.001112222671508789 2020-06-25 13:39:49.101368 1593085189.101368 dir_entry.stat() /home/wagnecaz/test.txt 1593085189.1000397 since last change 1.0028572082519531 2020-06-25 13:39:50.103111 1593085190.103111 dir_entry.stat() /home/wagnecaz/test.txt 1593085190.1020408 since last change 1.0026073455810547 2020-06-25 13:39:51.104881 1593085191.104881 dir_entry.stat() /home/wagnecaz/test.txt 1593085191.104042 since last change 1.0023958683013916 2020-06-25 13:39:52.106793 1593085192.106793 dir_entry.stat() /home/wagnecaz/test.txt 1593085192.106043 since last change 1.0023260116577148 2020-06-25 13:39:53.108582 1593085193.108582 dir_entry.stat() /home/wagnecaz/test.txt 1593085193.1080444 since last change 1.0021436214447021 2020-06-25 13:39:54.110500 1593085194.1105 dir_entry.stat() /home/wagnecaz/test.txt 1593085194.1100454 since last change 1.0013866424560547 2020-06-25 13:39:55.111684 1593085195.111684 dir_entry.stat() /home/wagnecaz/test.txt 1593085195.1110466 since last change 1.0022354125976562 2020-06-25 13:39:56.113542 1593085196.113542 dir_entry.stat() /home/wagnecaz/test.txt 1593085196.1130476 since last change 1.0021603107452393 2020-06-25 13:39:57.115450 1593085197.11545 dir_entry.stat() /home/wagnecaz/test.txt 1593085197.1140487 since last change 1.003014326095581 Change is done every 1s and detected in Linux in Windows it is stalled. 2020-06-25 13:39:58.117287 1593085198.117287 dir_entry.stat() /home/wagnecaz/test.txt 1593085198.11605 since last change 1.002938985824585 2020-06-25 13:39:59.119224 1593085199.119224 dir_entry.stat() /home/wagnecaz/test.txt 1593085199.118051 since last change 1.0027978420257568 2020-06-25 13:40:00.121166 1593085200.121166 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 08:02:02 2020 From: report at bugs.python.org (Cezary Wagner) Date: Thu, 25 Jun 2020 12:02:02 +0000 Subject: [issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing. In-Reply-To: <1593017703.53.0.919415125728.issue41106@roundup.psfhosted.org> Message-ID: <1593086522.02.0.759376462848.issue41106@roundup.psfhosted.org> Cezary Wagner added the comment: Use case - detection of changes in open files is very important - log scanning - synchronization ... I think that first of all it is need good unit test to detect this problem (rare edge case - probably it is missed because hard to imagine that it can not work when file is open - I will miss this I think). It should work like this. First program is writing file under Windows and second program (unit test) is running os.scandir() if repeated os.scandir() detect changes it is O.K. (same like in Linux). To make it simpler it can be unit test in one program. 1. Open test file in test directory. 2. os.scandir() in test directory. 3. Some writes to test file (f.write() with and without flush, ... - to be defined what is sufficient to test). 4. os.scandir() in test directory - if change detected it O.K. 5. f.close() I do not know Windows API now but I think we can detect id directory is changed between scans or we can detect if file is open (it is rare situation - rare edge case) in 90% all files will be closed. So if all files is closed current os.scandir() maybe is good (not I do not understand implementation to evaluate it correclty) and when one of file or more there is need another implementation which will detect modification. If you think I missed something please comment. You are welcome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 08:04:41 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 12:04:41 +0000 Subject: [issue41113] test_warnings fails on non-Western locales In-Reply-To: <1593083807.4.0.45792432465.issue41113@roundup.psfhosted.org> Message-ID: <1593086681.91.0.251983183472.issue41113@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20308 pull_request: https://github.com/python/cpython/pull/21149 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 08:05:00 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 12:05:00 +0000 Subject: [issue41113] test_warnings fails on non-Western locales In-Reply-To: <1593083807.4.0.45792432465.issue41113@roundup.psfhosted.org> Message-ID: <1593086700.33.0.741170873436.issue41113@roundup.psfhosted.org> miss-islington added the comment: New changeset f547d06ea7db23bb0a2cf81ff85478746efa958e by Miss Islington (bot) in branch '3.8': bpo-41113: Fix test_warnings on non-Western locales. (GH-21143) https://github.com/python/cpython/commit/f547d06ea7db23bb0a2cf81ff85478746efa958e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 08:06:14 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 12:06:14 +0000 Subject: [issue41112] test_peg_generator fails on non-UTF-8 locale In-Reply-To: <1593079275.98.0.365075470813.issue41112@roundup.psfhosted.org> Message-ID: <1593086774.62.0.0371067460439.issue41112@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +20309 pull_request: https://github.com/python/cpython/pull/21150 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 08:07:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 12:07:46 +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: <1593086866.14.0.115652675284.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 91698d8caa4b5bb6e8dbb64b156e8afe9e32cac1 by Victor Stinner in branch 'master': bpo-40521: Optimize PyBytes_FromStringAndSize(str, 0) (GH-21142) https://github.com/python/cpython/commit/91698d8caa4b5bb6e8dbb64b156e8afe9e32cac1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 08:09:04 2020 From: report at bugs.python.org (Xavier Morel) Date: Thu, 25 Jun 2020 12:09:04 +0000 Subject: [issue30951] Documentation error in inspect module In-Reply-To: <1500312575.69.0.52467451771.issue30951@psf.upfronthosting.co.za> Message-ID: <1593086944.85.0.564677446429.issue30951@roundup.psfhosted.org> Xavier Morel added the comment: Maybe something along the lines of "names other than arguments and function locals", or "names of the symbols used in the code object, other than arguments and function locals"? This is still slightly confusing because in the case of an import the name is present in both mappings, but less so than the outright lie of the current version. Serhiy, is there a way to access the class's code object from Python? Also does that mean varnames is not used by class code objects despite it stating unambiguously that it stores locals? ---------- nosy: +xmorel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 08:10:29 2020 From: report at bugs.python.org (Cezary Wagner) Date: Thu, 25 Jun 2020 12:10:29 +0000 Subject: [issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing. In-Reply-To: <1593017703.53.0.919415125728.issue41106@roundup.psfhosted.org> Message-ID: <1593087029.02.0.172332744703.issue41106@roundup.psfhosted.org> Cezary Wagner added the comment: I read some comments os.flush() or os.fsync() can be unrelated to problem. External application can be written in C# or whatever you want. Under Windows (not Linux) - modification dates will be stalled in such sequence. os.scandir() dir_entry.stat() # let it be dir_entry.path == 'test.txt' dir_entry.stat().st_mtime # will be for example 1 os.scandir() dir_entry.stat() # let it be dir_entry.path == 'test.txt' dir_entry.stat().st_mtime # will be STALLED for example 1 Under Windows (not Linux) - modification dates will be refreshed in such sequence. os.scandir() dir_entry.stat() # let it be dir_entry.path == 'test.txt' dir_entry.stat().st_mtime # will be for example 1 os.stat('test.txt') # this code do something and it is not stalled in next call os.scandir() dir_entry.stat() # let it be dir_entry.path == 'test.txt' dir_entry.stat().st_mtime # will be CHANGED for example 2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 08:11:17 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Jun 2020 12:11:17 +0000 Subject: [issue41009] @support.requires_*_version broken for classes In-Reply-To: <1592407243.92.0.831664912584.issue41009@roundup.psfhosted.org> Message-ID: <1593087077.56.0.65461746841.issue41009@roundup.psfhosted.org> Ned Deily added the comment: New changeset d3798ed9f1762dcf632369505d517f476eccde13 by Christian Heimes in branch '3.7': [3.7] bpo-41009: fix requires_OS_version() class decorator (GH-20942) (GH-20949) https://github.com/python/cpython/commit/d3798ed9f1762dcf632369505d517f476eccde13 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 08:15:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 12:15:44 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1593087344.2.0.706013529199.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 06a40d735939fd7d5cb77a68a6e18299b6484fa5 by Hai Shi in branch 'master': bpo-40275: Use new test.support helper submodules in tests (GH-20824) https://github.com/python/cpython/commit/06a40d735939fd7d5cb77a68a6e18299b6484fa5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 08:18:10 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 12:18:10 +0000 Subject: [issue41009] @support.requires_*_version broken for classes In-Reply-To: <1592407243.92.0.831664912584.issue41009@roundup.psfhosted.org> Message-ID: <1593087490.0.0.275666930735.issue41009@roundup.psfhosted.org> miss-islington added the comment: New changeset cd6f9110974f733d10d9eef36a9a769a29cd3295 by Christian Heimes in branch '3.9': [3.9] bpo-41009: fix requires_OS_version() class decorator (GH-20942) (GH-20947) https://github.com/python/cpython/commit/cd6f9110974f733d10d9eef36a9a769a29cd3295 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 08:18:47 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 12:18:47 +0000 Subject: [issue41009] @support.requires_*_version broken for classes In-Reply-To: <1592407243.92.0.831664912584.issue41009@roundup.psfhosted.org> Message-ID: <1593087527.75.0.269261795943.issue41009@roundup.psfhosted.org> miss-islington added the comment: New changeset 8075fe199b0569428cebaf213663bdd1ca40d792 by Christian Heimes in branch '3.8': [3.8] bpo-41009: fix requires_OS_version() class decorator (GH-20942) (GH-20948) https://github.com/python/cpython/commit/8075fe199b0569428cebaf213663bdd1ca40d792 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 08:19:30 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Jun 2020 12:19:30 +0000 Subject: [issue41009] @support.requires_*_version broken for classes In-Reply-To: <1592407243.92.0.831664912584.issue41009@roundup.psfhosted.org> Message-ID: <1593087570.27.0.842359720413.issue41009@roundup.psfhosted.org> Change by Ned Deily : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 08:22:03 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 12:22:03 +0000 Subject: [issue41113] test_warnings fails on non-Western locales In-Reply-To: <1593083807.4.0.45792432465.issue41113@roundup.psfhosted.org> Message-ID: <1593087723.55.0.946421380794.issue41113@roundup.psfhosted.org> miss-islington added the comment: New changeset 086b4539806e296af9b68591670d12a22e170d43 by Miss Islington (bot) in branch '3.9': bpo-41113: Fix test_warnings on non-Western locales. (GH-21143) https://github.com/python/cpython/commit/086b4539806e296af9b68591670d12a22e170d43 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 08:24:29 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 12:24:29 +0000 Subject: [issue41112] test_peg_generator fails on non-UTF-8 locale In-Reply-To: <1593079275.98.0.365075470813.issue41112@roundup.psfhosted.org> Message-ID: <1593087869.5.0.558187321589.issue41112@roundup.psfhosted.org> miss-islington added the comment: New changeset c4dfcb28f7d466de152db75e7bae9de694bf0f0e by Miss Islington (bot) in branch '3.9': bpo-41112: Fix test_peg_generator on non-UTF-8 locales. (GH-21138) https://github.com/python/cpython/commit/c4dfcb28f7d466de152db75e7bae9de694bf0f0e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 08:32:30 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 12:32:30 +0000 Subject: [issue41112] test_peg_generator fails on non-UTF-8 locale In-Reply-To: <1593079275.98.0.365075470813.issue41112@roundup.psfhosted.org> Message-ID: <1593088350.59.0.586963208167.issue41112@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 Jun 25 08:32:15 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 12:32:15 +0000 Subject: [issue41113] test_warnings fails on non-Western locales In-Reply-To: <1593083807.4.0.45792432465.issue41113@roundup.psfhosted.org> Message-ID: <1593088335.35.0.236488005369.issue41113@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 Jun 25 08:33:08 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 12:33:08 +0000 Subject: [issue35773] test_bdb fails on non-UTF-8 locale In-Reply-To: <1547812678.96.0.834885366728.issue35773@roundup.psfhosted.org> Message-ID: <1593088388.7.0.938973508433.issue35773@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 Jun 25 08:34:31 2020 From: report at bugs.python.org (hai shi) Date: Thu, 25 Jun 2020 12:34:31 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1593088471.01.0.328921759213.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +20310 pull_request: https://github.com/python/cpython/pull/21151 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 08:48:17 2020 From: report at bugs.python.org (Samuel Freilich) Date: Thu, 25 Jun 2020 12:48:17 +0000 Subject: [issue41114] "TypeError: unhashable type" could often be more clear Message-ID: <1593089297.5.0.960414313622.issue41114@roundup.psfhosted.org> New submission from Samuel Freilich : Currently, if you (for example) put a dict as a value in a set or key in a dict, you get: TypeError: unhashable type: 'dict' I'm pretty sure this wording goes back a long time, but I've noticed that Python beginners tend to find this really confusing. It fits into a pattern of error messages where you have to explain why the error message is worded the way it is after you explain why the error message occurs at all. There are many instances of: https://stackoverflow.com/questions/13264511/typeerror-unhashable-type-dict It would be clearer if the message was something like: TypeError: 'dict' can not be used as a set value because it is an unhashable type. (Or "dict key" instead of "set value".) The exception is raised in PyObject_Hash, so that doesn't have some of the context about how/why hash was called. That's called in a lot of places. Possibly, PyObject_Hash and PyObject_HashNotImplemented could take the format string passed to PyErr_Format as an optional second argument, defaulting to the current behavior? Then certain callers (in particular, the set and dict constructor, set and dict methods that add set values or add/modify dict keys) could provide clearer error messages. ---------- messages: 372366 nosy: sfreilich priority: normal severity: normal status: open title: "TypeError: unhashable type" could often be more clear type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 08:49:30 2020 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Jun 2020 12:49:30 +0000 Subject: [issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError Message-ID: <1593089370.45.0.0611386084027.issue41115@roundup.psfhosted.org> New submission from Antoine Pitrou : A number of codecs raise bare UnicodeError, rather than Unicode{Decode,Encode}Error. Example: File "/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/encodings/utf_16.py", line 67, in _buffer_decode raise UnicodeError("UTF-16 stream does not start with BOM") A more complete list can be found here: https://gist.github.com/pitrou/60594b28d8e47edcdb97d9b15d5f9866 ---------- components: Library (Lib) keywords: easy messages: 372367 nosy: benjamin.peterson, ezio.melotti, lemburg, pitrou, serhiy.storchaka, vstinner priority: normal severity: normal stage: needs patch status: open title: Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 09:11:35 2020 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Thu, 25 Jun 2020 13:11:35 +0000 Subject: [issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError In-Reply-To: <1593089370.45.0.0611386084027.issue41115@roundup.psfhosted.org> Message-ID: <1593090695.37.0.451910236002.issue41115@roundup.psfhosted.org> Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) added the comment: This looks like an easy task. Shall I create a PR? ---------- nosy: +thatiparthy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 10:13:03 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Thu, 25 Jun 2020 14:13:03 +0000 Subject: [issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError In-Reply-To: <1593089370.45.0.0611386084027.issue41115@roundup.psfhosted.org> Message-ID: <1593094383.24.0.207292492909.issue41115@roundup.psfhosted.org> Emmanuel Arias added the comment: Hi, IMO this can be mark as an easy issue. @thatiparthy please, go ahead ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 10:23:10 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Jun 2020 14:23:10 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1593094990.56.0.921218260786.issue40939@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +ned.deily nosy_count: 7.0 -> 8.0 pull_requests: +20311 pull_request: https://github.com/python/cpython/pull/21152 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 10:46:53 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Jun 2020 14:46:53 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1593096413.83.0.504336580632.issue40939@roundup.psfhosted.org> Ned Deily added the comment: New changeset 8d02f91dc6139a13b6efa9bd5a5b4bdd7ddcc29d by Ned Deily in branch 'master': bpo-40939: run autoreconf to fix configure{,.ac} disparity (GH-21152) https://github.com/python/cpython/commit/8d02f91dc6139a13b6efa9bd5a5b4bdd7ddcc29d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 10:55:57 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Jun 2020 14:55:57 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593096957.33.0.381891498039.issue41100@roundup.psfhosted.org> Ned Deily added the comment: New changeset 8ea6353f60625c96ce96588c70ff24a77f8c71f9 by Ronald Oussoren in branch 'master': BPO-41100: Support macOS 11 when building (GH-21113) https://github.com/python/cpython/commit/8ea6353f60625c96ce96588c70ff24a77f8c71f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 10:56:07 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 14:56:07 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593096967.4.0.668846077429.issue41100@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +20312 pull_request: https://github.com/python/cpython/pull/21153 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 10:56:15 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 14:56:15 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593096975.32.0.564471695456.issue41100@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20313 pull_request: https://github.com/python/cpython/pull/21154 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 10:56:22 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 14:56:22 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593096982.77.0.0937881328197.issue41100@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20314 pull_request: https://github.com/python/cpython/pull/21155 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 10:56:35 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 14:56:35 +0000 Subject: [issue41069] Use non-ascii file names in tests by default In-Reply-To: <1592774319.03.0.379358214671.issue41069@roundup.psfhosted.org> Message-ID: <1593096995.39.0.417335200256.issue41069@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 700cfa8c90a90016638bac13c4efd03786b2b2a0 by Serhiy Storchaka in branch 'master': bpo-41069: Make TESTFN and the CWD for tests containing non-ascii characters. (GH-21035) https://github.com/python/cpython/commit/700cfa8c90a90016638bac13c4efd03786b2b2a0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 11:11:54 2020 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Thu, 25 Jun 2020 15:11:54 +0000 Subject: [issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError In-Reply-To: <1593089370.45.0.0611386084027.issue41115@roundup.psfhosted.org> Message-ID: <1593097914.59.0.615892632075.issue41115@roundup.psfhosted.org> Walter D?rwald added the comment: UnicodeEncodeError and UnicodeDecodeError are used to report un(en|de)codedable ranges in the source object, so it wouldn't make sense to use them for errors that have nothing to do with problems in the source object. Their constructor requires 5 arguments (encoding, object, start, end, reason), not just a simple message: e.g. UnicodeEncodeError("utf-8", "foo", 17, 23, "bad string"). But for reporting e.g. missing BOMs at the start it would be useful to use (0, 0) as the offending range. ---------- nosy: +doerwalter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 11:13:43 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 15:13:43 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593098023.06.0.646708470282.issue41100@roundup.psfhosted.org> miss-islington added the comment: New changeset ad7a66731f2681c626f32f097e1e91cdc02330ab by Miss Islington (bot) in branch '3.9': BPO-41100: Support macOS 11 when building (GH-21113) https://github.com/python/cpython/commit/ad7a66731f2681c626f32f097e1e91cdc02330ab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 11:15:10 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jun 2020 15:15:10 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593098110.17.0.967196382306.issue41100@roundup.psfhosted.org> miss-islington added the comment: New changeset c4a53e48a98b3d8fdcfc11d1b5af3ea0dd987a88 by Miss Islington (bot) in branch '3.8': BPO-41100: Support macOS 11 when building (GH-21113) https://github.com/python/cpython/commit/c4a53e48a98b3d8fdcfc11d1b5af3ea0dd987a88 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 11:15:55 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Jun 2020 15:15:55 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593098155.49.0.139715892101.issue41100@roundup.psfhosted.org> Ned Deily added the comment: New changeset cfbc759f918d646a59acb99251fc10b3900248a6 by Miss Islington (bot) in branch '3.7': BPO-41100: Support macOS 11 when building (GH-21113) (GH-21155) https://github.com/python/cpython/commit/cfbc759f918d646a59acb99251fc10b3900248a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 11:20:53 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 15:20:53 +0000 Subject: [issue41069] Use non-ascii file names in tests by default In-Reply-To: <1592774319.03.0.379358214671.issue41069@roundup.psfhosted.org> Message-ID: <1593098453.15.0.187986612165.issue41069@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +20315 pull_request: https://github.com/python/cpython/pull/21156 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 11:40:59 2020 From: report at bugs.python.org (Nils Philippsen) Date: Thu, 25 Jun 2020 15:40:59 +0000 Subject: [issue34137] Add Path.lexist() to pathlib In-Reply-To: <1531825181.93.0.56676864532.issue34137@psf.upfronthosting.co.za> Message-ID: <1593099659.28.0.000723306223224.issue34137@roundup.psfhosted.org> Change by Nils Philippsen : ---------- keywords: +patch pull_requests: +20316 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21157 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 11:50:44 2020 From: report at bugs.python.org (Nils Philippsen) Date: Thu, 25 Jun 2020 15:50:44 +0000 Subject: [issue34137] Add Path.lexist() to pathlib In-Reply-To: <1531825181.93.0.56676864532.issue34137@psf.upfronthosting.co.za> Message-ID: <1593100244.25.0.954209300889.issue34137@roundup.psfhosted.org> Nils Philippsen added the comment: I've come across this issue lately and proposed a PR which implements this and, analogous to os.stat(), adds a follow_symlinks parameter to Path.exists(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 11:51:04 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Jun 2020 15:51:04 +0000 Subject: [issue41116] build on macOS 11 (beta) does not find system-supplied third-party libraries Message-ID: <1593100264.48.0.613850075185.issue41116@roundup.psfhosted.org> New submission from Ned Deily : When building on macOS 11 (beta), a number of modules that should normally build on macOS fail because the system-supplied third-party libraries are not found. The necessary bits to build these optional modules were not found: _bz2 _curses _curses_panel _gdbm _hashlib _lzma _ssl ossaudiodev readline spwd zlib The list should look like this (with no additional third-party libs supplied from another source like Homebrew or MacPorts): The necessary bits to build these optional modules were not found: _gdbm _hashlib _ssl ossaudiodev spwd The problem is due to a change in the 11 beta versus 10.15 or earlier systems: "New in macOS Big Sur 11 beta, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem. Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. Instead, check for library presence by attempting to dlopen() the path, which will correctly check for the library in the cache." This breaks tests in setup.py using find_library_file() to determine if a library is present and in what directory it exists. setup.py depends on Lib/distutils/unixccompiler.py to do the dirty work. A similar problem arose on earlier macOS releases when header files could no longer be installed in the systems /usr/include; setup.py had to be taught to look in the SDK being used implicitly or explicitly by the compiler preprocessor. We could probably do something like that here while trying to avoid changes that might break downstream supplements/replacements to distutils, for example, setuptools. There is a workaround: explicitly specify the SDK location to ./configure (you also need to specify the universal archs setting): ./configure \ --enable-universalsdk=$(xcodebuild -version -sdk macosx Path) \ --with-universal-archs=intel-64 \ ... ---------- components: macOS messages: 372379 nosy: ned.deily, ronaldoussoren priority: high severity: normal status: open title: build on macOS 11 (beta) does not find system-supplied third-party libraries versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 11:53:09 2020 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 25 Jun 2020 15:53:09 +0000 Subject: =?utf-8?q?=5Bissue40309=5D_=E2=80=9Cunmatched_paren=E2=80=9D_for_space_be?= =?utf-8?q?fore_parenthesis_in_Py=5FBuildValue?= In-Reply-To: <1587113667.76.0.930110442335.issue40309@roundup.psfhosted.org> Message-ID: <1593100389.76.0.154350049125.issue40309@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 1.0 -> 2.0 pull_requests: +20318 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21158 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 12:12:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 16:12:39 +0000 Subject: [issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError In-Reply-To: <1593089370.45.0.0611386084027.issue41115@roundup.psfhosted.org> Message-ID: <1593101559.78.0.162914291468.issue41115@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 12:35:27 2020 From: report at bugs.python.org (William Pickard) Date: Thu, 25 Jun 2020 16:35:27 +0000 Subject: [issue41117] [easy C] GC: Use local variable 'op' when invoking 'traverse' in 'subtract_refs' Message-ID: <1593102927.54.0.130776638406.issue41117@roundup.psfhosted.org> New submission from William Pickard : When the GC module goes to collect objects (most notably, during Python shutdown), it makes a call to subtract_refs on the GC container. During this invocation, it creates a local variable "op" who's value is the result of 'FROM_GC(gc)', but when it goes to use the obtained 'traverse' method, it calls FROM_GC(gc) instead of using 'op'. This, unfortunately, makes it rather difficult to debug "Access Violations" for extension modules for when 'traverse' is 'NULL' as inspecting the variable 'op' in the chosen debugger (for my case: Visual Studio on Windows) is impossible. This can potentially introduce a micro optimization in the overall runtime of the GC module as it no longer has to invoke the addition instruction (if it does) to construct the first parameter of the 'traverse' call. ---------- components: C API, Interpreter Core files: cpython.patch keywords: patch messages: 372380 nosy: WildCard65 priority: normal severity: normal status: open title: [easy C] GC: Use local variable 'op' when invoking 'traverse' in 'subtract_refs' type: enhancement versions: Python 3.10 Added file: https://bugs.python.org/file49261/cpython.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 13:18:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Jun 2020 17:18:04 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1593105484.98.0.0427937821767.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 847f94f47b104aec678d1d2a2d8fe23d817f375e by Hai Shi in branch 'master': bpo-40275: Use new test.support helper submodules in tests (GH-21151) https://github.com/python/cpython/commit/847f94f47b104aec678d1d2a2d8fe23d817f375e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 13:26:02 2020 From: report at bugs.python.org (hai shi) Date: Thu, 25 Jun 2020 17:26:02 +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: <1593105962.42.0.824080297135.issue40799@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 13:39:19 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 17:39:19 +0000 Subject: [issue41069] Use non-ascii file names in tests by default In-Reply-To: <1592774319.03.0.379358214671.issue41069@roundup.psfhosted.org> Message-ID: <1593106759.27.0.939162356491.issue41069@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset f925407a19eeb9bf5f7640143979638adce2c677 by Serhiy Storchaka in branch '3.9': [3.9] bpo-41069: Make TESTFN and the CWD for tests containing non-ascii characters. (GH-21035). (GH-21156) https://github.com/python/cpython/commit/f925407a19eeb9bf5f7640143979638adce2c677 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 13:40:13 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jun 2020 17:40:13 +0000 Subject: [issue41069] Use non-ascii file names in tests by default In-Reply-To: <1592774319.03.0.379358214671.issue41069@roundup.psfhosted.org> Message-ID: <1593106813.02.0.222689457224.issue41069@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 14:36:35 2020 From: report at bugs.python.org (thautwarm) Date: Thu, 25 Jun 2020 18:36:35 +0000 Subject: [issue12782] Multiple context expressions do not support parentheses for continuation across lines In-Reply-To: <1313719817.79.0.828403712604.issue12782@psf.upfronthosting.co.za> Message-ID: <1593110195.12.0.395603453893.issue12782@roundup.psfhosted.org> thautwarm added the comment: I can confirm Guido's words, now parentheses for continuation across lines are already supported. Even without parentheses, multiline with items can be supported. I just implemented it here: https://github.com/thautwarm/cpython/blob/bpo-12782/Grammar/python.gram#L180-L187 from contextlib import contextmanager @contextmanager def f(x): try: yield x finally: pass # Ok with f('c') as a, f('a') as b: pass # Ok with f('c') as a, f('a') as b, f('a') as c: pass # ERROR with f('c') as a, f('a') as b, f('a') as c: x = 1 + 1 # message: File "/home/thaut/github/cpython/../a.py", line 49 x = 1 + 1 ^ IndentationError: unindent does not match any outer indentation level # ERROR with f('c') as a, f('a') as b, f('a') as c: x = 1 + 1 File "/home/thaut/github/cpython/../a.py", line 49 x = 1 + 1 IndentationError: unexpected indent The grammar is: with_stmt[stmt_ty]: | ... | 'with' a=(',' [NEWLINE ~ INDENT?]).with_item+ ':' tc=[TYPE_COMMENT] NEWLINE b=statements DEDENT { _Py_With(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA) } | ... The restriction here is, since the second 'with_item', until the end of 'statements', the expression and statements have to keep the same indentation. with item1, item2, ...: block The indentation of 'item2', ..., 'block' should be the same. This implementation leverages the new PEG and how the lexer deals with indent/dedent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 14:38:11 2020 From: report at bugs.python.org (thautwarm) Date: Thu, 25 Jun 2020 18:38:11 +0000 Subject: [issue12782] Multiple context expressions do not support parentheses for continuation across lines In-Reply-To: <1313719817.79.0.828403712604.issue12782@psf.upfronthosting.co.za> Message-ID: <1593110291.95.0.897569258725.issue12782@roundup.psfhosted.org> thautwarm added the comment: Maybe you should close this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 15:11:20 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 25 Jun 2020 19:11:20 +0000 Subject: [issue12782] Multiple context expressions do not support parentheses for continuation across lines In-Reply-To: <1313719817.79.0.828403712604.issue12782@psf.upfronthosting.co.za> Message-ID: <1593112280.51.0.0309491625611.issue12782@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: This is already implemented in master with the new PEG parser so closing this. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 15:22:53 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 25 Jun 2020 19:22:53 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> Message-ID: <1593112973.41.0.853606292671.issue41111@roundup.psfhosted.org> Raymond Hettinger added the comment: While this might make for an interesting validation experiment, I don't think the results should be checked in. Code churn is to be avoided when there is no visible user benefit. It risks destabilizing code, introducing errors, and making the code less recognizable to the other developers who created and maintained it. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 17:22:13 2020 From: report at bugs.python.org (Grant Petty) Date: Thu, 25 Jun 2020 21:22:13 +0000 Subject: [issue41118] datetime object does not preserve POSIX timestamp Message-ID: <1593120133.28.0.499070536644.issue41118@roundup.psfhosted.org> New submission from Grant Petty : For complete context, see https://stackoverflow.com/questions/62582386/how-do-i-get-a-naive-datetime-object-that-correctly-uses-utc-inputs-and-preserve Short version: It does not seem correct that a datetime object produced *from* a POSIX timestamp using utcfromtimestamp should then return a different timestamp. As a user, I would like to be able to count on the POSIX timestamp as being the one conserved property of a datetime object, regardless of whether it is naive or time zone aware. > dt0 = dt.datetime(year=2020, month=1, day=1,hour=0,minute=0, tzinfo=pytz.utc) > print(dt0) 2020-01-01 00:00:00+00:00 > ts0 = dt0.timestamp() > print(ts0) 1577836800.0 > dt1 = dt.datetime.utcfromtimestamp(ts0) > print(dt1) 2020-01-01 00:00:00 > ts1 = dt1.timestamp() > print(ts1) 1577858400.0 ---------- messages: 372387 nosy: gpetty priority: normal severity: normal status: open title: datetime object does not preserve POSIX timestamp type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 17:32:18 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 25 Jun 2020 21:32:18 +0000 Subject: [issue12782] Multiple context expressions do not support parentheses for continuation across lines In-Reply-To: <1593112280.51.0.0309491625611.issue12782@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: But it is undocumented and doesn?t work with -X oldparser. -- --Guido (mobile) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 18:04:21 2020 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Jun 2020 22:04:21 +0000 Subject: [issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing. In-Reply-To: <1593017703.53.0.919415125728.issue41106@roundup.psfhosted.org> Message-ID: <1593122661.8.0.334087447719.issue41106@roundup.psfhosted.org> Eryk Sun added the comment: > Does it make the most sense for us to make .flush() also do an > implicit .fsync() (when it's actually a file object)? Standard I/O in the Windows C runtime supports a "c" commit mode that causes fflush to call _commit() on the underlying fd [1]. Perhaps Python should support a similar "c" or "s" mode that makes a flush implicitly call fsync / _commit. But you may not be in control of flushing the file if it's being written to by a third-party library or application. Calling os.[l]stat works around the problem, but only with NTFS. It doesn't help with FAT32 / exFAT. FAT filesystems update the last-write time when the file object is flushed or closed. It depends on the FO_FILE_MODIFIED flag in the file object or the CCB_FLAG_USER_SET_LAST_WRITE (from SetFileTime) in the file object's context control block (CCB). But opening, and even flushing, a file doesn't synchronize the context of other opens. Thus one can call os.stat (not even a scandir problem) repeatedly on a file and observe st_size changing while st_mtime remains constant: >>> filepath = 'C:/Mount/TestFat32/test/spam.txt' >>> f = open(filepath, 'w') >>> s = os.stat(filepath); s.st_size, s.st_mtime (0, 1593116028.0) >>> print('spam', file=f, flush=True) >>> s = os.stat(filepath); s.st_size, s.st_mtime (6, 1593116028.0) The last-write time gets updated by closing or flushing the kernel file object that was used to write to the file. >>> os.fsync(f.fileno()) >>> s = os.stat(filepath); s.st_size, s.st_mtime (6, 1593116044.0) Another problem is stale entries for NTFS hard links, which can lead to getting a completely incorrect stat result via os.scandir -- wrong timestamps, wrong file size, and wrong file attributes. An NTFS file's MFT record contains its timestamps, size, and attributes in a $STANDARD_INFORMATION attribute. This reliable information is what os.[l]stat and os.fstat query. But it gets duplicated in per-link $FILE_NAME attributes that directories index. The duplicated info for a link gets synchronized to the standard info when the link is accessed, but other links to the file do not get updated, and their values may be completely wrong. For example (using the scan function from my previous post): >>> filepath1 = 'C:/Mount/TestNtfs/test/spam1.txt' >>> filepath2 = 'C:/Mount/TestNtfs/test/spam2.txt' >>> f = open(filepath1, 'w') >>> os.link(filepath1, filepath2) >>> s = scan(filepath2).stat(); s.st_size, s.st_mtime (0, 1593116055.7695396) >>> print('spam', file=f, flush=True) >>> s = scan(filepath2).stat(); s.st_size, s.st_mtime (0, 1593116055.7695396) >>> os.fsync(f.fileno()) >>> s = scan(filepath2).stat(); s.st_size, s.st_mtime (0, 1593116055.7695396) >>> f.close() >>> s = scan(filepath2).stat(); s.st_size, s.st_mtime (0, 1593116055.7695396) As shown, flushing or closing the file object for the "spam1.txt" link is not reflected in the entry for the "spam2.txt" link. The directory entry for the link is only updated when the link is accessed: >>> f = open(filepath2) >>> s = scan(filepath2).stat(); s.st_size, s.st_mtime (6, 1593116062.2080283) --- [1] Linking commode.obj should enable commit-mode by default. But it's broken because __acrt_stdio_parse_mode is buggy. It initializes _stdio_mode to the global _commode value, but then it clobbers it when setting the required "r", "w", or "a" open mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 18:25:01 2020 From: report at bugs.python.org (Manuel Jacob) Date: Thu, 25 Jun 2020 22:25:01 +0000 Subject: [issue41091] Remove recommendation in curses module documentation to initialize LC_ALL and encode strings In-Reply-To: <1592926017.53.0.619449435613.issue41091@roundup.psfhosted.org> Message-ID: <1593123901.21.0.097855481622.issue41091@roundup.psfhosted.org> Change by Manuel Jacob : ---------- keywords: +patch pull_requests: +20319 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21159 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 18:36:38 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 25 Jun 2020 22:36:38 +0000 Subject: [issue41119] Wrong error message for list/tuple followed by a colon Message-ID: <1593124598.52.0.640760442401.issue41119@roundup.psfhosted.org> New submission from Lysandros Nikolaou : Brandt found this out while testing his implementation of the `match` statement. When a list or tuple are followed by a colon without an annotation, the old parser used to say "invalid syntax", while the new parser considers this an annotation and outputs something along the lines of "only single target (not tuple) can be annotated". For example: ? cpython git:(master) ./python.exe Python 3.10.0a0 (heads/master:06a40d7359, Jun 26 2020, 01:33:34) [Clang 11.0.3 (clang-1103.0.32.62)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> (a, b): File "", line 1 (a, b): ^ SyntaxError: only single target (not tuple) can be annotated >>> [a, b]: File "", line 1 [a, b]: ^ SyntaxError: only single target (not list) can be annotated >>> a,: File "", line 1 a,: ^ SyntaxError: only single target (not tuple) can be annotated The behavior of the old parser seems more logical. ---------- assignee: lys.nikolaou messages: 372390 nosy: brandtbucher, gvanrossum, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: Wrong error message for list/tuple followed by a colon type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 18:41:02 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 25 Jun 2020 22:41:02 +0000 Subject: [issue41119] Wrong error message for list/tuple followed by a colon In-Reply-To: <1593124598.52.0.640760442401.issue41119@roundup.psfhosted.org> Message-ID: <1593124862.07.0.476687351648.issue41119@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- keywords: +patch pull_requests: +20320 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21160 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 19:07:28 2020 From: report at bugs.python.org (Inada Naoki) Date: Thu, 25 Jun 2020 23:07:28 +0000 Subject: [issue41103] Removing old buffer support In-Reply-To: <1593006222.66.0.567274053686.issue41103@roundup.psfhosted.org> Message-ID: <1593126448.86.0.899995261368.issue41103@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 6f8a6ee59cb7f99f68df8ee9c3e8c8cf19af3eed by Inada Naoki in branch 'master': bpo-41103: Remove old buffer protocol support (#21117) https://github.com/python/cpython/commit/6f8a6ee59cb7f99f68df8ee9c3e8c8cf19af3eed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 19:07:42 2020 From: report at bugs.python.org (Inada Naoki) Date: Thu, 25 Jun 2020 23:07:42 +0000 Subject: [issue41103] Removing old buffer support In-Reply-To: <1593006222.66.0.567274053686.issue41103@roundup.psfhosted.org> Message-ID: <1593126462.99.0.122177311057.issue41103@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 19:11:22 2020 From: report at bugs.python.org (Abbas Taher) Date: Thu, 25 Jun 2020 23:11:22 +0000 Subject: [issue41120] Possible performance improvement for itertools.product example on Python Docs Message-ID: <1593126682.32.0.703433792229.issue41120@roundup.psfhosted.org> New submission from Abbas Taher : In the documentation the following example is given: def product(*args, repeat=1): # product('ABCD', 'xy') --> Ax Ay Bx By Cx Cy Dx Dy # product(range(2), repeat=3) --> 000 001 010 011 100 101 110 111 pools = [tuple(pool) for pool in args] * repeat result = [[]] for pool in pools: result = [x+[y] for x in result for y in pool] for prod in result: yield tuple(prod) The proposed enhancement uses a nested generator so no intermediate results are created. def product2(*args, repeat=1): def concat(result, pool): yield from (x+[y] for x in result for y in pool) pools = [tuple(pool) for pool in args] * repeat result = [[]] for pool in pools: result = concat(result, pool) for prod in result: yield (tuple(prod)) ---------- assignee: docs at python components: Documentation files: product example.py messages: 372392 nosy: ataher, docs at python priority: normal severity: normal status: open title: Possible performance improvement for itertools.product example on Python Docs type: enhancement Added file: https://bugs.python.org/file49262/product example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 19:13:20 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 25 Jun 2020 23:13:20 +0000 Subject: [issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing. In-Reply-To: <1593017703.53.0.919415125728.issue41106@roundup.psfhosted.org> Message-ID: <1593126800.07.0.136329701964.issue41106@roundup.psfhosted.org> Steve Dower added the comment: Okay, so it sounds like there's a class of files where we can't rely on the FindFileData having the right values. But we get enough information to be able just suppress the caching behaviour for those, right? Basically, my criteria for fixing this in the runtime is that we should not add any new system calls during iteration, and cannot switch to always bypassing the cache for DirEntry.stat(). What this probably means is if we can detect a link from the FFD struct (which I think we can?) then we can cache the attributes we trust and send .stat() through the real call. What it also means is that the "file still in use by another app" scenario will probably have to manually use os.stat(). We can't detect it, and it's the same race condition as calling os.stat() shortly before the update flushes anyway. I won't accept having to make a second set of system calls on every file just in case one of them is being modified by another application. That's not the normal case, and the point of scandir is to improve performance in the normal enumeration cases. Updating the documentation to mention/emphasise that some DirEntry.stat() fields may not update immediately, and so using os.stat() for current data is required, may be helpful. Though I think that's already implied by the line that says "Call os.stat() to fetch up-to-date information." So if someone wants to improve the docs, or has a way to recognise links (with unreliable data in the directory listing) and not pre-fill the stat object, feel free to submit a PR. Otherwise, unfortunately, we're pretty much bound by Windows's own optimisations here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 19:22:41 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 25 Jun 2020 23:22:41 +0000 Subject: [issue41119] Wrong error message for list/tuple followed by a colon In-Reply-To: <1593124598.52.0.640760442401.issue41119@roundup.psfhosted.org> Message-ID: <1593127361.16.0.159385834132.issue41119@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 4b85e60601489f9ee9dd2909e28d89a31566887c by Lysandros Nikolaou in branch 'master': bpo-41119: Output correct error message for list/tuple followed by colon (GH-21160) https://github.com/python/cpython/commit/4b85e60601489f9ee9dd2909e28d89a31566887c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 19:31:34 2020 From: report at bugs.python.org (Inada Naoki) Date: Thu, 25 Jun 2020 23:31:34 +0000 Subject: [issue41098] Deprecating PyUnicodeEncodeError_Create In-Reply-To: <1592988158.78.0.202358099858.issue41098@roundup.psfhosted.org> Message-ID: <1593127894.81.0.388408243617.issue41098@roundup.psfhosted.org> Change by Inada Naoki : ---------- keywords: +patch pull_requests: +20321 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21162 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 20:36:13 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 26 Jun 2020 00:36:13 +0000 Subject: [issue41120] Possible performance improvement for itertools.product example on Python Docs In-Reply-To: <1593126682.32.0.703433792229.issue41120@roundup.psfhosted.org> Message-ID: <1593131773.38.0.496719485645.issue41120@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 20:37:12 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 26 Jun 2020 00:37:12 +0000 Subject: [issue41118] datetime object does not preserve POSIX timestamp In-Reply-To: <1593120133.28.0.499070536644.issue41118@roundup.psfhosted.org> Message-ID: <1593131832.43.0.313899695906.issue41118@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +belopolsky, p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 20:39:56 2020 From: report at bugs.python.org (wyz23x2) Date: Fri, 26 Jun 2020 00:39:56 +0000 Subject: [issue41121] Path sep. in IDLE on Windows changes Message-ID: <1593131996.15.0.810805965142.issue41121@roundup.psfhosted.org> New submission from wyz23x2 : Python supports "/" and "\" separators on Windows. So in IDLE, the path shown sometimes is: D:\xxx\xxx Sometimes is: D:/xxx/xxx That isn't right. ---------- assignee: terry.reedy components: IDLE messages: 372395 nosy: terry.reedy, wyz23x2 priority: normal severity: normal status: open title: Path sep. in IDLE on Windows changes type: behavior versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 20:49:33 2020 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 26 Jun 2020 00:49:33 +0000 Subject: [issue41118] datetime object does not preserve POSIX timestamp In-Reply-To: <1593120133.28.0.499070536644.issue41118@roundup.psfhosted.org> Message-ID: <1593132573.7.0.497625044736.issue41118@roundup.psfhosted.org> Paul Ganssle added the comment: There's a pretty clear warning on the documentation that utcfromtimestamp is unsuitable for this purpose: https://docs.python.org/3/library/datetime.html#datetime.datetime.utcfromtimestamp What you want is a datetime that knows what time zone it's in, so that it can be translated back into the absolute number of seconds since UTC. The correct way to do that is to tell the datetime it's in UTC by attaching the `datetime.timezone.utc` object (or any equivalent `tzinfo`). I have written a blog post explaining in detail why you should not use `utcnow` or `utcfromtimestamp`: https://blog.ganssle.io/articles/2019/11/utcnow.html Hopefully that is helpful to you. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 21:09:00 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 26 Jun 2020 01:09:00 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> Message-ID: <1593133740.71.0.210291224952.issue41111@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 21:16:37 2020 From: report at bugs.python.org (One Digi Print) Date: Fri, 26 Jun 2020 01:16:37 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> Message-ID: <1593134197.35.0.110621630811.issue41111@roundup.psfhosted.org> Change by One Digi Print : Added file: https://bugs.python.org/file49263/Whatsapp-self-message-delivering-using-python-c55344b7f384e036bbe0fda69918c9eccf146dc1.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 21:19:47 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Jun 2020 01:19:47 +0000 Subject: [issue41120] Possible performance improvement for itertools.product example on Python Docs In-Reply-To: <1593126682.32.0.703433792229.issue41120@roundup.psfhosted.org> Message-ID: <1593134387.11.0.603589128343.issue41120@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for the suggestion, but the purpose of the rough equivalent example is to give a better idea of what product() does. It is not about performance ? that job falls to the actual implementation. Nested generators are an intermediate level Python skill, so using them in the example code makes the docs less accessible. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 21:25:49 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Jun 2020 01:25:49 +0000 Subject: [issue41121] Path sep. in IDLE on Windows changes In-Reply-To: <1593131996.15.0.810805965142.issue41121@roundup.psfhosted.org> Message-ID: <1593134749.77.0.479526689908.issue41121@roundup.psfhosted.org> Terry J. Reedy added the comment: This complaint is way too vague to work with. And for anything specific, it is almost certainly misdirected as the behavior is almost certainly not an IDLE issue. If your code, which is executed by python, not by IDLE, prints a path, IDLE displays it as is, which should be the same as printed by the same code executed directly by python.exe, without IDLE involved. If IDLE displays a path as a result of other user actions, it displays the strings returned by os.path, or maybe someday by pathlib. If you have specific complaints about the behavior of os.path, pathlib, or other stdlib functions, you could open a new issue. But I strongly suggest posting to python-list first, as these functions are mostly old and their well-discussed behavior unlikely to be seen as a bug by the developers who maintain them. If after posting to python-list (which I read), there appears to be a specific issue with IDLE, this could be re-opened. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 21:35:20 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Fri, 26 Jun 2020 01:35:20 +0000 Subject: [issue41098] Deprecating PyUnicodeEncodeError_Create In-Reply-To: <1592988158.78.0.202358099858.issue41098@roundup.psfhosted.org> Message-ID: <1593135320.68.0.699656188919.issue41098@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 21:40:42 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Fri, 26 Jun 2020 01:40:42 +0000 Subject: [issue41098] Deprecating PyUnicodeEncodeError_Create In-Reply-To: <1592988158.78.0.202358099858.issue41098@roundup.psfhosted.org> Message-ID: <1593135641.99.0.991472554638.issue41098@roundup.psfhosted.org> Emmanuel Arias added the comment: Yes, IMO in docs must exist a deprecated directive entry for `PyUnicodeEncodeError_Create`. Is the same situation with `PyUnicodeTranslateError_Create`, isn't? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 21:47:20 2020 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Jun 2020 01:47:20 +0000 Subject: [issue41098] Deprecating PyUnicodeEncodeError_Create In-Reply-To: <1592988158.78.0.202358099858.issue41098@roundup.psfhosted.org> Message-ID: <1593136040.21.0.209075925177.issue41098@roundup.psfhosted.org> Inada Naoki added the comment: See #41099 for PyUnicodeTranslateError_Create. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 21:49:50 2020 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Jun 2020 01:49:50 +0000 Subject: [issue41099] Deprecating PyUnicodeTranslateError_Create In-Reply-To: <1592988677.6.0.878608342851.issue41099@roundup.psfhosted.org> Message-ID: <1593136190.1.0.845848055196.issue41099@roundup.psfhosted.org> Inada Naoki added the comment: I prefer `PyObject_CallFunction(PyExc_UnicodeTranslateError, ...)` because UnicodeTranslateError is not so popular for third party libraries. I don't think we should provide public stable API for convenient. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 21:51:15 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Fri, 26 Jun 2020 01:51:15 +0000 Subject: [issue41098] Deprecating PyUnicodeEncodeError_Create In-Reply-To: <1592988158.78.0.202358099858.issue41098@roundup.psfhosted.org> Message-ID: <1593136275.91.0.348661551119.issue41098@roundup.psfhosted.org> Emmanuel Arias added the comment: oops, I didn't see. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 21:56:53 2020 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Jun 2020 01:56:53 +0000 Subject: [issue41099] Deprecating PyUnicodeTranslateError_Create In-Reply-To: <1592988677.6.0.878608342851.issue41099@roundup.psfhosted.org> Message-ID: <1593136613.52.0.523175466898.issue41099@roundup.psfhosted.org> Inada Naoki added the comment: I added deprecated directive in GH-21162. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 22:59:26 2020 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Jun 2020 02:59:26 +0000 Subject: [issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing. In-Reply-To: <1593017703.53.0.919415125728.issue41106@roundup.psfhosted.org> Message-ID: <1593140366.63.0.265806525283.issue41106@roundup.psfhosted.org> Eryk Sun added the comment: > What it also means is that the "file still in use by another app" > scenario will probably have to manually use os.stat(). We can't > detect it, and it's the same race condition as calling os.stat() > shortly before the update flushes anyway. FAT filesystems require an fsync (FlushFileBuffers) or close on the in-use file in order to update the last-write time in both the directory entry and the file control block (i.e. FCB, which is shared by all opens). It seems the developers take the meaning of "last write" literally in terms of the last time that cached data was flushed to disk. Because the last-write time in the FCB is updated separately from the file size in the FCB, even an [l]stat on an in-use FAT file may see st_size change while st_mtime remains constant, as I showed in the previous post. No matter whether we query the directory or the FCB, the reported last-write time of a FAT file might be wrong from the standpoint of reasonable expectations. An fsync call is also useful with NTFS, but it only updates the directory entry of the opened link. It doesn't update other links to the file. On the other hand, with an NTFS file, calling os.[l]stat or os.fstat is sufficient to get updated stat information, regardless of the link that's accessed. > What this probably means is if we can detect a link from the FFD struct > (which I think we can?) then we can cache the attributes we trust and > send .stat() through the real call. It would nice if we could detect the link count without an additional system call. But it's not in the duplicated information in the directory entry and wouldn't be reliable if it were. The link count is available via GetFileInformationByHandleEx: FileStandardInfo, but if you're calling CreateFileW to open the file, you may as well get the full stat result while you're at it. We're faced with the choice between either always calling the real lstat, or just documenting that files with hard links will have stale information if the file was updated using another link. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 23:03:48 2020 From: report at bugs.python.org (Mark Grandi) Date: Fri, 26 Jun 2020 03:03:48 +0000 Subject: [issue39679] functools: singledispatchmethod doesn't work with classmethod In-Reply-To: <1582053375.25.0.178240077179.issue39679@roundup.psfhosted.org> Message-ID: <1593140628.84.0.128359345748.issue39679@roundup.psfhosted.org> Mark Grandi added the comment: same issue here, if we can't fix it then maybe we should edit the documentation to not suggest that @classmethod works? ---------- nosy: +markgrandi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 23:29:31 2020 From: report at bugs.python.org (Mark Grandi) Date: Fri, 26 Jun 2020 03:29:31 +0000 Subject: [issue41122] functools.singledispatchfunction has confusing error message if no position arguments are passed in Message-ID: <1593142171.21.0.765046839926.issue41122@roundup.psfhosted.org> New submission from Mark Grandi : this is with python 3.8: ```plaintext PS C:\Users\mark> py -3 --version --version Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)] ``` So when using functools.singledispatch or functools.singledispatchmethod, you need to provide at least 1 positional argument so it can dispatch based on the type of said argument however, with `functools.singledispatchmethod`, you get an error message that is confusing and not obvious what the problem is. Example with `functools.singledispatchmethod`: ``` class NegatorTwo: @singledispatchmethod def neg(arg): raise NotImplementedError("Cannot negate a") @neg.register def _(self, arg: int): return -arg @neg.register def _test(self, arg: bool): return not arg if __name__ == "__main__": n = NegatorTwo() print(n.neg(0)) print(n.neg(False)) print(n.neg(arg=0)) ``` you end up getting: ```plaintext PS C:\Users\mark> py -3 C:\Users\mark\Temp\singledisp.py 0 True Traceback (most recent call last): File "C:\Users\mark\Temp\singledisp.py", line 58, in print(n.neg(arg=0)) File "C:\Python38\lib\functools.py", line 910, in _method method = self.dispatcher.dispatch(args[0].__class__) IndexError: tuple index out of range ``` but with just regular `functools.singledispatch`: ```plaintext @functools.singledispatch def negate_func(arg): raise NotImplementedError("can't negate") @negate_func.register def negate_int_func(arg:int): return -arg @negate_func.register def negate_bool_func(arg:bool): return not arg if __name__ == "__main__": print(negate_func(0)) print(negate_func(False)) print(negate_func(arg=0)) ``` you get an error that tells you what actually is wrong: ```plaintext PS C:\Users\mark> py -3 C:\Users\mark\Temp\singledisp.py 0 True Traceback (most recent call last): File "C:\Users\mark\Temp\singledisp.py", line 63, in print(negate_func(arg=0)) File "C:\Python38\lib\functools.py", line 871, in wrapper raise TypeError(f'{funcname} requires at least ' TypeError: negate_func requires at least 1 positional argument ``` it seems that the code in `functools.singledispatchmethod` needs to check to see if `args` is empty, and throw a similar (if not the same) exception as `functools.singledispatch` ---------- components: Library (Lib) messages: 372406 nosy: markgrandi priority: normal severity: normal status: open title: functools.singledispatchfunction has confusing error message if no position arguments are passed in type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 23:32:46 2020 From: report at bugs.python.org (Mark Grandi) Date: Fri, 26 Jun 2020 03:32:46 +0000 Subject: [issue41122] functools.singledispatchfunction has confusing error message if no positional arguments are passed in In-Reply-To: <1593142171.21.0.765046839926.issue41122@roundup.psfhosted.org> Message-ID: <1593142366.67.0.771840942039.issue41122@roundup.psfhosted.org> Change by Mark Grandi : ---------- title: functools.singledispatchfunction has confusing error message if no position arguments are passed in -> functools.singledispatchfunction has confusing error message if no positional arguments are passed in _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 25 23:53:21 2020 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Jun 2020 03:53:21 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 Message-ID: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> New submission from Inada Naoki : # APIs relating to wstr Since some APIs did not have Py_DEPRECATE until 3.9 (see GH-20941), it can not be removed in 3.10. I wrote PEP 623 for them. This issue doesn't about them. # Deprecated since Python 3.3, and not documented. In Python 3.3 what's new: * :c:macro:`Py_UNICODE_strlen`: use :c:func:`PyUnicode_GetLength` or :c:macro:`PyUnicode_GET_LENGTH` * :c:macro:`Py_UNICODE_strcat`: use :c:func:`PyUnicode_CopyCharacters` or :c:func:`PyUnicode_FromFormat` * :c:macro:`Py_UNICODE_strcpy`, :c:macro:`Py_UNICODE_strncpy`, :c:macro:`Py_UNICODE_COPY`: use :c:func:`PyUnicode_CopyCharacters` or :c:func:`PyUnicode_Substring` * :c:macro:`Py_UNICODE_strcmp`: use :c:func:`PyUnicode_Compare` * :c:macro:`Py_UNICODE_strncmp`: use :c:func:`PyUnicode_Tailmatch` * :c:macro:`Py_UNICODE_strchr`, :c:macro:`Py_UNICODE_strrchr`: use :c:func:`PyUnicode_FindChar` These functions are not documented. But they has Py_DEPRECATED(3.3) from Python 3.6. Let's remove them in 3.10. # Deprecated since Python 3.3 with document Some APIs has document with `.. deprecated:: 3.3 4.0`. * PyLong_FromUnicode * PyUnicode_TransformDecimalToASCII * PyUnicode_AsUnicodeCopy * PyUnicode_Encode * PyUnicode_EncodeUTF7 * PyUnicode_EncodeUTF8 * PyUnicode_EncodeUTF16 * PyUnicode_EncodeUTF32 * PyUnicode_EncodeUnicodeEscape * PyUnicode_EncodeRawUnicodeEscape * PyUnicode_EncodeLatin1 * PyUnicode_EncodeASCII * PyUnicode_EncodeCharmap * PyUnicode_TranslateCharmap * PyUnicode_EncodeMBCS a) Can we replace 4.0 with 3.10 and remove them in 3.10? b) Or should we replace 4.0 with 3.11 and wait one more year? ---------- components: C API messages: 372407 nosy: inada.naoki priority: normal severity: normal status: open title: Remove Py_UNICODE APIs except PEP 623 versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 00:32:03 2020 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Jun 2020 04:32:03 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593145923.65.0.466744897893.issue41123@roundup.psfhosted.org> Change by Inada Naoki : ---------- keywords: +patch pull_requests: +20322 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21164 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 01:07:19 2020 From: report at bugs.python.org (Srinivas Sampath) Date: Fri, 26 Jun 2020 05:07:19 +0000 Subject: [issue41124] String with encode causing addition of 'b' in the beginning Message-ID: <1593148039.09.0.312801930904.issue41124@roundup.psfhosted.org> New submission from Srinivas Sampath : I am trying to run the attached code. when hard-coding the string in the URL and doing .encode, then the code works. However since i am requesting user input, i cannot hard-code and the code seem to add the 'b' character in the beginning causing the request to fail with output like this Enter Hostname : hostname cannot be empty Enter Port Number : before invokingGET http://psglx73:24670/coreservices/DomainService HTTP/1.1 after encode b'GET http://psglx73:24670/coreservices/DomainService HTTP/1.1\r\n\r\n' HTTP/1.1 400 Bad Request Transfer-Encoding: chunked Date: Fri, 26 Jun 2020 05:06:21 GMT Connection: close Server: Informatica 0 i cannot pass without .encode to the socket communication. is this reported problem ? ---------- files: ex_12_informatica.py messages: 372408 nosy: Srinivas Sampath priority: normal severity: normal status: open title: String with encode causing addition of 'b' in the beginning type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49264/ex_12_informatica.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 01:18:59 2020 From: report at bugs.python.org (Laurie Opperman) Date: Fri, 26 Jun 2020 05:18:59 +0000 Subject: [issue41125] Display exit-codes for abruptly terminated processes in concurrent.futures Message-ID: <1593148739.76.0.536748253991.issue41125@roundup.psfhosted.org> New submission from Laurie Opperman : When a process terminates in the process-pool of concurrent.futures.process, it simply gives the exception (with no __cause__): BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending. I would like to include the terminated processes' exit codes in the error, either as part of the message or as a separate exception set as the error's __cause__ ---------- components: Library (Lib) messages: 372409 nosy: Epic_Wink priority: normal severity: normal status: open title: Display exit-codes for abruptly terminated processes in concurrent.futures type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 01:37:07 2020 From: report at bugs.python.org (SilentGhost) Date: Fri, 26 Jun 2020 05:37:07 +0000 Subject: [issue41124] String with encode causing addition of 'b' in the beginning In-Reply-To: <1593148039.09.0.312801930904.issue41124@roundup.psfhosted.org> Message-ID: <1593149827.81.0.346503222022.issue41124@roundup.psfhosted.org> SilentGhost added the comment: Your request is likely failing for entirely different reasons. What you've done is encoded a str object into bytes object, which is represented with as literal using b prefix. It isn't being sent over the socket. ---------- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 01:38:56 2020 From: report at bugs.python.org (SilentGhost) Date: Fri, 26 Jun 2020 05:38:56 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> Message-ID: <1593149936.74.0.739550693993.issue41111@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file49263/Whatsapp-self-message-delivering-using-python-c55344b7f384e036bbe0fda69918c9eccf146dc1.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 01:53:12 2020 From: report at bugs.python.org (Srinivas Sampath) Date: Fri, 26 Jun 2020 05:53:12 +0000 Subject: [issue41124] String with encode causing addition of 'b' in the beginning In-Reply-To: <1593149827.81.0.346503222022.issue41124@roundup.psfhosted.org> Message-ID: Srinivas Sampath added the comment: if you look at my code, couple of lines below the print, i am actually doing the send over the socket. It took me awhile to figure out why the socket is failing. I understand that the byte array is represented with a 'b' infront as part of encode function being called, and troubleshooting the code it was the first obvious difference that made me thing it was an issue. Thanks for your help On Thu, Jun 25, 2020 at 10:37 PM SilentGhost wrote: > > SilentGhost added the comment: > > Your request is likely failing for entirely different reasons. > > What you've done is encoded a str object into bytes object, which is > represented with as literal using b prefix. It isn't being sent over the > socket. > > ---------- > nosy: +SilentGhost > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > -- With Regards, Srinivas Sampath ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 02:00:19 2020 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Fri, 26 Jun 2020 06:00:19 +0000 Subject: [issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError In-Reply-To: <1593089370.45.0.0611386084027.issue41115@roundup.psfhosted.org> Message-ID: <1593151219.5.0.311427202462.issue41115@roundup.psfhosted.org> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- keywords: +patch pull_requests: +20323 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21165 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 02:54:02 2020 From: report at bugs.python.org (hai shi) Date: Fri, 26 Jun 2020 06:54:02 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> Message-ID: <1593154442.36.0.0905847400676.issue41111@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 03:03:47 2020 From: report at bugs.python.org (Gareth Rees) Date: Fri, 26 Jun 2020 07:03:47 +0000 Subject: [issue41092] Report actual size from 'os.path.getsize' In-Reply-To: <1592930686.73.0.679149711266.issue41092@roundup.psfhosted.org> Message-ID: <1593155027.63.0.107946214814.issue41092@roundup.psfhosted.org> Gareth Rees added the comment: The proposed change adds a Boolean flag to os.path.getsize() so that it returns: os.stat(filename).st_blocks * 512 (where the 512 is the file system block size on Linux; some work is needed to make this portable to other operating systems). The Boolean argument here would always be constant in practice -- that is, you'd always call it like this: virtual_size = os.path.getsize(filename, apparent=True) allocated_size = os.path.getsize(filename, apparent=False) and never like this: x_size = os.path.getsize(filename, apparent=x) where x varies at runtime. The "no constant bool arguments" design principle [1] suggests that this should be added as a new function, something like os.path.getallocatedsize(). [1] https://mail.python.org/pipermail/python-ideas/2016-May/040181.html ---------- nosy: +gdr at garethrees.org _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 03:25:13 2020 From: report at bugs.python.org (Laurie Opperman) Date: Fri, 26 Jun 2020 07:25:13 +0000 Subject: [issue41125] Display exit-codes for abruptly terminated processes in concurrent.futures In-Reply-To: <1593148739.76.0.536748253991.issue41125@roundup.psfhosted.org> Message-ID: <1593156313.87.0.734503475094.issue41125@roundup.psfhosted.org> Change by Laurie Opperman : ---------- keywords: +patch pull_requests: +20324 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21166 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 03:37:13 2020 From: report at bugs.python.org (hai shi) Date: Fri, 26 Jun 2020 07:37:13 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1593157033.87.0.0972620072254.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +20325 pull_request: https://github.com/python/cpython/pull/21167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 04:15:12 2020 From: report at bugs.python.org (hai shi) Date: Fri, 26 Jun 2020 08:15:12 +0000 Subject: [issue16623] argparse help formatter does not honor non-breaking space In-Reply-To: <1354745001.59.0.580615965604.issue16623@psf.upfronthosting.co.za> Message-ID: <1593159312.21.0.463184726841.issue16623@roundup.psfhosted.org> hai shi added the comment: > Python 2 is EOL, so I think this issue should be closed. +1, if someone need create a PR, we can reopen it again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 04:18:52 2020 From: report at bugs.python.org (hai shi) Date: Fri, 26 Jun 2020 08:18:52 +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: <1593159532.82.0.992283428126.issue40058@roundup.psfhosted.org> hai shi added the comment: > My PR of bpo-40799 fix this issue. Thanks victor for your work, I closed my PR ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 04:27:11 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 26 Jun 2020 08:27:11 +0000 Subject: [issue41116] build on macOS 11 (beta) does not find system-supplied third-party libraries In-Reply-To: <1593100264.48.0.613850075185.issue41116@roundup.psfhosted.org> Message-ID: <1593160031.16.0.541574093149.issue41116@roundup.psfhosted.org> Ronald Oussoren added the comment: These build for me (master branch), because the support for .tbd files in the macOS SDK still works. The ones that don't build for me: - Bits not found: _gdbm, _hashlib, _ssl, ossaudiodev, spwd - Failed to build: _ctypes, _decimal, _lzma This was with a "Universal 2" build (which explains _ctypes) and without 3party libraries (which explains _gdbm, _ssl and _lzma). ossaudiodev and spwd are not supported on macOS even on older versions of the OS. I can get _decimal to build with a trivial patch to Modules/_decimal/mpdecimal.py (I'll create a PR later today). The PR will obviously be untested w.r.t. actually supporting ARM64. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 05:12:12 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 26 Jun 2020 09:12:12 +0000 Subject: [issue16623] argparse help formatter does not honor non-breaking space In-Reply-To: <1354745001.59.0.580615965604.issue16623@psf.upfronthosting.co.za> Message-ID: <1593162732.03.0.143272807775.issue16623@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 05:21:10 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 26 Jun 2020 09:21:10 +0000 Subject: [issue41116] build on macOS 11 (beta) does not find system-supplied third-party libraries In-Reply-To: <1593100264.48.0.613850075185.issue41116@roundup.psfhosted.org> Message-ID: <1593163270.95.0.969308697926.issue41116@roundup.psfhosted.org> Ned Deily added the comment: I should have specified that the failures I saw were just with the default intel-64 arch on the beta. After thinking about it a bit and reviewing the code, I think the best approach is to handle this in _osx_support.py as part of the compiler flags customization. What's been happening over the years is that Apple has been deprecating and then removing system header files and system library files on running systems and instead forcing the use of an SDK to build with for both. That's fine but, to continue to support a range of systems, we should be able to handle the various default configurations when the user does not explicitly specify a particular SDK to use. The Apple compiler chain does the right thing under the covers so that C compilations just work. setip.py's macosx_sdk_root() now has initialization code to discover the path to the system header files that the compiler is using; it calls the compiler with -v on a dummy program and then scans the compiler output for the include paths searched until it finds either /usr/include or a path ending in .sdk/usr/include. (It's a bit of a hack but a fairly widely-used hack that works with both clang and gcc, at least, and for the Apple-supplied compilers, takes into account the dynamic specification of SDK via xcrun.) I think the thing to do is move that sdk path detection into _osx_support and then, at the end of other customization steps, if there isn't already a valid -isysroot provided by the user (either through ./configure or CFLAGS et al, add a -isysroot for the discovered default SDK path (or /) into the appropriate customized compiler and linker flags. It would also provide a function to return the SDK path for setup.py (the equivalent of the current macosx_sdk_root()) and others to use. setup.py and Distutils should then do the right things for both header and library file paths on any configuration (whether header files are installed or not and whether lib files are installed or not, Command Line Tools or Xcode) and, with luck, any other Distutils replacements that also use _osx_support will also do the right thing. I had contemplated removing _osx_support at some point in the future but, now with the return of universal files, I'm glad we didn't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 05:39:07 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 26 Jun 2020 09:39:07 +0000 Subject: [issue41116] build on macOS 11 (beta) does not find system-supplied third-party libraries In-Reply-To: <1593100264.48.0.613850075185.issue41116@roundup.psfhosted.org> Message-ID: <1593164347.17.0.161429746861.issue41116@roundup.psfhosted.org> Ronald Oussoren added the comment: I see, and (as expected) get the same output when I build like that. I agree that we should teach _osx_support about this. I guess we should add a function that returns the SDK root, which can then be used in distutils (and setuptools, ...) instead of looking for -isysroot in CFLAGS. The new function can than look for the default SDK when there is no sysroot flag. For 3.10 we should look into cleaning up configure.ac, it contains some logic that is no longer valid or necessary (such as looking for the architectures supported by /usr/lib/libSystem.dylib). We should also avoid adding "-isysroot" to the CFLAGS/LDFLAGS to avoid problems when building on user machines that might have a different version of Xcode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 05:39:22 2020 From: report at bugs.python.org (Abbas Taher) Date: Fri, 26 Jun 2020 09:39:22 +0000 Subject: [issue41120] Possible performance improvement for itertools.product example on Python Docs In-Reply-To: <1593134387.11.0.603589128343.issue41120@roundup.psfhosted.org> Message-ID: <1463003595.2856955.1593164357774@mail.yahoo.com> Abbas Taher added the comment: Good morning Raymond,?? Thank you for this quick response. You are absolutely right on all your points if you only consider that the example given in the documentation as purely a suggestion of "equivalent" version to the one implemented in the library. However, if you look at the examples given in the documentation as an illustration of an algorithm that can be customized and changed by the end-user if the existing implementation is not suitable then you might consider otherwise. This is exactly what happened when I wanted to do a Cartesian Product. Starting, I first looked at itertools and run my routine using itertools.product(). However, it turns out that I needed to flatten the result tuples which prompted me toadjust the given example accordingly and then add the nested generator. As for your statement:? "Nested generators are an intermediate level Python skill, so using them in the example code makes the docs less accessible.". Let me point to the facts, that someone looking at itertools and trying to do a Cartesian Product is certainly an intermediate programmer and often likes to understand, learn or peek inside the algorithm used. Additionally, the suggested improvement is a generator similar to the implementation where as the existing example is not. Thus, I hope I am able to convince you to reconsider your decision especially when you look at the given examples from a wider perspective and more so when the suggested improvement is minor and easy to understand. Best Regards, Abbas Side note: one of the first tutorial videos I used to learn Python were the ones you prepared for Oreilly. Thank you and thank you for all the work you did and still doing for free for the Python language and the Python community over so many many many years. On Thursday, June 25, 2020, 9:19:55 PM EDT, Raymond Hettinger wrote: Raymond Hettinger added the comment: Thanks for the suggestion, but the purpose of the rough equivalent example is to give a better idea of what product() does.? It is not about performance ? that job falls to the actual implementation. Nested generators are an intermediate level Python skill, so using them in the example code makes the docs less accessible. ---------- resolution:? -> rejected stage:? -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 06:00:04 2020 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 26 Jun 2020 10:00:04 +0000 Subject: [issue26212] Python with ncurses6.0 will not load _curses module on Solaris 10 In-Reply-To: <1453851633.31.0.356555678785.issue26212@psf.upfronthosting.co.za> Message-ID: <1593165604.15.0.858668658009.issue26212@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 Fri Jun 26 06:11:48 2020 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Fri, 26 Jun 2020 10:11:48 +0000 Subject: [issue41126] Running test suite gives me - python.exe(14198, 0x114352dc0) malloc: can't allocate region Message-ID: <1593166308.58.0.119681286256.issue41126@roundup.psfhosted.org> New submission from Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : While running tests with `./python.exe Lib/test`, I see the following text in the console. Is this a bug? `` python.exe(14198,0x114352dc0) malloc: can't allocate region :*** mach_vm_map(size=842105263157895168, flags: 100) failed (error code=3) python.exe(14198,0x114352dc0) malloc: *** set a breakpoint in malloc_error_break to debug python.exe(14198,0x114352dc0) malloc: can't allocate region :*** mach_vm_map(size=842105263157895168, flags: 100) failed (error code=3) python.exe(14198,0x114352dc0) malloc: *** set a breakpoint in malloc_error_break to debug python.exe(14198,0x114352dc0) malloc: can't allocate region :*** mach_vm_map(size=421052631578947584, flags: 100) failed (error code=3) python.exe(14198,0x114352dc0) malloc: *** set a breakpoint in malloc_error_break to debug python.exe(14198,0x114352dc0) malloc: can't allocate region :*** mach_vm_map(size=421052631578947584, flags: 100) failed (error code=3) python.exe(14198,0x114352dc0) malloc: *** set a breakpoint in malloc_error_break to debug `` My system is macOS Catalina 10.15.5 (19F101). unman -a Darwin Srinivass-MacBook-Pro.local 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64 ---------- messages: 372420 nosy: thatiparthy priority: normal severity: normal status: open title: Running test suite gives me - python.exe(14198,0x114352dc0) malloc: can't allocate region _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 06:12:23 2020 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Fri, 26 Jun 2020 10:12:23 +0000 Subject: [issue41126] Running test suite gives me - python.exe(14198, 0x114352dc0) malloc: can't allocate region In-Reply-To: <1593166308.58.0.119681286256.issue41126@roundup.psfhosted.org> Message-ID: <1593166343.4.0.553030381807.issue41126@roundup.psfhosted.org> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- components: +Build versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 07:24:13 2020 From: report at bugs.python.org (E. Paine) Date: Fri, 26 Jun 2020 11:24:13 +0000 Subject: [issue40893] tkinter: integrate TkDND support In-Reply-To: <1591474190.65.0.383574909158.issue40893@roundup.psfhosted.org> Message-ID: <1593170653.61.0.990110386412.issue40893@roundup.psfhosted.org> E. Paine added the comment: I have now marked the PR ready for review. Terry: Could you please take a quick look to double-check that the changes proposed are fully backwards-compatible? I have run the IDLE tests and have tried to pay particular attention to this problem when developing, but would appreciate a second opinion (to ensure we won't break existing tkinter scripts - such as IDLE). Serhiy: I would really appreciate your opinion on the patch, particularly the change to the _bind method. I am also concerned about the getlist_event method as it can split dropped text data (for example) but I don't know how to fix it (unless we give the user the raw data for them to fix it?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 07:24:31 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 26 Jun 2020 11:24:31 +0000 Subject: [issue41084] Signify that a SyntaxError comes from an fstring in the error message In-Reply-To: <1592870022.32.0.609883413471.issue41084@roundup.psfhosted.org> Message-ID: <1593170671.7.0.957444685436.issue41084@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 2e0a920e9eb540654c0bb2298143b00637dc5961 by Lysandros Nikolaou in branch 'master': bpo-41084: Adjust message when an f-string expression causes a SyntaxError (GH-21084) https://github.com/python/cpython/commit/2e0a920e9eb540654c0bb2298143b00637dc5961 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 08:31:19 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 26 Jun 2020 12:31:19 +0000 Subject: [issue41126] Running test suite gives me - python.exe(14198, 0x114352dc0) malloc: can't allocate region In-Reply-To: <1593166308.58.0.119681286256.issue41126@roundup.psfhosted.org> Message-ID: <1593174679.2.0.340012299566.issue41126@roundup.psfhosted.org> Change by Eric V. Smith : ---------- components: +macOS nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 08:53:10 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 26 Jun 2020 12:53:10 +0000 Subject: [issue41126] Running test suite gives me - python.exe(14198, 0x114352dc0) malloc: can't allocate region In-Reply-To: <1593166308.58.0.119681286256.issue41126@roundup.psfhosted.org> Message-ID: <1593175990.25.0.694444078459.issue41126@roundup.psfhosted.org> R?mi Lapeyre added the comment: This is probably related to issue 40928. Does the test succeed or fail when you do this? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 09:29:12 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 26 Jun 2020 13:29:12 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1593178152.09.0.477922279789.issue1635741@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +20326 pull_request: https://github.com/python/cpython/pull/21168 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 10:27:18 2020 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Fri, 26 Jun 2020 14:27:18 +0000 Subject: [issue41126] Running test suite gives me - python.exe(14198, 0x114352dc0) malloc: can't allocate region In-Reply-To: <1593166308.58.0.119681286256.issue41126@roundup.psfhosted.org> Message-ID: <1593181638.11.0.355615391701.issue41126@roundup.psfhosted.org> Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) added the comment: It was a success. And yes, this is a duplicate of issue 40928. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 10:40:09 2020 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 26 Jun 2020 14:40:09 +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: <1593182409.63.0.403224845417.issue40799@roundup.psfhosted.org> Paul Ganssle added the comment: > bout _strptime, I see that the time.strptime() imports internally the _strptime module. Ah, sorry, my remark about including `_strptime` was off the cuff ? I thought it was only used in `datetime`, which is why I said "possibly _strptime". If it's used for `time` as well, we should leave it where it is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 10:40:45 2020 From: report at bugs.python.org (Yonatan Goldschmidt) Date: Fri, 26 Jun 2020 14:40:45 +0000 Subject: [issue35823] Use vfork() in subprocess on Linux In-Reply-To: <1548381806.02.0.709569222975.issue35823@roundup.psfhosted.org> Message-ID: <1593182445.95.0.400256411504.issue35823@roundup.psfhosted.org> Yonatan Goldschmidt added the comment: With issue35537 merged, do we have any intention to get on with this? From what I can tell, it provides roughly the same performance benefit - but works also with close_fds=True, which is the default of Popen, so IMO it's a worthy addition. I tested a rebase on current master, test_subprocess passes on my Linux box and there are no more -Wclobbered warnings after Alexey's latest change of the do_fork_exec() helper. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 10:58:45 2020 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 26 Jun 2020 14:58:45 +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: <1593183525.41.0.169812902168.issue40799@roundup.psfhosted.org> Paul Ganssle added the comment: As for deciding between moving to `datetime/` and moving to `_pydatetime`, I think we should send an e-mail to Python-Dev about it to get a wider perspective, because the import machinery is a lot of black magic, and I know that there are large proprietary code bases out there that pile weird stuff on top of it. I'm not sure I can fully appreciate the trade-offs. The biggest advantage I see to moving `datetime` into its own folder is that it gives us a lot more freedom to expand into smaller sub-modules in the future. For example, in `zoneinfo`, we have zoneinfo/_common.py (https://github.com/python/cpython/blob/2e0a920e9eb540654c0bb2298143b00637dc5961/Lib/zoneinfo/_common.py), which is some logic shared between the C and Python implementations; `_zoneinfo.c` is able to rely directly on `_common.py` without importing `zoneinfo/_zoneinfo.py` (which saves us a bunch of other module imports as well). Right now the C implementation of `datetime` only directly imports `time` and `_strptime`, but I could imagine future enhancements that would be stupidly inconvenient to implement in C, but where we wouldn't want to implement all of _pydatetime just to get a pure-Python implementation. Having a namespace available for such packages would be useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 11:13:44 2020 From: report at bugs.python.org (hai shi) Date: Fri, 26 Jun 2020 15:13:44 +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: <1593184424.47.0.67664790855.issue40725@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 nosy_count: 5.0 -> 6.0 pull_requests: +20327 pull_request: https://github.com/python/cpython/pull/21169 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 11:15:14 2020 From: report at bugs.python.org (hai shi) Date: Fri, 26 Jun 2020 15:15:14 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1593184514.88.0.879922167145.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +20328 pull_request: https://github.com/python/cpython/pull/21169 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 11:24:56 2020 From: report at bugs.python.org (Austin Raney) Date: Fri, 26 Jun 2020 15:24:56 +0000 Subject: [issue41127] Executing code in thread or process pools: run_in_executor example Message-ID: <1593185096.75.0.03844537767.issue41127@roundup.psfhosted.org> New submission from Austin Raney : I found an issue with the concurrent.futures.ProcessPoolExecuter() example (#3) in the asyncio event loops documentation. The call to asyncio.run(main()) should be guarded by `__name__=="__main__":`, as it sits now a RuntimeError is thrown. https://docs.python.org/3/library/asyncio-eventloop.html#executing-code-in-thread-or-process-pools ---------- assignee: docs at python components: Documentation messages: 372428 nosy: aaraney, docs at python priority: normal severity: normal status: open title: Executing code in thread or process pools: run_in_executor example versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 11:48:04 2020 From: report at bugs.python.org (Alexey Izbyshev) Date: Fri, 26 Jun 2020 15:48:04 +0000 Subject: [issue35823] Use vfork() in subprocess on Linux In-Reply-To: <1548381806.02.0.709569222975.issue35823@roundup.psfhosted.org> Message-ID: <1593186484.43.0.717205658449.issue35823@roundup.psfhosted.org> Alexey Izbyshev added the comment: I'd really like to get this merged eventually because vfork()-based solution is fundamentally more generic than posix_spawn(). Apart from having no issue with close_fds=True, it will also continue to allow subprocess to add any process context tweaks without waiting for availability of corresponding features in posix_spawn(). If there is no objection from Gregory or other devs, I can pick up from where I left in two weeks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 12:14:34 2020 From: report at bugs.python.org (utkarsh) Date: Fri, 26 Jun 2020 16:14:34 +0000 Subject: [issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError In-Reply-To: <1593089370.45.0.0611386084027.issue41115@roundup.psfhosted.org> Message-ID: <1593188074.37.0.741901831821.issue41115@roundup.psfhosted.org> Change by utkarsh : ---------- nosy: +utk nosy_count: 8.0 -> 9.0 pull_requests: +20329 pull_request: https://github.com/python/cpython/pull/21170 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 12:22:54 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jun 2020 16:22:54 +0000 Subject: [issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing. In-Reply-To: <1593017703.53.0.919415125728.issue41106@roundup.psfhosted.org> Message-ID: <1593188574.89.0.581047698311.issue41106@roundup.psfhosted.org> Steve Dower added the comment: > We're faced with the choice between either always calling the real lstat, or just documenting that files with hard links will have stale information if the file was updated using another link. That's an easy choice: we document it. The os module comes with the assumption that platform-specific behaviour may vary, so this is really just a helpful note about a known variation on Windows. It is not a warning, just a note. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 12:31:42 2020 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Fri, 26 Jun 2020 16:31:42 +0000 Subject: [issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError In-Reply-To: <1593089370.45.0.0611386084027.issue41115@roundup.psfhosted.org> Message-ID: <1593189102.21.0.732841731934.issue41115@roundup.psfhosted.org> Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) added the comment: @utk You could have taken some other easy issue from https://bugs.python.org/issue?status=1&@sort=-activity&@columns=id%2Cactivity%2Ctitle%2Ccreator%2Cstatus&@dispname=Easy%20issues&@startwith=0&@group=priority&keywords=6&@action=search&@filter=&@pagesize=50 instead of copy pasting my work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 12:53:12 2020 From: report at bugs.python.org (Cezary Wagner) Date: Fri, 26 Jun 2020 16:53:12 +0000 Subject: [issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing. In-Reply-To: <1593017703.53.0.919415125728.issue41106@roundup.psfhosted.org> Message-ID: <1593190392.86.0.846375359271.issue41106@roundup.psfhosted.org> Cezary Wagner added the comment: I think we can assume that NTFS is priority since that is the most used option. I can not discuss what with FAT32 or FAT since I am not the best in this domain (in NTFS I am not the best too now). Whatever I think that system must do allocation for open files to avoid conflicts so it can be tracked but how? Possible solutions is some extra function, argument for Windows - which makes cache dirty between calls. It is very dirty proposal - I need to think if it is good. Even used names is ugly I need think more about it. My imagination tells me that it can be good direction. dir_entry.stat(nt_force_cache_refresh=True) - it can be good for specific entries. os.scandir(nt_force_cache_refresh=True) - it is sometimes not need for all entries I am thinking: dir_entry.stat(nt_force_cache_refresh=True) should be faster than os.stat(dir_entry.path) instead dir_entry.stat() which not works fo open files. os.scandir(nt_force_cache_refresh=True) should be faster than dir_entry.stat(nt_force_cache_refresh=True) and dir_entry.stat() will work for open files. It is simpler to understand that Windows is different if such extra attribute must be added at all. nt_force_cache_refresh can add to dir_entry some information that .stat() should not use cache. Then best will be to not use nt_force_cache_refresh for open files - maybe you will find the way to detect open files in external application. I think Windows API allow to check if file is open - as far as remember sysinternals tools can do this so there some API for it I think. See this tool: https://docs.microsoft.com/en-us/sysinternals/downloads/handle - maybe there is source code for it or you can learn for it. Maybe you can check if file is open with use this API before dir_entry.stat() I do want to force any solution but just share some rough ideas. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 12:56:15 2020 From: report at bugs.python.org (=?utf-8?b?Wm9sdMOhbiBTemF0bcOhcnk=?=) Date: Fri, 26 Jun 2020 16:56:15 +0000 Subject: [issue38879] Reordered error checking in PyArena_New(). In-Reply-To: <1574352752.3.0.334420443084.issue38879@roundup.psfhosted.org> Message-ID: <1593190575.9.0.797483062321.issue38879@roundup.psfhosted.org> Change by Zolt?n Szatm?ry : ---------- hgrepos: -386 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 12:59:17 2020 From: report at bugs.python.org (utkarsh) Date: Fri, 26 Jun 2020 16:59:17 +0000 Subject: [issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError In-Reply-To: <1593089370.45.0.0611386084027.issue41115@roundup.psfhosted.org> Message-ID: <1593190757.55.0.788840703706.issue41115@roundup.psfhosted.org> utkarsh added the comment: @thatiparthy These were the most logical changes, standard error messages, which were already there in the existing code, I just edited them as mentioned here. What part of your "work" do you think i copied? Sent this PR to get familiar to the process mostly, i will close it if you feel insecure. No need to be rude. thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 13:13:22 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jun 2020 17:13:22 +0000 Subject: [issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing. In-Reply-To: <1593017703.53.0.919415125728.issue41106@roundup.psfhosted.org> Message-ID: <1593191602.82.0.90905326881.issue41106@roundup.psfhosted.org> Steve Dower added the comment: Those are all good ideas, but using os.stat(d) instead of d.stat() is shorter, more reliable, more compatible, and already works. There's no middle ground where DirEntry can be faster, because it's already using that middle ground. All the discussion between Eryk and myself was figuring out whether we can use the DirEntry/FindFileData information to tell whether the file needs an explicit stat() or not, and we can't. Most of the performance impact of stat() is just in opening the file (which scandir() does not do). As soon as we have to directly access the file, we may as well get all the information from it. We're already getting all the "cheap" information we can. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: +Python 3.10, Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 13:34:49 2020 From: report at bugs.python.org (=?utf-8?q?Josef_Havr=C3=A1nek?=) Date: Fri, 26 Jun 2020 17:34:49 +0000 Subject: [issue41128] Signal handlers should not hang during blocked main thread Message-ID: <1593192889.65.0.44895771655.issue41128@roundup.psfhosted.org> New submission from Josef Havr?nek : python3 When handling signals (via signal module) have delayed execution when main thread is blocked/waiting for event That is sub-optimal(signal "could get lost"). Signals shoud be handled asap... Think about scenario when os may be asking python nicely before it sends os.kill...so we could be dead on next bytecode instruction of main thread. In such scenario when main thread is blocked and VM recives signal it should "context switch" to handler immediately thus not being dependent on state of main thread to be in executable state. This gotcha should be included in documentation of all 3.x version since there should be nothing running(including long-runing c computation like regex matching ;) ) and basicly nothing is preventing handler from execution more details and test script in file attached ps excuse my english/typos and uglines of code... this is my 1st bug report/enhancment proposal ---------- components: Extension Modules files: testscript.py messages: 372435 nosy: Josef Havr?nek priority: normal severity: normal status: open title: Signal handlers should not hang during blocked main thread type: enhancement versions: Python 3.7, Python 3.8 Added file: https://bugs.python.org/file49265/testscript.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 13:47:04 2020 From: report at bugs.python.org (=?utf-8?b?TWlpa2EgTcOka2Vsw6Q=?=) Date: Fri, 26 Jun 2020 17:47:04 +0000 Subject: [issue37369] Issue with pip in venv on Powershell in Windows In-Reply-To: <1561161256.11.0.32935812019.issue37369@roundup.psfhosted.org> Message-ID: <1593193624.55.0.732107844182.issue37369@roundup.psfhosted.org> Miika M?kel? added the comment: I tried to reproduce the issue on a another windows installation (Windows build 10.0.18363.0), but was however unable to do it following the same steps. I fear that my original python/pip installation is just corrupted somehow due to having many python interpreters around previously. My username with the machine I am having issues is typical C:\Users\miika.makela\ without any nonascii characters and without spaces in the data path. With the other machine I tried my username is just C:\Users\Miika I'll open an issue if I sometime find out what really did go wrong, thanks for the reply. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 14:11:19 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 26 Jun 2020 18:11:19 +0000 Subject: [issue41022] AST sum types is unidentifiable after ast.Constant became a base class In-Reply-To: <1592473081.05.0.347184745832.issue41022@roundup.psfhosted.org> Message-ID: <1593195079.26.0.285373761539.issue41022@roundup.psfhosted.org> Batuhan Taskaya added the comment: > Where they were identifable in such way? It is incorrect way, because user can create a subclass of every AST class. You are right, I didn't consider that while I was opening the issue. Also from 3.9>= can be searched "|" in the ASDL signature to identify these types. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 14:11:08 2020 From: report at bugs.python.org (Andrew) Date: Fri, 26 Jun 2020 18:11:08 +0000 Subject: [issue41129] Python extension modules fail to build on Mac 10.15.1 (Catalina) Message-ID: <1593195068.14.0.719266681703.issue41129@roundup.psfhosted.org> New submission from Andrew : Quick repoduction steps: 1) Log into a mac with macOS version 10.15.1 (10.15.x may work) 2) For build tools, use Xcode11. A minimal xcode command-tools installation also reproduced for me. 3) Download and decompress the latest python 3.8.2 source 4) run "./configure" in the top-level source folder 5) run "make" in the top-level source folder I believe this error may also occur when using python 2.7.x, 3.7.x, and others. Curiously, the errors do not occur when I use the latest 3.6.10 source. A text file containing the output of "./configure" and "make" is attached. Main Description: On Mac 10.15.1 with Xcode11 I encounter compilation errors when building the latest Python 3.8.2 source. When the build reaches the "build_ext" section in setup.py, none of the extension modules build, with each compilation attempt producing an error. For example, when the _struct extension module attempts compilation I get: --- Error Syndrome --- building '_struct' extension gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -I./Include/internal -I./Include -I. -I/usr/local/include -I/System/Volumes/Data/mathworks/devel/sandbox/aflewell/python38_source/Python-3.8.2/Include -I/System/Volumes/Data/mathworks/devel/sandbox/aflewell/python38_source/Python-3.8.2 -c _struct.c -o build/temp.macosx-10.15-x86_64-3.8/_struct.o clang: error: no such file or directory: '_struct.c' clang: error: no input files ------ After many similar errors, we get to the main build report where we see the failed extension modules: --- Snippet of build report --- Python build finished successfully! The necessary bits to build these optional modules were not found: _gdbm _hashlib _ssl ossaudiodev spwd To find the necessary bits, look in setup.py in detect_modules() for the module's name. The following modules found by detect_modules() in setup.py, have been built by the Makefile instead, as configured by the Setup files: _abc atexit pwd time Failed to build these modules: _asyncio _bisect _blake2 _bz2 _codecs_cn _codecs_hk _codecs_iso2022 _codecs_jp _codecs_kr _codecs_tw _contextvars _crypt _csv _ctypes _ctypes_test _curses _curses_panel _datetime _dbm _decimal _elementtree _heapq _json _lsprof _lzma _md5 _multibytecodec _multiprocessing _opcode _pickle _posixshmem _posixsubprocess _queue _random _scproxy _sha1 _sha256 _sha3 _sha512 _socket _sqlite3 _statistics _struct _testbuffer _testcapi _testimportmultiple _testinternalcapi _testmultiphase _tkinter _uuid _xxsubinterpreters _xxtestfuzz array audioop binascii cmath fcntl grp math mmap nis parser pyexpat readline resource select syslog termios unicodedata xxlimited zlib ------ The part "-c _struct.c" in the error syndrome stands out to me because there is not a prefix like the other modules that get built successfully before the "build_ext" section. In the successful cases, we see a prefix like "-c ./Modules/faulthandler.c". This can be seen in my attached log. Also, when I use the Python 3.6.10 source, the build for _struct looks like this and goes fine on Mac 10.15.1. This seems to be the only version of python that works for me on 10.15.1 that I know of. ------- building '_struct' extension creating build/temp.macosx-10.15-x86_64-3.6/System creating build/temp.macosx-10.15-x86_64-3.6/System/Volumes creating build/temp.macosx-10.15-x86_64-3.6/System/Volumes/Data creating build/temp.macosx-10.15-x86_64-3.6/System/Volumes/Data/my_company creating build/temp.macosx-10.15-x86_64-3.6/System/Volumes/Data/my_company/devel creating build/temp.macosx-10.15-x86_64-3.6/System/Volumes/Data/my_company/devel/sandbox creating build/temp.macosx-10.15-x86_64-3.6/System/Volumes/Data/my_company/devel/sandbox/my_username creating build/temp.macosx-10.15-x86_64-3.6/System/Volumes/Data/my_company/devel/sandbox/my_username/python36_source creating build/temp.macosx-10.15-x86_64-3.6/System/Volumes/Data/my_company/devel/sandbox/my_username/python36_source/Python-3.6.10 creating build/temp.macosx-10.15-x86_64-3.6/System/Volumes/Data/my_company/devel/sandbox/my_username/python36_source/Python-3.6.10/Modules gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -I./Include -I. -I/usr/local/include -I/System/Volumes/Data/my_company/devel/sandbox/my_username/python36_source/Python-3.6.10/Include -I/System/Volumes/Data/my_company/devel/sandbox/my_username/python36_source/Python-3.6.10 -c /System/Volumes/Data/my_company/devel/sandbox/my_username/python36_source/Python-3.6.10/Modules/_struct.c -o build/temp.macosx-10.15-x86_64-3.6/System/Volumes/Data/my_company/devel/sandbox/my_username/python36_source/Python-3.6.10/Modules/_struct.o gcc -bundle -undefined dynamic_lookup build/temp.macosx-10.15-x86_64-3.6/System/Volumes/Data/my_company/devel/sandbox/my_username/python36_source/Python-3.6.10/Modules/_struct.o -L/usr/local/lib -o build/lib.macosx-10.15-x86_64-3.6/_struct.cpython-36m-darwin.so ----- In this successful case, you can see absolute paths are used to compile the .c source, and some temp folders are created for the .o output. I wonder if there is a workaround where we pass a flag to the configure script to produce the same effects? Obviously it would be nice if a plain build worked though. Also, on Mac 10.14.5, the builds of any python succeeds similarly with no such errors. I am wondering why I am seeing this new pathing and filing behavior on mac 10.15.1 for most versions of Python. Are there any viable workarounds? Thanks for reading! ---------- components: Extension Modules files: configure_and_make_output.txt messages: 372437 nosy: andrewfg1992, ned.deily priority: normal severity: normal status: open title: Python extension modules fail to build on Mac 10.15.1 (Catalina) type: compile error versions: Python 3.8 Added file: https://bugs.python.org/file49266/configure_and_make_output.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 14:31:27 2020 From: report at bugs.python.org (=?utf-8?q?Josef_Havr=C3=A1nek?=) Date: Fri, 26 Jun 2020 18:31:27 +0000 Subject: [issue41128] Signal handlers should not hang during blocked main thread In-Reply-To: <1593192889.65.0.44895771655.issue41128@roundup.psfhosted.org> Message-ID: <1593196287.99.0.587284397568.issue41128@roundup.psfhosted.org> Change by Josef Havr?nek : ---------- type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 15:00:41 2020 From: report at bugs.python.org (myfreeweb) Date: Fri, 26 Jun 2020 19:00:41 +0000 Subject: [issue41130] Improve/fix FreeBSD Bluetooth socket support Message-ID: <1593198041.11.0.943194169636.issue41130@roundup.psfhosted.org> New submission from myfreeweb : 1) BTPROTO_HCI addresses only expect string identifiers on NetBSD and DragonFly: https://github.com/python/cpython/blob/2e0a920e9eb540654c0bb2298143b00637dc5961/Modules/socketmodule.c#L1931 But of course this is true on FreeBSD too. (DragonFly inherited the BT stack from FreeBSD!) For example this is how hccontrol creates an address: https://github.com/freebsd/freebsd/blob/6bb9221a9b865ee432269099f341e4230a6cbcd4/usr.sbin/bluetooth/hccontrol/hccontrol.c#L115-L129 So currently it is not possible to bind an HCI socket (without using FFI to directly use the libc bind function) :( 2) BTPROTO_SCO is excluded on FreeBSD: https://github.com/python/cpython/blob/2e0a920e9eb540654c0bb2298143b00637dc5961/Modules/socketmodule.c#L1953 But SCO has been supported since 2008: https://github.com/freebsd/freebsd/commit/bb4c6de0cf336d006e41521cbbd4706f60a0dfe0 ---------- components: FreeBSD messages: 372439 nosy: koobs, myfreeweb priority: normal severity: normal status: open title: Improve/fix FreeBSD Bluetooth socket support 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 Fri Jun 26 15:40:01 2020 From: report at bugs.python.org (Tony) Date: Fri, 26 Jun 2020 19:40:01 +0000 Subject: [issue41093] TCPServer's server_forever() shutdown immediately when calling shutdown() In-Reply-To: <1592938873.08.0.742314253675.issue41093@roundup.psfhosted.org> Message-ID: <1593200401.74.0.926645980273.issue41093@roundup.psfhosted.org> Tony added the comment: poke ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 16:37:36 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 26 Jun 2020 20:37:36 +0000 Subject: [issue41119] Wrong error message for list/tuple followed by a colon In-Reply-To: <1593124598.52.0.640760442401.issue41119@roundup.psfhosted.org> Message-ID: <1593203856.48.0.532611187347.issue41119@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +20330 pull_request: https://github.com/python/cpython/pull/21172 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 16:38:41 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Jun 2020 20:38:41 +0000 Subject: [issue41131] Augment random.choices() with the alias method Message-ID: <1593203921.14.0.316410898298.issue41131@roundup.psfhosted.org> New submission from Raymond Hettinger : For n unequal weights and k selections, sample selection with the inverse-cdf method is O(k log? n). Using the alias method, it improves to O(k). The proportionally constants also favor the alias method so that if the set up times were the same, the alias method would always win (even when n=2). However, the set up times are not the same. For the inverse-cdf method, set up is O(1) if cum_weights are given; otherwise, it is O(n) with a fast loop. The setup time for the alias method is also O(n) but is proportionally much slower. So, there would need to be a method selection heuristic based on the best trade-off between setup time and sample selection time. Both methods make k calls to random(). See: https://en.wikipedia.org/wiki/Alias_method Notes on the attached draft implementation: * Needs to add back the error checking code. * Need a better method selection heuristic. * The alias table K defaults to the original index so that there is always a valid selection even if there are small rounding errors. * The condition for the aliasing loop is designed to have an early-out when the remaining blocks all have equal weights. Also, the loop condition makes sure that the pops never fail even if there are small rounding errors when partitioning oversized bins or if the sum of weights isn't exactly 1.0. ---------- assignee: rhettinger components: Library (Lib) files: choices_proposal.py messages: 372441 nosy: mark.dickinson, rhettinger, tim.peters priority: normal severity: normal status: open title: Augment random.choices() with the alias method type: performance versions: Python 3.10 Added file: https://bugs.python.org/file49267/choices_proposal.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 16:42:31 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 26 Jun 2020 20:42:31 +0000 Subject: [issue41084] Signify that a SyntaxError comes from an fstring in the error message In-Reply-To: <1592870022.32.0.609883413471.issue41084@roundup.psfhosted.org> Message-ID: <1593204151.97.0.656309531229.issue41084@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 16:44:08 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 26 Jun 2020 20:44:08 +0000 Subject: [issue41119] Wrong error message for list/tuple followed by a colon In-Reply-To: <1593124598.52.0.640760442401.issue41119@roundup.psfhosted.org> Message-ID: <1593204248.96.0.442853590965.issue41119@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 16:56:18 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 26 Jun 2020 20:56:18 +0000 Subject: [issue41132] F-String parser uses raw allocator Message-ID: <1593204978.6.0.0616060148241.issue41132@roundup.psfhosted.org> New submission from Lysandros Nikolaou : The f-string parser uses the raw allocator in various places. We had a very very brief discussion about this with Pablo and he suggested to change the new parser and the hand-written f-string parser to use the pymalloc allocator. Eric, is there a specific reason the raw allocator was used? ---------- components: Interpreter Core messages: 372442 nosy: eric.smith, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: F-String parser uses raw allocator versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 16:57:17 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Jun 2020 20:57:17 +0000 Subject: [issue41131] Augment random.choices() with the alias method In-Reply-To: <1593203921.14.0.316410898298.issue41131@roundup.psfhosted.org> Message-ID: <1593205037.11.0.430730264801.issue41131@roundup.psfhosted.org> Raymond Hettinger added the comment: I also looked at another method using binomial variates but couldn't get it to run faster than the alias method: def choices(population, weights, *, k=1): r = 1.0 n = k selections = [] for elem, p in zip(population, weights): v = binomial_variate(n, p / r) selections += [elem] * v n -= v r -= p shuffle(selections) return selections The shuffle step took as much time as the alias method. Also, the binomial variate was hard to compute quickly and without overflow/underflow issues for large inputs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 16:59:51 2020 From: report at bugs.python.org (bbayles) Date: Fri, 26 Jun 2020 20:59:51 +0000 Subject: [issue39883] Use BSD0 license for code in docs In-Reply-To: <1583553057.27.0.724137569708.issue39883@roundup.psfhosted.org> Message-ID: <1593205191.46.0.19864995665.issue39883@roundup.psfhosted.org> Change by bbayles : ---------- nosy: +bbayles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 18:02:45 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 26 Jun 2020 22:02:45 +0000 Subject: [issue35823] Use vfork() in subprocess on Linux In-Reply-To: <1548381806.02.0.709569222975.issue35823@roundup.psfhosted.org> Message-ID: <1593208965.53.0.699856016163.issue35823@roundup.psfhosted.org> Gregory P. Smith added the comment: No objections, it would be great to see this finished up and land. I've encountered a minority of users who are using a wrapped vfork-based C/C++ library for process spawning as fork+exec isn't fast enough for them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 18:29:51 2020 From: report at bugs.python.org (Daniel Barkalow) Date: Fri, 26 Jun 2020 22:29:51 +0000 Subject: [issue41133] Insufficient description of cyclic garbage collector for C API Message-ID: <1593210591.52.0.296051875695.issue41133@roundup.psfhosted.org> New submission from Daniel Barkalow : Nothing in the documentation gives you enough information to find what you're doing wrong if you have the following bug for an object tracked by the GC: (a) you store a borrowed reference to an object whose lifetime is always longer that the buggy object (and never decrement it); (b) you visit that object in your tp_traverse. Despite the bug, everything works nearly all of the time. However, when it fails, the effect makes no sense from a documentation-only understanding of the garbage collection (unless Python is built with --with-assertions, perhaps). The only sequence in which it fails is: * All of the objects that will reference the victim get moved into an older generation. * The victim gets exactly as many buggy references from objects in its own generation as there are good references, and no good references from objects in its own generation. * Garbage collection runs for only the younger generation. At this point, the victim is marked as garbage despite the fact that there was a good object referencing it at all times. Reading the Python source, it becomes clear that the garbage collector handles references from older generations not by traversing the objects in older generations, but by comparing the count of references from other young objects to the usual reference count. That is, visiting an object you don't hold a reference to may cause that object to get collected, rather than protecting it, even if there are other reasons not to collect it. The best fix would probably be a warning in the documentation for tp_traverse that visiting an object you do not hold a strong reference to can cause inexplicable effects, because the intuitive guess would be that it could only cause memory leaks. It would probably also be worth mentioning in the documentation of the garbage collector something about its algorithm, so people have a hint that references from older objects aren't necessarily sufficient to overcome buggy use of the C API. ---------- assignee: docs at python components: C API, Documentation messages: 372445 nosy: docs at python, iabervon priority: normal severity: normal status: open title: Insufficient description of cyclic garbage collector for C API versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 19:14:19 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 26 Jun 2020 23:14:19 +0000 Subject: [issue41119] Wrong error message for list/tuple followed by a colon In-Reply-To: <1593124598.52.0.640760442401.issue41119@roundup.psfhosted.org> Message-ID: <1593213259.86.0.0268002466978.issue41119@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset d01a3e76ee0519cba3ccdb5de47b25ec2ed7bee4 by Lysandros Nikolaou in branch '3.9': [3.9] bpo-41119: Output correct error message for list/tuple followed by colon (GH-21160) (GH-21172) https://github.com/python/cpython/commit/d01a3e76ee0519cba3ccdb5de47b25ec2ed7bee4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 19:45:55 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 26 Jun 2020 23:45:55 +0000 Subject: [issue41132] F-String parser uses raw allocator In-Reply-To: <1593204978.6.0.0616060148241.issue41132@roundup.psfhosted.org> Message-ID: <1593215155.41.0.350056363687.issue41132@roundup.psfhosted.org> Eric V. Smith added the comment: I don't think I put any thought into it. It was probably just in an example I was copying from. I'm not familiar with the difference between those allocators. Why would pymalloc be preferred? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 20:18:11 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 27 Jun 2020 00:18:11 +0000 Subject: [issue41132] F-String parser uses raw allocator In-Reply-To: <1593204978.6.0.0616060148241.issue41132@roundup.psfhosted.org> Message-ID: <1593217091.87.0.781089271018.issue41132@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Why would pymalloc be preferred? For such small and temporary string is normally faster because it will likely have pools of that size readily available and it will also benefit further allocation of the same pool size. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 23:26:02 2020 From: report at bugs.python.org (Tom Hale) Date: Sat, 27 Jun 2020 03:26:02 +0000 Subject: [issue41134] distutils.dir_util.copy_tree FileExistsError when updating symlinks Message-ID: <1593228362.42.0.387933635808.issue41134@roundup.psfhosted.org> New submission from Tom Hale : Here is a minimal test case: ========================================================== #!/bin/bash cd /tmp || exit 1 dir=test-copy_tree src=$dir/src dst=$dir/dst mkdir -p "$src" touch "$src"/file ln -s file "$src/symlink" python -c "from distutils.dir_util import copy_tree; copy_tree('$src', '$dst', preserve_symlinks=1, update=1); copy_tree('$src', '$dst', preserve_symlinks=1, update=1);" rm -r "$dir" ========================================================== Traceback (most recent call last): File "", line 3, in File "/usr/lib/python3.8/distutils/dir_util.py", line 152, in copy_tree os.symlink(link_dest, dst_name) FileExistsError: [Errno 17] File exists: 'file' -> 'test-copy_tree/dst/symlink' ========================================================== Related: ========= This issue will likely be resolved via: bpo-36656 Add race-free os.link and os.symlink wrapper / helper https://bugs.python.org/issue36656 (WIP under discussion at python-mentor) Prior art: =========== https://stackoverflow.com/questions/53090360/python-distutils-copy-tree-fails-to-update-if-there-are-symlinks ---------- messages: 372449 nosy: Tom Hale priority: normal severity: normal status: open title: distutils.dir_util.copy_tree FileExistsError when updating symlinks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 23:41:28 2020 From: report at bugs.python.org (Tom Hale) Date: Sat, 27 Jun 2020 03:41:28 +0000 Subject: [issue36656] Add race-free os.link and os.symlink wrapper / helper In-Reply-To: <1555577087.92.0.769196427693.issue36656@roundup.psfhosted.org> Message-ID: <1593229288.08.0.919461783722.issue36656@roundup.psfhosted.org> Tom Hale added the comment: Related: bpo-41134 distutils.dir_util.copy_tree FileExistsError when updating symlinks WIP update: I am just about to ask for feedback on my proposed solution at core-mentorship at python.org ---------- title: Please add race-free os.link and os.symlink wrapper / helper -> Add race-free os.link and os.symlink wrapper / helper _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 26 23:53:32 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Jun 2020 03:53:32 +0000 Subject: [issue41131] Augment random.choices() with the alias method In-Reply-To: <1593203921.14.0.316410898298.issue41131@roundup.psfhosted.org> Message-ID: <1593230012.74.0.699703866748.issue41131@roundup.psfhosted.org> Change by Raymond Hettinger : Added file: https://bugs.python.org/file49268/choices_binomial.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 00:21:05 2020 From: report at bugs.python.org (Michael Rich) Date: Sat, 27 Jun 2020 04:21:05 +0000 Subject: [issue41135] Suggested change to http.server.HTTPServer to prevent socket reuse in Windows Message-ID: <1593231665.6.0.126177341986.issue41135@roundup.psfhosted.org> New submission from Michael Rich : Hi, a web server can be incorrectly bound to an already in-use socket when binding a HTTPServer on windows. The issue is discussed here: https://stackoverflow.com/questions/51090637/running-a-python-web-server-twice-on-the-same-port-on-windows-no-port-already This only happens on Windows. In *nix the socketserver will throw an error, on Windows it will not. However the most recently bound server will not receive the requests. I suggest the following code (taken from stackoverflow) at the start of the server_bind method: if hasattr(socket, 'SO_EXCLUSIVEADDRUSE'): self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_EXCLUSIVEADDRUSE, 1) # Also need to change the value of allow_reuse_address (defined in http.server.HTTPServer) HTTPServer.allow_reuse_address = 0 I have tested this and it will throw an error upon reuse in Windows and does not change *nix behavior. Thanks, Mike ---------- components: Library (Lib) messages: 372451 nosy: Michael Rich priority: normal severity: normal status: open title: Suggested change to http.server.HTTPServer to prevent socket reuse in Windows type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 02:02:58 2020 From: report at bugs.python.org (Ned Deily) Date: Sat, 27 Jun 2020 06:02:58 +0000 Subject: [issue41093] TCPServer's server_forever() shutdown immediately when calling shutdown() In-Reply-To: <1592938873.08.0.742314253675.issue41093@roundup.psfhosted.org> Message-ID: <1593237778.69.0.69432379758.issue41093@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: -ned.deily versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 03:13:47 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Jun 2020 07:13:47 +0000 Subject: [issue41136] argparse uses default encoding when read arguments from file Message-ID: <1593242027.84.0.221105259078.issue41136@roundup.psfhosted.org> New submission from Serhiy Storchaka : The fromfile_prefix_chars option allows you to read arguments from file. But open() without explicit encoding is used for this. Therefore the result is depending on the current locale or the PYTHONIOENCODING environment variable. On Linux this is rare a problem, because UTF-8 is a common locale encoding, but on Windows the locale encoding is usually 8-bit and may even be not able to encode all file names. I think we need a new option to specify the encoding for files from which arguments are read. ---------- components: Library (Lib) messages: 372452 nosy: rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: argparse uses default encoding when read arguments from file type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 03:14:37 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Jun 2020 07:14:37 +0000 Subject: [issue41063] Avoid using the locale encoding for open() in tests In-Reply-To: <1592737455.62.0.0102457706835.issue41063@roundup.psfhosted.org> Message-ID: <1593242077.46.0.50539127842.issue41063@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- dependencies: +argparse uses default encoding when read arguments from file _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 03:19:58 2020 From: report at bugs.python.org (Ned Deily) Date: Sat, 27 Jun 2020 07:19:58 +0000 Subject: [issue41129] Python extension modules fail to build on Mac 10.15.1 (Catalina) In-Reply-To: <1593195068.14.0.719266681703.issue41129@roundup.psfhosted.org> Message-ID: <1593242398.5.0.0806745723077.issue41129@roundup.psfhosted.org> Ned Deily added the comment: To be honest, I've never seen a failure quite like that before so thanks for that! A couple of observations: you appear to be using an old version of Xcode (11.0.0) that may not be fully supported on 10.15.x. So I would try upgrading to the latest released Xcode for 10.15, which is Xcode 11.5 at the moment or make sure your copy of the Command Like Tools is really up to date (you don't need a full-blown Xcode to build python). xcode-select -p should show which you have selected. You should see one of the following: $ cc --version Apple clang version 11.0.3 (clang-1103.0.32.62) Target: x86_64-apple-darwin19.5.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin or Apple clang version 11.0.3 (clang-1103.0.32.62) Target: x86_64-apple-darwin19.5.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin But that may be a secondary matter. The most interesting things in the snippet you display are the paths to the header files. for example: /System/Volumes/Data/mathworks/devel/sandbox/aflewell/python38_source/Python-3.8.2 which are absolute paths that suggest the build process you are using is somehow using macOS sandboxes. Yet the paths to the actual source file being compiled amd its output file are unprefixed relative paths. So I suggest you figure out why those sandbox paths are in there. A straightforward build from within the source tarball expanded in a non-sandboxed directory, for example under $HOME or /tmp, should work just fine. Keep in mind that in any case you will still run into some missing modules like _ssl and _hashlib unless you supply copies of third-party libraries that macOS does not or no longer provides; the Python Developer's Guide has some suggestions (https://devguide.python.org/setup/#macos-and-os-x). ---------- resolution: -> works for me status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 03:23:15 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Jun 2020 07:23:15 +0000 Subject: [issue41137] pdb uses the locale encoding for .pdbrc Message-ID: <1593242595.67.0.594029276449.issue41137@roundup.psfhosted.org> New submission from Serhiy Storchaka : pdb uses the locale encoding when read the .pdbrc file. It means that the current locale of the debugged program affects it. It also makes .pdbrc not portable between different platforms. It is usually not an issue, because the .pdbrc file usually contains ASCII-only data. But maybe always use UTF-8 for .pdbrc files? ---------- components: Library (Lib) messages: 372454 nosy: serhiy.storchaka priority: normal severity: normal status: open title: pdb uses the locale encoding for .pdbrc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 03:55:21 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 27 Jun 2020 07:55:21 +0000 Subject: [issue41132] F-String parser uses raw allocator In-Reply-To: <1593204978.6.0.0616060148241.issue41132@roundup.psfhosted.org> Message-ID: <1593244521.27.0.376839897653.issue41132@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- keywords: +patch pull_requests: +20331 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21173 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 03:57:29 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 27 Jun 2020 07:57:29 +0000 Subject: [issue41132] F-String parser uses raw allocator In-Reply-To: <1593204978.6.0.0616060148241.issue41132@roundup.psfhosted.org> Message-ID: <1593244649.04.0.231731125336.issue41132@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Ok, I've opened a PR. Should be backport this to previous versions as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 04:07:43 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Jun 2020 08:07:43 +0000 Subject: [issue41131] Augment random.choices() with the alias method In-Reply-To: <1593203921.14.0.316410898298.issue41131@roundup.psfhosted.org> Message-ID: <1593245263.4.0.240168550502.issue41131@roundup.psfhosted.org> Change by Raymond Hettinger : Removed file: https://bugs.python.org/file49268/choices_binomial.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 04:08:02 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Jun 2020 08:08:02 +0000 Subject: [issue41131] Augment random.choices() with the alias method In-Reply-To: <1593203921.14.0.316410898298.issue41131@roundup.psfhosted.org> Message-ID: <1593245282.89.0.49056169949.issue41131@roundup.psfhosted.org> Change by Raymond Hettinger : Added file: https://bugs.python.org/file49269/choices_binomial.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 04:20:36 2020 From: report at bugs.python.org (Ned Deily) Date: Sat, 27 Jun 2020 08:20:36 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593246036.99.0.502031199834.issue41100@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +20332 pull_request: https://github.com/python/cpython/pull/21174 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 04:32:28 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Jun 2020 08:32:28 +0000 Subject: [issue41063] Avoid using the locale encoding for open() in tests In-Reply-To: <1592737455.62.0.0102457706835.issue41063@roundup.psfhosted.org> Message-ID: <1593246748.58.0.359763115425.issue41063@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- dependencies: +pdb uses the locale encoding for .pdbrc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 04:44:59 2020 From: report at bugs.python.org (Ned Deily) Date: Sat, 27 Jun 2020 08:44:59 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593247499.98.0.722703072282.issue41100@roundup.psfhosted.org> Ned Deily added the comment: New changeset 2f168c6356f92c38ae7751d2faf2b266a9356229 by Ned Deily in branch 'master': bpo-41100: clarify NEWS item about macOS 11 support (GH-21174) https://github.com/python/cpython/commit/2f168c6356f92c38ae7751d2faf2b266a9356229 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 04:45:28 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Jun 2020 08:45:28 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593247528.31.0.845475377174.issue41100@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20333 pull_request: https://github.com/python/cpython/pull/21175 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 04:45:38 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Jun 2020 08:45:38 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593247538.04.0.929251700872.issue41100@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20334 pull_request: https://github.com/python/cpython/pull/21176 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 04:51:59 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Jun 2020 08:51:59 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593247919.89.0.329984284503.issue41100@roundup.psfhosted.org> miss-islington added the comment: New changeset 1a0c581a94892fbd8fa70905130776ef7a059d97 by Miss Islington (bot) in branch '3.9': bpo-41100: clarify NEWS item about macOS 11 support (GH-21174) https://github.com/python/cpython/commit/1a0c581a94892fbd8fa70905130776ef7a059d97 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 04:52:53 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Jun 2020 08:52:53 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593247973.22.0.541859377203.issue41100@roundup.psfhosted.org> miss-islington added the comment: New changeset 027bba2eada175358a7f34cad155b25e1b805082 by Miss Islington (bot) in branch '3.8': bpo-41100: clarify NEWS item about macOS 11 support (GH-21174) https://github.com/python/cpython/commit/027bba2eada175358a7f34cad155b25e1b805082 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 05:09:20 2020 From: report at bugs.python.org (Inada Naoki) Date: Sat, 27 Jun 2020 09:09:20 +0000 Subject: [issue41137] pdb uses the locale encoding for .pdbrc In-Reply-To: <1593242595.67.0.594029276449.issue41137@roundup.psfhosted.org> Message-ID: <1593248960.51.0.686099205301.issue41137@roundup.psfhosted.org> Inada Naoki added the comment: +1 for UTF-8 always. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 05:22:11 2020 From: report at bugs.python.org (Inada Naoki) Date: Sat, 27 Jun 2020 09:22:11 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593249731.89.0.678346925975.issue41123@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 20a79021753ab26a5989e6d3397160e52973870e by Inada Naoki in branch 'master': bpo-41123: Remove Py_UNICODE_str* functions (GH-21164) https://github.com/python/cpython/commit/20a79021753ab26a5989e6d3397160e52973870e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 06:50:02 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Jun 2020 10:50:02 +0000 Subject: [issue41138] trace CLI reads source files using the locale encoding Message-ID: <1593255002.94.0.166052202636.issue41138@roundup.psfhosted.org> New submission from Serhiy Storchaka : The command line interface of the trace module reads source files using the locale encoding. The following file fixes this by reading a file in binary mode (compile() detects the encoding). It fixes also a resource warning when save counts to a file. ---------- components: Library (Lib) messages: 372461 nosy: belopolsky, serhiy.storchaka priority: normal severity: normal status: open title: trace CLI reads source files using the locale encoding type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 06:54:57 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Jun 2020 10:54:57 +0000 Subject: [issue41138] trace CLI reads source files using the locale encoding In-Reply-To: <1593255002.94.0.166052202636.issue41138@roundup.psfhosted.org> Message-ID: <1593255297.43.0.490037392493.issue41138@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +20335 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21177 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 06:56:24 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Jun 2020 10:56:24 +0000 Subject: [issue41063] Avoid using the locale encoding for open() in tests In-Reply-To: <1592737455.62.0.0102457706835.issue41063@roundup.psfhosted.org> Message-ID: <1593255384.54.0.509985073841.issue41063@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- dependencies: +trace CLI reads source files using the locale encoding _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 07:30:05 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Jun 2020 11:30:05 +0000 Subject: [issue41139] cgi uses the locale encoding for log files Message-ID: <1593257405.62.0.0746372218017.issue41139@roundup.psfhosted.org> New submission from Serhiy Storchaka : The cgi module provides undocumented feasibility for logging. cgi.log() formats log message and appends it to the log file with name specified by cgi.logfile if it was not empty before the first use of cgi.log(). One of problems is that it uses the locale encoding for log file. Therefore the result depends on the locale at the moment of the first use of cgi.log(). We can fix this by using some fixed encoding (UTF-8). Or maybe just remove this undocumented feature. ---------- messages: 372462 nosy: Rhodri James, ethan.furman, serhiy.storchaka, vinay.sajip priority: normal severity: normal status: open title: cgi uses the locale encoding for log files type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 07:31:23 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Jun 2020 11:31:23 +0000 Subject: [issue41140] cgitb uses the locale encoding for log files Message-ID: <1593257483.85.0.980733000785.issue41140@roundup.psfhosted.org> New submission from Serhiy Storchaka : If logdir is not None the exception handler in cgitb tries to save the description of an error in that directory using the locale encoding. It will fail if the description contains non-encodable characters. We should either use corresponding error handlers (e.g. 'xmlcharrreplace' for html and 'backslashreplace' for text) for handling encoding errors or use the UTF-8 encoding. ---------- components: Library (Lib) messages: 372463 nosy: Rhodri James, ethan.furman, serhiy.storchaka, vinay.sajip priority: normal severity: normal status: open title: cgitb uses the locale encoding for log files type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 07:32:06 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Jun 2020 11:32:06 +0000 Subject: [issue41063] Avoid using the locale encoding for open() in tests In-Reply-To: <1592737455.62.0.0102457706835.issue41063@roundup.psfhosted.org> Message-ID: <1593257526.98.0.835606618997.issue41063@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- dependencies: +cgi uses the locale encoding for log files, cgitb uses the locale encoding for log files _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 08:18:12 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 27 Jun 2020 12:18:12 +0000 Subject: [issue41132] F-String parser uses raw allocator In-Reply-To: <1593204978.6.0.0616060148241.issue41132@roundup.psfhosted.org> Message-ID: <1593260292.04.0.263377966189.issue41132@roundup.psfhosted.org> Eric V. Smith added the comment: I think backporting to 3.8 would be okay. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 09:07:24 2020 From: report at bugs.python.org (Sergey Fedoseev) Date: Sat, 27 Jun 2020 13:07:24 +0000 Subject: [issue41141] remove unneeded handling of '.' and '..' from patlib.Path.iterdir() Message-ID: <1593263244.58.0.0850216109396.issue41141@roundup.psfhosted.org> New submission from Sergey Fedoseev : Currently patlib.Path.iterdir() filters out '.' and '..'. It's unneeded since patlib.Path.iterdir() uses os.listdir() under the hood, which returns neither '.' nor '..'. https://docs.python.org/3/library/os.html#os.listdir ---------- components: Library (Lib) messages: 372465 nosy: sir-sigurd priority: normal severity: normal status: open title: remove unneeded handling of '.' and '..' from patlib.Path.iterdir() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 09:09:15 2020 From: report at bugs.python.org (Sergey Fedoseev) Date: Sat, 27 Jun 2020 13:09:15 +0000 Subject: [issue41141] remove unneeded handling of '.' and '..' from patlib.Path.iterdir() In-Reply-To: <1593263244.58.0.0850216109396.issue41141@roundup.psfhosted.org> Message-ID: <1593263355.97.0.828675507322.issue41141@roundup.psfhosted.org> Change by Sergey Fedoseev : ---------- keywords: +patch pull_requests: +20336 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21179 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 11:01:56 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Jun 2020 15:01:56 +0000 Subject: [issue41142] msilib.CAB doesnot support non-ASCII files Message-ID: <1593270116.07.0.608480331512.issue41142@roundup.psfhosted.org> New submission from Serhiy Storchaka : There are several problems with _msi.FCICreate() used to create the CAB file. It encodes the CAB names and added file names to UTF-8 and then use them as encoded with the local encoding. So you cannot create a CAB file in a directory with non-ASCII name or add files from a directory with non-ASCII name. This is a Python 3 regression. Two possible solutions: 1. Encode paths with the locale encoding. It will add support for paths encodable with the locale encoding. 2. Encode them to UTF-8, but use a wrapper for opening file which converts the path from UTF-8 to UTF-16 and uses the Unicode variant of _open(). It will support arbitrary names. ---------- components: Windows messages: 372466 nosy: paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: msilib.CAB doesnot support non-ASCII files type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 11:14:09 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Jun 2020 15:14:09 +0000 Subject: [issue41143] distutils uses the locale encoding for the .pypirc file Message-ID: <1593270849.73.0.549348582361.issue41143@roundup.psfhosted.org> New submission from Serhiy Storchaka : I have not found any mention about the encoding of .pypirc files. Currently distutils uses the locale encoding for reading and writing them. It makes them potentially nonportable if they contain non-ASCII data (not sure if it is possible) and depending on the user settings. I think that if the only ASCII content is allowed, it would be safer to use explicit ASCII encoding. If non-ASCII content is allowed, then it may be worth always to use UTF-8. What do you think? ---------- components: Distutils messages: 372467 nosy: alexis, dstufft, eric.araujo, lemburg, paul.moore, serhiy.storchaka, tarek priority: normal severity: normal status: open title: distutils uses the locale encoding for the .pypirc file _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 11:14:43 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Jun 2020 15:14:43 +0000 Subject: [issue41063] Avoid using the locale encoding for open() in tests In-Reply-To: <1592737455.62.0.0102457706835.issue41063@roundup.psfhosted.org> Message-ID: <1593270883.19.0.920455279286.issue41063@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- dependencies: +distutils uses the locale encoding for the .pypirc file _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 12:08:34 2020 From: report at bugs.python.org (Inada Naoki) Date: Sat, 27 Jun 2020 16:08:34 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593274114.97.0.544861192757.issue41123@roundup.psfhosted.org> Inada Naoki added the comment: > a) Can we replace 4.0 with 3.10 and remove them in 3.10? > b) Or should we replace 4.0 with 3.11 and wait one more year? I chose this because they are deprecated since 3.3, and Py_DEPRECATED is used since 3.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 12:20:00 2020 From: report at bugs.python.org (Inada Naoki) Date: Sat, 27 Jun 2020 16:20:00 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593274800.7.0.465302534911.issue41123@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +20337 pull_request: https://github.com/python/cpython/pull/21181 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 12:57:08 2020 From: report at bugs.python.org (E. Paine) Date: Sat, 27 Jun 2020 16:57:08 +0000 Subject: [issue41144] IDLE: raises ImportError when opening special modules Message-ID: <1593277028.54.0.214290317054.issue41144@roundup.psfhosted.org> New submission from E. Paine : When opening special modules (such as os.path) through the "Open Module" dialog, an ImportError is raised. The fix is to catch this error and retry the loader call without the "name" argument (hence opening the true file). ---------- messages: 372469 nosy: epaine, taleinat, terry.reedy priority: normal severity: normal status: open title: IDLE: raises ImportError when opening special modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 12:57:47 2020 From: report at bugs.python.org (E. Paine) Date: Sat, 27 Jun 2020 16:57:47 +0000 Subject: [issue41144] IDLE: raises ImportError when opening special modules In-Reply-To: <1593277028.54.0.214290317054.issue41144@roundup.psfhosted.org> Message-ID: <1593277067.6.0.541387204845.issue41144@roundup.psfhosted.org> Change by E. Paine : ---------- keywords: +patch pull_requests: +20338 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21182 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 12:58:10 2020 From: report at bugs.python.org (E. Paine) Date: Sat, 27 Jun 2020 16:58:10 +0000 Subject: [issue41144] IDLE: raises ImportError when opening special modules In-Reply-To: <1593277028.54.0.214290317054.issue41144@roundup.psfhosted.org> Message-ID: <1593277090.94.0.544734196805.issue41144@roundup.psfhosted.org> Change by E. Paine : ---------- assignee: -> terry.reedy components: +IDLE versions: +Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 13:47:20 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 27 Jun 2020 17:47:20 +0000 Subject: [issue41132] F-String parser uses raw allocator In-Reply-To: <1593204978.6.0.0616060148241.issue41132@roundup.psfhosted.org> Message-ID: <1593280040.23.0.625445344099.issue41132@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 6dcbc2422de9e2a7ff89a4689572d84001e230b2 by Lysandros Nikolaou in branch 'master': bpo-41132: Use pymalloc allocator in the f-string parser (GH-21173) https://github.com/python/cpython/commit/6dcbc2422de9e2a7ff89a4689572d84001e230b2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 14:11:37 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 27 Jun 2020 18:11:37 +0000 Subject: [issue41084] Signify that a SyntaxError comes from an fstring in the error message In-Reply-To: <1592870022.32.0.609883413471.issue41084@roundup.psfhosted.org> Message-ID: <1593281497.18.0.894302979203.issue41084@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Should we maybe backport this to 3.9 as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 14:17:08 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 27 Jun 2020 18:17:08 +0000 Subject: [issue41132] F-String parser uses raw allocator In-Reply-To: <1593204978.6.0.0616060148241.issue41132@roundup.psfhosted.org> Message-ID: <1593281828.25.0.60903115039.issue41132@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +20339 pull_request: https://github.com/python/cpython/pull/21183 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 14:26:33 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 27 Jun 2020 18:26:33 +0000 Subject: [issue41132] F-String parser uses raw allocator In-Reply-To: <1593204978.6.0.0616060148241.issue41132@roundup.psfhosted.org> Message-ID: <1593282393.39.0.563132738364.issue41132@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +20340 pull_request: https://github.com/python/cpython/pull/21184 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 14:27:40 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 27 Jun 2020 18:27:40 +0000 Subject: [issue41132] F-String parser uses raw allocator In-Reply-To: <1593204978.6.0.0616060148241.issue41132@roundup.psfhosted.org> Message-ID: <1593282460.26.0.567567067147.issue41132@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 14:31:42 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 27 Jun 2020 18:31:42 +0000 Subject: [issue41084] Signify that a SyntaxError comes from an fstring in the error message In-Reply-To: <1592870022.32.0.609883413471.issue41084@roundup.psfhosted.org> Message-ID: <1593282702.98.0.738699420472.issue41084@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I would say yes unless someone sees an obvious impediment ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 14:33:12 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 27 Jun 2020 18:33:12 +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: <1593282792.45.0.466205895312.issue40769@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset c8f29ad986f8274fc5fbf889bdd2a211878856b9 by Batuhan Taskaya in branch 'master': bpo-40769: Allow extra surrounding parentheses for invalid annotated assignment rule (GH-20387) https://github.com/python/cpython/commit/c8f29ad986f8274fc5fbf889bdd2a211878856b9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 14:35:21 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Jun 2020 18:35:21 +0000 Subject: [issue41132] F-String parser uses raw allocator In-Reply-To: <1593204978.6.0.0616060148241.issue41132@roundup.psfhosted.org> Message-ID: <1593282921.33.0.809827793408.issue41132@roundup.psfhosted.org> miss-islington added the comment: New changeset 5193d0a665eb0944faae9fb20e2062cea0dc02e7 by Lysandros Nikolaou in branch '3.9': [3.9] bpo-41132: Use pymalloc allocator in the f-string parser (GH-21173) (GH-21183) https://github.com/python/cpython/commit/5193d0a665eb0944faae9fb20e2062cea0dc02e7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 14:36:29 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 27 Jun 2020 18:36:29 +0000 Subject: [issue40967] asyncio.Task.all_tasks() and asyncio.Task.current_task() must be removed in 3.9 In-Reply-To: <1592045282.09.0.91488246101.issue40967@roundup.psfhosted.org> Message-ID: <1593282989.52.0.932292526008.issue40967@roundup.psfhosted.org> R?mi Lapeyre added the comment: With beta 4 coming in 2 days it would perhaps good to choose now whether this must be done for 3.9 or 3.10 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 14:41:14 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 27 Jun 2020 18:41:14 +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: <1593283274.09.0.498195255063.issue40769@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +20341 pull_request: https://github.com/python/cpython/pull/21186 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 14:43:44 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Jun 2020 18:43:44 +0000 Subject: [issue41132] F-String parser uses raw allocator In-Reply-To: <1593204978.6.0.0616060148241.issue41132@roundup.psfhosted.org> Message-ID: <1593283424.52.0.383864909089.issue41132@roundup.psfhosted.org> miss-islington added the comment: New changeset 749d3bc04177ff9e2ddfd58d919b84cb4f6cf894 by Lysandros Nikolaou in branch '3.8': [3.8] bpo-41132: Use pymalloc allocator in the f-string parser (GH-21173) (GH-21184) https://github.com/python/cpython/commit/749d3bc04177ff9e2ddfd58d919b84cb4f6cf894 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 15:18:02 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 27 Jun 2020 19:18:02 +0000 Subject: [issue41084] Signify that a SyntaxError comes from an fstring in the error message In-Reply-To: <1592870022.32.0.609883413471.issue41084@roundup.psfhosted.org> Message-ID: <1593285482.43.0.488023173615.issue41084@roundup.psfhosted.org> Eric V. Smith added the comment: AFAIK, we don't guarantee the stability of error messages, so I think backporting is fine. It's all the better that this is just prefixing something to an existing error message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 15:25:10 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Jun 2020 19:25:10 +0000 Subject: [issue41084] Signify that a SyntaxError comes from an fstring in the error message In-Reply-To: <1592870022.32.0.609883413471.issue41084@roundup.psfhosted.org> Message-ID: <1593285910.54.0.374268768982.issue41084@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +20342 pull_request: https://github.com/python/cpython/pull/21188 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 15:43:55 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Jun 2020 19:43:55 +0000 Subject: [issue41084] Signify that a SyntaxError comes from an fstring in the error message In-Reply-To: <1592870022.32.0.609883413471.issue41084@roundup.psfhosted.org> Message-ID: <1593287035.95.0.135128474978.issue41084@roundup.psfhosted.org> miss-islington added the comment: New changeset cb0dc52d37a5cc561ad39bc034afe7db9c461768 by Miss Islington (bot) in branch '3.9': bpo-41084: Adjust message when an f-string expression causes a SyntaxError (GH-21084) https://github.com/python/cpython/commit/cb0dc52d37a5cc561ad39bc034afe7db9c461768 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 17:08:44 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 27 Jun 2020 21:08:44 +0000 Subject: [issue31590] CSV module incorrectly treats escaped newlines as new records if unquoted In-Reply-To: <1506418099.9.0.80881309729.issue31590@psf.upfronthosting.co.za> Message-ID: <1593292124.02.0.29437438401.issue31590@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 Jun 27 18:42:51 2020 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Jun 2020 22:42:51 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1593297771.27.0.189675186711.issue1635741@roundup.psfhosted.org> Change by Roundup Robot : ---------- nosy: +python-dev nosy_count: 15.0 -> 16.0 pull_requests: +20343 pull_request: https://github.com/python/cpython/pull/21189 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 19:40:49 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 27 Jun 2020 23:40:49 +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: <1593301249.25.0.0990300560164.issue40769@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 102ca529ef5d45b9ef70a341705ddf2577914135 by Pablo Galindo in branch '3.9': [3.9] bpo-40769: Allow extra surrounding parentheses for invalid annotated assignment rule (GH-20387) (GH-21186) https://github.com/python/cpython/commit/102ca529ef5d45b9ef70a341705ddf2577914135 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 19:41:01 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 27 Jun 2020 23:41:01 +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: <1593301261.08.0.560360395713.issue40769@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 Sat Jun 27 19:41:52 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 27 Jun 2020 23:41:52 +0000 Subject: [issue41076] Pre-feed the parser with the f-string expression location In-Reply-To: <1592830444.28.0.715795634223.issue41076@roundup.psfhosted.org> Message-ID: <1593301312.05.0.647569254694.issue41076@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 1f0f4abb110b9fbade6175842b6a26ab0b8df6dd by Lysandros Nikolaou in branch 'master': bpo-41076: Pre-feed the parser with the f-string expression location (GH-21054) https://github.com/python/cpython/commit/1f0f4abb110b9fbade6175842b6a26ab0b8df6dd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 19:42:01 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Jun 2020 23:42:01 +0000 Subject: [issue41131] Augment random.choices() with the alias method In-Reply-To: <1593203921.14.0.316410898298.issue41131@roundup.psfhosted.org> Message-ID: <1593301321.83.0.249548575347.issue41131@roundup.psfhosted.org> Change by Raymond Hettinger : Added file: https://bugs.python.org/file49270/choices_proposal.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 19:42:12 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Jun 2020 23:42:12 +0000 Subject: [issue41131] Augment random.choices() with the alias method In-Reply-To: <1593203921.14.0.316410898298.issue41131@roundup.psfhosted.org> Message-ID: <1593301332.58.0.55634482476.issue41131@roundup.psfhosted.org> Change by Raymond Hettinger : Removed file: https://bugs.python.org/file49267/choices_proposal.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 19:44:41 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 27 Jun 2020 23:44:41 +0000 Subject: [issue41076] Pre-feed the parser with the f-string expression location In-Reply-To: <1592830444.28.0.715795634223.issue41076@roundup.psfhosted.org> Message-ID: <1593301481.97.0.852183784789.issue41076@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +20344 pull_request: https://github.com/python/cpython/pull/21190 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 20:15:35 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Jun 2020 00:15:35 +0000 Subject: [issue41076] Pre-feed the parser with the f-string expression location In-Reply-To: <1592830444.28.0.715795634223.issue41076@roundup.psfhosted.org> Message-ID: <1593303335.94.0.220882658715.issue41076@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset dab533d0ee067159812d4ea51f6fbbb1bd37d8b7 by Pablo Galindo in branch '3.9': [3.9] bpo-41076: Pre-feed the parser with the f-string expression location (GH-21054) (GH-21190) https://github.com/python/cpython/commit/dab533d0ee067159812d4ea51f6fbbb1bd37d8b7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 20:16:10 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 28 Jun 2020 00:16:10 +0000 Subject: [issue40967] asyncio.Task.all_tasks() and asyncio.Task.current_task() must be removed in 3.9 In-Reply-To: <1592045282.09.0.91488246101.issue40967@roundup.psfhosted.org> Message-ID: <1593303370.68.0.374947503185.issue40967@roundup.psfhosted.org> Kyle Stanley added the comment: > With beta 4 coming in 2 days it would perhaps good to choose now whether this must be done for 3.9 or 3.10 Agreed. I'm definitely leaning towards 3.10 with it being decently well into the beta, but I'll try to bring this to Yury's attention to make a final decision on the matter. Optimally, we want to do removals before the beta so that users can prepare accordingly rather than deal with breakage in the final release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 20:17:19 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 28 Jun 2020 00:17:19 +0000 Subject: [issue41076] Pre-feed the parser with the f-string expression location In-Reply-To: <1592830444.28.0.715795634223.issue41076@roundup.psfhosted.org> Message-ID: <1593303439.0.0.848016710413.issue41076@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 20:33:55 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 28 Jun 2020 00:33:55 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1593304435.97.0.665878363155.issue35975@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 9d197c7d48147a9ea2f7f7be917f35514a16524b by Guido van Rossum in branch 'master': bpo-35975: Only use cf_feature_version if PyCF_ONLY_AST in cf_flags (#21021) https://github.com/python/cpython/commit/9d197c7d48147a9ea2f7f7be917f35514a16524b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 20:34:33 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 28 Jun 2020 00:34:33 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1593304473.44.0.813807657424.issue35975@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 2a1ee1d970460047bd88da9638f8c1789431d9ab by Guido van Rossum in branch '3.9': [3.9] bpo-35975: Only use cf_feature_version if PyCF_ONLY_AST in cf_flags (#21022) https://github.com/python/cpython/commit/2a1ee1d970460047bd88da9638f8c1789431d9ab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 20:35:08 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 28 Jun 2020 00:35:08 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1593304508.62.0.606914041044.issue35975@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset e653369e76d7da6bcbcf1f09a141f47fb77df6c3 by Guido van Rossum in branch '3.8': [3.8] bpo-35975: Only use cf_feature_version if PyCF_ONLY_AST in cf_flags (#21023) https://github.com/python/cpython/commit/e653369e76d7da6bcbcf1f09a141f47fb77df6c3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 20:55:53 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Jun 2020 00:55:53 +0000 Subject: [issue39151] Simplify the deep-first-search of the assembler In-Reply-To: <1577591968.17.0.626428145875.issue39151@roundup.psfhosted.org> Message-ID: <1593305753.76.0.208856774873.issue39151@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 60eb9f1ab59a59ddf81d3da3513cfa3251169b5c by Pablo Galindo in branch 'master': bpo-39151: Simplify DFS in the assembler (GH-17733) https://github.com/python/cpython/commit/60eb9f1ab59a59ddf81d3da3513cfa3251169b5c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 20:56:02 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Jun 2020 00:56:02 +0000 Subject: [issue39151] Simplify the deep-first-search of the assembler In-Reply-To: <1577591968.17.0.626428145875.issue39151@roundup.psfhosted.org> Message-ID: <1593305762.81.0.75283508483.issue39151@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 Sat Jun 27 21:11:46 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Jun 2020 01:11:46 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1593306706.62.0.717455404336.issue38870@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 8df1016e2ef8c0a9f4d15bf7894c284295c99d9f by Batuhan Taskaya in branch 'master': bpo-38870: Extend subject of ast.unparse warnings (GH-21053) https://github.com/python/cpython/commit/8df1016e2ef8c0a9f4d15bf7894c284295c99d9f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 21:12:59 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Jun 2020 01:12:59 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1593306779.96.0.985079439537.issue38870@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +20345 pull_request: https://github.com/python/cpython/pull/21191 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 21:21:28 2020 From: report at bugs.python.org (Inada Naoki) Date: Sun, 28 Jun 2020 01:21:28 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593307288.21.0.378010145133.issue41123@roundup.psfhosted.org> Inada Naoki added the comment: APIs have /* Py_DEPRECATED(3.3) */ * PyUnicode_EncodeDecimal It is used in PyLong_FromUnicode. Deprecate in 3.10 and remove in 3.12 * PyUnicode_TransformDecimalToASCII While PEP 393 deprecate this too, its document doesn't has ``deprecated``. Deprecate in 3.10 and remove in 3.12 * _PyUnicode_ToLowercase, _PyUnicode_ToUppercase They are not deprecated by PEP 393, but #12736. Deprecate in 3.10 and remove in 3.12. On the other hand, _PyUnicode_ToTitlecase has Py_DEPRECATED. It can be removed in 3.10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 21:22:33 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Jun 2020 01:22:33 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1593307353.12.0.782854000398.issue38870@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 6e39999a246a019a356e1befcdfd3d54a52cb7b5 by Pablo Galindo in branch '3.9': [3.9] bpo-38870: Extend subject of ast.unparse warnings (GH-21053) (GH-21191) https://github.com/python/cpython/commit/6e39999a246a019a356e1befcdfd3d54a52cb7b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 21:37:00 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Jun 2020 01:37:00 +0000 Subject: [issue41144] IDLE: raises ImportError when opening special modules In-Reply-To: <1593277028.54.0.214290317054.issue41144@roundup.psfhosted.org> Message-ID: <1593308220.78.0.226392938586.issue41144@roundup.psfhosted.org> Terry J. Reedy added the comment: The problem is that there is no file os/path.py. When I try to load os.path, nothing happens, not even a "Module not found" message, as with idlelib.rrr, for instance. If I try 'os.pathx', I get "Error: __path__ attribute not found on 'os' while trying to find 'os.pathx'". A new test, without the patch, fails with ImportError: loader for ntpath cannot handle os.path I am going to assume that calling it with the module name is usually a good idea, so that adding a separate call without is a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 21:58:30 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Jun 2020 01:58:30 +0000 Subject: [issue31590] CSV module incorrectly treats escaped newlines as new records if unquoted In-Reply-To: <1506418099.9.0.80881309729.issue31590@psf.upfronthosting.co.za> Message-ID: <1593309510.82.0.387670946244.issue31590@roundup.psfhosted.org> Terry J. Reedy added the comment: Yes, the status quo won ;-). Sebastian, if you think a doc fix is still needed for current versions, please open a new issue with a specific suggestion and explanation for changing the 3.9 doc. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 27 23:06:02 2020 From: report at bugs.python.org (Inada Naoki) Date: Sun, 28 Jun 2020 03:06:02 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593313562.49.0.152503056424.issue41123@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +20346 pull_request: https://github.com/python/cpython/pull/21192 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 02:02:54 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Jun 2020 06:02:54 +0000 Subject: [issue41144] IDLE: raises ImportError when opening special modules In-Reply-To: <1593277028.54.0.214290317054.issue41144@roundup.psfhosted.org> Message-ID: <1593324174.02.0.614850318069.issue41144@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 8ab77c6f9fb6ef86af8f6b8722a2fcb37438edd0 by E-Paine in branch 'master': bpo-41144: Fix IDLE open module error (#21182) https://github.com/python/cpython/commit/8ab77c6f9fb6ef86af8f6b8722a2fcb37438edd0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 02:03:10 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Jun 2020 06:03:10 +0000 Subject: [issue41144] IDLE: raises ImportError when opening special modules In-Reply-To: <1593277028.54.0.214290317054.issue41144@roundup.psfhosted.org> Message-ID: <1593324190.66.0.589066453661.issue41144@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +20347 pull_request: https://github.com/python/cpython/pull/21193 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 02:03:21 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Jun 2020 06:03:21 +0000 Subject: [issue41144] IDLE: raises ImportError when opening special modules In-Reply-To: <1593277028.54.0.214290317054.issue41144@roundup.psfhosted.org> Message-ID: <1593324201.76.0.999472667513.issue41144@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20348 pull_request: https://github.com/python/cpython/pull/21194 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 02:20:19 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Jun 2020 06:20:19 +0000 Subject: [issue41144] IDLE: raises ImportError when opening special modules In-Reply-To: <1593277028.54.0.214290317054.issue41144@roundup.psfhosted.org> Message-ID: <1593325219.75.0.0964517111079.issue41144@roundup.psfhosted.org> miss-islington added the comment: New changeset 86ef6fe2b64360a1a55a913a09b12f0a80e8c06d by Miss Islington (bot) in branch '3.8': bpo-41144: Fix IDLE open module error (GH-21182) https://github.com/python/cpython/commit/86ef6fe2b64360a1a55a913a09b12f0a80e8c06d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 02:22:09 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Jun 2020 06:22:09 +0000 Subject: [issue41144] IDLE: raises ImportError when opening special modules In-Reply-To: <1593277028.54.0.214290317054.issue41144@roundup.psfhosted.org> Message-ID: <1593325329.14.0.120388945314.issue41144@roundup.psfhosted.org> miss-islington added the comment: New changeset 1497bf66f9b043e6db3801b1512cfbdeaaaa6650 by Miss Islington (bot) in branch '3.9': bpo-41144: Fix IDLE open module error (GH-21182) https://github.com/python/cpython/commit/1497bf66f9b043e6db3801b1512cfbdeaaaa6650 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 02:41:01 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 28 Jun 2020 06:41:01 +0000 Subject: [issue31082] reduce takes iterable, not just sequence In-Reply-To: <1501448787.5.0.80084797494.issue31082@psf.upfronthosting.co.za> Message-ID: <1593326461.69.0.641589678974.issue31082@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset cd3c2bdd5d53db7fe1d546543d32000070916552 by Zackery Spytz in branch 'master': bpo-31082: Use "iterable" in the docstring for functools.reduce() (GH-20796) https://github.com/python/cpython/commit/cd3c2bdd5d53db7fe1d546543d32000070916552 ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 02:41:38 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 28 Jun 2020 06:41:38 +0000 Subject: [issue31082] reduce takes iterable, not just sequence In-Reply-To: <1501448787.5.0.80084797494.issue31082@psf.upfronthosting.co.za> Message-ID: <1593326498.96.0.861760528893.issue31082@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 Sun Jun 28 02:43:47 2020 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sun, 28 Jun 2020 06:43:47 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1593326627.26.0.51729730806.issue29882@roundup.psfhosted.org> Vedran ?a?i? added the comment: Well, bit_sum is what it really is. But I agree it's a terrible name. :-) ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 02:49:26 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Jun 2020 06:49:26 +0000 Subject: [issue41144] IDLE: raises ImportError when opening special modules In-Reply-To: <1593277028.54.0.214290317054.issue41144@roundup.psfhosted.org> Message-ID: <1593326966.89.0.130917773397.issue41144@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 Sun Jun 28 02:51:00 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Jun 2020 06:51:00 +0000 Subject: [issue41144] IDLE: make Load Module load os.path (posixpath.py, ntpath.py) In-Reply-To: <1593277028.54.0.214290317054.issue41144@roundup.psfhosted.org> Message-ID: <1593327060.79.0.240616708813.issue41144@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: IDLE: raises ImportError when opening special modules -> IDLE: make Load Module load os.path (posixpath.py, ntpath.py) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 02:52:49 2020 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Jun 2020 06:52:49 +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: <1593327169.43.0.316402132071.issue24048@roundup.psfhosted.org> Nick Coghlan added the comment: Belatedly marking this as resolved. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 03:11:08 2020 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Jun 2020 07:11:08 +0000 Subject: [issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds In-Reply-To: <1491349378.03.0.0671954460373.issue29988@psf.upfronthosting.co.za> Message-ID: <1593328268.52.0.567286693912.issue29988@roundup.psfhosted.org> Nick Coghlan added the comment: Belatedly clearing the issue assignment here - while I do still sometimes ponder this problem, I haven't been actively working on it since the 2017 core sprint where Greg & I made our last serious attempt at trying to improve the situation. Mark's PR at https://github.com/python/cpython/pull/18334 looks very promising to me, though - my main request was just to bring over the tests I wrote at the 2017 core dev sprints, and confirm that the revised eval breaker logic solves the issue. ---------- assignee: ncoghlan -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 03:15:42 2020 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Jun 2020 07:15:42 +0000 Subject: [issue17490] Improve ast.literal_eval test suite coverage In-Reply-To: <1363746875.32.0.0832947039866.issue17490@psf.upfronthosting.co.za> Message-ID: <1593328542.0.0.177716106309.issue17490@roundup.psfhosted.org> Nick Coghlan added the comment: Belatedly removing the issue assignment here, as I'm not actively working on this. I've also marked this as an easy newcomer friendly task, as all that's involved is taking the `test_ast.py` changes from https://bugs.python.org/file29520/issue17490_ast_literal_eval_converters.diff and turning them into a test suite PR on GitHub. ---------- assignee: ncoghlan -> keywords: +easy, newcomer friendly -patch stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 03:17:16 2020 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Jun 2020 07:17:16 +0000 Subject: [issue31898] Add a `recommended-packages.txt` file In-Reply-To: <1509340647.27.0.213398074469.issue31898@psf.upfronthosting.co.za> Message-ID: <1593328636.2.0.682486785901.issue31898@roundup.psfhosted.org> Nick Coghlan added the comment: Removing the issue assignment, as I'm not actively working on this (although I still think it's a reasonable idea). ---------- assignee: ncoghlan -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 03:17:27 2020 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Jun 2020 07:17:27 +0000 Subject: [issue31899] Ensure backwards compatibility with recommended packages In-Reply-To: <1509340997.49.0.213398074469.issue31899@psf.upfronthosting.co.za> Message-ID: <1593328647.75.0.228499756511.issue31899@roundup.psfhosted.org> Nick Coghlan added the comment: Removing the issue assignment, as I'm not actively working on this (although I still think it's a reasonable idea). ---------- assignee: ncoghlan -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 03:27:33 2020 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Jun 2020 07:27:33 +0000 Subject: [issue34206] Move and clarify Py_Main documentation In-Reply-To: <1532439469.19.0.56676864532.issue34206@psf.upfronthosting.co.za> Message-ID: <1593329253.06.0.515628912476.issue34206@roundup.psfhosted.org> Nick Coghlan added the comment: Adjusted target versions, as I never previously got around to merging this PR. ---------- versions: +Python 3.10, Python 3.9 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 03:32:56 2020 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Jun 2020 07:32:56 +0000 Subject: [issue34206] Move and clarify Py_Main documentation In-Reply-To: <1532439469.19.0.56676864532.issue34206@psf.upfronthosting.co.za> Message-ID: <1593329576.33.0.950333623401.issue34206@roundup.psfhosted.org> Nick Coghlan added the comment: Added 3.8 back in to the target versions. However, if the automatic backport doesn't work for that branch, I'll probably skip it rather than fixing any conflicts. ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 03:34:02 2020 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Jun 2020 07:34:02 +0000 Subject: [issue30672] PEP 538: Unexpected locale behaviour on *BSD (including Mac OS X) In-Reply-To: <1497518633.36.0.998856107706.issue30672@psf.upfronthosting.co.za> Message-ID: <1593329642.23.0.628547314831.issue30672@roundup.psfhosted.org> Nick Coghlan added the comment: Removing issue assignment, as I'm not actively investigating this. ---------- assignee: ncoghlan -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 03:34:48 2020 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Jun 2020 07:34:48 +0000 Subject: [issue32002] test_c_locale_coercion fails when the default LC_CTYPE != "C" In-Reply-To: <1510310872.23.0.213398074469.issue32002@psf.upfronthosting.co.za> Message-ID: <1593329688.41.0.90720206279.issue32002@roundup.psfhosted.org> Nick Coghlan added the comment: Removing issue assignment, as I'm no longer actively investigating this. ---------- assignee: ncoghlan -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 04:28:26 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Jun 2020 08:28:26 +0000 Subject: [issue33553] Documentation improvement proposal for multiprocessing In-Reply-To: <1526541318.79.0.682650639539.issue33553@psf.upfronthosting.co.za> Message-ID: <1593332906.92.0.471185681234.issue33553@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 04:58:17 2020 From: report at bugs.python.org (Gustavo J. A. M. Carneiro) Date: Sun, 28 Jun 2020 08:58:17 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> Message-ID: <1593334697.73.0.432217537188.issue41111@roundup.psfhosted.org> Change by Gustavo J. A. M. Carneiro : ---------- nosy: +gustavo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 05:35:18 2020 From: report at bugs.python.org (Rahul Jha) Date: Sun, 28 Jun 2020 09:35:18 +0000 Subject: [issue17490] Improve ast.literal_eval test suite coverage In-Reply-To: <1363746875.32.0.0832947039866.issue17490@psf.upfronthosting.co.za> Message-ID: <1593336918.29.0.723729680724.issue17490@roundup.psfhosted.org> Rahul Jha added the comment: Nick, hello! I'd like to take it onwards from here. ---------- nosy: +RJ722 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 05:43:38 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Jun 2020 09:43:38 +0000 Subject: [issue41142] msilib.CAB doesnot support non-ASCII files In-Reply-To: <1593270116.07.0.608480331512.issue41142@roundup.psfhosted.org> Message-ID: <1593337418.19.0.309004908369.issue41142@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +20349 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21195 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 05:43:33 2020 From: report at bugs.python.org (Guillaume Gauvrit) Date: Sun, 28 Jun 2020 09:43:33 +0000 Subject: [issue41145] EmailMessage.as_string is altering the message state and actually fix bugs Message-ID: <1593337413.31.0.292797380525.issue41145@roundup.psfhosted.org> New submission from Guillaume Gauvrit : I am currently refactoring code and use the EmailMessage api to build message. I encountered weird behavior while building an email. The `as_string()` method is fixing the `make_alternative` method. So, to me their is two bug here: a `as_string` method should not mutate internal state, and the `make_alternative` should create a correct internal state. It may be resume in the following program: ``` ? python Python 3.8.3 (default, May 17 2020, 18:15:42) [GCC 10.1.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import email >>> from email.message import EmailMessage, MIMEPart >>> >>> msg = EmailMessage() >>> msg.make_alternative() >>> print(msg.get_boundary()) None >>> print(msg._headers) [('Content-Type', 'multipart/alternative')] >>> _ = msg.as_string() >>> print(msg.get_boundary()) ===============3171625413581695247== >>> print(msg._headers) [('Content-Type', 'multipart/alternative; boundary="===============3171625413581695247=="')] ``` ---------- files: bug.py messages: 372508 nosy: mardiros priority: normal severity: normal status: open title: EmailMessage.as_string is altering the message state and actually fix bugs type: resource usage versions: Python 3.7, Python 3.8 Added file: https://bugs.python.org/file49271/bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 06:34:29 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Jun 2020 10:34:29 +0000 Subject: [issue41138] trace CLI reads source files using the locale encoding In-Reply-To: <1593255002.94.0.166052202636.issue41138@roundup.psfhosted.org> Message-ID: <1593340469.05.0.0215166050158.issue41138@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 04cdeb7a5617c48102f45b965e683b12cdf934f8 by Serhiy Storchaka in branch 'master': bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177) https://github.com/python/cpython/commit/04cdeb7a5617c48102f45b965e683b12cdf934f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 06:34:39 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Jun 2020 10:34:39 +0000 Subject: [issue41138] trace CLI reads source files using the locale encoding In-Reply-To: <1593255002.94.0.166052202636.issue41138@roundup.psfhosted.org> Message-ID: <1593340479.14.0.876678713851.issue41138@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +20350 pull_request: https://github.com/python/cpython/pull/21196 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 06:52:29 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Jun 2020 10:52:29 +0000 Subject: [issue41138] trace CLI reads source files using the locale encoding In-Reply-To: <1593255002.94.0.166052202636.issue41138@roundup.psfhosted.org> Message-ID: <1593341549.38.0.967311275166.issue41138@roundup.psfhosted.org> miss-islington added the comment: New changeset d1e05e78a3995fd7e5a79c5c6e4c8160aa48af22 by Miss Islington (bot) in branch '3.9': bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177) https://github.com/python/cpython/commit/d1e05e78a3995fd7e5a79c5c6e4c8160aa48af22 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 07:00:43 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Jun 2020 11:00:43 +0000 Subject: [issue41146] Convert signal.default_int_handler() to Argument Clinic Message-ID: <1593342043.08.0.492755229257.issue41146@roundup.psfhosted.org> New submission from Serhiy Storchaka : It adds a signature to signal.default_int_handler(). ---------- components: Argument Clinic, Extension Modules messages: 372511 nosy: larry, serhiy.storchaka priority: normal severity: normal status: open title: Convert signal.default_int_handler() to Argument Clinic type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 07:01:34 2020 From: report at bugs.python.org (Rahul Jha) Date: Sun, 28 Jun 2020 11:01:34 +0000 Subject: [issue17490] Improve ast.literal_eval test suite coverage In-Reply-To: <1363746875.32.0.0832947039866.issue17490@psf.upfronthosting.co.za> Message-ID: <1593342094.3.0.0704083813292.issue17490@roundup.psfhosted.org> Rahul Jha added the comment: Some of the test cases from Nick's patch are not passing on master: ast.literal_eval('') # raises SyntaxError; expected: ValueError ast.literal_eval('6j--3') # expected: 3+6j ast.literal_eval('(2j+4j)+(1+2)') # expected: 3+6j ast.literal_eval('(2j+4j)-(1+2)') # expected: -3+6j I'm assuming that new changes in ast.py do not allow for these. Can anyone confirm that this is indeed the case, and not a bug with literal_eval? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 07:01:49 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Jun 2020 11:01:49 +0000 Subject: [issue41146] Convert signal.default_int_handler() to Argument Clinic In-Reply-To: <1593342043.08.0.492755229257.issue41146@roundup.psfhosted.org> Message-ID: <1593342109.24.0.881446375371.issue41146@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +20351 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21197 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 07:04:39 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Jun 2020 11:04:39 +0000 Subject: [issue23325] Turn SIG_DFL and SIG_IGN into functions In-Reply-To: <1422304710.21.0.213579052731.issue23325@psf.upfronthosting.co.za> Message-ID: <1593342279.71.0.292227886678.issue23325@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 08:01:20 2020 From: report at bugs.python.org (Rahul Jha) Date: Sun, 28 Jun 2020 12:01:20 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1593345680.54.0.834325019843.issue19335@roundup.psfhosted.org> Change by Rahul Jha : ---------- nosy: +RJ722 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 08:27:34 2020 From: report at bugs.python.org (Peter Law) Date: Sun, 28 Jun 2020 12:27:34 +0000 Subject: [issue41147] Document that redirect_std{out, err} yield the new stream as the context variable Message-ID: <1593347254.67.0.116081162021.issue41147@roundup.psfhosted.org> New submission from Peter Law : In `contextlib`, `_RedirectStream` (the class behind `redirect_stdout` and `redirect_stderr`) returns the current stream target as its context variable, which allows code like this: ``` python with redirect_stdout(io.StringIO()) as buffer: do_stuff() use(buffer.getvalue()) ``` where you capture the redirected stream without a separate line to declare the variable. This isn't documented (See https://docs.python.org/3/library/contextlib.html#contextlib.redirect_stdout), yet is potentially useful. Unless there's a reason that this isn't documented, I propose that the documentation be modified to include it. Aside: After initially reporting this against the typeshed (https://github.com/python/typeshed/issues/4283) I'm also working on a PR to the typeshed to include this there. ---------- assignee: docs at python components: Documentation messages: 372513 nosy: PeterJCLaw, docs at python priority: normal severity: normal status: open title: Document that redirect_std{out,err} yield the new stream as the context variable type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 08:43:09 2020 From: report at bugs.python.org (Peter Law) Date: Sun, 28 Jun 2020 12:43:09 +0000 Subject: [issue41147] Document that redirect_std{out, err} yield the new stream as the context variable In-Reply-To: <1593347254.67.0.116081162021.issue41147@roundup.psfhosted.org> Message-ID: <1593348189.32.0.146334776349.issue41147@roundup.psfhosted.org> Change by Peter Law : ---------- keywords: +patch pull_requests: +20352 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21199 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 08:47:18 2020 From: report at bugs.python.org (Ravi Teja P) Date: Sun, 28 Jun 2020 12:47:18 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1593348438.05.0.210086487697.issue41004@roundup.psfhosted.org> Ravi Teja P added the comment: Hi My CLA has been approved. Can someone review the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 08:53:10 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Jun 2020 12:53:10 +0000 Subject: [issue41138] trace CLI reads source files using the locale encoding In-Reply-To: <1593255002.94.0.166052202636.issue41138@roundup.psfhosted.org> Message-ID: <1593348790.39.0.335988099538.issue41138@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +20354 pull_request: https://github.com/python/cpython/pull/21200 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 09:01:56 2020 From: report at bugs.python.org (Ned Deily) Date: Sun, 28 Jun 2020 13:01:56 +0000 Subject: [issue41068] zipfile: read after write fails for non-ascii files In-Reply-To: <1592770084.24.0.0586983888963.issue41068@roundup.psfhosted.org> Message-ID: <1593349316.71.0.227198174041.issue41068@roundup.psfhosted.org> Change by Ned Deily : ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 09:02:39 2020 From: report at bugs.python.org (Ned Deily) Date: Sun, 28 Jun 2020 13:02:39 +0000 Subject: [issue41058] pdb reads source files using the locale encoding In-Reply-To: <1592675653.2.0.61878894167.issue41058@roundup.psfhosted.org> Message-ID: <1593349359.82.0.723761650473.issue41058@roundup.psfhosted.org> Change by Ned Deily : ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 09:48:27 2020 From: report at bugs.python.org (Tal Einat) Date: Sun, 28 Jun 2020 13:48:27 +0000 Subject: [issue37706] IDLE: fix sidebar click-drag bug and macOS test failures In-Reply-To: <1564411299.35.0.364998769852.issue37706@roundup.psfhosted.org> Message-ID: <1593352107.06.0.80812314519.issue37706@roundup.psfhosted.org> Tal Einat added the comment: I had been running the GUI tests, apparently until the change Ned mentioned whereby they are only run on framework builds of Python. With Ned's help, I've finally managed to create a framework build on macOS where the GUI tests run properly. Indeed, running test_tk without such a build causes it to be skipped. With a framework build and -ugui (or -uall), test_tk runs (and fails!). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 09:52:18 2020 From: report at bugs.python.org (Tal Einat) Date: Sun, 28 Jun 2020 13:52:18 +0000 Subject: [issue37706] IDLE: fix sidebar click-drag bug and macOS test failures In-Reply-To: <1564411299.35.0.364998769852.issue37706@roundup.psfhosted.org> Message-ID: <1593352338.51.0.717262603903.issue37706@roundup.psfhosted.org> Tal Einat added the comment: While we're on the topic, it seems wise to have our macOS buildbot workers create proper framework builds and run the GUI tests, if possible. We should also try to get a macOS 10.15 ("Catalina") machine into our buildbot fleet. Perhaps there's a company with macOS machines that would be willing to run one? Ned, would you like to bring this up on the buildbots mailing list, or should I? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 10:06:12 2020 From: report at bugs.python.org (Ned Deily) Date: Sun, 28 Jun 2020 14:06:12 +0000 Subject: [issue37706] IDLE: fix sidebar click-drag bug and macOS test failures In-Reply-To: <1564411299.35.0.364998769852.issue37706@roundup.psfhosted.org> Message-ID: <1593353172.62.0.23488421805.issue37706@roundup.psfhosted.org> Ned Deily added the comment: Running the GUI test on macOS buildbots is not straightforward, AFAIK. We'd need to have either the console logged in to the username that the tests are running under or, better, the buildbot would need to run in a virtual machine. We have had a chronic shortage of macOS buildbots anyway. Plus the automated tests aren't all that good at finding the nasty problems that pop up in the intersection of the user, IDLE, and macOS Tk; at the moment, there's no substitute for manual testing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 10:30:12 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Jun 2020 14:30:12 +0000 Subject: [issue41138] trace CLI reads source files using the locale encoding In-Reply-To: <1593255002.94.0.166052202636.issue41138@roundup.psfhosted.org> Message-ID: <1593354612.1.0.265336266954.issue41138@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset cb53b8ce9c8660465b816f4d577720305b1283fa by Serhiy Storchaka in branch '3.8': [3.8] bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177) (GH-21200) https://github.com/python/cpython/commit/cb53b8ce9c8660465b816f4d577720305b1283fa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 11:26:32 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Jun 2020 15:26:32 +0000 Subject: [issue41148] IDLE uses the locale encoding for config files Message-ID: <1593357992.42.0.986776175737.issue41148@roundup.psfhosted.org> New submission from Serhiy Storchaka : IDLE uses the locale encoding for reading and writing config files. Default config files are ASCII-only, but if user config files contain non-ASCII data, it makes them non-portable and depending on the environment of IDLE. Could they contain file paths? If yes, then not all file paths can be saved. In any case it is better to use a fixed encoding for config files (ASCII or UTF-8). ---------- assignee: terry.reedy components: IDLE messages: 372520 nosy: serhiy.storchaka, taleinat, terry.reedy priority: normal severity: normal status: open title: IDLE uses the locale encoding for config files _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 12:01:04 2020 From: report at bugs.python.org (Barney Stratford) Date: Sun, 28 Jun 2020 16:01:04 +0000 Subject: [issue41149] Threads can fail to start Message-ID: <1593360064.64.0.828598087215.issue41149@roundup.psfhosted.org> New submission from Barney Stratford : >>> import threading >>> class foo (object): ... def __bool__ (self): ... return False ... def __call__ (self): ... print ("Running") ... >>> threading.Thread (target = foo ()).start () The expected result of these commands would be for the thread to print "Running". However, in actual fact it prints nothing at all. This is because threading.Thread.run only runs the target if it is True as a boolean. This is presumably to make the thread do nothing at all if the target is None. In this case, I have a legitimate target that is False as a boolean. I propose to remove the test altogether. The effect of this is that failure to set the target of the thread, or setting a non-callable target, will cause the thread to raise a TypeError as soon as it is started. Forgetting to set the target is in almost every case a bug, and bugs should never be silent. PR to follow. ---------- components: Library (Lib) messages: 372521 nosy: BarneyStratford priority: normal severity: normal status: open title: Threads can fail to start type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 12:01:16 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Jun 2020 16:01:16 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1593360076.99.0.674746864696.issue19335@roundup.psfhosted.org> Terry J. Reedy added the comment: Pablo and Lysandros: this issue is about a corner-case bug in either compile(,,'single') or its use by REPL and codeop._maybe_compile (comc). What do either of you think? Can the new parser handle it better? Should we just add the hack suggested by Nick in msg200936 or is there a better solution? Is interactive mode python calling compile() differently? Or is it doing a check that could be incorporated into compile? (Perhap after correction, see below.) The issue above is about interactive entry of def a(): def b(): nonlocal c REPL does not raise SyntaxError, comc does. Not raising is correct here because additional lines added to the nonlocal context may make the code valid. Additional experiment: the same is true (comc raises, REPL not) for def a(): nonlocal c Here, REPL not raising (until a blank is entered) could be considered a glitch because there is no pending nonlocal context to be completed. Though raising later than necessary is better than raising too soon. Nick's hack (and the REPL) could check that there are at least 2 pending indents. When the new parser compiles a function, does it know or could it know whether it is nested? It should in that the legal grammer (use of nonlocal) is different. ---------- nosy: +lys.nikolaou, pablogsal versions: +Python 3.10 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 12:09:14 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Jun 2020 16:09:14 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1593360554.3.0.602704953385.issue19335@roundup.psfhosted.org> Terry J. Reedy added the comment: Note: Recently in #40807, Cheryl and I patched codeop._maybecompile to only emits warnings once in a given call. I don't know if 3 calls (2 '\n' additions) to compile are really needed today. The logic that handles the results is not clear to me either. It could stand review by compile() experts. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 12:22:22 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Jun 2020 16:22:22 +0000 Subject: [issue41150] pipes uses text files and the locale encodig Message-ID: <1593361342.8.0.644791868441.issue41150@roundup.psfhosted.org> New submission from Serhiy Storchaka : The pipes module was designed as a Python interface to Unix shell pipelines. In Python 2 it works with binary streams (on Unix). But in Python 3 it opens all files and pipes in text mode with the locale encoding. It makes it unapplicable for processing binary data and text data non-encodable with the locale encoding. ---------- components: Library (Lib) messages: 372524 nosy: serhiy.storchaka priority: normal severity: normal status: open title: pipes uses text files and the locale encodig type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 12:23:08 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Jun 2020 16:23:08 +0000 Subject: [issue41063] Avoid using the locale encoding for open() in tests In-Reply-To: <1592737455.62.0.0102457706835.issue41063@roundup.psfhosted.org> Message-ID: <1593361388.65.0.294202791278.issue41063@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- dependencies: +pipes uses text files and the locale encodig _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 12:41:15 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Jun 2020 16:41:15 +0000 Subject: [issue37706] IDLE: fix sidebar click-drag bug and macOS test failures In-Reply-To: <1564411299.35.0.364998769852.issue37706@roundup.psfhosted.org> Message-ID: <1593362475.82.0.0823857563267.issue37706@roundup.psfhosted.org> Terry J. Reedy added the comment: The htests are for manual testing and they include one for sidebar, with instructions to click and drag. We just need to remember to run them occasionally on the various systems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 13:04:03 2020 From: report at bugs.python.org (Nathaniel Smith) Date: Sun, 28 Jun 2020 17:04:03 +0000 Subject: [issue41151] Support for new Windows pseudoterminals in the subprocess module Message-ID: <1593363843.17.0.163145949347.issue41151@roundup.psfhosted.org> New submission from Nathaniel Smith : So Windows finally has pty support: https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/ However, the API is a bit weird. Unlike Unix, when you create a Windows pty, there's no way to directly get access to the "slave" handle. Instead, you first call CreatePseudoConsole to get a special "HPCON" object, which is similar to a Unix pty master. And then you can have to use a special CreateProcess incantation to spawn a child process that's attached to our pty. Specifically, what you have to do is set a special entry in the "lpAttributeList", with type "PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE". Details: https://docs.microsoft.com/en-us/windows/console/creating-a-pseudoconsole-session Unfortunately, the subprocess module does not provide any way to pass arbitrary attributes through lpAttributeList, which means that it's currently impossible to use pty support on Windows without reimplementing the whole subprocess module. It would be nice if the subprocess module could somehow support this. Off the top of my head, I can think of three possible APIs: Option 1: full support for Windows ptys: this would require wrapping CreatePseudoConsole, providing some object to represent a Windows pty, etc. This is fairly complex (especially since CreatePseudoConsole requires you to pass in some pipe handles, and the user might want to create those themselves). Option 2: minimal support for Windows ptys: add another supported field to the subprocess module's lpAttributeList wrapper, that lets the user pass in an "HPCON" cast to a Python integer, and stuffs it into the attribute list. This would require users to do all the work to actually *get* the HPCON object, but at least it would make ptys possible to use. Option 3: generic support for unrecognized lpAttributeList entries: add a field to the subprocess module's lpAttributeList wrapper that lets you add arbitrary entries, specified by type number + arbitrary pointer/chunk of bytes. (Similar to how Python's ioctl or setsockopt wrappers work.) Annoyingly, it doesn't seem to be enough to just pass in a buffer object, because for pseudoconsole support, you actually have to pass in an opaque "HPCON" object directly. (This is kind of weird, and might even be a bug, see: https://github.com/microsoft/terminal/issues/6705) ---------- messages: 372526 nosy: giampaolo.rodola, gregory.p.smith, njs priority: normal severity: normal status: open title: Support for new Windows pseudoterminals in the subprocess module type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 13:06:57 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 28 Jun 2020 17:06:57 +0000 Subject: [issue41151] Support for new Windows pseudoterminals in the subprocess module In-Reply-To: <1593363843.17.0.163145949347.issue41151@roundup.psfhosted.org> Message-ID: <1593364017.27.0.374822945931.issue41151@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 13:56:42 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Jun 2020 17:56:42 +0000 Subject: [issue41152] IDLE: revise setting of iomenu.encoding and .errors Message-ID: <1593367002.84.0.77588386021.issue41152@roundup.psfhosted.org> New submission from Terry J. Reedy : When testing and on Windows, iomenu.encoding and .errors are set to utf-8 and surrogateescape*. When running otherwise, these are set with baroque code I don't understand. (Currently lines 31 to 61.) 1. Combine the two conditional statements for testing and Windows. 2. Ned, on my Catalina Macbook, the 30-line 'else' sections sets encoding, errors to 'utf-8', 'strict'. Should there ever be any other result on Mac we care about? If not, I would like to directly set them, as on Windows. 3. Serhiy, does the 'baroque code' look right to you, for Linux (or *nix in general)? ---------- assignee: terry.reedy components: IDLE messages: 372527 nosy: ned.deily, serhiy.storchaka, taleinat, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: revise setting of iomenu.encoding and .errors type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 14:10:28 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Jun 2020 18:10:28 +0000 Subject: [issue41152] IDLE: revise setting of iomenu.encoding and .errors In-Reply-To: <1593367002.84.0.77588386021.issue41152@roundup.psfhosted.org> Message-ID: <1593367828.53.0.38285694922.issue41152@roundup.psfhosted.org> Serhiy Storchaka added the comment: I think it makes sense if we want to use the locale encoding for IO streams. But on other hand, it may be worth to drop support of locale-depending and configurable IO encoding and always use UTF-8. It is the IO encoding always used on Windows and the encoding of most locales on modern Linux and macOS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 15:15:08 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Jun 2020 19:15:08 +0000 Subject: [issue41148] IDLE uses the locale encoding for config files In-Reply-To: <1593357992.42.0.986776175737.issue41148@roundup.psfhosted.org> Message-ID: <1593371708.36.0.660098958981.issue41148@roundup.psfhosted.org> Terry J. Reedy added the comment: I opened # 41152 to revise the iomenu code setting encoding and errors. The encoding is always 'utf-8' when testing and running on Windows and, I believe, macOS. So that and this issues are about finding and using locale on *nix, and would require testing on *nix. Serhiy, I notice that you have been fixing similar issues for other modules. I have been meaning to ask you to help us review the multiple uses of iomenu.encoding throughout IDLE, so thanks for opening this ;-). It seems to me that all encoded text within IDLE and through any inter-process streams should be utf-8. I particular, when you and I last revised the interprocess file classes, in run.py, we left the encoding and errors parameters to set from the iomenu values. (The 'utf-8' and 'strict' defaults are never used. Since user code can print any unicode, I think the encoding just be set to utf-8 to transparently pass on and possibly display anything the user sends. Such a change should have no back-compatibility issues. Agreed? All filenames entered and displayed within IDLE are unicode and hence utf8-encodable. And they *can* appear in any of the .idlerc config-xyz.cfg files and in breakpoints.lst and recent-files.lst. So they *should* be saved in utf-8, though in the absence of visible issues, doing so seems like a low priority. Problem 1 is that users can and do edit these files, and may even add one, and they might not save in utf8. We could add a comment "# If this file has non-ascii, save in utf-8." (and try reading with the locale encoding if reading with utf-8 fails). Problem 2 is that if these files are shared across releases. If one currently has non-ascii written in non-utf8 by existing IDLE, and new IDLE rewrites in utf8, then existing IDLE will not be able to read the file. The best solution I can think of is to break user-config compatibility with the past, such as by switching to '.idle3rc'. If and when we do this, I would want to change other things, such as a few defaults. So not in 3.9, maybe in 3.10. There would need to be enough payoff for the pain. I believe all other text files, which users do not edit, are already ascii or utf-8, and any new files we add that could have non-ascii should be read as utf-8. ---------- stage: -> test needed type: -> enhancement versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 15:37:54 2020 From: report at bugs.python.org (Stefan Krah) Date: Sun, 28 Jun 2020 19:37:54 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593373074.34.0.0241356357421.issue40874@roundup.psfhosted.org> Change by Stefan Krah : ---------- pull_requests: +20355 pull_request: https://github.com/python/cpython/pull/21202 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 15:59:39 2020 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Jun 2020 19:59:39 +0000 Subject: [issue41149] Threads can fail to start In-Reply-To: <1593360064.64.0.828598087215.issue41149@roundup.psfhosted.org> Message-ID: <1593374379.37.0.820586294047.issue41149@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +20356 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21201 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 16:01:10 2020 From: report at bugs.python.org (Stefan Krah) Date: Sun, 28 Jun 2020 20:01:10 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593374470.67.0.404322297964.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: New changeset 8bea91b5e9ea07ca93958e131b436024f0b1b1cf by Stefan Krah in branch 'master': bpo-40874 Update the required libmpdec version for the decimal module (GH-21202) https://github.com/python/cpython/commit/8bea91b5e9ea07ca93958e131b436024f0b1b1cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 16:03:15 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Jun 2020 20:03:15 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593374595.02.0.696256541542.issue40874@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20357 pull_request: https://github.com/python/cpython/pull/21203 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 16:06:57 2020 From: report at bugs.python.org (paul j3) Date: Sun, 28 Jun 2020 20:06:57 +0000 Subject: [issue41136] argparse uses default encoding when read arguments from file In-Reply-To: <1593242027.84.0.221105259078.issue41136@roundup.psfhosted.org> Message-ID: <1593374817.15.0.343054042949.issue41136@roundup.psfhosted.org> Change by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 16:16:57 2020 From: report at bugs.python.org (William Pickard) Date: Sun, 28 Jun 2020 20:16:57 +0000 Subject: [issue41153] [easy Doc] "PyPreConfig_InitIsolatedConfig" and "PyPreConfig_InitPythonConfig" are given opposite documentation. Message-ID: <1593375417.17.0.026489399384.issue41153@roundup.psfhosted.org> New submission from William Pickard : The initconfig API functions "PyPreConfig_InitPythonConfig" and "PyPreConfig_InitIsolatedConfig" are mistakenly documented for the other method. ---------- assignee: docs at python components: Documentation messages: 372531 nosy: WildCard65, docs at python priority: normal pull_requests: 20358 severity: normal status: open title: [easy Doc] "PyPreConfig_InitIsolatedConfig" and "PyPreConfig_InitPythonConfig" are given opposite documentation. type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 16:18:35 2020 From: report at bugs.python.org (William Pickard) Date: Sun, 28 Jun 2020 20:18:35 +0000 Subject: [issue41153] [easy Doc] "PyPreConfig_InitIsolatedConfig" and "PyPreConfig_InitPythonConfig" are given the opposite's documentation. In-Reply-To: <1593375417.17.0.026489399384.issue41153@roundup.psfhosted.org> Message-ID: <1593375515.62.0.84684728802.issue41153@roundup.psfhosted.org> Change by William Pickard : ---------- title: [easy Doc] "PyPreConfig_InitIsolatedConfig" and "PyPreConfig_InitPythonConfig" are given opposite documentation. -> [easy Doc] "PyPreConfig_InitIsolatedConfig" and "PyPreConfig_InitPythonConfig" are given the opposite's documentation. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 16:25:05 2020 From: report at bugs.python.org (Stefan Krah) Date: Sun, 28 Jun 2020 20:25:05 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593375905.12.0.156713948547.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: New changeset 119de0eba839993cf6a909dba5d60202ad5566d6 by Miss Islington (bot) in branch '3.9': bpo-40874 Update the required libmpdec version for the decimal module (GH-21202) https://github.com/python/cpython/commit/119de0eba839993cf6a909dba5d60202ad5566d6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 16:29:10 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Jun 2020 20:29:10 +0000 Subject: [issue41148] IDLE uses the locale encoding for config files In-Reply-To: <1593357992.42.0.986776175737.issue41148@roundup.psfhosted.org> Message-ID: <1593376150.13.0.678353080041.issue41148@roundup.psfhosted.org> Terry J. Reedy added the comment: After writing the above, I discovered that IDLE *itself* does not use any particular encoding for config files. Its configparser.Configparser subclasses load function calls .read(filename), which in turn calls open(filename, encoding=None), which calls locale.getpreferredencoding(). For me, this is cp1252. (Changing the console codepage with chcp or the process locale with setlocale don't change this. Something else might.) So this issue currently has nothing to do with iomenu.encoding. Rather it is a proposal that IDLE explicitly pass a locale, in particular 'utf-8'. This has the same issues given above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 17:14:26 2020 From: report at bugs.python.org (Stefan Krah) Date: Sun, 28 Jun 2020 21:14:26 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593378866.97.0.84694093088.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: A very brief guide for all users of --with-system-libmpdec: Python 3.7 and Python 3.8 both require the release with this sha256sum: 83c628b90f009470981cf084c5418329c88b19835d8af3691b930afccb7d79c7 mpdecimal-2.4.2.tar.gz Python 3.9 requires the release with this sha256sum: 15417edc8e12a57d1d9d75fa7e3f22b158a3b98f44db9d694cfd2acde8dfa0ca mpdecimal-2.5.0.tar.gz ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 17:36:05 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 28 Jun 2020 21:36:05 +0000 Subject: [issue27154] Regression in file.writelines behavior In-Reply-To: <1464543679.71.0.415502254928.issue27154@psf.upfronthosting.co.za> Message-ID: <1593380165.83.0.962245913444.issue27154@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 Jun 28 18:57:37 2020 From: report at bugs.python.org (Eryk Sun) Date: Sun, 28 Jun 2020 22:57:37 +0000 Subject: [issue41151] Support for new Windows pseudoterminals in the subprocess module In-Reply-To: <1593363843.17.0.163145949347.issue41151@roundup.psfhosted.org> Message-ID: <1593385057.17.0.786617546327.issue41151@roundup.psfhosted.org> Eryk Sun added the comment: > However, the API is a bit weird. Unlike Unix, when you create a > Windows pty, there's no way to directly get access to the "slave" > handle. Instead, you first call CreatePseudoConsole to get a > special "HPCON" object, which is similar to a Unix pty master. > And then you can have to use a special CreateProcess incantation > to spawn a child process that's attached to our pty. As implemented in Windows 8+ (the previous implementation is very different), if a process is attached to a console session, the ConsoleHandle value in the PEB ProcessParameters is a file handle for "\Device\ConDrv\Connect", which is a connection to a console session that's hosted by conhost.exe (or openconsole.exe if using Windows Terminal). The connection handle is used implicitly with NtDeviceIoControlFile to implement API functions such as GetConsoleWindow, GetConsoleTitle, GetConsoleCP, GetConsoleAliases, GetConsoleProcessList, GenerateConsoleCtrlEvent, and so on. Console I/O, on the other hand, uses dedicated files on "\Device\ConDrv". The initial files used for standard I/O are generic "Input" and "Output", which work with any console connection. There are other ConDrv files that, when opened, attach to a particular console session and are only valid when the process is connected to that session, including "Console" (CON), "CurrentIn" (CONIN$), "CurrentOut" (CONOUT$), and "ScreenBuffer" (CreateConsoleScreenBuffer). Simple ReadFile and WriteFile use NT NtReadFile and NtWriteFile system calls. Console-specific I/O functions such as GetConsoleMode, ReadConsoleW, and WriteConsoleW use NtDeviceIoControlFile. If a console connection is inherited, initially the ConsoleHandle value is a handle for "\Device\ConDrv\Reference", which references the console session. (If a console session isn't inherited, the ConsoleHandle value may be one of the values reserved for the creation flags CREATE_NEW_CONSOLE, CREATE_NO_WINDOW, and DETACHED_PROCESS.) The base API opens the "\Connect" connection handle relative to the reference handle. The NtCreateFile call in this case uses the reserved EaBuffer (extended attributes) argument to send the console session host the information it needs about the connecting client process. Once connected, depending on the state, the base API may close inherited console handles (i.e. handles with the NT device type FILE_DEVICE_CONSOLE) that are set in StandardInput, StandardOutput, and StandardError, in which case new generic "Input" and "Output" handles are opened relative to the connection handle. The pseudoconsole API apparently uses PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE to explicitly pass the "\Device\ConDrv\Reference" handle to client processes, instead of inheriting the reference handle of the current process, if the current process even has a console. An HPCON appears to be just a pointer to an array of three handles. One of the handles is the "Reference" handle that client processes need. The other two handles are for the API -- one for the console-session host process (conhost.exe) and one for the signal pipe. You can see the handle value for the other end of the signal pipe passed on the conhost.exe command line as the "--signal" parameter. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 20:32:42 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 29 Jun 2020 00:32:42 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1593390762.82.0.0395910461776.issue19335@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 21:46:27 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 29 Jun 2020 01:46:27 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593395187.6.0.348489636217.issue41123@roundup.psfhosted.org> Inada Naoki added the comment: I confirmed PyUnicode_GetMax is not used in top4000 packages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 21:47:06 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 29 Jun 2020 01:47:06 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593395226.27.0.448847992766.issue41123@roundup.psfhosted.org> Inada Naoki added the comment: New changeset d9f2a13106254c53550583adca70aeb3979f2993 by Inada Naoki in branch 'master': bpo-41123: Remove PyUnicode_GetMax() (GH-21192) https://github.com/python/cpython/commit/d9f2a13106254c53550583adca70aeb3979f2993 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 28 22:35:13 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 29 Jun 2020 02:35:13 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593398113.76.0.224967179208.issue41123@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +20359 pull_request: https://github.com/python/cpython/pull/21204 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 00:00:56 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 29 Jun 2020 04:00:56 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593403256.01.0.488313373011.issue41123@roundup.psfhosted.org> Inada Naoki added the comment: New changeset e4f1fe6edb216e04da03ae80b462ca273f00255b by Inada Naoki in branch 'master': bpo-41123: Remove PyLong_FromUnicode() (GH-21204) https://github.com/python/cpython/commit/e4f1fe6edb216e04da03ae80b462ca273f00255b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 00:05:24 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 29 Jun 2020 04:05:24 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593403524.89.0.000757882298939.issue41123@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +20360 pull_request: https://github.com/python/cpython/pull/21205 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 00:06:52 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jun 2020 04:06:52 +0000 Subject: [issue41152] IDLE: revise setting of iomenu.encoding and .errors In-Reply-To: <1593367002.84.0.77588386021.issue41152@roundup.psfhosted.org> Message-ID: <1593403612.78.0.403236771198.issue41152@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +20361 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21206 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 00:11:40 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jun 2020 04:11:40 +0000 Subject: [issue41152] IDLE: revise setting of iomenu.encoding and .errors In-Reply-To: <1593367002.84.0.77588386021.issue41152@roundup.psfhosted.org> Message-ID: <1593403900.2.0.711085775732.issue41152@roundup.psfhosted.org> Terry J. Reedy added the comment: The PR is for 1. The *nix code is a bit clearer without the Windows code in the middle. Is there a good reason why when encoding is 'utf-8', errors should be 'surrogateescape' on Windows and 'strict' elsewhere? Surrogateescape seems like it is made for when using ascii or other limited encoding. ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 00:52:22 2020 From: report at bugs.python.org (hai shi) Date: Mon, 29 Jun 2020 04:52:22 +0000 Subject: [issue41073] [C API] PyType_GetSlot() should accept static types In-Reply-To: <1592815094.33.0.264745776024.issue41073@roundup.psfhosted.org> Message-ID: <1593406342.62.0.431067994687.issue41073@roundup.psfhosted.org> hai shi added the comment: historical discuss: bpo17162 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 00:56:21 2020 From: report at bugs.python.org (hai shi) Date: Mon, 29 Jun 2020 04:56:21 +0000 Subject: [issue41073] [C API] PyType_GetSlot() should accept static types In-Reply-To: <1592815094.33.0.264745776024.issue41073@roundup.psfhosted.org> Message-ID: <1593406581.56.0.654113288157.issue41073@roundup.psfhosted.org> hai shi added the comment: I create a PR in: https://github.com/shihai1991/cpython/pull/13/commits. Looks like It works. If we extend PyType_GetSlot() to accept non-heaptype, we need find a way to judge the max slot of non-heaptype. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 01:02:27 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jun 2020 05:02:27 +0000 Subject: [issue41152] IDLE: revise setting of iomenu.encoding and .errors In-Reply-To: <1593367002.84.0.77588386021.issue41152@roundup.psfhosted.org> Message-ID: <1593406947.96.0.42313805775.issue41152@roundup.psfhosted.org> Terry J. Reedy added the comment: The main use for the iomenu settings is for the socket-transport file classes, in run.py. The default encoding='utf-8' and errors='strict' are not used but are overriden with the iomenu values, or for stderr, 'backslashreplace'. Since user code can print any unicode, I think the defaults should used as is to transparently pass on and possibly display anything the user sends. Such a change should have no back-compatibility issues. Thinking more about errors. With utf-8 encoding of proper strings, there should never be any, but Python does allow construction of 'improper' strings with, say, single surrogates. The transport mechanism should never raise, so maybe surrogateescape or backslashreplace should always be used. What do you two think? Another use is for writing bytes to an OutputWindow, as with find-in-files. But I can think of no case where IDLE sends bytes to an OutputWindow. User files are all opened in an editor. I believe these are all the uses of 'iomenu.encoding' outside of iomenu. 'from iomenu ...' is never used. Within iomenu, the only use is part of reading an encoding cookie. # The only use of 'encoding' below is in _decode as initial value # of deprecated block asking user for encoding. I am not sure if this use can be reached now. Even if so, I believe this code duplicates code elsewhere in the stdlib that might be used. So maybe the encoding calculation is not really needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 01:26:34 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 29 Jun 2020 05:26:34 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593408394.39.0.76366761086.issue41123@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 02134dae448c7885c9c07adfc6970f878db33372 by Inada Naoki in branch '3.9': bpo-41123: Doc: PyLong_FromUnicode will be removed in 3.10 (GH-21205) https://github.com/python/cpython/commit/02134dae448c7885c9c07adfc6970f878db33372 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 01:27:04 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jun 2020 05:27:04 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593408424.14.0.474980265573.issue41123@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +20362 pull_request: https://github.com/python/cpython/pull/21207 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 01:36:11 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jun 2020 05:36:11 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593408971.43.0.474412093984.issue41123@roundup.psfhosted.org> miss-islington added the comment: New changeset ea164309dea4e7f92aeda6daa9e9679290c68827 by Miss Islington (bot) in branch '3.8': bpo-41123: Doc: PyLong_FromUnicode will be removed in 3.10 (GH-21205) https://github.com/python/cpython/commit/ea164309dea4e7f92aeda6daa9e9679290c68827 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 01:36:21 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jun 2020 05:36:21 +0000 Subject: [issue41152] IDLE: revise setting of iomenu.encoding and .errors In-Reply-To: <1593367002.84.0.77588386021.issue41152@roundup.psfhosted.org> Message-ID: <1593408981.4.0.110043340245.issue41152@roundup.psfhosted.org> Terry J. Reedy added the comment: I got the 'within iomenu' part a bit wrong. To open a file to edit, iomenu.IOBinging('IO').open tells filelist to use IO.loadfile. This reads bytes 'so that we can handle end-of-line convention ourselves'. (I suspect that this predates 3.x and might not be needed any more.) IO.loadfile calls IO._decode which looks for a utf-8 BOM, looks for a coding cookie, tries ascii (not needed in 3.x), tries utf-8, and asks the user for an encoding, using iomenu.encoding as the initial value in the query box. This box is deprecated in the sense that for 3.x, a python file should either be utf-8 or have an encoding cookie. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 02:00:58 2020 From: report at bugs.python.org (Ma Lin) Date: Mon, 29 Jun 2020 06:00:58 +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: <1593410458.64.0.635351348308.issue35859@roundup.psfhosted.org> Ma Lin added the comment: Do I need to write a detailed review guide? I suppose that after reading it from beginning to end, it will be easy to understand PR 12427, no need to read anything else. Or plan to replace the sre module with the regex module in a future version? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 02:48:41 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 29 Jun 2020 06:48:41 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593413321.08.0.827841881446.issue41123@roundup.psfhosted.org> Inada Naoki added the comment: PyUnicode_AsUnicodeCopy is not used in top 4000 packages. Let's remove it too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 02:51:17 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 29 Jun 2020 06:51:17 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593413477.92.0.503716773339.issue41123@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +20363 pull_request: https://github.com/python/cpython/pull/21209 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 02:56:41 2020 From: report at bugs.python.org (Rahul Jha) Date: Mon, 29 Jun 2020 06:56:41 +0000 Subject: [issue41154] test_pkgutil:test_name_resolution fails on master Message-ID: <1593413801.07.0.974965447149.issue41154@roundup.psfhosted.org> New submission from Rahul Jha : After configuring and building using the command: ./configure --with-pydebug ** make -j I ran the test suite (without changing anything) and saw that test_pkg has failed. Here is the output of `./python.exe -m test -v test_pkgutil`: == CPython 3.10.0a0 (heads/master:cd3c2bdd5d, Jun 28 2020, 13:29:09) [Clang 9.0.0 (clang-900.0.39.2)] == macOS-10.12.6-x86_64-i386-64bit little-endian == cwd: /Users/rahuljha/Documents/cpython/build/test_python_10678? == CPU count: 4 == encodings: locale=UTF-8, FS=utf-8 0:00:00 load avg: 2.01 Run tests sequentially 0:00:00 load avg: 2.01 [1/1] test_pkgutil test_getdata_filesys (test.test_pkgutil.PkgutilTests) ... ok test_getdata_zipfile (test.test_pkgutil.PkgutilTests) ... ok test_name_resolution (test.test_pkgutil.PkgutilTests) ... ERROR test_unreadable_dir_on_syspath (test.test_pkgutil.PkgutilTests) ... ok test_walk_packages_raises_on_string_or_bytes_input (test.test_pkgutil.PkgutilTests) ... ok test_walkpackages_filesys (test.test_pkgutil.PkgutilTests) ... ok test_walkpackages_zipfile (test.test_pkgutil.PkgutilTests) Tests the same as test_walkpackages_filesys, only with a zip file. ... ok test_alreadyloaded (test.test_pkgutil.PkgutilPEP302Tests) ... ok test_getdata_pep302 (test.test_pkgutil.PkgutilPEP302Tests) ... ok test_iter_importers (test.test_pkgutil.ExtendPathTests) ... ok test_mixed_namespace (test.test_pkgutil.ExtendPathTests) ... ok test_simple (test.test_pkgutil.ExtendPathTests) ... ok test_nested (test.test_pkgutil.NestedNamespacePackageTest) ... ok test_find_loader_avoids_emulation (test.test_pkgutil.ImportlibMigrationTests) ... ok test_find_loader_missing_module (test.test_pkgutil.ImportlibMigrationTests) ... ok test_get_importer_avoids_emulation (test.test_pkgutil.ImportlibMigrationTests) ... ok test_get_loader_None_in_sys_modules (test.test_pkgutil.ImportlibMigrationTests) ... ok test_get_loader_avoids_emulation (test.test_pkgutil.ImportlibMigrationTests) ... ok test_get_loader_handles_missing_loader_attribute (test.test_pkgutil.ImportlibMigrationTests) ... ok test_get_loader_handles_missing_spec_attribute (test.test_pkgutil.ImportlibMigrationTests) ... ok test_get_loader_handles_spec_attribute_none (test.test_pkgutil.ImportlibMigrationTests) ... ok test_importer_deprecated (test.test_pkgutil.ImportlibMigrationTests) ... ok test_iter_importers_avoids_emulation (test.test_pkgutil.ImportlibMigrationTests) ... ok test_loader_deprecated (test.test_pkgutil.ImportlibMigrationTests) ... ok ====================================================================== ERROR: test_name_resolution (test.test_pkgutil.PkgutilTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/rahuljha/Documents/cpython/Lib/test/test_pkgutil.py", line 262, in test_name_resolution mod = importlib.import_module(uw) File "/Users/rahuljha/Documents/cpython/Lib/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 984, in _find_and_load_unlocked ModuleNotFoundError: No module named '?' ---------------------------------------------------------------------- Ran 24 tests in 0.186s FAILED (errors=1) test test_pkgutil failed test_pkgutil failed == Tests result: FAILURE == 1 test failed: test_pkgutil Total duration: 482 ms Tests result: FAILURE Py vulture ~/Documents/cpython master !1 ?1 ? ./python.exe -m test -v test_pkgutil == CPython 3.10.0a0 (heads/master:cd3c2bdd5d, Jun 28 2020, 13:29:09) [Clang 9.0.0 (clang-900.0.39.2)] == macOS-10.12.6-x86_64-i386-64bit little-endian == cwd: /Users/rahuljha/Documents/cpython/build/test_python_21819? == CPU count: 4 == encodings: locale=UTF-8, FS=utf-8 0:00:00 load avg: 2.69 Run tests sequentially 0:00:00 load avg: 2.69 [1/1] test_pkgutil test_getdata_filesys (test.test_pkgutil.PkgutilTests) ... ok test_getdata_zipfile (test.test_pkgutil.PkgutilTests) ... ok test_name_resolution (test.test_pkgutil.PkgutilTests) ... ERROR test_unreadable_dir_on_syspath (test.test_pkgutil.PkgutilTests) ... ok test_walk_packages_raises_on_string_or_bytes_input (test.test_pkgutil.PkgutilTests) ... ok test_walkpackages_filesys (test.test_pkgutil.PkgutilTests) ... ok test_walkpackages_zipfile (test.test_pkgutil.PkgutilTests) Tests the same as test_walkpackages_filesys, only with a zip file. ... ok test_alreadyloaded (test.test_pkgutil.PkgutilPEP302Tests) ... ok test_getdata_pep302 (test.test_pkgutil.PkgutilPEP302Tests) ... ok test_iter_importers (test.test_pkgutil.ExtendPathTests) ... ok test_mixed_namespace (test.test_pkgutil.ExtendPathTests) ... ok test_simple (test.test_pkgutil.ExtendPathTests) ... ok test_nested (test.test_pkgutil.NestedNamespacePackageTest) ... ok test_find_loader_avoids_emulation (test.test_pkgutil.ImportlibMigrationTests) ... ok test_find_loader_missing_module (test.test_pkgutil.ImportlibMigrationTests) ... ok test_get_importer_avoids_emulation (test.test_pkgutil.ImportlibMigrationTests) ... ok test_get_loader_None_in_sys_modules (test.test_pkgutil.ImportlibMigrationTests) ... ok test_get_loader_avoids_emulation (test.test_pkgutil.ImportlibMigrationTests) ... ok test_get_loader_handles_missing_loader_attribute (test.test_pkgutil.ImportlibMigrationTests) ... ok test_get_loader_handles_missing_spec_attribute (test.test_pkgutil.ImportlibMigrationTests) ... ok test_get_loader_handles_spec_attribute_none (test.test_pkgutil.ImportlibMigrationTests) ... ok test_importer_deprecated (test.test_pkgutil.ImportlibMigrationTests) ... ok test_iter_importers_avoids_emulation (test.test_pkgutil.ImportlibMigrationTests) ... ok test_loader_deprecated (test.test_pkgutil.ImportlibMigrationTests) ... ok ====================================================================== ERROR: test_name_resolution (test.test_pkgutil.PkgutilTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/rahuljha/Documents/cpython/Lib/test/test_pkgutil.py", line 262, in test_name_resolution mod = importlib.import_module(uw) File "/Users/rahuljha/Documents/cpython/Lib/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 984, in _find_and_load_unlocked ModuleNotFoundError: No module named '?' ---------------------------------------------------------------------- Ran 24 tests in 0.184s FAILED (errors=1) test test_pkgutil failed test_pkgutil failed == Tests result: FAILURE == 1 test failed: test_pkgutil Total duration: 635 ms Tests result: FAILURE ---------- components: Build, Distutils, Tests messages: 372549 nosy: RJ722, dstufft, eric.araujo, vinay.sajip priority: normal severity: normal status: open title: test_pkgutil:test_name_resolution fails on master versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 03:24:18 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 29 Jun 2020 07:24:18 +0000 Subject: [issue41154] test_pkgutil:test_name_resolution fails on some platforms In-Reply-To: <1593413801.07.0.974965447149.issue41154@roundup.psfhosted.org> Message-ID: <1593415458.73.0.717175021971.issue41154@roundup.psfhosted.org> Ned Deily added the comment: This same failure is observed with the most recent 3.9beta (3.9.0b3) when running on macOS 10.9 with the binaries from the python.org macOS installer. However, no failure is seen when running the same Python on macOS 10.15. I have not investigated further with other releases. This test failure should be addressed prior t0 3.9.0rc1. ---------- nosy: +ned.deily, vstinner priority: normal -> deferred blocker title: test_pkgutil:test_name_resolution fails on master -> test_pkgutil:test_name_resolution fails on some platforms versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 03:25:37 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 29 Jun 2020 07:25:37 +0000 Subject: [issue41154] test_pkgutil:test_name_resolution fails on some platforms In-Reply-To: <1593413801.07.0.974965447149.issue41154@roundup.psfhosted.org> Message-ID: <1593415537.14.0.962290489713.issue41154@roundup.psfhosted.org> Ned Deily added the comment: PS, the problem may have been introduced by the changes for bpo-12915. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 03:26:34 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 29 Jun 2020 07:26:34 +0000 Subject: [issue12915] Add inspect.locate and inspect.resolve In-Reply-To: <1315326633.9.0.910127000285.issue12915@psf.upfronthosting.co.za> Message-ID: <1593415594.27.0.0707206186539.issue12915@roundup.psfhosted.org> Ned Deily added the comment: See bpo-41154 for possible regression introduced by these changes. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 03:34:25 2020 From: report at bugs.python.org (Florian Bruhin) Date: Mon, 29 Jun 2020 07:34:25 +0000 Subject: [issue41154] test_pkgutil:test_name_resolution fails on some platforms In-Reply-To: <1593413801.07.0.974965447149.issue41154@roundup.psfhosted.org> Message-ID: <1593416065.14.0.421625584004.issue41154@roundup.psfhosted.org> Change by Florian Bruhin : ---------- nosy: +The Compiler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 04:31:35 2020 From: report at bugs.python.org (Svetoslav Inkolov) Date: Mon, 29 Jun 2020 08:31:35 +0000 Subject: [issue41155] Tkinter -postoffset not working for TCombobox Message-ID: <1593419495.04.0.313976680119.issue41155@roundup.psfhosted.org> New submission from Svetoslav Inkolov : Doing a configuration of the tkinter combobox for the dropdown list with: style = ttk.Style() style.configure('TCombobox', postoffset=(0,0,width,0)) results in no changing of the combobox. In Python 2.7.16 or generally in python 2 this functionality works well. Please see the sample source-code attached. ---------- components: Tkinter files: test_variable_dropdown-width_of_combobox.py messages: 372553 nosy: Sveti007 priority: normal severity: normal status: open title: Tkinter -postoffset not working for TCombobox type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49272/test_variable_dropdown-width_of_combobox.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 04:37:10 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jun 2020 08:37:10 +0000 Subject: [issue41048] read_mime_types() should read the rule file using UTF-8, not the locale encoding In-Reply-To: <1592644260.23.0.766790238639.issue41048@roundup.psfhosted.org> Message-ID: <1593419830.76.0.984420498799.issue41048@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +20364 pull_request: https://github.com/python/cpython/pull/21210 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 04:37:07 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Jun 2020 08:37:07 +0000 Subject: [issue41048] read_mime_types() should read the rule file using UTF-8, not the locale encoding In-Reply-To: <1592644260.23.0.766790238639.issue41048@roundup.psfhosted.org> Message-ID: <1593419827.21.0.839103205718.issue41048@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 7f569c9bc0079906012b3034d30fe8abc742e7fc by Srinivas Reddy Thatiparthy (?????????? ?????? ?????????) in branch 'master': bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998) https://github.com/python/cpython/commit/7f569c9bc0079906012b3034d30fe8abc742e7fc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 04:37:22 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jun 2020 08:37:22 +0000 Subject: [issue41048] read_mime_types() should read the rule file using UTF-8, not the locale encoding In-Reply-To: <1592644260.23.0.766790238639.issue41048@roundup.psfhosted.org> Message-ID: <1593419842.33.0.259570307893.issue41048@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20365 pull_request: https://github.com/python/cpython/pull/21211 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 05:05:57 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jun 2020 09:05:57 +0000 Subject: [issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath In-Reply-To: <1489121898.66.0.224917416789.issue29778@psf.upfronthosting.co.za> Message-ID: <1593421557.82.0.418772688426.issue29778@roundup.psfhosted.org> STINNER Victor added the comment: _Py_CheckPython3() tries to load "python3.dll" from two directories: * first one based on _Py_dll_path * second one based on Py_GetPrefix() I understand that LoadLibraryExW() must not be attempted if _Py_dll_path is empty, or if Py_GetPrefix() is empty. Am I right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 05:09:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jun 2020 09:09:59 +0000 Subject: [issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath In-Reply-To: <1489121898.66.0.224917416789.issue29778@psf.upfronthosting.co.za> Message-ID: <1593421799.81.0.648925082725.issue29778@roundup.psfhosted.org> STINNER Victor added the comment: I understand that Python 3.5, 3.6 and 3.7 are also affected. It's not a regression. On Python 3.5, 3.6 and 3.7, when Py_SetPath(path) is called, Py_GetPrefix() also returns an empty path. So at least the directory based on Py_GetPrefix() should also be skipped on Python 3.5-3.7 if Py_GetPrefix() is empty, right? ---------- type: behavior -> security versions: +Python 3.10, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 05:18:48 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 29 Jun 2020 09:18:48 +0000 Subject: [issue41156] Remove Task.all_tasks and Task.current_task Message-ID: <1593422328.24.0.527300036648.issue41156@roundup.psfhosted.org> New submission from Inada Naoki : They are documented as "will be removed in version 3.9", but they are not removed in 3.9 beta. * Remove them in 3.10. * Update ~3.9 documents to "will be removed in version 3.10" ---------- components: asyncio messages: 372557 nosy: asvetlov, inada.naoki, yselivanov priority: normal severity: normal status: open title: Remove Task.all_tasks and Task.current_task versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 06:24:36 2020 From: report at bugs.python.org (Jay Patel) Date: Mon, 29 Jun 2020 10:24:36 +0000 Subject: [issue41023] smtplib does not handle Unicode characters In-Reply-To: <1592473534.66.0.101889528587.issue41023@roundup.psfhosted.org> Message-ID: <1593426276.78.0.394051250741.issue41023@roundup.psfhosted.org> Change by Jay Patel : Removed file: https://bugs.python.org/file49250/providing_only_ascii_characters.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 06:29:03 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 29 Jun 2020 10:29:03 +0000 Subject: [issue41156] Remove Task.all_tasks and Task.current_task In-Reply-To: <1593422328.24.0.527300036648.issue41156@roundup.psfhosted.org> Message-ID: <1593426543.5.0.285480222449.issue41156@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue40967 ---------- nosy: +aeros, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 06:30:25 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 29 Jun 2020 10:30:25 +0000 Subject: [issue41156] Remove Task.all_tasks and Task.current_task In-Reply-To: <1593422328.24.0.527300036648.issue41156@roundup.psfhosted.org> Message-ID: <1593426625.89.0.293647997033.issue41156@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> asyncio.Task.all_tasks() and asyncio.Task.current_task() must be removed in 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 06:32:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jun 2020 10:32:16 +0000 Subject: [issue41073] [C API] PyType_GetSlot() should accept static types In-Reply-To: <1592815094.33.0.264745776024.issue41073@roundup.psfhosted.org> Message-ID: <1593426736.73.0.866235715435.issue41073@roundup.psfhosted.org> STINNER Victor added the comment: > historical discuss: bpo17162 bpo-17162 added PyType_GetSlot(), but static types were not discussed there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 06:35:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jun 2020 10:35:17 +0000 Subject: [issue12915] Add inspect.locate and inspect.resolve In-Reply-To: <1315326633.9.0.910127000285.issue12915@psf.upfronthosting.co.za> Message-ID: <1593426917.34.0.940904685654.issue12915@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 06:35:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jun 2020 10:35:59 +0000 Subject: [issue34206] Move and clarify Py_Main documentation In-Reply-To: <1532439469.19.0.56676864532.issue34206@psf.upfronthosting.co.za> Message-ID: <1593426959.57.0.223108250071.issue34206@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 06:36:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jun 2020 10:36:19 +0000 Subject: [issue30672] PEP 538: Unexpected locale behaviour on *BSD (including Mac OS X) In-Reply-To: <1497518633.36.0.998856107706.issue30672@psf.upfronthosting.co.za> Message-ID: <1593426979.08.0.0425597300172.issue30672@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 06:38:57 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jun 2020 10:38:57 +0000 Subject: [issue41154] test_pkgutil:test_name_resolution fails on some platforms In-Reply-To: <1593413801.07.0.974965447149.issue41154@roundup.psfhosted.org> Message-ID: <1593427137.48.0.886286378355.issue41154@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 06:39:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jun 2020 10:39:53 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1593427193.9.0.737474031135.issue35975@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 06:51:06 2020 From: report at bugs.python.org (Jay Patel) Date: Mon, 29 Jun 2020 10:51:06 +0000 Subject: [issue41157] email.message_from_string() is unable to find the headers for the .msg files Message-ID: <1593427866.61.0.334200042199.issue41157@roundup.psfhosted.org> New submission from Jay Patel : I need to extract the email data from an MSG file on Python v2.7. But as Python v2.7 has been deprecated, I tried to replicate this scenario on Python v3.8 and faced the same issue. I am trying to extract the message using the "Message" class of the "extract_msg" module. After extracting the text from the "Message" object, I am using email.message_from_string() method to separate the headers and the body (or payload). The same workflow can be observed in the "extract_mail.py" file. The issue with the attached file, "msgfile_not_working_correctly.msg", is that the headers of this file begin with "Microsoft Mail Internet Headers Version 2.0" which is interpreted as body and not as headers (as it is not in the standard email headers format like "To": "receiver at gmail.com"). According to this (https://support.microsoft.com/en-us/office/view-internet-message-headers-in-outlook-cd039382-dc6e-4264-ac74-c048563d212c) link the message headers in Outlook will begin with "Microsoft Mail Internet Headers Version 2.0" which is added by Outlook (mentioned in the "Interpreting email headers" section of the mentioned link). The email data can be observed in the "email_data.txt" file. I have tried omitting the first line, when there are no headers and it works as per the expectation. Can this scenario be handled at the modular level (email module) or is there any other way to extract headers for the .msg files. ---------- files: extract_mail.py messages: 372560 nosy: jpatel priority: normal severity: normal status: open title: email.message_from_string() is unable to find the headers for the .msg files type: enhancement versions: Python 3.8 Added file: https://bugs.python.org/file49273/extract_mail.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 06:51:34 2020 From: report at bugs.python.org (Jay Patel) Date: Mon, 29 Jun 2020 10:51:34 +0000 Subject: [issue41157] email.message_from_string() is unable to find the headers for the .msg files In-Reply-To: <1593427866.61.0.334200042199.issue41157@roundup.psfhosted.org> Message-ID: <1593427894.37.0.565416055686.issue41157@roundup.psfhosted.org> Change by Jay Patel : Added file: https://bugs.python.org/file49274/msgfile_not_working_correctly.msg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 06:54:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jun 2020 10:54:54 +0000 Subject: [issue37224] [subinterpreters] test__xxsubinterpreters fails randomly In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1593428094.17.0.702899458475.issue37224@roundup.psfhosted.org> STINNER Victor added the comment: AMD64 Windows8.1 Refleaks 3.x: https://buildbot.python.org/all/#/builders/157/builds/218 2:51:27 load avg: 3.54 [275/423/2] test__xxsubinterpreters crashed (Exit code 3221225477) -- running: test_regrtest (2 hour 49 min), test_distutils (1 min 56 sec), test_pydoc (1 min 36 sec) beginning 6 repetitions 123456 ...Windows fatal exception: access violation Thread 0x000004dc (most recent call first): File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\test\test__xxsubinterpreters.py", line 766 in setUp File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\unittest\case.py", line 547 in _callSetUp File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\unittest\case.py", line 589 in run File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\unittest\case.py", line 653 in __call__ (...) ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 06:56:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jun 2020 10:56:08 +0000 Subject: [issue41084] Signify that a SyntaxError comes from an fstring in the error message In-Reply-To: <1592870022.32.0.609883413471.issue41084@roundup.psfhosted.org> Message-ID: <1593428168.94.0.0763964196538.issue41084@roundup.psfhosted.org> STINNER Victor added the comment: The change broke the old parser in Python 3.9, I reopen the issue: AMD64 Arch Linux VintageParser 3.9: https://buildbot.python.org/all/#/builders/765/builds/129 FAIL: test_format_specifier_expressions (test.test_fstring.TestCase) (str="f'{4:{/5}}'") FAIL: test_invalid_syntax_error_message (test.test_fstring.TestCase) FAIL: test_lambda (test.test_fstring.TestCase) (str="f'{lambda x:x}'") FAIL: test_parens_in_expressions (test.test_fstring.TestCase) (str="f'{,}'") FAIL: test_parens_in_expressions (test.test_fstring.TestCase) (str="f'{,}'") ---------- nosy: +vstinner resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 07:13:46 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 29 Jun 2020 11:13:46 +0000 Subject: [issue41084] Signify that a SyntaxError comes from an fstring in the error message In-Reply-To: <1592870022.32.0.609883413471.issue41084@roundup.psfhosted.org> Message-ID: <1593429226.38.0.751598516613.issue41084@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +20366 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/21212 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 07:37:57 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Jun 2020 11:37:57 +0000 Subject: [issue41158] IDLE: rewrite the code for handling file encoding Message-ID: <1593430677.27.0.733244762594.issue41158@roundup.psfhosted.org> New submission from Serhiy Storchaka : The proposed patch rewrites the code in IDLE for detecting Python file encoding and decoding and encoding Python sources by using the tokenize module instead of handmade implementation of PEP 263. ---------- assignee: terry.reedy components: IDLE messages: 372563 nosy: serhiy.storchaka, terry.reedy priority: normal severity: normal status: open title: IDLE: rewrite the code for handling file encoding type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 07:49:55 2020 From: report at bugs.python.org (PySimpleGUI) Date: Mon, 29 Jun 2020 11:49:55 +0000 Subject: [issue36468] Treeview: wrong color change In-Reply-To: <1553848318.4.0.250762836848.issue36468@roundup.psfhosted.org> Message-ID: <1593431395.93.0.166190152292.issue36468@roundup.psfhosted.org> PySimpleGUI added the comment: The tk project fixed this problem in release 8.6.10. I don't see where this version of tk is being picked up. The release notes of 3.9.0 Beta3 show tk version 8.6.9 is being used for Windows. https://docs.python.org/3.9/whatsnew/changelog.html#python-3-9-0-beta-3 Is there a planned release vehicle for 8.6.10? How does tk integration get into a Python release? It would be nice to know what version of Python users should be on the lookout for in order to get this fix. ---------- nosy: +PySimpleGUI _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 07:52:29 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Jun 2020 11:52:29 +0000 Subject: [issue41152] IDLE: revise setting of iomenu.encoding and .errors In-Reply-To: <1593367002.84.0.77588386021.issue41152@roundup.psfhosted.org> Message-ID: <1593431549.33.0.804467329679.issue41152@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +20367 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21214 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 07:54:00 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Jun 2020 11:54:00 +0000 Subject: [issue41158] IDLE: rewrite the code for handling file encoding In-Reply-To: <1593430677.27.0.733244762594.issue41158@roundup.psfhosted.org> Message-ID: <1593431640.56.0.828546439683.issue41158@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +20368 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21215 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 08:07:35 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jun 2020 12:07:35 +0000 Subject: [issue41048] read_mime_types() should read the rule file using UTF-8, not the locale encoding In-Reply-To: <1592644260.23.0.766790238639.issue41048@roundup.psfhosted.org> Message-ID: <1593432455.14.0.534040851544.issue41048@roundup.psfhosted.org> miss-islington added the comment: New changeset 9e36b6e6c8fc8925c6a5e7b57aff527bc4b862a8 by Miss Islington (bot) in branch '3.9': bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998) https://github.com/python/cpython/commit/9e36b6e6c8fc8925c6a5e7b57aff527bc4b862a8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 08:07:44 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jun 2020 12:07:44 +0000 Subject: [issue41048] read_mime_types() should read the rule file using UTF-8, not the locale encoding In-Reply-To: <1592644260.23.0.766790238639.issue41048@roundup.psfhosted.org> Message-ID: <1593432464.97.0.507541235566.issue41048@roundup.psfhosted.org> miss-islington added the comment: New changeset 7731139b7af655b9f5df6d1b5493f8dfdf41d569 by Miss Islington (bot) in branch '3.8': bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998) https://github.com/python/cpython/commit/7731139b7af655b9f5df6d1b5493f8dfdf41d569 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 08:15:20 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Jun 2020 12:15:20 +0000 Subject: [issue41152] IDLE: revise setting of iomenu.encoding and .errors In-Reply-To: <1593367002.84.0.77588386021.issue41152@roundup.psfhosted.org> Message-ID: <1593432920.55.0.0311971736877.issue41152@roundup.psfhosted.org> Serhiy Storchaka added the comment: PR 21214 sets the encoding of stdin/stdout/stderr to 'utf-8'. Error handler is set to 'surrogatepass' or 'surrogateescape' because these error handlers are used when convert strings between Python and Tcl. It guarantees that reading from stdin and writing back to stdout will never fail, even if you paste garbage from clipboard. Printing file paths will never fail too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 08:16:25 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 29 Jun 2020 12:16:25 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1593432985.93.0.454355260959.issue19335@roundup.psfhosted.org> Lysandros Nikolaou added the comment: > What do either of you think? Can the new parser handle it better? Pablo, correct me if I'm wrong, but I think that the parser has nothing to do with this. It's not the parser that produces this SyntaxError, it's some later compilation phase (I guess symtable creation phase?), which I know very very little about, so I can't really offer an opinion on what can be done. In any case, this should actually indicate that this is not a parser issue: (venv) ? cpython git:(master) ./python.exe Python 3.10.0a0 (heads/master:7f569c9bc0, Jun 29 2020, 14:48:39) [Clang 11.0.3 (clang-1103.0.32.62)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> a = '''\ ... def a(): ... def b(): ... nonlocal c ... ''' >>> a 'def a():\n def b():\n nonlocal c\n' >>> compile(a, '?', 'single') Traceback (most recent call last): File "", line 1, in File "?", line 3 SyntaxError: no binding for nonlocal 'c' found >>> import ast >>> ast.dump(ast.parse(a, mode='single')) "Interactive(body=[FunctionDef(name='a', args=arguments(posonlyargs=[], args=[], kwonlyargs=[], kw_defaults=[], defaults=[]), body=[FunctionDef(name='b', args=arguments(posonlyargs=[], args=[], kwonlyargs=[], kw_defaults=[], defaults=[]), body=[Nonlocal(names=['c'])], decorator_list=[])], decorator_list=[])])" All in all, I think that Nick's hack is the way to go here, since it's comc's responsibility to correctly check if a statement is incomplete, right? > When the new parser compiles a function, does it know or could it know whether it is nested? It currently doesn't, but the tokenizer holds a stack of indent tokens, which can be accessed by the parser. This way we could indeed check if there are two or more pending indent tokens, before generating an AST for nonlocal. However, I don't think that this is generally a good idea. Parsing should not care about statement semantics, in that a nonlocal statement should be like any other statement in the parser's point of view. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 08:55:24 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Jun 2020 12:55:24 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1593435324.77.0.759141811284.issue19335@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Pablo, correct me if I'm wrong, but I think that the parser has nothing to do with this. It's not the parser that produces this SyntaxError, it's some later compilation phase (I guess symtable creation phase?), which I know very very little about, so I can't really offer an opinion on what can be done. Yeah, this is correct the parser has nothing to be done with this, what is involved in this is the compiler, as the generated AST looks correct. > When the new parser compiles a function, does it know or could it know whether it is nested? Nop, the parser does not even know what a 'function' is while it parses, as that is only determined in the product of the parser itself: the AST. The piece that understands semantically what a function is and if is nested or not is the compiler. > Parsing should not care about statement semantics, in that a nonlocal statement should be like any other statement in the parser's point of view. Yup, I very much agree with this. The parser must not know about the semantics of the AST elements (forcing it to do so will be not only very complex but also will make maintenance much more difficult as the parser will be coupled with the semantics of the language is parsing as opposed to only having to know about the grammar). > All in all, I think that Nick's hack is the way to go here, since it's comc's responsibility to correctly check if a statement is incomplete, right? If I understand correctly, Nick is talking about modifying the different iterations for different errors in codeop no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 08:56:01 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Jun 2020 12:56:01 +0000 Subject: [issue41084] Signify that a SyntaxError comes from an fstring in the error message In-Reply-To: <1592870022.32.0.609883413471.issue41084@roundup.psfhosted.org> Message-ID: <1593435361.08.0.079670830186.issue41084@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 990efe0fff749773887a50cb1ecb2c5d09263cf8 by Lysandros Nikolaou in branch '3.9': [3.9] bpo-41084: Fix test_fstring failure when using the old parser (GH-21212) https://github.com/python/cpython/commit/990efe0fff749773887a50cb1ecb2c5d09263cf8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 09:01:19 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 29 Jun 2020 13:01:19 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1593435679.89.0.200389819198.issue19335@roundup.psfhosted.org> Lysandros Nikolaou added the comment: > If I understand correctly, Nick is talking about modifying the different iterations for different errors in codeop no? I was talking about msg200936, where Nick proposed to just hardcode a check for nonlocal SyntaxErrors in codeop._maybe_compile, which should return None (which means incomplete) when the SyntaxError comes as a result of a nonlocal binding not existing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 09:03:31 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 29 Jun 2020 13:03:31 +0000 Subject: [issue41084] Signify that a SyntaxError comes from an fstring in the error message In-Reply-To: <1592870022.32.0.609883413471.issue41084@roundup.psfhosted.org> Message-ID: <1593435811.44.0.0059197549014.issue41084@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Thanks, Victor! The fix is merged, so I'm closing this again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 09:03:43 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 29 Jun 2020 13:03:43 +0000 Subject: [issue41084] Signify that a SyntaxError comes from an fstring in the error message In-Reply-To: <1592870022.32.0.609883413471.issue41084@roundup.psfhosted.org> Message-ID: <1593435823.83.0.125410551503.issue41084@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 Jun 29 09:05:04 2020 From: report at bugs.python.org (Andrei Daraschenka) Date: Mon, 29 Jun 2020 13:05:04 +0000 Subject: [issue39672] Segmentation fault on shutdown with shelve & c pickle In-Reply-To: <1582019462.33.0.255360625193.issue39672@roundup.psfhosted.org> Message-ID: <1593435904.92.0.662995087387.issue39672@roundup.psfhosted.org> Andrei Daraschenka added the comment: Hello zd nex After a little research, it became clear that this drop is due to vague garbage collection behavior. As you know, method `__del__` is called by the garbage collector and when this happens there is no guarantee that the rest of the objects are not yet cleaned. def __del__(self): if not hasattr(self, 'writeback'): return self.close() But in the `close` method, synchronization with the disk occurred and objects were created for modules that were no longer in memory and, as a result, method `dump` fell with an error, because when trying to get module `pickle` it was already gone (due to the garbage collector). Modules/_pickle.c .... 4353 PickleState *st = _Pickle_GetGlobalState(); .... But `_Pickle_GetGlobalState` can't return right result because pickle module was gone from memory by garbage collector. In this case, you encountered a problem when the C code tried to use a module that was no longer in memory since this module deleted the garbage collector. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 09:48:46 2020 From: report at bugs.python.org (zd nex) Date: Mon, 29 Jun 2020 13:48:46 +0000 Subject: [issue39672] Segmentation fault on shutdown with shelve & c pickle In-Reply-To: <1582019462.33.0.255360625193.issue39672@roundup.psfhosted.org> Message-ID: <1593438526.74.0.905369755189.issue39672@roundup.psfhosted.org> zd nex added the comment: Hello, ok but it seems to me that this segfault happens always (it is not random)? So I guess that there should be way how fix C pickle, no? Or something else should be done with __del__ method of shelve. Because in Python2 this was normally working. It seems to me that when user just reads data of shelve and then exit happens this can happen. Why Python2 normally worked? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 09:57:54 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 13:57:54 +0000 Subject: [issue39701] Azure Pipelines PR broken In-Reply-To: <1582214220.59.0.59152238753.issue39701@roundup.psfhosted.org> Message-ID: <1593439074.1.0.579649198494.issue39701@roundup.psfhosted.org> Stefan Krah added the comment: This appears to be fixed now. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 10:16:13 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 14:16:13 +0000 Subject: [issue40223] Add -fwrapv for new icc versions In-Reply-To: <1586342429.44.0.914021178636.issue40223@roundup.psfhosted.org> Message-ID: <1593440173.93.0.286460378647.issue40223@roundup.psfhosted.org> Stefan Krah added the comment: icc does not like the label reordering from: ddd1949fea59f256e51191540a4446f75ed608fa This is one step further, but not much. Possibilities are still: 1) The reordering exposes an overflow. 2) The new ordering is not supported by icc, it introduces UB that is masked by -fwrapv (again, does -fwrapv only disable a single optimization? My guess is that it disables several). This was found by automated bisecting, I still have no time to really investigate what is going on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 10:21:28 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 14:21:28 +0000 Subject: [issue40223] Add -fwrapv for new icc versions In-Reply-To: <1586342429.44.0.914021178636.issue40223@roundup.psfhosted.org> Message-ID: <1593440488.04.0.33948918152.issue40223@roundup.psfhosted.org> Stefan Krah added the comment: cc Benjamin, in case he has any ideas: icc does not like the label reordering in ceval.c, but that can be anything from an icc issue to an actual overflow in ceval.c. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 10:40:37 2020 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 29 Jun 2020 14:40:37 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593441637.54.0.354908150975.issue40874@roundup.psfhosted.org> Anthony Sottile added the comment: this breaks builds for ubuntu, I'd suggest reverting this (especially because it appears to build fine without this patch) 2020-06-29T08:52:56.8303672Z x86_64-linux-gnu-gcc -pthread -fPIC -Wdate-time -D_FORTIFY_SOURCE=2 -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -g -fdebug-prefix-map=/tmp/code=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector -Wformat -Werror=format-security -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -I../Include/internal -DCONFIG_64=1 -DASM=1 -I../Include -IObjects -IPython -I. -I/usr/include/x86_64-linux-gnu -I/tmp/code/Include -I/tmp/code/build-static -c /tmp/code/Modules/_decimal/_decimal.c -o build/temp.linux-x86_64-3.9/tmp/code/Modules/_decimal/_decimal.o 2020-06-29T08:52:56.9003112Z /tmp/code/Modules/_decimal/_decimal.c:40:4: error: #error "libmpdec version >= 2.5.0 required" 2020-06-29T08:52:56.9005053Z #error "libmpdec version >= 2.5.0 required" 2020-06-29T08:52:56.9006190Z ^~~~~ ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 10:41:28 2020 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 29 Jun 2020 14:41:28 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593441688.96.0.919329932673.issue40874@roundup.psfhosted.org> Anthony Sottile added the comment: especially this late in the beta period for 3.9 -- it would be unfortunate for 3.10 but it's an explicit break of feature freeze for 3.9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 10:48:33 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 14:48:33 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593442113.51.0.0674716306347.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: Ubuntu is my main system, and it does not break the build. If you use --with-system-libmpdec, you need to keep in sync with the external libmpdec. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 10:50:41 2020 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Mon, 29 Jun 2020 14:50:41 +0000 Subject: [issue41159] Nested async dict comprehension fails with SyntaxError Message-ID: <1593442241.74.0.468196599971.issue41159@roundup.psfhosted.org> New submission from Hrvoje Nik?i? : Originally brought up on StackOverflow, https://stackoverflow.com/questions/60799366/nested-async-comprehension : This dict comprehension parses and works correctly: async def bar(): return { n: await foo(n) for n in [1, 2, 3] } But making it nested fails with a SyntaxError: async def bar(): return { i: { n: await foo(n) for n in [1, 2, 3] } for i in [1,2,3] } The error reported is: File "", line 0 SyntaxError: asynchronous comprehension outside of an asynchronous function ---------- components: Interpreter Core messages: 372582 nosy: hniksic priority: normal severity: normal status: open title: Nested async dict comprehension fails with SyntaxError type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 10:51:00 2020 From: report at bugs.python.org (Jan Hudec) Date: Mon, 29 Jun 2020 14:51:00 +0000 Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za> Message-ID: <1593442260.09.0.377901493197.issue5004@roundup.psfhosted.org> Jan Hudec added the comment: Confirming the fixed version linked in previous comment by Thomas Waldmann is correct and matches what `hostname -f` does. ---------- nosy: +bulb 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 Jun 29 10:51:35 2020 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 29 Jun 2020 14:51:35 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593442295.25.0.746026163884.issue40874@roundup.psfhosted.org> Anthony Sottile added the comment: reverting this patch passes all the tests, what's the motivation and why were there no code reviews for this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 10:52:20 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 14:52:20 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593442340.11.0.0341538758454.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: Please name a buildbot that does not pass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 10:52:59 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 14:52:59 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593442379.3.0.893314009246.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: Or is this CoC bait again? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 10:56:31 2020 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 29 Jun 2020 14:56:31 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593442591.5.0.925989971583.issue40874@roundup.psfhosted.org> Anthony Sottile added the comment: I package pythons for ubuntu: https://github.com/deadsnakes/python3.9-nightly/actions/runs/151286686 https://github.com/deadsnakes/python3.10-nightly/actions/runs/151287821 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 10:58:26 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Jun 2020 14:58:26 +0000 Subject: [issue41159] Nested async dict comprehension fails with SyntaxError In-Reply-To: <1593442241.74.0.468196599971.issue41159@roundup.psfhosted.org> Message-ID: <1593442706.36.0.780498947443.issue41159@roundup.psfhosted.org> Serhiy Storchaka added the comment: This is a duplicate of issue33346. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Syntax error with async generator inside dictionary comprehension _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 11:04:39 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 15:04:39 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593443079.59.0.411838954144.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: If Python is packaged with **system** libmpdec, you can only use the official Ubuntu Python/libmpdec version combination. Which are packaged by Matthias Klose, who is on the CC list here. Otherwise, why use the system libmpdec at all and not the version shipped with Python? If I install into a venv, I also don't use the system libmpdec. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 11:05:53 2020 From: report at bugs.python.org (Marius Bakke) Date: Mon, 29 Jun 2020 15:05:53 +0000 Subject: [issue41160] Cross-compiling for GNU/Hurd fails Message-ID: <1593443153.41.0.00823928584858.issue41160@roundup.psfhosted.org> New submission from Marius Bakke : Attempting to cross-compile for i586-pc-gnu fails with the following message: checking MACHDEP... configure: error: cross build not supported for i586-pc-gnu Adding a trivial case for it in the configure script is sufficient. ---------- components: Build messages: 372590 nosy: mbakke priority: normal severity: normal status: open title: Cross-compiling for GNU/Hurd fails _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 11:08:39 2020 From: report at bugs.python.org (Marius Bakke) Date: Mon, 29 Jun 2020 15:08:39 +0000 Subject: [issue41160] Cross-compiling for GNU/Hurd fails In-Reply-To: <1593443153.41.0.00823928584858.issue41160@roundup.psfhosted.org> Message-ID: <1593443319.56.0.408322206261.issue41160@roundup.psfhosted.org> Change by Marius Bakke : ---------- keywords: +patch pull_requests: +20370 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21218 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 11:12:04 2020 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 29 Jun 2020 15:12:04 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593443524.29.0.684567415578.issue40874@roundup.psfhosted.org> Anthony Sottile added the comment: > Otherwise, why use the system libmpdec at all and not the version shipped with Python? the packages are faithful reproductions of upstream packages, deviating from those introduces surprises for downstreams > If I install into a venv, I also don't use the system libmpdec. that's simply not true: $ python3.9 -m venv vvv $ vvv/bin/python -c 'import _decimal, subprocess; subprocess.check_call(("ldd", _decimal.__file__))' linux-vdso.so.1 (0x00007fff429ec000) libmpdec.so.2 => /lib/x86_64-linux-gnu/libmpdec.so.2 (0x00007fcaeae03000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fcaeade0000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcaeabee000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fcaeaa9f000) /lib64/ld-linux-x86-64.so.2 (0x00007fcaeae7f000) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 11:17:04 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Jun 2020 15:17:04 +0000 Subject: [issue33346] Syntax error with async generator inside dictionary comprehension In-Reply-To: <1524567941.57.0.682650639539.issue33346@psf.upfronthosting.co.za> Message-ID: <1593443824.09.0.411056604265.issue33346@roundup.psfhosted.org> Serhiy Storchaka added the comment: What can I do to move this issue forward? We already missed 3.7, 3.8 and 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 11:22:21 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 15:22:21 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593444141.52.0.262471262525.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: You are talking to the author of libmpdec *and* the _decimal module. Perhaps this problem has occurred to me, too: $ diff -ur mpdecimal-2.5.0/libmpdec cpython-commit/Modules/_decimal/libmpdec/ Only in mpdecimal-2.5.0/libmpdec: .objs Only in mpdecimal-2.5.0/libmpdec: Makefile.in Only in mpdecimal-2.5.0/libmpdec: Makefile.vc diff -ur mpdecimal-2.5.0/libmpdec/README.txt cpython-commit/Modules/_decimal/libmpdec/README.txt --- mpdecimal-2.5.0/libmpdec/README.txt 2020-06-27 21:41:49.000000000 +0200 +++ cpython-commit/Modules/_decimal/libmpdec/README.txt 2020-06-29 13:46:45.379299458 +0200 @@ -8,6 +8,9 @@ Mike Cowlishaw/IBM's General Decimal Arithmetic Specification. +Files required for the Python _decimal module +============================================= + Core files for small and medium precision arithmetic ---------------------------------------------------- Only in mpdecimal-2.5.0/libmpdec: bench.c Only in mpdecimal-2.5.0/libmpdec: bench_full.c Only in mpdecimal-2.5.0/libmpdec: examples Only in cpython-commit/Modules/_decimal/libmpdec/: mpdecimal.h Only in mpdecimal-2.5.0/libmpdec: mpdecimal.h.in Only in mpdecimal-2.5.0/libmpdec: mpdecimal32vc.h Only in mpdecimal-2.5.0/libmpdec: mpdecimal64vc.h Only in mpdecimal-2.5.0/libmpdec: mpsignal.c You are the one here who wants to ship a non-recommended libmpdec version with Python-3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 11:39:27 2020 From: report at bugs.python.org (Bill Wallace) Date: Mon, 29 Jun 2020 15:39:27 +0000 Subject: [issue39085] Improve docs for await expression In-Reply-To: <1576640861.79.0.333385908669.issue39085@roundup.psfhosted.org> Message-ID: <1593445167.06.0.164375364559.issue39085@roundup.psfhosted.org> Bill Wallace added the comment: There are a few other places on the documentation that are imprecise or misleading for await. While the information needed is scattered around the docs, I think these can also be improved. I'm pretty sure these fit with this issue. Developing with asyncio guide: https://docs.python.org/3/library/asyncio-dev.html#concurrency-and-multithreading - first paragraph, "When a Task executes an await expression, the running Task gets suspended, and the event loop executes the next Task." Taken by itself it isn't clear that execution of the awaitable starts immediately without intervention from the event loop. A possible fix might be to add "If the awaited expression is a coroutine its execution begins immediately and the running Task will not suspend till the awaited expression stalls waiting for a result." The same sentence is found in the Task documentation: https://docs.python.org/3/library/asyncio-task.html#task-object ---------- nosy: +wwallace _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 11:56:29 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 29 Jun 2020 15:56:29 +0000 Subject: [issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath In-Reply-To: <1489121898.66.0.224917416789.issue29778@psf.upfronthosting.co.za> Message-ID: <1593446189.36.0.099843213054.issue29778@roundup.psfhosted.org> Steve Dower added the comment: > I understand that LoadLibraryExW() must not be attempted if _Py_dll_path is empty, or if Py_GetPrefix() is empty. Am I right? More likely those should never be empty. Perhaps sys.prefix is optional, but the DLL path is the current executing module, and should always be set. I suspect you're right, that 3.7 is also affected. But earlier versions would only _not_ fill the DLL path for static (non-shared) builds. It looks like Py_SetPath in 3.7 started clearing it unnecessarily, so that may be the cause. ---------- stage: resolved -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 12:00:50 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Jun 2020 16:00:50 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593446450.35.0.306716340752.issue40874@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +christian.heimes priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 12:02:57 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 29 Jun 2020 16:02:57 +0000 Subject: [issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath In-Reply-To: <1489121898.66.0.224917416789.issue29778@psf.upfronthosting.co.za> Message-ID: <1593446577.81.0.930083981763.issue29778@roundup.psfhosted.org> Steve Dower added the comment: Sorry, I take that back. Earlier versions would indeed skip initialization in some cases. I propose we deprecate the dll_path field in PathConfig and just get the path directly in the three places it's necessary. The path calculations have security exposure, so let's just avoid trying to manage additional state around it unnecessarily. I'll work on a patch this week unless someone else gets to it first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 12:05:17 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 16:05:17 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593446717.62.0.985863515552.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: This is no release blocker. Version 2.5.0 has been in 3.9 for a long time, and people should use the correct version. ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 12:07:37 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 16:07:37 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593446857.9.0.684706824316.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: --with-system-libmpdec is a **long term** tool for distributions. Pinning the version number ensures that they use the correct version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 12:11:10 2020 From: report at bugs.python.org (E. Paine) Date: Mon, 29 Jun 2020 16:11:10 +0000 Subject: [issue41155] Tkinter -postoffset not working for TCombobox In-Reply-To: <1593419495.04.0.313976680119.issue41155@roundup.psfhosted.org> Message-ID: <1593447070.38.0.280734614756.issue41155@roundup.psfhosted.org> E. Paine added the comment: This is a strange bug, as the fix is simply to explicitly give the style (`style='TCombobox'`). This is, however, a Tcl/Tk issue as it can be reproduced in wish (I used the script attached). I therefore ask you close this issue as third party (you can take it up with the Tcl team if you want). ---------- nosy: +epaine Added file: https://bugs.python.org/file49275/postoffset.tcl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 12:22:57 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Jun 2020 16:22:57 +0000 Subject: [issue41161] libmpdec-2.5.0 update is missing news entry Message-ID: <1593447777.78.0.32434043629.issue41161@roundup.psfhosted.org> New submission from Christian Heimes : libmpdec was updated in bpo-40874 but there is no entry in the changelog. Every non-trivial change should be accompanied by a Misc/NEWS.d/ blurb. Please update the changelog manually. ---------- assignee: skrah components: Documentation keywords: 3.9regression messages: 372600 nosy: christian.heimes, skrah priority: normal severity: normal stage: needs patch status: open title: libmpdec-2.5.0 update is missing news entry type: enhancement versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 12:28:11 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 29 Jun 2020 16:28:11 +0000 Subject: [issue41162] Clear audit hooks after destructors Message-ID: <1593448091.24.0.691665000355.issue41162@roundup.psfhosted.org> New submission from Steve Dower : Because of when _Py_ClearAuditHooks is called during finalization, it is possible that __del__ destructors will be called after hooks have been cleared. Audit events that would be raised here are dropped. We should ensure these events are received by any known hooks for the interpreter (Python) or the runtime (C). (Thanks to Frank Li for the report.) ---------- components: Interpreter Core messages: 372601 nosy: christian.heimes, steve.dower priority: normal severity: normal stage: needs patch status: open title: Clear audit hooks after destructors type: security versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 12:40:15 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 29 Jun 2020 16:40:15 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1593448815.21.0.152683002458.issue35975@roundup.psfhosted.org> Guido van Rossum added the comment: Fixed again. Thanks Stefan for finding this! I apologize for the bug. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 12:56:17 2020 From: report at bugs.python.org (hai shi) Date: Mon, 29 Jun 2020 16:56:17 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1593449777.98.0.952621255954.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +20371 pull_request: https://github.com/python/cpython/pull/21219 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 13:06:04 2020 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 29 Jun 2020 17:06:04 +0000 Subject: [issue41154] test_pkgutil:test_name_resolution fails on some platforms In-Reply-To: <1593413801.07.0.974965447149.issue41154@roundup.psfhosted.org> Message-ID: <1593450364.55.0.866685498596.issue41154@roundup.psfhosted.org> Vinay Sajip added the comment: The problem appears to be in importlib. I put in a breakpoint in the test just before it tries to import the module e?. (At this point it has successfully imported a module called ??? in an earlier loop iteration.) Then, in a different terminal console, I cd'd to the test directory and tried the import directly: $ ls -l total 0 drwxr-xr-x 3 xxxxxxxx xxxxx 102 29 Jun 17:55 e? drwxr-xr-x 4 xxxxxxxx xxxxx 136 29 Jun 17:55 ??? $ ~/projects/cpython/python.exe Python 3.10.0a0 (heads/master:a3ad95d, Jun 29 2020, 17:50:09) [Clang 8.0.0 (clang-800.0.42.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import ??? >>> import e? Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named '?' So for some reason, importlib is failing to import the ? module. (The ?/__init__.py is a zero-byte file.) Adding Brett to nosy. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 13:09:05 2020 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 29 Jun 2020 17:09:05 +0000 Subject: [issue40884] Added defaults parameter for logging.Formatter In-Reply-To: <1591399791.89.0.0887642700869.issue40884@roundup.psfhosted.org> Message-ID: <1593450545.44.0.658371209965.issue40884@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 13:13:36 2020 From: report at bugs.python.org (Rahul Jha) Date: Mon, 29 Jun 2020 17:13:36 +0000 Subject: [issue34360] urllib.parse doesn't fully comply to RFC 3986 In-Reply-To: <1533744155.42.0.56676864532.issue34360@psf.upfronthosting.co.za> Message-ID: <1593450816.05.0.256519779549.issue34360@roundup.psfhosted.org> Change by Rahul Jha : ---------- nosy: +RJ722 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 13:34:34 2020 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Jun 2020 17:34:34 +0000 Subject: [issue29753] Ctypes Packing Bitfields Incorrectly - Linux In-Reply-To: <1488933400.56.0.160685455632.issue29753@psf.upfronthosting.co.za> Message-ID: <1593452074.12.0.329509224571.issue29753@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- versions: +Python 3.8, Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 13:34:51 2020 From: report at bugs.python.org (Rahul Jha) Date: Mon, 29 Jun 2020 17:34:51 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1593452091.58.0.611767925345.issue19335@roundup.psfhosted.org> Rahul Jha added the comment: > That may actually be another alternative: instead of doing the "try > appending newlines and see if it works or generates different errors", > we may be able to switch to the tokenizer if the initial compilation > fails and check for hanging INDENT tokens (i.e. INDENTS without a > corresponding DEDENT). That would get us much closer to what the real > eval loop is doing. >From what I understand, "checking for two or more hanging INDENTS" and, "hardcoding a check for nonlocal SyntaxErrors in codeop._maybe_compile" are two different solutions, right? If yes, do we have an answer to which one of them is more cleaner, and henceforth, the preferable solution? I, personally, like the idea of checking INDENTS primarily because of it's reduced specificity, but I am in no position to comment on this (I already kinda did ':D), and you folks know better! For all we know, we should be optimizing for specificity. Also, reading Nick's comments and the comc's code, gives me the feeling that a fix for this wouldn't require drastic changes. I'm slowly starting my journey with CPython, and I'd like to contribute a patch if that is the case. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 13:35:07 2020 From: report at bugs.python.org (=?utf-8?b?UGV0ZXIgS3XFpcOhaw==?=) Date: Mon, 29 Jun 2020 17:35:07 +0000 Subject: [issue41163] test_weakref hangs Message-ID: <1593452107.04.0.340745139309.issue41163@roundup.psfhosted.org> New submission from Peter Ku??k : Command make hangs on test_weakref I compile python 3.6.11 (latest compatible with my settings raspbian jessie) I compile on OrangePi i96 - single core ARM I think it is same problem as Issue29796 ---------- components: Tests messages: 372605 nosy: Peter Ku??k priority: normal severity: normal status: open title: test_weakref hangs type: compile error versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 13:39:36 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 29 Jun 2020 17:39:36 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1593452376.19.0.329479574591.issue41004@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset b30ee26e366bf509b7538d79bfec6c6d38d53f28 by Ravi Teja P in branch 'master': bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033) https://github.com/python/cpython/commit/b30ee26e366bf509b7538d79bfec6c6d38d53f28 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 13:39:49 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jun 2020 17:39:49 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1593452389.24.0.799293604711.issue41004@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +20372 pull_request: https://github.com/python/cpython/pull/21220 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 13:39:57 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jun 2020 17:39:57 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1593452397.54.0.422050474374.issue41004@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20373 pull_request: https://github.com/python/cpython/pull/21221 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 13:48:44 2020 From: report at bugs.python.org (Andrew) Date: Mon, 29 Jun 2020 17:48:44 +0000 Subject: [issue41129] Python extension modules fail to build on Mac 10.15.1 (Catalina) In-Reply-To: <1593195068.14.0.719266681703.issue41129@roundup.psfhosted.org> Message-ID: <1593452924.87.0.341187003391.issue41129@roundup.psfhosted.org> Andrew added the comment: Thanks for your reply Ned. I think you are right about mac OS sandboxes messing something up. Python builds most of the extension modules fine if I do a straightforward build in the /tmp directory like you said. Do you know of any easy ways to disable mac OS sandboxes from being used in the python build from the command line? Alternatively, how do I open the python project in xcode11 GUI? I think I might be able to disable sandboxes from there. If you are not very familiar with mac OS sandboxes like me, feel free to leave that up to me to figure out. Regarding you question about my command line tools version: I upgraded the my xcode command line tools installation to 11.4 - I believe this is the latest version that's supported on mac 10.15.1 I still get the same error behavior though when building outside of /tmp. In this case, here is the compiler that's getting used. % gcc --version Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang version 11.0.3 (clang-1103.0.32.29) Target: x86_64-apple-darwin19.3.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 13:51:24 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 29 Jun 2020 17:51:24 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593453084.18.0.181267857779.issue40874@roundup.psfhosted.org> ?ukasz Langa added the comment: Stefan brought libmpdec-2.5.0 to 3.9 shortly before Beta 2. Due to us being busy with the importlib fiasco, this went under our radar. It shouldn't have. It's a large chunk of refactored code merged without review after the beta freeze. Betas aren't for changing style guides and language standards, etc. etc. Sadly, given that this already got released as part of Beta 2 and Beta 3 shortly after, I think at this point it's pointless to revert it. And the new PR simply requires a shared version to match the one that we are bundling now in sources, reverting just this one is out of the question. > Or is this CoC bait again? Stefan, please, don't be like that. What purpose does this serve? Anthony noted a new failure related to your unreviewed and under-documented commit. You slipped in libmpdec-2.5.0 during the beta freeze without any discussion. It catches up to you right now. No reason to shoot the messenger. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 14:00:36 2020 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 29 Jun 2020 18:00:36 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593453636.41.0.140321168293.issue40874@roundup.psfhosted.org> Anthony Sottile added the comment: ?ukasz: what would you recommend for downstream packagers? I have essentially two options (assuming this isn't reverted in cpython master which I believe makes the most sense since cpython still works fine with older libmpdec): - revert this individual commit as a patch - fork further from debian's packaging and use the vendored libmpdec (this potentially carries other negative side-effects since it makes the packages unlike upstream's -- and potentially susceptible to vendor/security drift since we don't carry patches for vendored components (but would get them from system libmpdec)) I'd rather not carry that patch indefinitely if possible -- especially when this cannot be built in a compatible way on software that's a mere 2 months old (ubuntu 20.04). For similar libraries (ssl, ffi, etc.) this would be a very major break in building. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 14:09:40 2020 From: report at bugs.python.org (JIanqiu Tao) Date: Mon, 29 Jun 2020 18:09:40 +0000 Subject: [issue41162] Clear audit hooks after destructors In-Reply-To: <1593448091.24.0.691665000355.issue41162@roundup.psfhosted.org> Message-ID: <1593454180.84.0.662275606604.issue41162@roundup.psfhosted.org> JIanqiu Tao added the comment: Patch attached below works well, but with less functionality for users' audit hook. Pure Python audit hook implement looks safe enough. Should we need call _PySys_ClearAuditHooks earlier for more functionality? ---------- keywords: +patch nosy: +zkonge Added file: https://bugs.python.org/file49276/clearaudithook.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 14:12:59 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jun 2020 18:12:59 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1593454379.49.0.00482766108995.issue41004@roundup.psfhosted.org> miss-islington added the comment: New changeset dc8ce8ead182de46584cc1ed8a8c51d48240cbd5 by Miss Islington (bot) in branch '3.8': bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033) https://github.com/python/cpython/commit/dc8ce8ead182de46584cc1ed8a8c51d48240cbd5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 14:15:42 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jun 2020 18:15:42 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1593454542.16.0.859138255809.issue41004@roundup.psfhosted.org> miss-islington added the comment: New changeset 9a646aa82dfa62d70ca2a99ada901ee6cf9f82bd by Miss Islington (bot) in branch '3.9': bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033) https://github.com/python/cpython/commit/9a646aa82dfa62d70ca2a99ada901ee6cf9f82bd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 14:18:36 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 29 Jun 2020 18:18:36 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1593454716.31.0.372418171528.issue41004@roundup.psfhosted.org> Change by Eric V. Smith : ---------- assignee: -> eric.smith resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 14:19:20 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 18:19:20 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593454760.6.0.117895495114.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: > Anthony noted a new failure related to your unreviewed and under-documented commit. He claimed a failure in Ubuntu (in a manner that I took as petulant), which isn't the case. It is a failure in a custom Ubuntu distro that uses --with-system-libmpdec in an unintended way. > You slipped in libmpdec-2.5.0 during the beta freeze without any discussion. I did not slip it in at all. You were on the nosy list from the very start of this issue, and so was Matthias. > It catches up to you right now. No reason to shoot the messenger. It catches up to people who use --with-system-libmpdec in an unintended manner. It is intended for a scenario like merging Python 3.9 into Sid, then testing, then stable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 14:21:16 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 18:21:16 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593454876.04.0.212447153311.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: > unreviewed and under-documented commit. libmpdec has been one of the few zero fault areas of Python. Please stop spreading FUD. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 14:27:06 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Jun 2020 18:27:06 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593455226.79.0.0218183479484.issue40874@roundup.psfhosted.org> Christian Heimes added the comment: > > unreviewed and under-documented commit. > > libmpdec has been one of the few zero fault areas of Python. > Please stop spreading FUD. This has nothing to do with your excellent fault rate (lack of any issues). The commit had no Misc/NEWS.d blurb and therefore was undocumented. I have opened bpo-41161 to address the issue. There was also no approval or review from another core dev on GH-20652. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 14:35:29 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 18:35:29 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593455729.84.0.63406033963.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: > This has nothing to do with your excellent fault rate (lack of any issues). I sounds like that though for random people who read this issue and think that ?ukasz is the grand release manager who puts a person in his place. That was incredibly inappropriate. libmpdec has **found** issues in decNumber that were acknowledged by Cowlishaw. If one's reputation is questioned every time one opens an issue here (notably by people who are not subject experts at all), then I *have* to respond in no uncertain terms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 14:37:33 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 18:37:33 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593455853.94.0.714009892408.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: > I have opened bpo-41161 to address the issue. Thanks, that is a more considerate approach, I'll add the note! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 15:08:46 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 19:08:46 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593457726.91.0.288349810339.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: Also note that people did not react at all to the fact that coroutine storage was not thread safe across several releases. No one asked for News entry. But "breaking" a fringe distro seems to be a major disaster. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 15:25:59 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 29 Jun 2020 19:25:59 +0000 Subject: [issue41129] Python extension modules fail to build on Mac 10.15.1 (Catalina) In-Reply-To: <1593195068.14.0.719266681703.issue41129@roundup.psfhosted.org> Message-ID: <1593458759.23.0.291623176584.issue41129@roundup.psfhosted.org> Ned Deily added the comment: > Do you know of any easy ways to disable mac OS sandboxes from being used in the python build from the command line? Please show the exact steps you used to build this, in particular, the full ./configure statement and any relevant env variable settings. I don't know how to disable the sandboxes because I've never seen something like this before and I don't know for sure how to reproduce. If I had to take a guess, I suspect it has to do with the location of your source tree which looks like it might be at a unconventional location at the root level: /mathworks/devel. As you may know, macOS 10.15 Catalina has made a lot of under the cover changes to file system structure including the splitting of / into immutable and mutable subvolumes (/System/Volumes/Data). You may want to try moving /mathworks to another location rather than directly under /, perhaps under /opt or under /Users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 15:31:14 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Jun 2020 19:31:14 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593459074.49.0.960810990921.issue40874@roundup.psfhosted.org> Christian Heimes added the comment: > Also note that people did not react at all to the fact that > coroutine storage was not thread safe across several releases. That's whataboutism. > No one asked for News entry. The bot did ask you to add a news entry. According to https://devguide.python.org/triaging/#github-labels-for-prs the "skip news" label should only be used in trivial cases like fixing a typo. > But "breaking" a fringe distro seems to be a major disaster. I find your choice of words hurtful and it demeaning. Other core developer go through great length to keep backwards compatibility for older or less commonly used systems. In bpo-40810 Erlend researched SQLite version numbers before support for support for ancient SQLite was dropped. I'm spending a considerable effort to keep Python working with unsupported but still widely used OpenSSL and LibreSSL versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 15:31:38 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 29 Jun 2020 19:31:38 +0000 Subject: [issue41129] Python extension modules fail to build on Mac 10.15.1 (Catalina) In-Reply-To: <1593195068.14.0.719266681703.issue41129@roundup.psfhosted.org> Message-ID: <1593459098.54.0.804343851264.issue41129@roundup.psfhosted.org> Ned Deily added the comment: PS. Or try doing an out-of-tree build. Perhaps the problem is just due to trying to do the build under that unconventional location under /. cd ~/build ./path/to/sourcetree/configure ... make ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 15:36:48 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Jun 2020 19:36:48 +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: <1593459408.11.0.622157242557.issue37999@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset e67f7db3c34f70536f36c56bb82e33c3512a53a3 by Serhiy Storchaka in branch 'master': bpo-37999: Simplify the conversion code for %c, %d, %x, etc. (GH-20437) https://github.com/python/cpython/commit/e67f7db3c34f70536f36c56bb82e33c3512a53a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 15:40:33 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 19:40:33 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593459633.3.0.65346199125.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: > The bot did ask you to add a news entry. And I deliberately did not, out of politeness. Two release managers were added and they did not ask. > Other core developer go through great length to keep backwards compatibility for older or less commonly used systems. Ok, I take that back then. I go through great lengths to keep libmpdec and Python in sync. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 15:45:27 2020 From: report at bugs.python.org (JIanqiu Tao) Date: Mon, 29 Jun 2020 19:45:27 +0000 Subject: [issue41162] Clear audit hooks after destructors In-Reply-To: <1593448091.24.0.691665000355.issue41162@roundup.psfhosted.org> Message-ID: <1593459927.74.0.494877553693.issue41162@roundup.psfhosted.org> Change by JIanqiu Tao : ---------- pull_requests: +20374 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21222 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 15:46:05 2020 From: report at bugs.python.org (Brett Cannon) Date: Mon, 29 Jun 2020 19:46:05 +0000 Subject: [issue41154] test_pkgutil:test_name_resolution fails on some platforms In-Reply-To: <1593413801.07.0.974965447149.issue41154@roundup.psfhosted.org> Message-ID: <1593459965.4.0.757357481368.issue41154@roundup.psfhosted.org> Brett Cannon added the comment: I wonder if it's a problem from Unicode representation since I don't think importlib tries to have a standard normalization form of Unicode. I could see that leading to how the file system encoded something differing from how it was encoded in the test file, leading to a claim the file doesn't exist. And thanks to binary file paths that isn't necessarily a wrong result. :P ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 16:04:19 2020 From: report at bugs.python.org (Andrei Daraschenka) Date: Mon, 29 Jun 2020 20:04:19 +0000 Subject: [issue41046] unittest: make skipTest a classmethod In-Reply-To: <1592613393.95.0.180040510992.issue41046@roundup.psfhosted.org> Message-ID: <1593461059.08.0.0521525625844.issue41046@roundup.psfhosted.org> Andrei Daraschenka added the comment: Hello and thanks for your issue. Can you explain why we need to make method as `classmethod` because in your example you don't provide argument for `cls.skipTest()`. ---------- nosy: +dorosch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 16:16:03 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 20:16:03 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593461763.38.0.864859406279.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: Major correction: Victor *did* ask for a news entry, but otherwise I would not have added one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 16:27:28 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Jun 2020 20:27:28 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1593462448.98.0.0607051152876.issue36346@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +20375 pull_request: https://github.com/python/cpython/pull/21223 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 16:42:38 2020 From: report at bugs.python.org (Zack Weinberg) Date: Mon, 29 Jun 2020 20:42:38 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1593463358.72.0.880314233606.issue18233@roundup.psfhosted.org> Zack Weinberg added the comment: I have yet another use case for the function implemented by this patch (i.e. retrieving the cert chain actually sent by the server, regardless of whether that gives a path to a trust anchor). I'm implementing a network forensics tool, and one of the situations it's supposed to detect is when a man-in-the-middle is attempting to substitute its own cert for a site's "legitimate" cert (yes, possibly having suborned a public CA in order to do so). To make all of the planned heuristics for this work correctly, I need to record exactly what came over the wire. If it would be useful for me to dust off the patch and/or implement the _other_ function that people requested (retrieve the chain that OpenSSL concluded was a valid chain to an accepted trust anchor) I can probably scare up time to do so in the next week or two. I imagine it's too late for 3.8 patch releases at this point, but assuming I did this, could it make 3.9? ---------- nosy: +zwol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 16:43:21 2020 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 29 Jun 2020 20:43:21 +0000 Subject: [issue40967] asyncio.Task.all_tasks() and asyncio.Task.current_task() must be removed in 3.9 In-Reply-To: <1592045282.09.0.91488246101.issue40967@roundup.psfhosted.org> Message-ID: <1593463401.78.0.31238002585.issue40967@roundup.psfhosted.org> Yury Selivanov added the comment: > Optimally, we want to do removals before the beta so that users can prepare accordingly rather than deal with breakage in the final release. +1 to remove it now. Up to Lukasz to give us green or red light here, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 16:55:00 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 29 Jun 2020 20:55:00 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593464100.87.0.023247797492.issue40874@roundup.psfhosted.org> ?ukasz Langa added the comment: > That was incredibly inappropriate. You'll have to let the readers of this thread judge that for themselves. You're right that you added me to nosy. I missed it as I've been busy with other things at the time. You let *3 hours* pass between opening this issue and merging the original backport PR into Python 3.9. Python users and fellow core developers value your contributions. I personally could not have done them myself. We only ask you to try to play along. For example by letting other core devs stamp non-trivial non-bugfix contributions late in the release cycle. Let's not make this unnecessarily hostile. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 16:57:32 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 29 Jun 2020 20:57:32 +0000 Subject: [issue40967] asyncio.Task.all_tasks() and asyncio.Task.current_task() must be removed in 3.9 In-Reply-To: <1592045282.09.0.91488246101.issue40967@roundup.psfhosted.org> Message-ID: <1593464252.56.0.347841109259.issue40967@roundup.psfhosted.org> ?ukasz Langa added the comment: Go ahead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 16:59:29 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 29 Jun 2020 20:59:29 +0000 Subject: [issue40924] Recent importlib change breaks most recent certifi == 2020.4.5.2 In-Reply-To: <1591682388.65.0.686796854093.issue40924@roundup.psfhosted.org> Message-ID: <1593464369.45.0.30765194554.issue40924@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 2fb5f038f2a2e91a7293d62dfd5601e6eb500c55 by Jason R. Coombs in branch 'master': bpo-40924: Ensure importlib.resources.path returns an extant path (GH-20857) https://github.com/python/cpython/commit/2fb5f038f2a2e91a7293d62dfd5601e6eb500c55 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 17:01:50 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 21:01:50 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593464510.41.0.992705088515.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: > You'll have to let the readers of this thread judge that for themselves. Ask Cowlishaw or the mpfr developers to read this thread. As for politeness, msg372581 was entirely polite and directly answered by an inappropriate and petulant msg372584. This no way to talk to an experienced core developer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 17:02:11 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 29 Jun 2020 21:02:11 +0000 Subject: [issue40746] test_gdb failing on 32-bit armv7l when built with GCC -Og (fail on Raspbian on 3.9, regression from 3.8) In-Reply-To: <1590258625.25.0.246740749681.issue40746@roundup.psfhosted.org> Message-ID: <1593464531.71.0.115523929855.issue40746@roundup.psfhosted.org> ?ukasz Langa added the comment: This will miss 3.9.0b4. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 17:10:55 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 29 Jun 2020 21:10:55 +0000 Subject: [issue40924] Recent importlib change breaks most recent certifi == 2020.4.5.2 In-Reply-To: <1591682388.65.0.686796854093.issue40924@roundup.psfhosted.org> Message-ID: <1593465055.22.0.170266558237.issue40924@roundup.psfhosted.org> ?ukasz Langa added the comment: This can now be closed. Thank you for all hard work here. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 17:14:03 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 21:14:03 +0000 Subject: [issue40874] Update to libmpdec-2.5.0 In-Reply-To: <1591374563.33.0.374271364023.issue40874@roundup.psfhosted.org> Message-ID: <1593465243.56.0.38293391851.issue40874@roundup.psfhosted.org> Stefan Krah added the comment: Since this is an ongoing problem: When I submitted the decNumber patches to Cowlishaw, he asked me if I would be interested in maintaining decNumber. I declined at the time due to time constraints. Had I accepted, I'd control 2/3 of the decimal market now, the Intel library being the remaining 1/3. I'm unwilling to justify my competence to random bug reporters in this forum, especially when I'm nice to them initially. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 17:54:15 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 29 Jun 2020 21:54:15 +0000 Subject: [issue40223] Add -fwrapv for new icc versions In-Reply-To: <1586342429.44.0.914021178636.issue40223@roundup.psfhosted.org> Message-ID: <1593467655.49.0.772119084547.issue40223@roundup.psfhosted.org> Benjamin Peterson added the comment: I don't readily have access to ICC, so I can't personally debug this. That commit was supposed to be a functional noop, though it may have exposed different optimization opportunities to the compiler. I would like to see Python not assumed signed overflow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 18:17:57 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 29 Jun 2020 22:17:57 +0000 Subject: [issue40223] Add -fwrapv for new icc versions In-Reply-To: <1586342429.44.0.914021178636.issue40223@roundup.psfhosted.org> Message-ID: <1593469077.67.0.500396238894.issue40223@roundup.psfhosted.org> Stefan Krah added the comment: Yeah, I already felt a bit guilty about adding you -- it could be a compiler bug or an actual overflow. My bet is also that the reordering exposes an existing overflow. The reordering itself certainly looks correct to me. When I have time, I'll try to look into it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 18:26:14 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 29 Jun 2020 22:26:14 +0000 Subject: [issue40223] Add -fwrapv for new icc versions In-Reply-To: <1586342429.44.0.914021178636.issue40223@roundup.psfhosted.org> Message-ID: <1593469574.52.0.372522759412.issue40223@roundup.psfhosted.org> Benjamin Peterson added the comment: I agree that your fix it correct, though because even if the specific issue you saw is a compiler bug, we need to tell our compilers than Python assumes signed wraparound. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 18:49:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jun 2020 22:49:11 +0000 Subject: [issue23427] Add sys.orig_argv: original command line arguments passed to the Python executable In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1593470951.07.0.294379240882.issue23427@roundup.psfhosted.org> STINNER Victor added the comment: New changeset dd8a93e23b5c4f9290e1cea6183d97eb9b5e61c0 by Victor Stinner in branch 'master': bpo-23427: Add sys.orig_argv attribute (GH-20729) https://github.com/python/cpython/commit/dd8a93e23b5c4f9290e1cea6183d97eb9b5e61c0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 18:53:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jun 2020 22:53:45 +0000 Subject: [issue23427] Add sys.orig_argv: original command line arguments passed to the Python executable In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1593471225.91.0.601720995628.issue23427@roundup.psfhosted.org> STINNER Victor added the comment: I added sys.orig_argv to the master branch (future Python 3.10). ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 19:57:08 2020 From: report at bugs.python.org (Lawrence D'Anna) Date: Mon, 29 Jun 2020 23:57:08 +0000 Subject: [issue41164] allow python to build for macosx-11.0-arm64 Message-ID: <1593475028.57.0.758354865143.issue41164@roundup.psfhosted.org> New submission from Lawrence D'Anna : allow python to build for macosx-11.0-arm64, by adding the appropriate case to configure.ac ---------- components: Interpreter Core files: 0001-arm64.patch keywords: patch messages: 372641 nosy: lawrence-danna-apple priority: normal severity: normal status: open title: allow python to build for macosx-11.0-arm64 type: enhancement versions: Python 3.9 Added file: https://bugs.python.org/file49277/0001-arm64.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 19:59:14 2020 From: report at bugs.python.org (Lawrence D'Anna) Date: Mon, 29 Jun 2020 23:59:14 +0000 Subject: [issue41164] allow python to build for macosx-11.0-arm64 In-Reply-To: <1593475028.57.0.758354865143.issue41164@roundup.psfhosted.org> Message-ID: <1593475154.14.0.0821643579994.issue41164@roundup.psfhosted.org> Change by Lawrence D'Anna : ---------- pull_requests: +20376 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21224 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 20:18:39 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Jun 2020 00:18:39 +0000 Subject: [issue41152] IDLE: revise setting of iomenu.encoding and .errors In-Reply-To: <1593367002.84.0.77588386021.issue41152@roundup.psfhosted.org> Message-ID: <1593476319.03.0.821702177024.issue41152@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 2515a28230b1a011205f30263da6b01c6bd167a3 by Serhiy Storchaka in branch 'master': bpo-41152: IDLE: always use UTF-8 for standard IO streams (GH-21214) https://github.com/python/cpython/commit/2515a28230b1a011205f30263da6b01c6bd167a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 20:18:47 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Jun 2020 00:18:47 +0000 Subject: [issue41152] IDLE: revise setting of iomenu.encoding and .errors In-Reply-To: <1593367002.84.0.77588386021.issue41152@roundup.psfhosted.org> Message-ID: <1593476327.98.0.282907208873.issue41152@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +20378 pull_request: https://github.com/python/cpython/pull/21225 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 20:18:55 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Jun 2020 00:18:55 +0000 Subject: [issue41152] IDLE: revise setting of iomenu.encoding and .errors In-Reply-To: <1593367002.84.0.77588386021.issue41152@roundup.psfhosted.org> Message-ID: <1593476335.6.0.439154723483.issue41152@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20379 pull_request: https://github.com/python/cpython/pull/21226 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 20:36:54 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Jun 2020 00:36:54 +0000 Subject: [issue41152] IDLE: revise setting of iomenu.encoding and .errors In-Reply-To: <1593367002.84.0.77588386021.issue41152@roundup.psfhosted.org> Message-ID: <1593477414.38.0.885111691139.issue41152@roundup.psfhosted.org> miss-islington added the comment: New changeset 01638ce51a63afe5af3f778e7403702703bb41b9 by Miss Islington (bot) in branch '3.9': bpo-41152: IDLE: always use UTF-8 for standard IO streams (GH-21214) https://github.com/python/cpython/commit/01638ce51a63afe5af3f778e7403702703bb41b9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 20:39:05 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Jun 2020 00:39:05 +0000 Subject: [issue41152] IDLE: revise setting of iomenu.encoding and .errors In-Reply-To: <1593367002.84.0.77588386021.issue41152@roundup.psfhosted.org> Message-ID: <1593477545.95.0.128942765009.issue41152@roundup.psfhosted.org> miss-islington added the comment: New changeset 00fd04b9b7537c473c3f9396a861868b8ddd3bb2 by Miss Islington (bot) in branch '3.8': bpo-41152: IDLE: always use UTF-8 for standard IO streams (GH-21214) https://github.com/python/cpython/commit/00fd04b9b7537c473c3f9396a861868b8ddd3bb2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 22:41:30 2020 From: report at bugs.python.org (Tim Peters) Date: Tue, 30 Jun 2020 02:41:30 +0000 Subject: [issue41133] Insufficient description of cyclic garbage collector for C API In-Reply-To: <1593210591.52.0.296051875695.issue41133@roundup.psfhosted.org> Message-ID: <1593484890.58.0.368164908015.issue41133@roundup.psfhosted.org> Tim Peters added the comment: I don't see real value in the docs noting that Bad Things can happen if code lies about true refcounts. If a container points to an object, _of course_ the container should own that reference. Cheating on that isn't intended to be supported in any way, so there's no obligation to explain how or why things can go wrong otherwise. Worse, trying to explain such things would constrain implementations to have the same specific kinds of failure modes forever after. Neither would there would be real value in repeating "DON'T LIE ABOUT REFCOUNTS!" on every page, either ;-) If someone just wants to know more about CPython's cyclic collector, that's fine, but that takes a great many more words than are suitable in the C API docs. Luckily, Pablo recently did that: https://devguide.python.org/garbage_collector/ ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 23:23:16 2020 From: report at bugs.python.org (Inada Naoki) Date: Tue, 30 Jun 2020 03:23:16 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593487396.04.0.899396482849.issue41123@roundup.psfhosted.org> Inada Naoki added the comment: New changeset b3332660adb02babb7e66e45310c66dc9a9a94da by Inada Naoki in branch 'master': bpo-41123: Remove PyUnicode_AsUnicodeCopy (GH-21209) https://github.com/python/cpython/commit/b3332660adb02babb7e66e45310c66dc9a9a94da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 23:26:47 2020 From: report at bugs.python.org (Inada Naoki) Date: Tue, 30 Jun 2020 03:26:47 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593487607.68.0.744214182577.issue41123@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +20380 pull_request: https://github.com/python/cpython/pull/21227 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 23:50:27 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 30 Jun 2020 03:50:27 +0000 Subject: [issue41164] allow python to build for macosx-11.0-arm64 In-Reply-To: <1593475028.57.0.758354865143.issue41164@roundup.psfhosted.org> Message-ID: <1593489027.73.0.243107819948.issue41164@roundup.psfhosted.org> Dong-hee Na added the comment: Thanks, Lawrence for the patch. I am happy to see the patch from the Apple team. By the way, is there any way to check that the CPython team can check all the tests works well on the ARM macOS? ---------- nosy: +corona10, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 29 23:50:48 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 30 Jun 2020 03:50:48 +0000 Subject: [issue41164] allow python to build for macosx-11.0-arm64 In-Reply-To: <1593475028.57.0.758354865143.issue41164@roundup.psfhosted.org> Message-ID: <1593489048.93.0.0690609625604.issue41164@roundup.psfhosted.org> Change by Dong-hee Na : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 00:03:02 2020 From: report at bugs.python.org (Lawrence D'Anna) Date: Tue, 30 Jun 2020 04:03:02 +0000 Subject: [issue41164] allow python to build for macosx-11.0-arm64 In-Reply-To: <1593475028.57.0.758354865143.issue41164@roundup.psfhosted.org> Message-ID: <1593489782.77.0.47664008855.issue41164@roundup.psfhosted.org> Lawrence D'Anna added the comment: The tests do not all pass yet, I thought I'd try with the tiny patch to enable building on arm and follow up with more after I getting feedback. If you prefer, I can wait until I have a complete patch that addresses all test failures on arm, but if you want to do it that way I think it will have to wait until the next seed of Mac OS 11 comes out. If you want to test it yourself on an arm Mac, we have Developer Transition Kits that include an arm Mac mini https://developer.apple.com/programs/universal/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 00:22:25 2020 From: report at bugs.python.org (Lawrence D'Anna) Date: Tue, 30 Jun 2020 04:22:25 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593490945.78.0.374091385096.issue41100@roundup.psfhosted.org> Change by Lawrence D'Anna : ---------- nosy: +lawrence-danna-apple nosy_count: 3.0 -> 4.0 pull_requests: +20381 pull_request: https://github.com/python/cpython/pull/21224 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 00:25:34 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 30 Jun 2020 04:25:34 +0000 Subject: [issue41164] allow python to build for macosx-11.0-arm64 In-Reply-To: <1593475028.57.0.758354865143.issue41164@roundup.psfhosted.org> Message-ID: <1593491134.22.0.980945268407.issue41164@roundup.psfhosted.org> Ned Deily added the comment: Lawrence, thanks for the PR. We appreciate any insights from you all. We ahve already started to build using the first seed of Big Sur and have already committed some fixes. Rather than having multiple open issues covering the same topic, I'd like to suggest that we use the existing one Issue41100 to consolidate the PRs; to that end, I've changed the title of your PR (PR 21224) to reference that issue and I'm going to close this one. I'll add you to the other issue and we can continue discussions. BTW, I believe a DTK is in Ronald's future :) ---------- nosy: +ned.deily resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Build failure on macOS 11 (beta) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 00:26:35 2020 From: report at bugs.python.org (Daniel Barkalow) Date: Tue, 30 Jun 2020 04:26:35 +0000 Subject: [issue41133] Insufficient description of cyclic garbage collector for C API In-Reply-To: <1593210591.52.0.296051875695.issue41133@roundup.psfhosted.org> Message-ID: <1593491195.45.0.448474670044.issue41133@roundup.psfhosted.org> Daniel Barkalow added the comment: I think it would be helpful to have something as troubleshooting information on the garbage collector. If you've got a bug in your C module, it's obvious that you shouldn't be doing something egregiously wrong, but it's not obvious what you might have done wrong in order to cause that particular failure. It wouldn't be useful to promise that, if you have a particular sort of bug, you'll get a particular sort of failure, or keep it the same from version to version, but it would be nice to be told, if you're getting tp_clear called on objects that aren't garbage in this particular version of Python, look for cases where you're calling py_VISIT on it more times than you called Py_INCREF. Alternatively, it would be helpful for the API documentation to say, "If you are having some strange problem with garbage collection, here's documentation (Developer Guide link) on what's really going on in the garbage collector, which might help explain what you could be doing wrong to get that effect." For that matter, the documentation for tp_traverse doesn't mention that you have to call Py_VISIT on each object exactly as many times as references you hold to it; the phrasing sounds like it's fine so long as you call it at least once on any object you hold a reference to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 00:28:21 2020 From: report at bugs.python.org (Lawrence D'Anna) Date: Tue, 30 Jun 2020 04:28:21 +0000 Subject: [issue41164] allow python to build for macosx-11.0-arm64 In-Reply-To: <1593475028.57.0.758354865143.issue41164@roundup.psfhosted.org> Message-ID: <1593491301.07.0.659991722757.issue41164@roundup.psfhosted.org> Lawrence D'Anna added the comment: sound good, thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 00:30:15 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 30 Jun 2020 04:30:15 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593491415.89.0.684812682166.issue41100@roundup.psfhosted.org> Ned Deily added the comment: [Moving the discussion from Issue41164 to here.] The change in PR 21224 may be needed to successfully build but I'm not sure whether that LIBTOOL_CRUFT stuff is still needed. With a squick search, I don't see any references to it anymore. But it won't hurt to add it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 00:33:11 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 30 Jun 2020 04:33:11 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593491591.04.0.440894705089.issue41100@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 00:43:07 2020 From: report at bugs.python.org (Lawrence D'Anna) Date: Tue, 30 Jun 2020 04:43:07 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593492187.86.0.738929878705.issue41100@roundup.psfhosted.org> Change by Lawrence D'Anna : ---------- pull_requests: +20382 pull_request: https://github.com/python/cpython/pull/21228 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 00:53:16 2020 From: report at bugs.python.org (Inada Naoki) Date: Tue, 30 Jun 2020 04:53:16 +0000 Subject: [issue41165] [Python 3.10] Remove APIs deprecated since Python 3.3 Message-ID: <1593492796.52.0.194597415316.issue41165@roundup.psfhosted.org> New submission from Inada Naoki : I don't think we need to remove them all at onece. But we can remove some of them for code health. c-api/module.rst .. c:function:: const char* PyModule_GetFilename(PyObject *module) .. deprecated:: 3.2 c-api/init.rst .. c:function:: void PyEval_AcquireLock() .. deprecated:: 3.2 .. c:function:: void PyEval_ReleaseLock() .. deprecated:: 3.2 unittest: .. deprecated:: 3.1 The fail* aliases listed in the second column have been deprecated. .. deprecated:: 3.2 The assert* aliases listed in the third column have been deprecated. .. deprecated:: 3.2 ``assertRegexpMatches`` and ``assertRaisesRegexp`` have been renamed to :meth:`.assertRegex` and :meth:`.assertRaisesRegex`. urllib.request: .. class:: URLopener(proxies=None, **x509) .. deprecated:: 3.3 .. class:: FancyURLopener(...) .. deprecated:: 3.3 turtle: .. function:: settiltangle(angle) .. deprecated:: 3.1 imp: .. function:: get_suffixes() .. function:: find_module(name[, path]) .. function:: load_module(name, file, pathname, description) .. data:: PY_SOURCE .. data:: PY_COMPILED .. data:: C_EXTENSION .. data:: PKG_DIRECTORY .. data:: C_BUILTIN .. data:: PY_FROZEN configparser: .. method:: readfp(fp, filename=None) .. deprecated:: 3.2 email.errors: * :class:`MalformedHeaderDefect` -- A header was found that was missing a colon, or was otherwise malformed. .. deprecated:: 3.3 pkgutil: .. class:: ImpImporter(dirname=None) .. deprecated:: 3.3 .. class:: ImpLoader(fullname, file, filename, etc) .. deprecated:: 3.3 zipfile: .. exception:: BadZipfile Alias of :exc:`BadZipFile`, for compatibility with older Python versions. .. deprecated:: 3.2 inspect: .. function:: getargspec(func) .. deprecated:: 3.0 asyncore: .. deprecated:: 3.2 importlib: .. class:: Finder .. deprecated:: 3.3 .. method:: path_mtime(path) .. deprecated:: 3.3 ---------- components: Library (Lib) messages: 372653 nosy: inada.naoki priority: normal severity: normal status: open title: [Python 3.10] Remove APIs deprecated since Python 3.3 versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 01:10:32 2020 From: report at bugs.python.org (Inada Naoki) Date: Tue, 30 Jun 2020 05:10:32 +0000 Subject: [issue41165] [Python 3.10] Remove APIs deprecated since Python 3.3 In-Reply-To: <1593492796.52.0.194597415316.issue41165@roundup.psfhosted.org> Message-ID: <1593493832.7.0.062860778929.issue41165@roundup.psfhosted.org> Inada Naoki added the comment: PyModule_GetFilename, PyEval_AcquireLock, PyEval_ReleaseLock. Are they part of stable ABI? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 01:39:38 2020 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Tue, 30 Jun 2020 05:39:38 +0000 Subject: [issue41048] read_mime_types() should read the rule file using UTF-8, not the locale encoding In-Reply-To: <1592644260.23.0.766790238639.issue41048@roundup.psfhosted.org> Message-ID: <1593495578.43.0.826998253842.issue41048@roundup.psfhosted.org> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- pull_requests: +20383 pull_request: https://github.com/python/cpython/pull/21229 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 01:40:26 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 30 Jun 2020 05:40:26 +0000 Subject: [issue41048] read_mime_types() should read the rule file using UTF-8, not the locale encoding In-Reply-To: <1592644260.23.0.766790238639.issue41048@roundup.psfhosted.org> Message-ID: <1593495626.77.0.495656122716.issue41048@roundup.psfhosted.org> Change by Ned Deily : ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 01:47:12 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 30 Jun 2020 05:47:12 +0000 Subject: [issue41048] read_mime_types() should read the rule file using UTF-8, not the locale encoding In-Reply-To: <1592644260.23.0.766790238639.issue41048@roundup.psfhosted.org> Message-ID: <1593496032.25.0.893255717176.issue41048@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the PR! With the backports to 3.9 and 3.8 in place, I am assuming we can now close this issue. ---------- nosy: +ned.deily resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 02:03:22 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Jun 2020 06:03:22 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1593497002.7.0.948973707033.issue36346@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 349f76c6aace5a4a2b57f6b442a532faf0027d6b by Serhiy Storchaka in branch 'master': bpo-36346: Prepare for removing the legacy Unicode C API (AC only). (GH-21223) https://github.com/python/cpython/commit/349f76c6aace5a4a2b57f6b442a532faf0027d6b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 02:24:26 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Jun 2020 06:24:26 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593498266.01.0.0233646524966.issue41123@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +20384 pull_request: https://github.com/python/cpython/pull/21230 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 02:24:09 2020 From: report at bugs.python.org (Inada Naoki) Date: Tue, 30 Jun 2020 06:24:09 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593498249.8.0.625236295291.issue41123@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 2ea6a9928e4fa135888cc8f4733c28d93e642301 by Inada Naoki in branch '3.9': bpo-41123: Remove PyUnicode_AsUnicodeCopy in 3.10 (GH-21227) https://github.com/python/cpython/commit/2ea6a9928e4fa135888cc8f4733c28d93e642301 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 02:27:03 2020 From: report at bugs.python.org (Inada Naoki) Date: Tue, 30 Jun 2020 06:27:03 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1593498423.33.0.0575741662157.issue36346@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 038dd0f79dc89566b01ba66a5a018266b2917a19 by Inada Naoki in branch 'master': bpo-36346: Raise DeprecationWarning when creating legacy Unicode (GH-20933) https://github.com/python/cpython/commit/038dd0f79dc89566b01ba66a5a018266b2917a19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 02:33:29 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Jun 2020 06:33:29 +0000 Subject: [issue41158] IDLE: rewrite the code for handling file encoding In-Reply-To: <1593430677.27.0.733244762594.issue41158@roundup.psfhosted.org> Message-ID: <1593498809.18.0.533881284023.issue41158@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 694d31e714074176f0c324f95948b75dc768c091 by Serhiy Storchaka in branch 'master': bpo-41158: IDLE: rewrite the code for handling file encoding (GH-21215) https://github.com/python/cpython/commit/694d31e714074176f0c324f95948b75dc768c091 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 02:48:59 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Jun 2020 06:48:59 +0000 Subject: [issue41158] IDLE: rewrite the code for handling file encoding In-Reply-To: <1593430677.27.0.733244762594.issue41158@roundup.psfhosted.org> Message-ID: <1593499739.42.0.648146227118.issue41158@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 Jun 30 03:01:22 2020 From: report at bugs.python.org (ABELARDO) Date: Tue, 30 Jun 2020 07:01:22 +0000 Subject: [issue41166] CLASS ATTRIBUTES Message-ID: <1593500482.74.0.237291555104.issue41166@roundup.psfhosted.org> New submission from ABELARDO : Hi there, I have encountered a possible bug inside the documentation. In the attached picture you can see a portion of text highlighted ("Class attribute"). I think it's a typo since there is not "class attributes" nor "instance attributes" but "class value" and "instance value". A "class value" is a value which is shared among instances and an "instance value" is a specific value of an attribute of an instance. Best regards. ---------- assignee: docs at python components: Documentation files: Captura de pantalla de 2020-06-30 08-50-39.png messages: 372660 nosy: ABELARDOLG, docs at python priority: normal severity: normal status: open title: CLASS ATTRIBUTES versions: Python 3.8 Added file: https://bugs.python.org/file49278/Captura de pantalla de 2020-06-30 08-50-39.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 03:22:17 2020 From: report at bugs.python.org (Svetoslav Inkolov) Date: Tue, 30 Jun 2020 07:22:17 +0000 Subject: [issue41155] Tkinter -postoffset not working for TCombobox In-Reply-To: <1593419495.04.0.313976680119.issue41155@roundup.psfhosted.org> Message-ID: <1593501737.55.0.358764324956.issue41155@roundup.psfhosted.org> Svetoslav Inkolov added the comment: Thanks to E. Paine's reply: This is a strange bug, as the fix is simply to explicitly give the style (`style='TCombobox'`) ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 03:52:57 2020 From: report at bugs.python.org (Tapas Kundu) Date: Tue, 30 Jun 2020 07:52:57 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1593503577.87.0.0356220901072.issue41004@roundup.psfhosted.org> Change by Tapas Kundu : ---------- nosy: +tapakund nosy_count: 7.0 -> 8.0 pull_requests: +20385 pull_request: https://github.com/python/cpython/pull/21231 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 04:18:18 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Tue, 30 Jun 2020 08:18:18 +0000 Subject: [issue41166] CLASS ATTRIBUTES In-Reply-To: <1593500482.74.0.237291555104.issue41166@roundup.psfhosted.org> Message-ID: <1593505098.46.0.257309825924.issue41166@roundup.psfhosted.org> Dennis Sweeney added the comment: I think the word "attribute" is preferred over "value" because "value" can mean just about anything, whereas, according to https://docs.python.org/3/glossary.html?highlight=glossary , an attribute is specifically: """A value associated with an object which is referenced by name using dotted expressions. For example, if an object `o` has an attribute `a` it would be referenced as `o.a`.""" The phrase "class attribute" is used throughout the documentation to mean an attribute of a class. To reference the class attribute called `foo` of the class called `MyClass`, we write `MyClass.foo`. Unless I misunderstand you, I don't think there is an issue. ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 04:19:55 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 30 Jun 2020 08:19:55 +0000 Subject: [issue41166] CLASS ATTRIBUTES In-Reply-To: <1593500482.74.0.237291555104.issue41166@roundup.psfhosted.org> Message-ID: <1593505195.35.0.0974538448347.issue41166@roundup.psfhosted.org> Steven D'Aprano added the comment: "Class attribute" and "instance attribute" are the usual terms used in the Python documentation and community. I have heard other terms used in other language communities, in particular "members" and "variables", but I've never come across one that uses "value". Do you mind if you tell us where you have seen this used? We have 30 years of talking about class and instance attributes, we're not going to change now. Java has ClassValue: https://docs.oracle.com/javase/7/docs/api/java/lang/ClassValue.html and Scala talks about "value classes", but neither seem to be what you are talking about. See also: https://stackoverflow.com/questions/11350423/terminology-of-class-attribute-vs-member-vs-variable-vs-field ---------- nosy: +steven.daprano resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 04:23:14 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 30 Jun 2020 08:23:14 +0000 Subject: [issue41166] CLASS ATTRIBUTES In-Reply-To: <1593500482.74.0.237291555104.issue41166@roundup.psfhosted.org> Message-ID: <1593505394.42.0.372556136964.issue41166@roundup.psfhosted.org> Steven D'Aprano added the comment: By the way, for future reports, it is much better to give the URL of the page and copy and paste the exact quote than to give a screen shot. Using a screen shot is inconvenient for us (we have to try to guess what URL you are referring to, there are *lots* of pages in the documentation) and discriminates against the visually impaired and blind, who may be using screen readers. (They typically do not work with images.) Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 04:25:02 2020 From: report at bugs.python.org (Tapas Kundu) Date: Tue, 30 Jun 2020 08:25:02 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1593505502.37.0.00922597493651.issue41004@roundup.psfhosted.org> Change by Tapas Kundu : ---------- pull_requests: +20386 pull_request: https://github.com/python/cpython/pull/21232 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 04:43:24 2020 From: report at bugs.python.org (Dirk Roorda) Date: Tue, 30 Jun 2020 08:43:24 +0000 Subject: [issue38891] ShareableList read and write access is O(N), should be O(1) In-Reply-To: <1574389874.92.0.425732905902.issue38891@roundup.psfhosted.org> Message-ID: <1593506604.11.0.0256470018969.issue38891@roundup.psfhosted.org> Dirk Roorda added the comment: I can see that the performance of ShareableList is much better now. Still the performance of list operations on a ShareableList may be degraded by a factor 200-300 with respect to a normal list. If this is unavoidable then the docs should clearly mention this degradation, because this will, in many use cases, cancel the performance gain that shared memory offers! ---------- nosy: +dirkroorda Added file: https://bugs.python.org/file49279/report.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 04:49:17 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Jun 2020 08:49:17 +0000 Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623 In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org> Message-ID: <1593506957.7.0.320507739022.issue41123@roundup.psfhosted.org> miss-islington added the comment: New changeset 41d6e3fbb8bcfd41db37782523caac47e7c8ad23 by Miss Islington (bot) in branch '3.8': bpo-41123: Remove PyUnicode_AsUnicodeCopy in 3.10 (GH-21227) https://github.com/python/cpython/commit/41d6e3fbb8bcfd41db37782523caac47e7c8ad23 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 04:51:02 2020 From: report at bugs.python.org (ABELARDO) Date: Tue, 30 Jun 2020 08:51:02 +0000 Subject: [issue41166] CLASS ATTRIBUTES In-Reply-To: <1593500482.74.0.237291555104.issue41166@roundup.psfhosted.org> Message-ID: <1593507062.48.0.651907335352.issue41166@roundup.psfhosted.org> ABELARDO added the comment: Sorry, I don't have any doc where "class value" / "instance value" are mentioned. This idea is original from me originally based on my personal interpretation about OOP basic concepts. But it doesn't mean I'm wrong with my proposal. When you use the following notation: "foo.a" you are accessing to the value of that attribute. In Python, you would write: print(foo.a) to print the value of that attribute, being 'foo' an instance of the Foo class. Right. All attributes are inheriting from a class; so, any attribute inside an instance is a "class attribute" but here I am not discussing this but the value itself. This confusion could be caused because Python could implement a mechanism different than other OOP programming languages and I'm not sure if Python strictly follows this paradigm. I am a newbie in Python but not in OOP paradigm, where my discussion is focused. If Python doesn't strictly follow the OOP paradigm, you could gently delete this issue because we wouldn't talk about the same concept. Otherwise, let's explain why I think the concept "class attribute" is wrong from my viewpoint. IMHO, a "class attribute" doesn't exist in OOP as is. Really, a "class value" exists instead. A "class value" is a value (pay attention, please: not an attribute) shared among all instances from a class. You can do this by tagging an attribute as "static" (in Java and PHP, for example). The value of that attribute is, again, shared among all instances of that class. Nevertheless, when you don't declare an attribute with the tag "static" you are requiring the value (!) is not being shared among their instances. It's not applied to attributes but values. The attribute always is a class level property (all instances share this property still when the instances don't contain the same value for it). Disclaimer: I'm not an English native. I made all my best to decently express in English but since it is not my native language I could have made typos which could twist my words. Best regards. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 04:53:12 2020 From: report at bugs.python.org (ABELARDO) Date: Tue, 30 Jun 2020 08:53:12 +0000 Subject: [issue41166] CLASS ATTRIBUTES In-Reply-To: <1593500482.74.0.237291555104.issue41166@roundup.psfhosted.org> Message-ID: <1593507192.01.0.853304300594.issue41166@roundup.psfhosted.org> ABELARDO added the comment: Steven D'Aprano: Yes, my fault. I will give an url where it is located. https://docs.python.org/3/tutorial/classes.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 04:56:08 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Jun 2020 08:56:08 +0000 Subject: [issue41142] msilib.CAB doesnot support non-ASCII files In-Reply-To: <1593270116.07.0.608480331512.issue41142@roundup.psfhosted.org> Message-ID: <1593507368.83.0.775969987136.issue41142@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset ba67d7386edf20bcc0f878a518de0894cb574e9f by Serhiy Storchaka in branch 'master': bpo-41142: Add support of non-ASCII paths for CAB files. (GH-21195) https://github.com/python/cpython/commit/ba67d7386edf20bcc0f878a518de0894cb574e9f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 04:56:22 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Jun 2020 08:56:22 +0000 Subject: [issue41142] msilib.CAB doesnot support non-ASCII files In-Reply-To: <1593270116.07.0.608480331512.issue41142@roundup.psfhosted.org> Message-ID: <1593507382.85.0.592168649766.issue41142@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 Jun 30 05:03:42 2020 From: report at bugs.python.org (Inada Naoki) Date: Tue, 30 Jun 2020 09:03:42 +0000 Subject: [issue41167] Add new formats to PyArg_ParseTuple for "str or None" Message-ID: <1593507822.5.0.360334275717.issue41167@roundup.psfhosted.org> New submission from Inada Naoki : PyArg_ParseTuple has 'U' format for getting Unicode as PyObject*. But when user want accept "str or None", they are forced to use 'O&' and write a custom converter. It is not convenient. I am proposing to add 'U?' for "str or None" variants of 'U'. Does it make sense? ---------- components: C API messages: 372670 nosy: inada.naoki priority: normal severity: normal status: open title: Add new formats to PyArg_ParseTuple for "str or None" versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 05:13:56 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Tue, 30 Jun 2020 09:13:56 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1593508436.15.0.345277798622.issue19335@roundup.psfhosted.org> Lysandros Nikolaou added the comment: > From what I understand, "checking for two or more hanging INDENTS" and, "hardcoding a check for nonlocal SyntaxErrors in codeop._maybe_compile" are two different solutions, right? If yes, do we have an answer to which one of them is more cleaner, and henceforth, the preferable solution? Note that these are two solution that take very different approaches. What Nick is suggesting with "checking for two or more hanging INDENTS" would drastically change how codeop._maybe_compile does its thing, while his other proposed solution, ""hardcoding a check for nonlocal SyntaxErrors in codeop._maybe_compile", would just fix this issue. > I, personally, like the idea of checking INDENTS primarily because of it's reduced specificity, but I am in no position to comment on this (I already kinda did ':D), and you folks know better! For all we know, we should be optimizing for specificity. You're right that this idea is more general. It would require significantly more effort from whoever tackles this though. > Also, reading Nick's comments and the comc's code, gives me the feeling that a fix for this wouldn't require drastic changes. That really depends on what solution is chosen out of the two. > I'm slowly starting my journey with CPython, and I'd like to contribute a patch if that is the case. Thanks! If there's consensus around one proposed approach, you could certainly take this up. I'd be glad to help out with workflow stuff or provide a first review. Let me know if you've got more questions. ---------- keywords: +3.3regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 05:15:56 2020 From: report at bugs.python.org (Stefan Krah) Date: Tue, 30 Jun 2020 09:15:56 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593508556.29.0.559533750106.issue41100@roundup.psfhosted.org> Stefan Krah added the comment: New changeset 604d95e235d86465b8c17f02095edcaf18464d4c by Lawrence D'Anna in branch 'master': bpo-41100: fix _decimal for arm64 Mac OS (GH-21228) https://github.com/python/cpython/commit/604d95e235d86465b8c17f02095edcaf18464d4c ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 05:17:19 2020 From: report at bugs.python.org (Chris Burr) Date: Tue, 30 Jun 2020 09:17:19 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1593508639.11.0.301954879789.issue18233@roundup.psfhosted.org> Chris Burr added the comment: Hi Zack, I've already opened a PR that is loosely based on this patch. If you have time to give it a review I'd appreciate the extra set of eyes. https://github.com/python/cpython/pull/17938 ---------- versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 05:18:22 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Jun 2020 09:18:22 +0000 Subject: [issue41167] Add new formats to PyArg_ParseTuple for "str or None" In-Reply-To: <1593507822.5.0.360334275717.issue41167@roundup.psfhosted.org> Message-ID: <1593508702.62.0.00929016372991.issue41167@roundup.psfhosted.org> Serhiy Storchaka added the comment: I think it is more common to use the general "O" format. In any case you need to write separate code for None and str in the body of function. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 05:33:37 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 30 Jun 2020 09:33:37 +0000 Subject: [issue40971] Documentation still mentions 'u' string formatting option In-Reply-To: <1592092069.64.0.724839327789.issue40971@roundup.psfhosted.org> Message-ID: <1593509617.37.0.130641699033.issue40971@roundup.psfhosted.org> Petr Viktorin added the comment: AFAICS, Python 3 suports '%u' for printf-style formatting: Python 3.8.3 (default, May 29 2020, 00:00:00) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> '%u' % 6 '6' What am I missing? ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 05:39:32 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 30 Jun 2020 09:39:32 +0000 Subject: [issue41164] allow python to build for macosx-11.0-arm64 In-Reply-To: <1593475028.57.0.758354865143.issue41164@roundup.psfhosted.org> Message-ID: <1593509972.53.0.0759474970347.issue41164@roundup.psfhosted.org> Ronald Oussoren added the comment: FYI I have as of a couple of minutes ago received a developer transition kit and can, and will, test on the new hardware. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 05:42:10 2020 From: report at bugs.python.org (Tapas Kundu) Date: Tue, 30 Jun 2020 09:42:10 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1593510130.36.0.539892180436.issue41004@roundup.psfhosted.org> Change by Tapas Kundu : ---------- pull_requests: +20387 pull_request: https://github.com/python/cpython/pull/21233 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 07:01:31 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 30 Jun 2020 11:01:31 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1593514891.23.0.052932329381.issue41004@roundup.psfhosted.org> Eric V. Smith added the comment: Ned: what are your thoughts on backporting this as a security issue? https://nvd.nist.gov/vuln/detail?vulnId=CVE-2020-14422 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 07:02:48 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 30 Jun 2020 11:02:48 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1593514968.6.0.00576317311402.issue41004@roundup.psfhosted.org> Change by Dong-hee Na : ---------- status: closed -> open versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 07:05:07 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 30 Jun 2020 11:05:07 +0000 Subject: [issue41013] test_os.test_memfd_create() fails on AMD64 FreeBSD Shared 3.x In-Reply-To: <1592434332.74.0.304039490213.issue41013@roundup.psfhosted.org> Message-ID: <1593515107.12.0.4590587585.issue41013@roundup.psfhosted.org> ?ukasz Langa added the comment: As a regression this would have been a release blocker, this also fails on 3.9 and 3.8. However, given that this has only been surfaced by Christian's fix to the testing machinery in GH-20942, I'll mark this as deferred blocker instead for visibility. ---------- nosy: +lukasz.langa priority: normal -> deferred blocker versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 07:05:26 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 30 Jun 2020 11:05:26 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1593515126.2.0.0331179130819.issue41004@roundup.psfhosted.org> Dong-hee Na added the comment: > https://nvd.nist.gov/vuln/detail?vulnId=CVE-2020-14422 As Eric said, this issue is assigned a CVE-2020-14422. I re-open PRs for 3.5 - 3.7 and waiting for other core developers guide. I am +1 on merge this PRs as the security patch. ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 07:12:47 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 30 Jun 2020 11:12:47 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593515567.7.0.0201615502609.issue41100@roundup.psfhosted.org> Ronald Oussoren added the comment: A first testrun on the arm-mac resulted in test failures in test_distutils (in particular test_deployment_target_default in the distutils test). That's something I have to investigate further. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 07:41:36 2020 From: report at bugs.python.org (Rahul Jha) Date: Tue, 30 Jun 2020 11:41:36 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1593517296.77.0.36875529187.issue19335@roundup.psfhosted.org> Rahul Jha added the comment: > Note that these are two solution that take very different approaches. What Nick is suggesting with "checking for two or more hanging INDENTS" would drastically change how codeop._maybe_compile does its thing, while his other proposed solution, ""hardcoding a check for nonlocal SyntaxErrors in codeop._maybe_compile", would just fix this issue. Got it! > If there's consensus around one proposed approach, you could certainly take this up. I'd be glad to help out with workflow stuff or provide a first review. Let me know if you've got more questions. Thank you so much Lysandros! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 07:43:23 2020 From: report at bugs.python.org (Kyle Evans) Date: Tue, 30 Jun 2020 11:43:23 +0000 Subject: [issue41013] test_os.test_memfd_create() fails on AMD64 FreeBSD Shared 3.x In-Reply-To: <1592434332.74.0.304039490213.issue41013@roundup.psfhosted.org> Message-ID: <1593517403.44.0.360042146669.issue41013@roundup.psfhosted.org> Kyle Evans added the comment: Ah, sorry, I meant to update this- I submitted our fix for review a day or two ago, got approval for commit and will poke koobs to rebuild the FreeBSD -CURRENT buildbot with it after that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 08:04:44 2020 From: report at bugs.python.org (Iman Sharafodin) Date: Tue, 30 Jun 2020 12:04:44 +0000 Subject: [issue41168] Lack of proper checking in PyObject_SetAttr leads to segmentation fault Message-ID: <1593518684.95.0.149768712012.issue41168@roundup.psfhosted.org> New submission from Iman Sharafodin : I was testing the latest release of Python 3.6 (June 27, 2020) (https://www.python.org/ftp/python/3.6.11/Python-3.6.11.tgz) and I found that there is lack of enough checks on line number 956 in Objects/object.c file which can cause a segmentation fault. It could lead to security related issues. I've attached the PoC.pyc. Program received signal SIGSEGV, Segmentation fault. PyObject_SetAttr (v=v at entry=0x6d7373616c637463, name=0x7ffff7f75730, value=value at entry=0x0) at Objects/object.c:956 956 PyTypeObject *tp = Py_TYPE(v); ---------- components: Interpreter Core files: PoC.pyc messages: 372683 nosy: Iman Sharafodin priority: normal severity: normal status: open title: Lack of proper checking in PyObject_SetAttr leads to segmentation fault type: security versions: Python 3.6 Added file: https://bugs.python.org/file49280/PoC.pyc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 08:23:13 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Jun 2020 12:23:13 +0000 Subject: [issue41152] IDLE: make sys.stdxxx.encoding always be utf-8 In-Reply-To: <1593367002.84.0.77588386021.issue41152@roundup.psfhosted.org> Message-ID: <1593519793.91.0.382292597103.issue41152@roundup.psfhosted.org> Terry J. Reedy added the comment: Thank you for this and the next patch. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: IDLE: revise setting of iomenu.encoding and .errors -> IDLE: make sys.stdxxx.encoding always be utf-8 versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 08:25:50 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 30 Jun 2020 12:25:50 +0000 Subject: [issue40971] Documentation still mentions 'u' string formatting option In-Reply-To: <1592092069.64.0.724839327789.issue40971@roundup.psfhosted.org> Message-ID: <1593519950.37.0.0108862165281.issue40971@roundup.psfhosted.org> Petr Viktorin added the comment: I'm closing the issue. Please comment or reopen if I missed something. ---------- resolution: -> not a bug stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 08:27:48 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Jun 2020 12:27:48 +0000 Subject: [issue41158] IDLE: rewrite the code for handling file encoding In-Reply-To: <1593430677.27.0.733244762594.issue41158@roundup.psfhosted.org> Message-ID: <1593520068.73.0.485251394679.issue41158@roundup.psfhosted.org> Terry J. Reedy added the comment: Is there any reason the patch would not work with 3.9/3.8? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 08:45:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Jun 2020 12:45:35 +0000 Subject: [issue38980] Compile libpython with -fno-semantic-interposition In-Reply-To: <1575561631.45.0.417730594345.issue38980@roundup.psfhosted.org> Message-ID: <1593521135.78.0.633479846316.issue38980@roundup.psfhosted.org> STINNER Victor added the comment: We wrote an article about -fno-semantic-interposition flag that we use with GCC on RHEL8 and Fedora: https://developers.redhat.com/blog/2020/06/25/red-hat-enterprise-linux-8-2-brings-faster-python-3-8-run-speeds/ "Enabling this flag disables semantic interposition, which can increase run speed by as much as 30%." In short, the flag allows the compiler to inline code and so make further optimizations, when Python is built with --enable-shared. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 09:02:02 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Jun 2020 13:02:02 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1593522122.05.0.912450174245.issue19335@roundup.psfhosted.org> Terry J. Reedy added the comment: _maybe_compile currently compiles the possibly complete statement up to 3 times -- with C-coded compile. Without doing any timing tests, I wondered if 3 times is really necessary. Nick suggested that using the tokenize module to determine the number of hanging indents, combined with some yet to be determined logic, might be an alternative. But since tokenize is written in Python, the result might not be any faster. Checking the error message aims at specifically fixing this issue. But I am not sure if the check is sufficient or if more logic is needed. "def a():\n nonlocal c\n" should ideally raise. "def a():\n def b():\n nonlocal c\n" must not. At least the second should be used for a new test. I would start by adding debug prints to see the result of each compile and then testing with those two lines. ---------- type: -> behavior versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 09:38:54 2020 From: report at bugs.python.org (Andrew) Date: Tue, 30 Jun 2020 13:38:54 +0000 Subject: [issue41129] Python extension modules fail to build on Mac 10.15.1 (Catalina) In-Reply-To: <1593195068.14.0.719266681703.issue41129@roundup.psfhosted.org> Message-ID: <1593524334.61.0.736910897867.issue41129@roundup.psfhosted.org> Andrew added the comment: The build steps were, unpack source, ./configure, make, using default settings on a company machine. The configure_and_make_output.txt I attached should show the whole ./configure output. The only difference is that I was using xcode 11.0 for that output- the errors and behavior are identical though. The error only seems to occur when building to a network location. This is most of our user space because we oftentimes do builds across platforms with the same source. Buliding at locations or out of source builds to /tmp or /Users/Shared works fine though. /mathworks is a network location which was originally mounted at root, but now we have it mounted at /System/Volumes/Data/mathworks. From there, all other network locations are available through other mount points. We also have some related symlinks at /System/Volumes/Data. I think I need to see how the network access move to /Systems/Volumes/Data might have changed and broken things for the python build. Likely, something deep in the python build is not working well with our new network setup. I will see if I can debug deeper into setup.py and PyBuildExt.build_extensions() to see if it's not working right with our network setup and to get you a way to reproduce this behavior. It's hard to see exactly how the paths get passed to xcode and the compiler though. I'll see what I can get you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 09:46:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Jun 2020 13:46:12 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1593524772.39.0.952154508044.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3ddc634cd5469550c0c2dc5a6051a70739995699 by Hai Shi in branch 'master': bpo-40275: Use new test.support helper submodules in tests (GH-21219) https://github.com/python/cpython/commit/3ddc634cd5469550c0c2dc5a6051a70739995699 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 09:46:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Jun 2020 13:46:35 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1593524795.36.0.0940967876143.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0c4f0f3b29d84063700217dcf90ad6860ed71c70 by Hai Shi in branch 'master': bpo-40275: Use new test.support helper submodules in tests (GH-21169) https://github.com/python/cpython/commit/0c4f0f3b29d84063700217dcf90ad6860ed71c70 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 09:48:19 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 30 Jun 2020 13:48:19 +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: <1593524899.13.0.485224286521.issue39314@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset bd4a3f21454a6012f4353e2255837561fc9f0e6a by R?mi Lapeyre in branch 'master': bpo-39314: Closes parenthesis when autocompleting for functions that take no arguments (GH-20562) https://github.com/python/cpython/commit/bd4a3f21454a6012f4353e2255837561fc9f0e6a ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 09:48:54 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 30 Jun 2020 13:48:54 +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: <1593524934.5.0.812862752213.issue39314@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 Jun 30 10:01:33 2020 From: report at bugs.python.org (hai shi) Date: Tue, 30 Jun 2020 14:01:33 +0000 Subject: [issue41073] [C API] PyType_GetSlot() should accept static types In-Reply-To: <1592815094.33.0.264745776024.issue41073@roundup.psfhosted.org> Message-ID: <1593525693.9.0.437743310712.issue41073@roundup.psfhosted.org> hai shi added the comment: > bpo-17162 added PyType_GetSlot(), but static types were not discussed there. Thanks to correct my info. I paste this bpo just Larry have mentioned the static type in PyType_GetSlot() :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 10:03:44 2020 From: report at bugs.python.org (hai shi) Date: Tue, 30 Jun 2020 14:03:44 +0000 Subject: [issue38980] Compile libpython with -fno-semantic-interposition In-Reply-To: <1575561631.45.0.417730594345.issue38980@roundup.psfhosted.org> Message-ID: <1593525824.74.0.546621683191.issue38980@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 10:06:11 2020 From: report at bugs.python.org (Wator Sead) Date: Tue, 30 Jun 2020 14:06:11 +0000 Subject: [issue41169] socket.inet_pton raised when pass an IPv6 address like "[::]" to it Message-ID: <1593525971.46.0.103341919582.issue41169@roundup.psfhosted.org> New submission from Wator Sead : 3.6: >>> import socket >>> socket.inet_pton(socket.AF_INET6,'[::]') b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 3.7 and above: >>> import socket >>> socket.inet_pton(socket.AF_INET6,'[::]') Traceback (most recent call last): File "", line 1, in OSError: illegal IP address string passed to inet_pton Both: >>> import socket >>> addr = '[::1]', 888 >>> ls = socket.socket(socket.AF_INET6) >>> cs = socket.socket(socket.AF_INET6) >>> ls.bind(addr) # no raise >>> ls.listen(1) >>> cs.connect(addr) # no raise ---------- components: Library (Lib) messages: 372694 nosy: seahoh priority: normal severity: normal status: open title: socket.inet_pton raised when pass an IPv6 address like "[::]" to it type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 10:17:24 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 30 Jun 2020 14:17:24 +0000 Subject: [issue38980] Compile libpython with -fno-semantic-interposition In-Reply-To: <1575561631.45.0.417730594345.issue38980@roundup.psfhosted.org> Message-ID: <1593526644.27.0.687570054032.issue38980@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 10:41:52 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 30 Jun 2020 14:41:52 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1593528112.66.0.411423772296.issue41004@roundup.psfhosted.org> Ned Deily added the comment: A legitimate CVE should certainly be backported to all applicable releases, so, yes. However, I think that it is important for the CVE to be mentioned in the NEWS blurbs for each commit. So please update the NEWS items in each open PR to include the CVE. For master and 3.9 (if you hurry), you can update the original blurb file. For 3.8, the blurb file is in the process of being merged into the blurb for the release; for it, wait until the v3.8.4rc1 has been merged back into the main cpython repo and then update the merged the blob, please. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 10:44:52 2020 From: report at bugs.python.org (Niclas Larsson) Date: Tue, 30 Jun 2020 14:44:52 +0000 Subject: [issue41170] Use strnlen instead of strlen when the size i known. Message-ID: <1593528292.53.0.480525267545.issue41170@roundup.psfhosted.org> Change by Niclas Larsson : ---------- components: C API nosy: Niclas Larsson priority: normal severity: normal status: open title: Use strnlen instead of strlen when the size i known. versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 10:50:20 2020 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Jun 2020 14:50:20 +0000 Subject: [issue41170] Use strnlen instead of strlen when the size i known. Message-ID: <1593528620.18.0.986481908907.issue41170@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +20388 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21236 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 11:34:35 2020 From: report at bugs.python.org (William Pickard) Date: Tue, 30 Jun 2020 15:34:35 +0000 Subject: [issue41171] Create companion methods of "PyType_FromSpec*" to allow setting metaclass. Message-ID: <1593531275.14.0.931108904355.issue41171@roundup.psfhosted.org> New submission from William Pickard : The current goal from what I can tell for Python is to have all C based modules move away from static types and instead use "PyType_FromSpec" and the variant that specifies base classes. The only problem is, PyType_FromSpec and it's variant makes the assumption the caller wants "PyType_Type" as the type's metaclass. Why not add companion methods to them prefixed with "PyMetaType" and have the "PyType" ones internally invoke these new methods with "PyType_Type" as the metaclass (to keep existing behavior and backwards compatibility) ---------- components: C API messages: 372696 nosy: WildCard65 priority: normal severity: normal status: open title: Create companion methods of "PyType_FromSpec*" to allow setting metaclass. type: enhancement versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 11:35:26 2020 From: report at bugs.python.org (William Pickard) Date: Tue, 30 Jun 2020 15:35:26 +0000 Subject: [issue41171] Create companion methods of "PyType_FromSpec*" to allow setting metaclass. In-Reply-To: <1593531275.14.0.931108904355.issue41171@roundup.psfhosted.org> Message-ID: <1593531326.04.0.392678856881.issue41171@roundup.psfhosted.org> William Pickard added the comment: Another thing I thought of, if this is accepted, we can turn the "PyType" methods into header static inline methods. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 11:47:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Jun 2020 15:47:22 +0000 Subject: [issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration In-Reply-To: <1586183568.2.0.322929459864.issue40204@roundup.psfhosted.org> Message-ID: <1593532042.64.0.18326471541.issue40204@roundup.psfhosted.org> STINNER Victor added the comment: This issue prevents to upgrade Sphinx to Sphinx 3 in Fedora Rawhide, at least it breaks the python3-docs package which is Python 3.9 documentation: https://bugzilla.redhat.com/show_bug.cgi?id=1823898 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 11:57:23 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 30 Jun 2020 15:57:23 +0000 Subject: [issue41172] test_peg_generator C tests fail on Windows ARM Message-ID: <1593532643.61.0.103127847831.issue41172@roundup.psfhosted.org> New submission from Steve Dower : These tests rely on MSVC to do some building, but Windows ARM devices do not currently have a compiler toolset (you need to cross-compile). We should skip these tests. Sample build: https://buildbot.python.org/all/#/builders/182/builds/773 Sample traceback: ====================================================================== ERROR: test_error_in_rules (test.test_peg_generator.test_c_parser.TestCParser) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\python\lib\test\test_peg_generator\test_c_parser.py", line 404, in test_error_in_rules self.run_test(grammar_source, test_source) File "C:\python\lib\test\test_peg_generator\test_c_parser.py", line 83, in run_test self.build_extension(grammar_source) File "C:\python\lib\test\test_peg_generator\test_c_parser.py", line 80, in build_extension generate_parser_c_extension(grammar, Path(self.tmp_path)) File "C:\python\Tools\peg_generator\pegen\testutil.py", line 104, in generate_parser_c_extension compile_c_extension(str(source), build_dir=str(path)) File "C:\python\Tools\peg_generator\pegen\build.py", line 90, in compile_c_extension cmd.run() File "C:\python\lib\distutils\command\build_ext.py", line 340, in run self.build_extensions() File "C:\python\lib\distutils\command\build_ext.py", line 449, in build_extensions self._build_extensions_serial() File "C:\python\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial self.build_extension(ext) File "C:\python\lib\distutils\command\build_ext.py", line 529, in build_extension objects = self.compiler.compile(sources, File "C:\python\lib\distutils\_msvccompiler.py", line 323, in compile self.initialize() File "C:\python\lib\distutils\_msvccompiler.py", line 220, in initialize vc_env = _get_vc_env(plat_spec) File "C:\python\lib\distutils\_msvccompiler.py", line 122, in _get_vc_env raise DistutilsPlatformError("Unable to find vcvarsall.bat") distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat ---------- components: Tests, Windows messages: 372699 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: test_peg_generator C tests fail on Windows ARM versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 11:58:09 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 30 Jun 2020 15:58:09 +0000 Subject: [issue41173] Windows ARM buildbots cannot upload results Message-ID: <1593532689.42.0.224097599218.issue41173@roundup.psfhosted.org> New submission from Steve Dower : Sample build: https://buildbot.python.org/all/#/builders/182/builds/773 The second last step is failing for some reason, probably because it doesn't have the file it needs. ---------- components: Build, Windows messages: 372700 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows ARM buildbots cannot upload results versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 11:59:17 2020 From: report at bugs.python.org (Julien Palard) Date: Tue, 30 Jun 2020 15:59:17 +0000 Subject: [issue40742] Doc: Parallel build break audit table In-Reply-To: <1590231407.13.0.794441624197.issue40742@roundup.psfhosted.org> Message-ID: <1593532757.51.0.928290989466.issue40742@roundup.psfhosted.org> Change by Julien Palard : ---------- keywords: +patch pull_requests: +20389 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21237 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 12:00:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Jun 2020 16:00:52 +0000 Subject: [issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration In-Reply-To: <1586183568.2.0.322929459864.issue40204@roundup.psfhosted.org> Message-ID: <1593532852.26.0.283168802633.issue40204@roundup.psfhosted.org> STINNER Victor added the comment: Making the Python documentation compatible with Sphinx 3.0 is causing multiple blocker issues. (*) The first major problem is that new C domain markup like :c:struct: and :expr: are not recognized by Sphinx 2.4.4, but Sphinx 3.0 requires them. For example, a ".. c:struct:" section is completely hidden: treated as a comment. I don't think that we can afford to drop Sphinx < 3 support since no Linux distribution uses Sphinx 3 yet. I see two options: * Stay at Sphinx forever * Backport the ":c:struct:" and ":c:expr:" markups somehow in Sphinx 2 using our CPython Sphinx extensions * Update Sphinx 3 to tolerate our "incorrect" documentation using :c:type: and :c:type:`PyObject\*` (invalid C syntax), maybe as an opt-in option * Update Sphinx 2 to support Sphinx 3 new syntax: something like Python 2.7 which backported a few Python 3 features like b"bytes string" syntax (*) The second major question is: should we backport these changes to Python 3.8 and 3.9 branches? I consider that "supporting Sphinx 3" is a fix in the Python build system, and usually we do backport such changes, even if they can be seen as "new features". For me, it falls into the same category than supporting a newer version of C compiler. PR 19397 makes tons of small changes. If we don't backport it, it will be very likely very painful to backport documentation changes. Julien Palard (who works on the documentation) suggests to backport the change. Usually, documentation changes are applied to all branches, not only master. Again, right now, if we backport these changes, we would drop Sphinx 2 support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 12:02:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Jun 2020 16:02:00 +0000 Subject: [issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration In-Reply-To: <1586183568.2.0.322929459864.issue40204@roundup.psfhosted.org> Message-ID: <1593532920.31.0.0647433684201.issue40204@roundup.psfhosted.org> STINNER Victor added the comment: In short, the current status is that IMHO it is not acceptable to support Sphinx 3. We cannot afford to break support with Sphinx 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 12:21:41 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Tue, 30 Jun 2020 16:21:41 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1593534101.97.0.605241445677.issue19335@roundup.psfhosted.org> Lysandros Nikolaou added the comment: I feel that I wasn't clear at all in my previous responses, so let me try to have another go at explaining how I see this: We have two distinct problems, that are totally unrelated to one another: 1) nonlocal should raise when it's not in a nested function (question for the more experienced here: is this the *only* place where nonlocal is allowed?) 2) comc should return None, signifying an incomplete input, when presented with the bloack: def a(): def b(): nonlocal c because c, the variable, could be declared in a, the function, some time after the definition of b, the function, is done. The way I see this, like I have expressed in my previous comments, is that whatever solution we come up with should not involve the parser, because it should not care about statement semantics. I'm not really sure what the best solutions are, but I'd propose the following for the problems I listed above: 1) We should alter code in symtable.c to check whether the namespace in which the nonlocal statement appears in is a function block and whether it is nested or not. 2) A check for the SyntaxError message to see if it comes from a nonlocal statement surely sounds like a hack, but I don't think that's a dealbreaker. I'd probably go with this rather than undergoing the effort of exposing the indentation stack in Python and then examining it in codeop. Thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 12:29:58 2020 From: report at bugs.python.org (William Pickard) Date: Tue, 30 Jun 2020 16:29:58 +0000 Subject: [issue41171] Create companion methods of "PyType_FromSpec*" to allow setting metaclass. In-Reply-To: <1593531275.14.0.931108904355.issue41171@roundup.psfhosted.org> Message-ID: <1593534598.24.0.285721641789.issue41171@roundup.psfhosted.org> Change by William Pickard : ---------- keywords: +patch pull_requests: +20390 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21238 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 13:05:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Jun 2020 17:05:23 +0000 Subject: [issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration In-Reply-To: <1586183568.2.0.322929459864.issue40204@roundup.psfhosted.org> Message-ID: <1593536723.39.0.744305866431.issue40204@roundup.psfhosted.org> STINNER Victor added the comment: I reported the issue to Sphinx: "C domain changes of Sphinx 3 prevent to write doc compatible with Sphinx 2 and Sphinx 3" https://github.com/sphinx-doc/sphinx/issues/7899 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 13:08:45 2020 From: report at bugs.python.org (E. Paine) Date: Tue, 30 Jun 2020 17:08:45 +0000 Subject: [issue40893] tkinter: integrate TkDND support In-Reply-To: <1591474190.65.0.383574909158.issue40893@roundup.psfhosted.org> Message-ID: <1593536925.14.0.544464736437.issue40893@roundup.psfhosted.org> E. Paine added the comment: I think I have fixed the problem with the 'data' attribute (and related getlist_event method) by exposing two event data attributes. One of these is a 'data_raw' attribute intended for use with text-based drops and the other is a 'data_split' intended for file drops (see the new docs for details). My original idea was to expose the 'tkapp.splitlist' method and just give them the content of what is now the 'data_raw' attribute. However, I decided that should be avoided and so settled on the current implementation of two new attributes. Thanks everyone for the effort you have already put into this and I know that there is a lot added in this PR but I would really appreciate some reviews to get it to a more commit-ready state (there is inevitably lots to be improved - I also apologise for saying 'appreciate' in almost every message :-). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 13:14:21 2020 From: report at bugs.python.org (Allan Feldman) Date: Tue, 30 Jun 2020 17:14:21 +0000 Subject: [issue41174] asyncio.coroutine decorator returns a non-generator function when using PYTHONASYNCIODEBUG Message-ID: <1593537261.43.0.523552907091.issue41174@roundup.psfhosted.org> New submission from Allan Feldman : This code behaves differently when PYTHONASYNCIODEBUG=1 import asyncio import inspect @asyncio.coroutine def foo(): yield from asyncio.sleep(0) print("isgeneratorfunction:", inspect.isgeneratorfunction(foo)) PYTHONASYNCIODEBUG: isgeneratorfunction: False non-debug mode: isgeneratorfunction: True When in debug mode, the `asyncio.coroutine` decorator returns a function that is not a generator function (https://github.com/python/cpython/blob/bd4a3f21454a6012f4353e2255837561fc9f0e6a/Lib/asyncio/coroutines.py#L144) The result is that introspection of functions is changed when PYTHONASYNCIODEBUG is enabled. ---------- components: asyncio messages: 372706 nosy: a-feld, asvetlov, yselivanov priority: normal severity: normal status: open title: asyncio.coroutine decorator returns a non-generator function when using PYTHONASYNCIODEBUG 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 Jun 30 13:23:35 2020 From: report at bugs.python.org (Lawrence D'Anna) Date: Tue, 30 Jun 2020 17:23:35 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593537815.9.0.296492423321.issue41100@roundup.psfhosted.org> Change by Lawrence D'Anna : ---------- pull_requests: +20391 pull_request: https://github.com/python/cpython/pull/21239 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 13:26:55 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 30 Jun 2020 17:26:55 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1593538015.42.0.705992959905.issue19335@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > 1) We should alter code in symtable.c to check whether the namespace in which the nonlocal statement appears in is a function block and whether it is nested or not. We already raise in this case. Consider this 'test.py' file: x = 34 def f(): nonlocal x x = 24 f() Executing python test.py: File "test.py", line 3 nonlocal x ^ SyntaxError: no binding for nonlocal 'x' found ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 13:29:20 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 30 Jun 2020 17:29:20 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1593538160.07.0.613548028428.issue19335@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: >1) We should alter code in symtable.c to check whether the namespace in which the nonlocal statement appears in is a function block and whether it is nested or not. Also, the 'nesting' has very specific meanings in the symbol table: scoping. The validity of the keyword translates there if is able to find a variable in the enclosing intermediate scope (when its not the global one). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 14:00:24 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Tue, 30 Jun 2020 18:00:24 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1593540024.69.0.519070645017.issue19335@roundup.psfhosted.org> Lysandros Nikolaou added the comment: That's right, but the SyntaxError message is somewhat confusing. At least the fact that the SyntaxError message is some for both of def a(): def b(): nonlocal x and def a(): nonlocal x seems a bit misleading. No? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 14:01:08 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Tue, 30 Jun 2020 18:01:08 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1593540068.88.0.629781792998.issue19335@roundup.psfhosted.org> Lysandros Nikolaou added the comment: some -> same ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 14:06:49 2020 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 30 Jun 2020 18:06:49 +0000 Subject: [issue41175] Static analysis issues reported by GCC 10 Message-ID: <1593540409.36.0.220720333967.issue41175@roundup.psfhosted.org> New submission from Charalampos Stratakis : GCC added a static analysis tool recently [0]. Running it under for CPython code base produces some interesting results. Reproducer: ./configure --with-pydebug && CFLAGS='-fanalyzer' make Attaching the log. [0] https://developers.redhat.com/blog/2020/03/26/static-analysis-in-gcc-10/ ---------- files: debugstaticanalysis.txt messages: 372711 nosy: cstratak priority: normal severity: normal status: open title: Static analysis issues reported by GCC 10 versions: Python 3.10, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file49281/debugstaticanalysis.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 14:07:54 2020 From: report at bugs.python.org (Stefan Krah) Date: Tue, 30 Jun 2020 18:07:54 +0000 Subject: [issue40223] Add -fwrapv for new icc versions In-Reply-To: <1586342429.44.0.914021178636.issue40223@roundup.psfhosted.org> Message-ID: <1593540474.65.0.972686650149.issue40223@roundup.psfhosted.org> Stefan Krah added the comment: It looks like a compiler bug (line numbers are after macro expansion): #0 0x00000000006ea678 in _PyEval_EvalFrameDefault (f=0x886d20 <_PyRuntime+352>, throwflag=-8) at Python/ceval.c:35554 #1 0x000000000057167b in _PyEval_EvalCodeWithName (_co=0x886d20 <_PyRuntime+352>, globals=0xfffffffffffffff8, locals=0xffffffffffffffff, args=0x1, argcount=9370836, kwnames=0x0, kwargs=0x90bd90, kwcount=0, kwstep=1, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x8f05a0, qualname=0x8f05a0) at Python/ceval.c:33634 #2 0x000000000043a693 in _PyFunction_FastCallKeywords (func=0x886d20 <_PyRuntime+352>, stack=0xfffffffffffffff8, nargs=-1, kwnames=0x1) at Objects/call.c:433 #3 0x00000000006e65f5 in call_function (pp_stack=0x886d20 <_PyRuntime+352>, oparg=-8, kwnames=0xffffffffffffffff) at Python/ceval.c:37762 #4 0x00000000006eb7a8 in _PyEval_EvalFrameDefault (f=0x886d20 <_PyRuntime+352>, throwflag=-8) at Python/ceval.c:36385 #5 0x000000000057167b in _PyEval_EvalCodeWithName (_co=0x886d20 <_PyRuntime+352>, globals=0xfffffffffffffff8, locals=0xffffffffffffffff, args=0x1, argcount=9370836, kwnames=0x0, kwargs=0x0, kwcount=0, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:33634 #6 0x0000000000571e41 in PyEval_EvalCodeEx (_co=0x886d20 <_PyRuntime+352>, globals=0xfffffffffffffff8, locals=0xffffffffffffffff, args=0x1, argcount=9370836, kws=0x0, kwcount=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:37166 #7 0x00000000006bdb95 in builtin___build_class__ (self=0x886d20 <_PyRuntime+352>, args=0xfffffffffffffff8, nargs=-1, kwnames=0x1) at Python/bltinmodule.c:221 #8 0x000000000043a41e in _PyMethodDef_RawFastCallKeywords (method=0x886d20 <_PyRuntime+352>, self=0xfffffffffffffff8, args=0xffffffffffffffff, nargs=1, kwnames=0x8efcd4) at Objects/call.c:656 #9 0x000000000043ada6 in _PyCFunction_FastCallKeywords (func=0x886d20 <_PyRuntime+352>, args=0xfffffffffffffff8, nargs=-1, kwnames=0x1) at Objects/call.c:730 #10 0x00000000006e6a64 in call_function (pp_stack=0x886d20 <_PyRuntime+352>, oparg=-8, kwnames=0xffffffffffffffff) at Python/ceval.c:37714 #11 0x00000000006eb7a8 in _PyEval_EvalFrameDefault (f=0x886d20 <_PyRuntime+352>, throwflag=-8) at Python/ceval.c:36385 #12 0x000000000057167b in _PyEval_EvalCodeWithName (_co=0x886d20 <_PyRuntime+352>, globals=0xfffffffffffffff8, locals=0xffffffffffffffff, args=0x1, argcount=9370836, kwnames=0x0, kwargs=0x0, kwcount=0, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:33634 #13 0x0000000000570c52 in PyEval_EvalCodeEx (_co=, globals=, locals=, args=, argcount=, kws=, kwcount=, defs=, defcount=, kwdefs=, closure=) at Python/ceval.c:37166 #14 PyEval_EvalCode (co=0x886d20 <_PyRuntime+352>, globals=0xfffffffffffffff8, locals=0xffffffffffffffff) at Python/ceval.c:33611 #15 0x00000000005b20ba in exec_code_in_module (name=, module_dict=, code_object=) at Python/import.c:952 #16 PyImport_ImportFrozenModuleObject (name=) at Python/import.c:1357 #17 PyImport_ImportFrozenModule (name=0x886d20 <_PyRuntime+352> "\020\023\216") at Python/import.c:1376 #18 0x00000000005ca1f7 in _Py_InitializeCore_impl (interp_p=0xfffffffffffffff8, core_config=0xffffffffffffffff) at Python/pylifecycle.c:197 #19 0x00000000005c9be5 in _Py_InitializeCore (interp_p=0xfffffffffffffff8, src_config=0xffffffffffffffff) at Python/pylifecycle.c:745 #20 0x0000000000429859 in pymain_init (pymain=0x886d20 <_PyRuntime+352>, interp_p=0xfffffffffffffff8) at Modules/main.c:1733 #21 0x0000000000428ddf in pymain_main (pymain=) at Modules/main.c:1753 #22 _Py_UnixMain (argc=8940832, argv=0xfffffffffffffff8) at Modules/main.c:1792 #23 0x00007ffff7c90f43 in __libc_start_main () from /lib64/libc.so.6 #24 0x000000000042652e in _start () In frame 13 argcount is still 0: #13 0x0000000000570c52 in PyEval_EvalCodeEx (_co=, globals=, locals=, args=, argcount=, kws=, kwcount=, defs=, defcount=, kwdefs=, closure=) at Python/ceval.c:37166 37166 return _PyEval_EvalCodeWithName(_co, globals, locals, (gdb) l 37161 PyObject *const *kws, int kwcount, 37162 PyObject *const *defs, int defcount, 37163 PyObject *kwdefs, PyObject *closure) 37164 { 37165 if (argcount != 0) abort(); 37166 return _PyEval_EvalCodeWithName(_co, globals, locals, 37167 args, argcount, 37168 kws, kws != ((void*)0) ? kws + 1 : ((void*)0), 37169 kwcount, 2, 37170 defs, defcount, In frame 12 it looks uninitialized: (gdb) f 12 #12 0x000000000057167b in _PyEval_EvalCodeWithName (_co=0x886d20 <_PyRuntime+352>, globals=0xfffffffffffffff8, locals=0xffffffffffffffff, args=0x1, argcount=9370836, kwnames=0x0, kwargs=0x0, kwcount=0, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:33634 33634 return interp->eval_frame(f, throwflag); So yes, if -fwrapv of all things prevents that, let's go for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 14:09:45 2020 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 30 Jun 2020 18:09:45 +0000 Subject: [issue41175] Static analysis issues reported by GCC 10 In-Reply-To: <1593540409.36.0.220720333967.issue41175@roundup.psfhosted.org> Message-ID: <1593540585.76.0.242288740678.issue41175@roundup.psfhosted.org> Charalampos Stratakis added the comment: First issue in Objects/bytearrayobject.c [0]. warning: use of NULL ?? where non-null expected [CWE-690] [-Wanalyzer-null-argument] 277 | memcpy(result->ob_bytes, va.buf, va.len); [0] https://github.com/python/cpython/blob/master/Objects/bytearrayobject.c#L277 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 14:10:11 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 30 Jun 2020 18:10:11 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1593540611.28.0.180731800285.issue19335@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > At least the fact that the SyntaxError message is some for both of Well, is the same because the semantics are the same: a symbol is missing in the expected scopes. The only difference is that in the first case is not even possible to "fix it" because that scope cannot exist if the function is not 'nested'. But I do agree that it may be some value on specializing the error message to that case (but is not enough to have the nesting, you would need also to add a variable - the error is really 'you need a symbol in an intermediate scope' -> 'Oh, i don't even have an intermediate scope' -> 'then *first* you need to add an intermediate scope). Although this particular problem is indeed different from the main one (the one about codeop). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 14:10:35 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 30 Jun 2020 18:10:35 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1593540635.37.0.428907699239.issue19335@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: first case -> second case ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 14:20:23 2020 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 30 Jun 2020 18:20:23 +0000 Subject: [issue41175] Static analysis issues reported by GCC 10 In-Reply-To: <1593540409.36.0.220720333967.issue41175@roundup.psfhosted.org> Message-ID: <1593541223.19.0.096536508658.issue41175@roundup.psfhosted.org> Change by Charalampos Stratakis : ---------- keywords: +patch pull_requests: +20392 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21240 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 14:23:27 2020 From: report at bugs.python.org (Lawrence D'Anna) Date: Tue, 30 Jun 2020 18:23:27 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593541407.86.0.610445183662.issue41100@roundup.psfhosted.org> Change by Lawrence D'Anna : ---------- pull_requests: +20393 pull_request: https://github.com/python/cpython/pull/21241 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 14:25:26 2020 From: report at bugs.python.org (Lawrence D'Anna) Date: Tue, 30 Jun 2020 18:25:26 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593541526.2.0.760145298591.issue41100@roundup.psfhosted.org> Change by Lawrence D'Anna : ---------- pull_requests: +20394 pull_request: https://github.com/python/cpython/pull/21242 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 14:29:07 2020 From: report at bugs.python.org (Lawrence D'Anna) Date: Tue, 30 Jun 2020 18:29:07 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593541747.55.0.695879386575.issue41100@roundup.psfhosted.org> Lawrence D'Anna added the comment: I've created 3 patches for ctypes * use system libffi instead of vendored one on Mac OS 10.15 and up * use correct ABI for variadic functions on arm64 * check for libs in the dyld shared cache With those, test_ctypes should all pass on arm64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 14:51:07 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 30 Jun 2020 18:51:07 +0000 Subject: [issue33346] Syntax error with async generator inside dictionary comprehension In-Reply-To: <1524567941.57.0.682650639539.issue33346@psf.upfronthosting.co.za> Message-ID: <1593543067.78.0.547929197521.issue33346@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Yeah, I am +1 on moving this and on the current solution in PR6766 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 14:52:34 2020 From: report at bugs.python.org (Stefan Krah) Date: Tue, 30 Jun 2020 18:52:34 +0000 Subject: [issue41161] libmpdec-2.5.0 update is missing news entry In-Reply-To: <1593447777.78.0.32434043629.issue41161@roundup.psfhosted.org> Message-ID: <1593543154.49.0.0543023983842.issue41161@roundup.psfhosted.org> Change by Stefan Krah : ---------- keywords: +patch pull_requests: +20395 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21243 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 14:59:04 2020 From: report at bugs.python.org (Stefan Krah) Date: Tue, 30 Jun 2020 18:59:04 +0000 Subject: [issue41161] libmpdec-2.5.0 update is missing news entry In-Reply-To: <1593447777.78.0.32434043629.issue41161@roundup.psfhosted.org> Message-ID: <1593543544.21.0.621750886647.issue41161@roundup.psfhosted.org> Stefan Krah added the comment: New changeset 1648c99932f39f1c60972bb114e6a7bd65523818 by Stefan Krah in branch 'master': bpo-41161 Add news entry for libmpdec-2.5.0 (GH-21243) https://github.com/python/cpython/commit/1648c99932f39f1c60972bb114e6a7bd65523818 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 14:59:35 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Jun 2020 18:59:35 +0000 Subject: [issue41161] libmpdec-2.5.0 update is missing news entry In-Reply-To: <1593447777.78.0.32434043629.issue41161@roundup.psfhosted.org> Message-ID: <1593543575.56.0.808993745359.issue41161@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +20396 pull_request: https://github.com/python/cpython/pull/21244 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 15:07:19 2020 From: report at bugs.python.org (Stefan Krah) Date: Tue, 30 Jun 2020 19:07:19 +0000 Subject: [issue41161] libmpdec-2.5.0 update is missing news entry In-Reply-To: <1593447777.78.0.32434043629.issue41161@roundup.psfhosted.org> Message-ID: <1593544039.27.0.192719354611.issue41161@roundup.psfhosted.org> Stefan Krah added the comment: New changeset c84d3fe6b3301c7fd4a82e63fb4d545a7b9df84b by Miss Islington (bot) in branch '3.9': bpo-41161 Add news entry for libmpdec-2.5.0 (GH-21243) (#21244) https://github.com/python/cpython/commit/c84d3fe6b3301c7fd4a82e63fb4d545a7b9df84b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 15:08:52 2020 From: report at bugs.python.org (Stefan Krah) Date: Tue, 30 Jun 2020 19:08:52 +0000 Subject: [issue41161] libmpdec-2.5.0 update is missing news entry In-Reply-To: <1593447777.78.0.32434043629.issue41161@roundup.psfhosted.org> Message-ID: <1593544132.02.0.0588437638237.issue41161@roundup.psfhosted.org> Change by Stefan Krah : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 15:20:25 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 30 Jun 2020 19:20:25 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1593544825.13.0.0815868267987.issue41004@roundup.psfhosted.org> Ned Deily added the comment: New changeset b98e7790c77a4378ec4b1c71b84138cb930b69b7 by Tapas Kundu in branch '3.7': [3.7] bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033) (GH-21231) https://github.com/python/cpython/commit/b98e7790c77a4378ec4b1c71b84138cb930b69b7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 15:30:29 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 30 Jun 2020 19:30:29 +0000 Subject: [issue41004] Hash collisions in IPv4Interface and IPv6Interface In-Reply-To: <1592399512.32.0.283218763722.issue41004@roundup.psfhosted.org> Message-ID: <1593545429.92.0.146329081428.issue41004@roundup.psfhosted.org> Ned Deily added the comment: New changeset cfc7ff8d05f7a949a88b8a8dd506fb5c1c30d3e9 by Tapas Kundu in branch '3.6': [3.6] bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033) (GH-21232) https://github.com/python/cpython/commit/cfc7ff8d05f7a949a88b8a8dd506fb5c1c30d3e9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 16:44:35 2020 From: report at bugs.python.org (Richard Sheridan) Date: Tue, 30 Jun 2020 20:44:35 +0000 Subject: [issue41176] revise Tkinter mainloop dispatching flag behavior Message-ID: <1593549875.63.0.81357373837.issue41176@roundup.psfhosted.org> New submission from Richard Sheridan : This could also be considered a "behavior" type issue. `TkappObject` has a member `dispatching` that could usefully be exposed by a very simple read-only method for users to determine at runtime if the tkinter mainloop is running. Matplotlib and I'm sure other packages rely on fragile hacks (https://github.com/matplotlib/matplotlib/blob/a68562aa230e5895136120f5073dd01f124d728d/lib/matplotlib/cbook/__init__.py#L65-L71) to determine this state. I ran into this in https://github.com/matplotlib/matplotlib/pull/17802. All these projects would be more reliable with a new "dispatching()" method on the TkappObject, tkinter.Misc objects, and possibly the tkinter module itself. Internally, `dispatching` is used to, yes, determine if the mainloop is running. However, this determination is always done within the `WaitForMainloop` function (https://github.com/python/cpython/blob/bd4a3f21454a6012f4353e2255837561fc9f0e6a/Modules/_tkinter.c#L363-L380), which waits up to 1 second for the mainloop to come up. Apparently, this function allows a thread to implicitly wait for the loop to come up by calling any `TkappObject` method. This is a bad design choice in my opinion, because if client code wants to start immediately and the loop is not started by mistake, there will be a meaningless, hard-to-diagnose delay of one second before crashing. Instead, if some client code in a thread needs to wait for the mainloop to run, it should explicitly poll `dispatching()` on its own. This waiting behavior should be deprecated and, after a deprecation cycle perhaps, all `WaitForMainloop()` statements should be converted to inline `self->dispatching`. The correctness of the `dispatching` flag is dampened by the currently existing, undocumented `willdispatch` method which simply arbitrarily sets the `dispatching` to 1. It seems `willdispatch` was added 18 years ago to circumvent a bug building pydoc caused by `WaitForMainloop` not waiting long enough, as it tricks `WaitForMainloop` into... not waiting for the mainloop. This was in my opinion a bad choice in comparison to adding a dispatching flag: again, if some thread needs to wait for the mainloop, it should poll `dispatching()`, and avoid adding spurious 1 second waits. `willdispatch` currently has no references in CPython and most GitHub references are to Pycharm stubs for the CPython method. It should be deprecated and removed to preserve the correctness of `dispatching`. Happy to make a PR about this, except I don't understand clinic at all, nor the specifics of deprecation cycles in CPython. ---------- components: Tkinter messages: 372722 nosy: Richard Sheridan priority: normal severity: normal status: open title: revise Tkinter mainloop dispatching flag behavior 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 Tue Jun 30 17:01:07 2020 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 30 Jun 2020 21:01:07 +0000 Subject: [issue38782] Convert importlib.abc to use typing.Protocol In-Reply-To: <1573598860.27.0.897323663705.issue38782@roundup.psfhosted.org> Message-ID: <1593550867.99.0.567882779715.issue38782@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 3.0 -> 4.0 pull_requests: +20397 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21245 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 17:21:06 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 30 Jun 2020 21:21:06 +0000 Subject: [issue41169] socket.inet_pton raised when pass an IPv6 address like "[::]" to it In-Reply-To: <1593525971.46.0.103341919582.issue41169@roundup.psfhosted.org> Message-ID: <1593552066.39.0.418720514855.issue41169@roundup.psfhosted.org> Christian Heimes added the comment: I can reproduce the problem with 3.6 and even Python versions as old as 3.4: Python 3.4.10rc1+ (default, Jun 30 2020, 23:15:25) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> socket.inet_pton(socket.AF_INET6,'[::]') Traceback (most recent call last): File "", line 1, in OSError: illegal IP address string passed to inet_pton Python is just mapping inet_pton(3) return value 0 to an exception. It might be possible that your libc has changed behavior. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 19:10:03 2020 From: report at bugs.python.org (Brett Hannigan) Date: Tue, 30 Jun 2020 23:10:03 +0000 Subject: [issue41177] ConvertingList and ConvertingTuple lack iterators and ConvertingDict lacks items() Message-ID: <1593558603.02.0.467706950868.issue41177@roundup.psfhosted.org> New submission from Brett Hannigan : The logging.config module uses three internal data structures to hold items that may need to be converted to a handler or other object: ConvertingList, ConvertingTuple, and ConvertingDict. These three objects provide interfaces to get converted items using the __getitem__ methods. However, if a user tries to iterate over items in the container, they will get the un-converted entries. ---------- components: Library (Lib) messages: 372724 nosy: Brett Hannigan priority: normal severity: normal status: open title: ConvertingList and ConvertingTuple lack iterators and ConvertingDict lacks items() type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 19:40:09 2020 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Jun 2020 23:40:09 +0000 Subject: [issue41177] ConvertingList and ConvertingTuple lack iterators and ConvertingDict lacks items() In-Reply-To: <1593558603.02.0.467706950868.issue41177@roundup.psfhosted.org> Message-ID: <1593560409.7.0.766357960203.issue41177@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +20398 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21248 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 20:35:17 2020 From: report at bugs.python.org (Wator Sead) Date: Wed, 01 Jul 2020 00:35:17 +0000 Subject: [issue41169] socket.inet_pton raised when pass an IPv6 address like "[::]" to it In-Reply-To: <1593525971.46.0.103341919582.issue41169@roundup.psfhosted.org> Message-ID: <1593563717.15.0.395287228306.issue41169@roundup.psfhosted.org> Wator Sead added the comment: I did not build it, just download the Windows pre-built releases. Can make a consistent behave via constraints it? socket.socket accepted it, but socket.inet_pton did not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 20:40:23 2020 From: report at bugs.python.org (DataGhost) Date: Wed, 01 Jul 2020 00:40:23 +0000 Subject: [issue41178] Registry writes on Windows Store - workaround Message-ID: <1593564023.02.0.36011703999.issue41178@roundup.psfhosted.org> New submission from DataGhost : I just installed the Windows Store version of Python (v3.8.3:6f8c832) on Windows 10.0.18362.900 (1903, old VM) and quickly ran into the issue that registry writes aren't visible system-wide. I later found a remark about this in the Known Issues section of the Using Python on Windows page. Real-world scenario: running "python -m pip install --user pipx" and subsequently "python -m pipx ensurepath" says it changed the PATH variable, but it does not take effect even after a reboot. I'd say this is one of the cases where a user might not know about what's going on and why it fails, even after reading the known issues, and the developer might not have thought of the existence or incompatibility of the Windows Store version of Python at all. I have found a workaround to do this, though, and I figured the best place to do that is in the actual winreg module so that users and developers don't need to worry about this. Calling reg.exe allows registry variables to be written in the "normal" registry, and these changes are system-wide rather than in the private copy Store apps use. Some functions could be changed to use the reg.exe binary instead of the system calls on Windows Store builds. Other functions, such as for querying, don't need any changes. I realise this is an ugly workaround so I'm just suggesting it in hopes of improving compatibility, so that users and developers don't need to worry about these issues anymore. I did some basic tests on this, by executing reg.exe through the subprocess module, and testing for a Windows Store instance by checking sys.base_exec_prefix. There are probably better ways but at least this shows that it should be possible in just Python. ---------- components: Windows messages: 372726 nosy: DataGhost, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Registry writes on Windows Store - workaround type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 21:08:17 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 01 Jul 2020 01:08:17 +0000 Subject: [issue41170] Use strnlen instead of strlen when the size i known. Message-ID: <1593565697.06.0.841082636792.issue41170@roundup.psfhosted.org> New submission from Eric V. Smith : Is strnlen() supported by all of the compilers we care about? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 21:09:06 2020 From: report at bugs.python.org (Lawrence D'Anna) Date: Wed, 01 Jul 2020 01:09:06 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1593565746.39.0.219467769235.issue41100@roundup.psfhosted.org> Change by Lawrence D'Anna : ---------- pull_requests: +20399 pull_request: https://github.com/python/cpython/pull/21249 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 22:10:57 2020 From: report at bugs.python.org (Sumanth Ratna) Date: Wed, 01 Jul 2020 02:10:57 +0000 Subject: [issue41179] find_library on macOS Big Sur Message-ID: <1593569457.74.0.77283115603.issue41179@roundup.psfhosted.org> New submission from Sumanth Ratna : The following all return None on macOS Big Sur, but return a valid path (str) on macOS Catalina: python3.6 -c "from ctypes import util; print(util.find_library('objc'))" python3.7 -c "from ctypes import util; print(util.find_library('objc'))" python3.8 -c "from ctypes import util; print(util.find_library('objc'))" The solution I'm thinking of is using platform.mac_ver() in ctypes.util.find_library to see if the macOS version is either 10.16 or 11.0; if so, use an alternative method to locate the path of the library somehow?else, use the current functionality. I'm hoping that looking in /System/Library/Frameworks/ is enough. >From the macOS Big Sur release notes (https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11-beta-release-notes): > New in macOS Big Sur 11 beta, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem. Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. Instead, check for library presence by attempting to `dlopen()` the path, which will correctly check for the library in the cache. (62986286) Related links: - https://bugs.python.org/issue41116 (this is a build issue, but is related I think) - https://stackoverflow.com/questions/62587131/macos-big-sur-python-ctypes-find-library-does-not-find-libraries-ssl-corefou - https://www.reddit.com/r/MacOSBeta/comments/hfknpa/is_corefoundation_missing_for_everyone_on_big_sur/ - https://github.com/vispy/vispy/issues/1885 - https://github.com/napari/napari/issues/1393 - https://github.com/espressif/esptool/issues/540 This is my first issue in Python; sorry in advance if I've made a mistake anywhere. ---------- components: ctypes messages: 372728 nosy: Sumanth Ratna priority: normal severity: normal status: open title: find_library on macOS Big Sur type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 30 22:16:15 2020 From: report at bugs.python.org (Roundup Robot) Date: Wed, 01 Jul 2020 02:16:15 +0000 Subject: [issue41179] find_library on macOS Big Sur In-Reply-To: <1593569457.74.0.77283115603.issue41179@roundup.psfhosted.org> Message-ID: <1593569775.02.0.613476957086.issue41179@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +20400 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21250 _______________________________________ Python tracker _______________________________________