From report at bugs.python.org Sun Nov 1 00:14:56 2020 From: report at bugs.python.org (Zac Hatfield-Dodds) Date: Sun, 01 Nov 2020 04:14:56 +0000 Subject: [issue42218] SystemError in compile builtin function In-Reply-To: <1604143002.46.0.930999995617.issue42218@roundup.psfhosted.org> Message-ID: <1604204096.51.0.26193126646.issue42218@roundup.psfhosted.org> Zac Hatfield-Dodds added the comment: Wow! Thanks and congrats on the super-fast fix :-) FYI Paul Ganssle has recently [1] started to work on adding property-based tests to CPython CI [2]. Once Paul gets the stubs and first set of tests working, I'll start moving the others over from my demo repo [3] to CPython master so we catch this kind of bug earlier in future. [1] https://bugs.python.org/issue42109; see also https://bugs.python.org/issue38953 [2] https://pyfound.blogspot.com/2020/05/property-based-testing-for-python.html [3] https://github.com/Zac-HD/stdlib-property-tests ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 00:31:45 2020 From: report at bugs.python.org (Jeremy Howard) Date: Sun, 01 Nov 2020 04:31:45 +0000 Subject: [issue42226] imghdr.what is missing docstring, has a logic error, and is overly complex Message-ID: <1604205105.29.0.494636878964.issue42226@roundup.psfhosted.org> New submission from Jeremy Howard : imghdr.what does not set f if h is passed, but still passed f to tests functions. None of the tests functions use it - they would not be able to anyway since it is not always set. imghdr.what is missing a docstring. imghdr.what has a complex highly nest structure with multiple return paths which makes the logic hard to follow. ---------- components: Library (Lib) messages: 380114 nosy: jph00 priority: normal severity: normal status: open title: imghdr.what is missing docstring, has a logic error, and is overly complex type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 00:34:37 2020 From: report at bugs.python.org (Jeremy Howard) Date: Sun, 01 Nov 2020 04:34:37 +0000 Subject: [issue42226] imghdr.what is missing docstring, has a logic error, and is overly complex In-Reply-To: <1604205105.29.0.494636878964.issue42226@roundup.psfhosted.org> Message-ID: <1604205277.3.0.718123170503.issue42226@roundup.psfhosted.org> Change by Jeremy Howard : ---------- keywords: +patch pull_requests: +21988 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23069 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 01:28:43 2020 From: report at bugs.python.org (Kaiyu Zheng) Date: Sun, 01 Nov 2020 05:28:43 +0000 Subject: [issue42227] Unexpected sharing of list/set/dict between instances of the same class, when the list/set/dict is a default parameter value of the constructor Message-ID: <1604208523.28.0.858749665776.issue42227@roundup.psfhosted.org> New submission from Kaiyu Zheng : In the following toy example, with Python 3.7.4 class Foo: def __init__(self, a=set()): self.a = a foo1 = Foo() foo2 = Foo() foo1.a.add(1) print(foo2.a) This shows {1}. This means that modifying the .a field of foo1 changed that of foo2. I was not expecting this behavior, as I thought that when the constructor is called, an empty set is created for the parameter `a`. But instead, what seems to happen is that a set() is created, and then shared between instances of Foo. What is the reason for this? What is the benefit? It adds a lot of confusion ---------- messages: 380115 nosy: kaiyutony priority: normal severity: normal status: open title: Unexpected sharing of list/set/dict between instances of the same class, when the list/set/dict is a default parameter value of the constructor type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 01:33:16 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 01 Nov 2020 05:33:16 +0000 Subject: [issue42146] subprocess.Popen() leaks cwd in case of uid/gid overflow In-Reply-To: <1603629055.61.0.677699237141.issue42146@roundup.psfhosted.org> Message-ID: <1604208796.01.0.784131254588.issue42146@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset d3b4e068077dd26927ae7485bd0303e09d962c02 by Alexey Izbyshev in branch 'master': bpo-42146: Unify cleanup in subprocess_fork_exec() (GH-22970) https://github.com/python/cpython/commit/d3b4e068077dd26927ae7485bd0303e09d962c02 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 01:36:27 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 01 Nov 2020 05:36:27 +0000 Subject: [issue42146] subprocess.Popen() leaks cwd in case of uid/gid overflow In-Reply-To: <1603629055.61.0.677699237141.issue42146@roundup.psfhosted.org> Message-ID: <1604208987.4.0.980508582287.issue42146@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 Nov 1 01:24:35 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 01 Nov 2020 06:24:35 +0000 Subject: [issue42227] Unexpected sharing of list/set/dict between instances of the same class, when the list/set/dict is a default parameter value of the constructor In-Reply-To: <1604208523.28.0.858749665776.issue42227@roundup.psfhosted.org> Message-ID: <1604211875.71.0.766180923162.issue42227@roundup.psfhosted.org> Steven D'Aprano added the comment: Sorry, this is not a bug, but working as designed. Default values for functions and methods are only created once, when the function is created, not on every call. This is a FAQ: https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 01:34:38 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 01 Nov 2020 06:34:38 +0000 Subject: [issue42227] Unexpected sharing of list/set/dict between instances of the same class, when the list/set/dict is a default parameter value of the constructor In-Reply-To: <1604208523.28.0.858749665776.issue42227@roundup.psfhosted.org> Message-ID: <1604212478.53.0.701739578345.issue42227@roundup.psfhosted.org> Steven D'Aprano added the comment: See also my comment here: https://bugs.python.org/msg361451 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 02:05:05 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Nov 2020 07:05:05 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604214305.77.0.939939549344.issue42225@roundup.psfhosted.org> Serhiy Storchaka added the comment: I get a crash for chr(128516) ("?") in Tk. $ wish % label .l -text ? .l % X Error of failed request: BadLength (poly request too large or internal Xlib length error) Major opcode of failed request: 139 (RENDER) Minor opcode of failed request: 20 (RenderAddGlyphs) Serial number of failed request: 599 Current serial number in output stream: 599 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 02:59:15 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 01 Nov 2020 07:59:15 +0000 Subject: [issue13501] Make libedit support more generic; port readline / libedit to FreeBSD In-Reply-To: <1322579942.3.0.601983912656.issue13501@psf.upfronthosting.co.za> Message-ID: <1604217555.84.0.610360421006.issue13501@roundup.psfhosted.org> Gregory P. Smith added the comment: at a glance, it looks like the PR needs updating. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 04:08:51 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 01 Nov 2020 09:08:51 +0000 Subject: [issue29566] binhex() creates files with mixed line endings In-Reply-To: <1487161265.61.0.450348509296.issue29566@psf.upfronthosting.co.za> Message-ID: <1604221731.72.0.496737898223.issue29566@roundup.psfhosted.org> miss-islington added the comment: New changeset 2165cea548f961b308050f30d1f042a377651d44 by Ronald Oussoren in branch 'master': bpo-29566: binhex.binhex now consitently writes MacOS 9 line endings. (GH-23059) https://github.com/python/cpython/commit/2165cea548f961b308050f30d1f042a377651d44 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 04:09:08 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 01 Nov 2020 09:09:08 +0000 Subject: [issue29566] binhex() creates files with mixed line endings In-Reply-To: <1487161265.61.0.450348509296.issue29566@psf.upfronthosting.co.za> Message-ID: <1604221748.38.0.887665950191.issue29566@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21990 pull_request: https://github.com/python/cpython/pull/23070 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 04:10:25 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 01 Nov 2020 09:10:25 +0000 Subject: [issue29566] binhex() creates files with mixed line endings In-Reply-To: <1487161265.61.0.450348509296.issue29566@psf.upfronthosting.co.za> Message-ID: <1604221825.42.0.287672332935.issue29566@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 04:11:17 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 01 Nov 2020 09:11:17 +0000 Subject: [issue29566] binhex() creates files with mixed line endings In-Reply-To: <1487161265.61.0.450348509296.issue29566@psf.upfronthosting.co.za> Message-ID: <1604221877.14.0.47511185311.issue29566@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21991 pull_request: https://github.com/python/cpython/pull/23071 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 04:16:38 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 01 Nov 2020 09:16:38 +0000 Subject: [issue24380] Got warning when compiling _scproxy.c on Mac In-Reply-To: <1433427659.62.0.118183885403.issue24380@psf.upfronthosting.co.za> Message-ID: <1604222198.35.0.126415108426.issue24380@roundup.psfhosted.org> Ronald Oussoren added the comment: I'm closing this as out of date because the code the compiler warns about is no longer present in the master branch. ---------- resolution: -> out of date stage: -> resolved status: open -> closed type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 04:38:54 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Nov 2020 09:38:54 +0000 Subject: [issue29566] binhex() creates files with mixed line endings In-Reply-To: <1487161265.61.0.450348509296.issue29566@psf.upfronthosting.co.za> Message-ID: <1604223534.15.0.396613134582.issue29566@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: duplicate -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 04:39:47 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 01 Nov 2020 09:39:47 +0000 Subject: [issue29566] binhex() creates files with mixed line endings In-Reply-To: <1487161265.61.0.450348509296.issue29566@psf.upfronthosting.co.za> Message-ID: <1604223587.82.0.257538007785.issue29566@roundup.psfhosted.org> miss-islington added the comment: New changeset 39a56e55231be00d52fa183fcd2b7d88619ced4b by Miss Skeleton (bot) in branch '3.8': [3.8] bpo-29566: binhex.binhex now consitently writes MacOS 9 line endings. (GH-23059) (GH-23070) https://github.com/python/cpython/commit/39a56e55231be00d52fa183fcd2b7d88619ced4b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 04:39:48 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 01 Nov 2020 09:39:48 +0000 Subject: [issue29566] binhex() creates files with mixed line endings In-Reply-To: <1487161265.61.0.450348509296.issue29566@psf.upfronthosting.co.za> Message-ID: <1604223588.09.0.292263395483.issue29566@roundup.psfhosted.org> miss-islington added the comment: New changeset 3defcbac2c9ff4306ed5b7fb37d12637eb188306 by Miss Skeleton (bot) in branch '3.9': [3.9] bpo-29566: binhex.binhex now consitently writes MacOS 9 line endings. (GH-23059) (GH-23071) https://github.com/python/cpython/commit/3defcbac2c9ff4306ed5b7fb37d12637eb188306 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 05:04:46 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Sun, 01 Nov 2020 10:04:46 +0000 Subject: [issue42140] asyncio.wait function creates futures set two times In-Reply-To: <1603522282.48.0.50359686965.issue42140@roundup.psfhosted.org> Message-ID: <1604225086.16.0.293048820493.issue42140@roundup.psfhosted.org> Change by Jakub Stasiak : ---------- nosy: +jstasiak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 05:46:29 2020 From: report at bugs.python.org (Ben Boeckel) Date: Sun, 01 Nov 2020 10:46:29 +0000 Subject: [issue42228] Activate.ps1 clears PYTHONHOME Message-ID: <1604227589.68.0.567841470196.issue42228@roundup.psfhosted.org> New submission from Ben Boeckel : On Windows, we are extracting a tarball of a Python installation for CI (to avoid needing to juggle umpteen Python installs on umpteen machines). This requires `PYTHONHOME` to be set to use properly since there is no registry entry for the "installation". However, `Activate.ps1` clears `PYTHONHOME` unconditionally. Is there something else we can do to properly integrate with it or should there be an option to say "no, I need `PYTHONHOME` for the stdlib to work"? I don't know how relevant this is to other platforms at the moment as other mechanisms are sufficient there (Xcode's Python3.framework in the SDK and Linux system packages). ---------- components: Windows messages: 380125 nosy: mathstuf, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Activate.ps1 clears PYTHONHOME type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 05:49:32 2020 From: report at bugs.python.org (Samuel Marks) Date: Sun, 01 Nov 2020 10:49:32 +0000 Subject: [issue42229] Fix SQLite warnings on macOS Message-ID: <1604227772.18.0.746348927327.issue42229@roundup.psfhosted.org> New submission from Samuel Marks : Planned to fix all the compiler warnings on macOS. Ended up just fixing this SQLite one: ``` Python-3.9.0/Modules/_sqlite/connection.c:1066:9: warning: 'sqlite3_trace' is deprecated: first deprecated in macOS 10.12 [-Wdeprecated-declarations] sqlite3_trace(self->db, 0, (void*)0); ^~~~~~~~~~~~~ sqlite3_trace_v2 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sqlite3.h:3022:36: note: 'sqlite3_trace' has been explicitly marked deprecated here SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace( ^ Python-3.9.0/Modules/_sqlite/connection.c:1069:9: warning: 'sqlite3_trace' is deprecated: first deprecated in macOS 10.12 [-Wdeprecated-declarations] sqlite3_trace(self->db, _trace_callback, trace_callback); ^~~~~~~~~~~~~ sqlite3_trace_v2 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sqlite3.h:3022:36: note: 'sqlite3_trace' has been explicitly marked deprecated here SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace( ^ ``` Note that: `sqlite3_enable_shared_cache` should be removed from `Modules/_sqlite/module.c` also, as warning and guide says: https://www.sqlite.org/c3ref/enable_shared_cache.html ``` Python-3.9.0/Modules/_sqlite/module.c:147:10: warning: 'sqlite3_enable_shared_cache' is deprecated: first deprecated in macOS 10.7 - Not supported [-Wdeprecated-declarations] ``` But I think that would require a major version change, so let's keep that warning fix to one side. Same with the tk issues, as per https://bugs.python.org/issue41016 ; although I suspect there's a way to quiet the warnings here? ---------- components: Build messages: 380126 nosy: samuelmarks priority: normal pull_requests: 21992 severity: normal status: open title: Fix SQLite warnings on macOS type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 07:12:14 2020 From: report at bugs.python.org (Marco Sulla) Date: Sun, 01 Nov 2020 12:12:14 +0000 Subject: [issue41835] Speed up dict vectorcall creation using keywords In-Reply-To: <1600779404.53.0.758044601526.issue41835@roundup.psfhosted.org> Message-ID: <1604232734.39.0.286459481949.issue41835@roundup.psfhosted.org> Marco Sulla added the comment: I did PGO+LTO... --enable-optimizations --with-lto ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 07:17:01 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Sun, 01 Nov 2020 12:17:01 +0000 Subject: [issue42230] Document that asyncio's wait() and as_completed() accept arbitrary iterables Message-ID: <1604233021.96.0.386232269828.issue42230@roundup.psfhosted.org> New submission from Jakub Stasiak : The documentation explicitly says "sets" but arbitrary iterables are accepted and various non-sets are passed to those in real world almost certainly. ---------- components: asyncio messages: 380128 nosy: asvetlov, jstasiak, yselivanov priority: normal severity: normal status: open title: Document that asyncio's wait() and as_completed() accept arbitrary iterables versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 07:23:24 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Sun, 01 Nov 2020 12:23:24 +0000 Subject: [issue42230] Document that asyncio's wait() and as_completed() accept arbitrary iterables In-Reply-To: <1604233021.96.0.386232269828.issue42230@roundup.psfhosted.org> Message-ID: <1604233404.22.0.324009038945.issue42230@roundup.psfhosted.org> Change by Jakub Stasiak : ---------- keywords: +patch pull_requests: +21993 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23073 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 07:26:47 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Sun, 01 Nov 2020 12:26:47 +0000 Subject: [issue42140] asyncio.wait function creates futures set two times In-Reply-To: <1603522282.48.0.50359686965.issue42140@roundup.psfhosted.org> Message-ID: <1604233607.32.0.756289344571.issue42140@roundup.psfhosted.org> Jakub Stasiak added the comment: I opened https://bugs.python.org/issue42230 to make the documentation reflect the reality in this matter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 07:36:24 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 01 Nov 2020 12:36:24 +0000 Subject: [issue30053] Problems building with --enable-profiling on macOS In-Reply-To: <1492001446.82.0.198717177169.issue30053@psf.upfronthosting.co.za> Message-ID: <1604234184.63.0.189908902094.issue30053@roundup.psfhosted.org> Ronald Oussoren added the comment: The system compiler on macOS 10.9 or later doesn't support "-pg" (profile generation) at all: $ clang -o t -pg t.c clang: error: the clang compiler does not support -pg option on versions of OS X 10.9 and later This means that its unlikely I'll look into this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 07:45:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Nov 2020 12:45:17 +0000 Subject: [issue42207] Python 3.9 testing fails when building with clang and optimizations are enabled In-Reply-To: <1604069104.85.0.435616508554.issue42207@roundup.psfhosted.org> Message-ID: <1604234717.4.0.442798249507.issue42207@roundup.psfhosted.org> STINNER Victor added the comment: > This bug no longer happens on master branch because it's related to test_peg_generator. test_peg_generator exists in 3.9 and master branches. configure.ac doesn't seem to be different in 3.9 and master branches for PGO_PROF_USE_FLAG and LLVM_PROF_MERGER variables. I don't understand why this change is specific to the 3.9 branch. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 08:04:38 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 01 Nov 2020 13:04:38 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1604235878.42.0.250859977011.issue37483@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 7feb54a6348f6220b27986777786c812f110b53d by Dong-hee Na in branch 'master': bpo-37483: Add PyObject_CallOneArg() in the What's New in Python 3.9 (GH-23062) https://github.com/python/cpython/commit/7feb54a6348f6220b27986777786c812f110b53d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 08:04:52 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 01 Nov 2020 13:04:52 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1604235892.36.0.0721628543486.issue37483@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +21994 pull_request: https://github.com/python/cpython/pull/23074 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 08:27:09 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 01 Nov 2020 13:27:09 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1604237229.07.0.145899143589.issue37483@roundup.psfhosted.org> miss-islington added the comment: New changeset 0312efcd2bb3d7964dbfe2b4cbd5f5b440aed049 by Miss Skeleton (bot) in branch '3.9': bpo-37483: Add PyObject_CallOneArg() in the What's New in Python 3.9 (GH-23062) https://github.com/python/cpython/commit/0312efcd2bb3d7964dbfe2b4cbd5f5b440aed049 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 08:28:37 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 01 Nov 2020 13:28:37 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1604237317.27.0.282786394194.issue37483@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 Nov 1 08:33:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Nov 2020 13:33:58 +0000 Subject: [issue24165] Free list for single-digits ints In-Reply-To: <1431352769.3.0.375640200007.issue24165@psf.upfronthosting.co.za> Message-ID: <1604237638.96.0.832638918614.issue24165@roundup.psfhosted.org> STINNER Victor added the comment: > Inada-san, how do you interpret the results? Looks like it's performance-neutral. You should give a try to the development branch of pyperf which computes the geometric mean of all results and says if it's faster or slower overall :-D https://mail.python.org/archives/list/speed at python.org/thread/RANN6PQURUVPMNXS6GIOL42F2DIFV5LM/ (I'm still waiting for testers before releasing a new version including the new feature.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 08:44:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Nov 2020 13:44:32 +0000 Subject: [issue42231] test_zipimport failure Message-ID: <1604238272.76.0.181231986099.issue42231@roundup.psfhosted.org> New submission from STINNER Victor : ARM Raspbian 3.x: https://buildbot.python.org/all/#/builders/424/builds/294 I don't understand why the test started to fail at build 294 which only has one new change: commit 2165cea548f961b308050f30d1f042a377651d44 ("bpo-29566: binhex.binhex now consitently writes MacOS 9 line endings"). It seems to be unrelated. I failed to reproduce the issue on Linux. ====================================================================== FAIL: testBoth (test.test_zipimport.UncompressedZipImportTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildbot/workers/3.x.gps-raspbian/build/Lib/test/test_zipimport.py", line 194, in testBoth self.doTest(pyc_ext, files, TESTMOD) File "/var/lib/buildbot/workers/3.x.gps-raspbian/build/Lib/test/test_zipimport.py", line 148, in doTest self.assertEqual(file, os.path.join(TEMP_ZIP, AssertionError: '/var[64 chars]8289?/test_python_worker_2163?/junk95142.zip/ziptestmodule.py' != '/var[64 chars]8289?/test_python_worker_2163?/junk95142.zip/ziptestmodule.pyc' - /var/lib/buildbot/workers/3.x.gps-raspbian/build/build/test_python_18289?/test_python_worker_2163?/junk95142.zip/ziptestmodule.py + /var/lib/buildbot/workers/3.x.gps-raspbian/build/build/test_python_18289?/test_python_worker_2163?/junk95142.zip/ziptestmodule.pyc ? + ====================================================================== FAIL: testGetCompiledSource (test.test_zipimport.UncompressedZipImportTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildbot/workers/3.x.gps-raspbian/build/Lib/test/test_zipimport.py", line 594, in testGetCompiledSource self.doTest(pyc_ext, files, TESTMOD, call=self.assertModuleSource) File "/var/lib/buildbot/workers/3.x.gps-raspbian/build/Lib/test/test_zipimport.py", line 148, in doTest self.assertEqual(file, os.path.join(TEMP_ZIP, AssertionError: '/var[64 chars]8289?/test_python_worker_2163?/junk95142.zip/ziptestmodule.py' != '/var[64 chars]8289?/test_python_worker_2163?/junk95142.zip/ziptestmodule.pyc' - /var/lib/buildbot/workers/3.x.gps-raspbian/build/build/test_python_18289?/test_python_worker_2163?/junk95142.zip/ziptestmodule.py + /var/lib/buildbot/workers/3.x.gps-raspbian/build/build/test_python_18289?/test_python_worker_2163?/junk95142.zip/ziptestmodule.pyc ? + ====================================================================== FAIL: testBoth (test.test_zipimport.CompressedZipImportTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildbot/workers/3.x.gps-raspbian/build/Lib/test/test_zipimport.py", line 194, in testBoth self.doTest(pyc_ext, files, TESTMOD) File "/var/lib/buildbot/workers/3.x.gps-raspbian/build/Lib/test/test_zipimport.py", line 148, in doTest self.assertEqual(file, os.path.join(TEMP_ZIP, AssertionError: '/var[64 chars]8289?/test_python_worker_2163?/junk95142.zip/ziptestmodule.py' != '/var[64 chars]8289?/test_python_worker_2163?/junk95142.zip/ziptestmodule.pyc' - /var/lib/buildbot/workers/3.x.gps-raspbian/build/build/test_python_18289?/test_python_worker_2163?/junk95142.zip/ziptestmodule.py + /var/lib/buildbot/workers/3.x.gps-raspbian/build/build/test_python_18289?/test_python_worker_2163?/junk95142.zip/ziptestmodule.pyc ? + ====================================================================== FAIL: testGetCompiledSource (test.test_zipimport.CompressedZipImportTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildbot/workers/3.x.gps-raspbian/build/Lib/test/test_zipimport.py", line 594, in testGetCompiledSource self.doTest(pyc_ext, files, TESTMOD, call=self.assertModuleSource) File "/var/lib/buildbot/workers/3.x.gps-raspbian/build/Lib/test/test_zipimport.py", line 148, in doTest self.assertEqual(file, os.path.join(TEMP_ZIP, AssertionError: '/var[64 chars]8289?/test_python_worker_2163?/junk95142.zip/ziptestmodule.py' != '/var[64 chars]8289?/test_python_worker_2163?/junk95142.zip/ziptestmodule.pyc' - /var/lib/buildbot/workers/3.x.gps-raspbian/build/build/test_python_18289?/test_python_worker_2163?/junk95142.zip/ziptestmodule.py + /var/lib/buildbot/workers/3.x.gps-raspbian/build/build/test_python_18289?/test_python_worker_2163?/junk95142.zip/ziptestmodule.pyc ? + ---------- components: Tests messages: 380135 nosy: vstinner priority: normal severity: normal status: open title: test_zipimport failure versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 08:48:18 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Nov 2020 13:48:18 +0000 Subject: [issue42160] unnecessary overhead in tempfile In-Reply-To: <1603747164.82.0.214293266524.issue42160@roundup.psfhosted.org> Message-ID: <1604238498.01.0.337987646212.issue42160@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 08:51:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Nov 2020 13:51:48 +0000 Subject: [issue42231] test_zipimport failure In-Reply-To: <1604238272.76.0.181231986099.issue42231@roundup.psfhosted.org> Message-ID: <1604238708.36.0.217624399639.issue42231@roundup.psfhosted.org> STINNER Victor added the comment: The test failed on many 3.x buildbots. Other examples: * PPC64LE Fedora Rawhide 3.x: https://buildbot.python.org/all/#builders/455/builds/226 * AMD64 Windows10 3.x: https://buildbot.python.org/all/#builders/146/builds/295 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 08:52:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Nov 2020 13:52:19 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604238739.23.0.859328945398.issue42225@roundup.psfhosted.org> STINNER Victor added the comment: Serhiy: > I get a crash for chr(128516) ("?") in Tk. On Linux? What is your Tk version? On my Fedora 32, the character is displayed properly. It seems like Tk is still using X11 whereas my GNOME desktop is using Wayland. $ ./python -m test.pythoninfo|grep ^tkinter tkinter.TCL_VERSION: 8.6 tkinter.TK_VERSION: 8.6 tkinter.info_patchlevel: 8.6.10 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 08:53:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Nov 2020 13:53:52 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604238832.71.0.44321172108.issue42225@roundup.psfhosted.org> STINNER Victor added the comment: Hum, I didn't explain well. My test. I ran: ./python -m idlelib In the IDLE shell, I wrote chr(0x1F604) which displays the emoji as expected: >>> chr(0x1F604) '?' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 08:55:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Nov 2020 13:55:11 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604238911.3.0.37771959153.issue42225@roundup.psfhosted.org> STINNER Victor added the comment: Serhiy's test also work as expected. $ wish % label .l -text ? Since the Serhiy's test doesn't use Python, is it worth it to track this Tk crash in the Python bug tracker? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 08:54:05 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Nov 2020 13:54:05 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604238845.87.0.150013982097.issue42225@roundup.psfhosted.org> Serhiy Storchaka added the comment: I generated a script for testing all characters: with open('withtest.sh', 'w', errors='surrogatepass') as f: for i in range(0x100, 0x110000): print(f"echo 'label .l -text \"{chr(i)}\"; exit' | wish 2>/dev/null && echo OK '\\U{i:08x}' {chr(i)!r} || echo FAIL '\\U{i:08x}' {chr(i)!r}", file=f) It takes a time. It tested around 20% of all characters for 6-7 hours. And it seems that all failed characters are colored emojies and all passed characters are non-colored. Seems it is related either to the font that provides colored emojies, or to the mechanism that interprets such fonts, or Tk just cannot correctly handle the output when such fonts are used (maybe reserve too small buffer or cannot interpret result code). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 09:12:00 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 01 Nov 2020 14:12:00 +0000 Subject: [issue41754] Webbrowser Module Cannot Find xdg-settings on OSX In-Reply-To: <1599718531.77.0.777287973454.issue41754@roundup.psfhosted.org> Message-ID: <1604239920.19.0.616134289373.issue41754@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- keywords: +patch pull_requests: +21995 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23075 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 09:12:53 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 01 Nov 2020 14:12:53 +0000 Subject: [issue41754] Webbrowser Module Cannot Find xdg-settings on OSX In-Reply-To: <1599718531.77.0.777287973454.issue41754@roundup.psfhosted.org> Message-ID: <1604239973.26.0.862697537604.issue41754@roundup.psfhosted.org> Ronald Oussoren added the comment: I've created a PR that ignores this exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 09:34:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Nov 2020 14:34:09 +0000 Subject: [issue42115] Caching infrastructure for the evaluation loop: specialised opcodes In-Reply-To: <1603336898.74.0.366564812208.issue42115@roundup.psfhosted.org> Message-ID: <1604241249.02.0.848673195735.issue42115@roundup.psfhosted.org> STINNER Victor added the comment: > because you'd cache a pointer to the specific `+` operator implementation You should have a look at "INCA: Inline Caching meets Quickening in Python 3.3": https://bugs.python.org/issue14757 Stefan Brunthaler wrote a paper on his work: "Inline Caching Meets Quickening" (Published in ECOOP 2010) https://publications.sba-research.org/publications/ecoop10.pdf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 09:56:12 2020 From: report at bugs.python.org (Marcel Hofstetter) Date: Sun, 01 Nov 2020 14:56:12 +0000 Subject: [issue42173] Drop Solaris support In-Reply-To: <1603814348.33.0.839225742612.issue42173@roundup.psfhosted.org> Message-ID: <1604242572.62.0.305458283057.issue42173@roundup.psfhosted.org> Change by Marcel Hofstetter : ---------- nosy: +jomasoftmarcel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 10:08:43 2020 From: report at bugs.python.org (David CARLIER) Date: Sun, 01 Nov 2020 15:08:43 +0000 Subject: [issue42232] mmap module add Darwin specific madvise options Message-ID: <1604243323.33.0.637936661343.issue42232@roundup.psfhosted.org> Change by David CARLIER : ---------- components: macOS nosy: devnexen, ned.deily, ronaldoussoren priority: normal pull_requests: 21996 severity: normal status: open title: mmap module add Darwin specific madvise options type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 10:26:25 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Nov 2020 15:26:25 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604244385.17.0.307847314772.issue42225@roundup.psfhosted.org> Serhiy Storchaka added the comment: Yes, on Linux. Ubuntu 2020.04. Tk 8.6.10. X.Org X Server 1.20.8. I tried to report the bug upstream, but failed. I did not use the Tk bugtracker several years, and it was on different computer, so I have no password to my account, and when I tried to create new accounts, I cannot login with them too. I tried to write to the mailing list, but it requires subscribing, and when I subscribed I did not receive a message with confirmation. If anybody can, please report this bug to Tk developers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 10:29:52 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Nov 2020 15:29:52 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604244592.67.0.422299758337.issue42225@roundup.psfhosted.org> Serhiy Storchaka added the comment: Victor, do you see a color smiling face in my example or monochromatic or just a bar? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 10:32:10 2020 From: report at bugs.python.org (Ken Jin) Date: Sun, 01 Nov 2020 15:32:10 +0000 Subject: [issue42233] GenericAlias does not support union type expressions Message-ID: <1604244730.48.0.778653484179.issue42233@roundup.psfhosted.org> New submission from Ken Jin : Union type expressions added in PEP 604 throw an error when both operands are GenericAlias objects. Eg the following works:: int | list[str] The following throws TypeError:: list[int] | dict[float, str] Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for |: 'types.GenericAlias' and 'types.GenericAlias' I have submitted a PR to fix this. Coincidentally, it also fixes the fact that union expressions weren't de-duplicating GenericAlias properly. Eg:: >>> list[int] | int | list[int] list[int] | int | list[int] For non-GenericAlias type expressions, the new code shouldn't be much slower. Rich compare is only used for GenericAlias objects. This isn't very scientific, but python -m timeit "int | str | float" # original 1000000 loops, best of 5: 295 nsec per loop # purely rich compare 1000000 loops, best of 5: 344 nsec per loop # check for GenericAlias and rich compare only for that 1000000 loops, best of 5: 297 nsec per loop ---------- components: Interpreter Core messages: 380145 nosy: gvanrossum, kj, levkivskyi priority: normal severity: normal status: open title: GenericAlias does not support union type expressions versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 10:34:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Nov 2020 15:34:12 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604244852.26.0.502757561452.issue42225@roundup.psfhosted.org> STINNER Victor added the comment: > Victor, do you see a color smiling face in my example or monochromatic or just a bar? See attached screenshot: fedora32.png. ---------- Added file: https://bugs.python.org/file49556/fedora32.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 10:38:11 2020 From: report at bugs.python.org (Ken Jin) Date: Sun, 01 Nov 2020 15:38:11 +0000 Subject: [issue42233] GenericAlias does not support union type expressions In-Reply-To: <1604244730.48.0.778653484179.issue42233@roundup.psfhosted.org> Message-ID: <1604245091.43.0.948845456631.issue42233@roundup.psfhosted.org> Change by Ken Jin : ---------- keywords: +patch pull_requests: +21997 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23077 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 10:39:31 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Nov 2020 15:39:31 +0000 Subject: [issue42233] GenericAlias does not support union type expressions In-Reply-To: <1604244730.48.0.778653484179.issue42233@roundup.psfhosted.org> Message-ID: <1604245171.89.0.0481507896605.issue42233@roundup.psfhosted.org> Serhiy Storchaka added the comment: There is also a problem with typing module. >>> typing.List[int] | dict[float, str] typing.Union[typing.List[int], dict] ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 10:48:23 2020 From: report at bugs.python.org (Armins Stepanjans) Date: Sun, 01 Nov 2020 15:48:23 +0000 Subject: [issue42234] pathlib relative_to behaviour change Message-ID: <1604245703.4.0.361207259352.issue42234@roundup.psfhosted.org> New submission from Armins Stepanjans : In the docs (https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.relative_to) PurePath.relative_to() is specified to fail for arguments that are not on the original path (e.g. Path('/ham/beans').relative_to(Path('/spam'))). I believe it would be useful to extend the behaviour of relative_to so that it handles the case above. For example, I would expect Path('/ham/beans').relative_to(Path('/spam')) to return Path('../ham/beans'). If this sounds like a useful change I'd be happy to make a PR for it. ---------- components: Library (Lib) messages: 380148 nosy: armins.bagrats priority: normal severity: normal status: open title: pathlib relative_to behaviour change type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 10:53:28 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Nov 2020 15:53:28 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604246008.21.0.548967572236.issue42225@roundup.psfhosted.org> Serhiy Storchaka added the comment: It looks different on my computer. I suppose it will crash to you too if you install a color emoji font. ---------- Added file: https://bugs.python.org/file49557/Ubuntu-2020.04.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 11:00:44 2020 From: report at bugs.python.org (Ken Jin) Date: Sun, 01 Nov 2020 16:00:44 +0000 Subject: [issue42233] GenericAlias does not support union type expressions In-Reply-To: <1604244730.48.0.778653484179.issue42233@roundup.psfhosted.org> Message-ID: <1604246444.37.0.109904488847.issue42233@roundup.psfhosted.org> Ken Jin added the comment: @Serhiy, wow interesting find, it seems to be typing's repr problem rather than the actual types itself: >>> typing.Union[dict[int, str], list[str]] typing.Union[dict, list] >>> typing.Union[dict[int, str], list[str]].__args__ (dict[int, str], list[str]) The __args__ seem to be correct, so I'm guessing the typing repr went wrong somewhere. That should be the case for your example too: >>> alias = typing.List[int] | dict[float, str] >>> alias typing.Union[typing.List[int], dict] >>> type(alias) >>> alias.__args__ (typing.List[int], dict[float, str]) I'll work on this. If I don't reply back in a week, someone else is free to take over this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 11:24:46 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 01 Nov 2020 16:24:46 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604247886.23.0.95068375366.issue42225@roundup.psfhosted.org> Ronald Oussoren added the comment: The error on Linux could be related to this issue: https://bugzilla.redhat.com/show_bug.cgi?id=1498269 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 11:31:13 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 01 Nov 2020 16:31:13 +0000 Subject: [issue42235] [macOS] Use --enable-optimizations in build-installer.py Message-ID: <1604248273.75.0.377267734476.issue42235@roundup.psfhosted.org> New submission from Ronald Oussoren : With recent enough compilers it is possible to use --enable-optimzations when building the installer. ---------- messages: 380152 nosy: ronaldoussoren priority: normal severity: normal status: open title: [macOS] Use --enable-optimizations in build-installer.py type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 11:37:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Nov 2020 16:37:44 +0000 Subject: [issue41181] [macOS] Build macOS installer with LTO and PGO optimizations In-Reply-To: <1593599541.73.0.325479735185.issue41181@roundup.psfhosted.org> Message-ID: <1604248664.05.0.795318923346.issue41181@roundup.psfhosted.org> STINNER Victor added the comment: > Link Time Optimization (LTO) and Profile-Guided Optimization (PGO) have a major impact on Python performance: they make Python between 10% and 30% faster (coarse estimation). > > Currently, macOS installers distributed on python.org are built with Clang 6.0 without LTO or PGO. I propose to enable LTO and PGO to make these binaries faster. Oh, I forgot to mention that I discovered that macOS doesn't use LTO when I worked on the https://bugs.python.org/issue39542#msg373230 issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 11:37:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Nov 2020 16:37:51 +0000 Subject: [issue42235] [macOS] Use --enable-optimizations in build-installer.py In-Reply-To: <1604248273.75.0.377267734476.issue42235@roundup.psfhosted.org> Message-ID: <1604248671.64.0.119518521725.issue42235@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-41181 "[macOS] Build macOS installer with LTO and PGO optimizations". ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 11:45:14 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 01 Nov 2020 16:45:14 +0000 Subject: [issue42235] [macOS] Use --enable-optimizations in build-installer.py In-Reply-To: <1604248273.75.0.377267734476.issue42235@roundup.psfhosted.org> Message-ID: <1604249114.77.0.451318138885.issue42235@roundup.psfhosted.org> Ronald Oussoren added the comment: I'm working on a PR. The current version of build-installer.py doesn't use LTO/PGO because installers are build on macOS 10.9 where the compiler doesn't reliably support this. Recent compilers should work a lot better. The upcoming PR enables --enable-optimizations when building on macOS 10.15 or later (Xcode 11 or 12), mostly because that's what I'm testing with. I'm listing 41100 as a dependency because having that is the only way to make use of this PR at the moment: build-installer.py uses --enable-universalsdk and 41100 introduces "universal2" as a set of architectures that can be build using Xcode 12. All other sets of architectures require Xcode 10 or older. ---------- components: +macOS dependencies: +Build failure on macOS 11 (beta) nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 12:03:28 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 01 Nov 2020 17:03:28 +0000 Subject: [issue42235] [macOS] Use --enable-optimizations in build-installer.py In-Reply-To: <1604248273.75.0.377267734476.issue42235@roundup.psfhosted.org> Message-ID: <1604250208.19.0.861030866075.issue42235@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- keywords: +patch pull_requests: +21998 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23079 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 12:36:52 2020 From: report at bugs.python.org (Ken Jin) Date: Sun, 01 Nov 2020 17:36:52 +0000 Subject: [issue42233] GenericAlias does not support union type expressions In-Reply-To: <1604244730.48.0.778653484179.issue42233@roundup.psfhosted.org> Message-ID: <1604252212.15.0.180789037803.issue42233@roundup.psfhosted.org> Change by Ken Jin : ---------- pull_requests: +21999 pull_request: https://github.com/python/cpython/pull/23081 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 13:12:56 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Nov 2020 18:12:56 +0000 Subject: [issue42236] os.device_encoding() doesn't respect the UTF-8 Mode Message-ID: <1604254376.75.0.724076396779.issue42236@roundup.psfhosted.org> New submission from STINNER Victor : When the UTF-8 Mode is enabled, sys.stdout.encoding is always UTF-8, whereas os.devide_encoding(sys.stdout.fileno()) returns the locale encoding. os.devide_encoding() must return UTF-8 when the UTF-8 Mode is used. ---------- components: Library (Lib) messages: 380156 nosy: vstinner priority: normal severity: normal status: open title: os.device_encoding() doesn't respect the UTF-8 Mode versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 13:14:14 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 01 Nov 2020 18:14:14 +0000 Subject: [issue42233] GenericAlias does not support union type expressions In-Reply-To: <1604244730.48.0.778653484179.issue42233@roundup.psfhosted.org> Message-ID: <1604254454.5.0.410860962028.issue42233@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +22000 pull_request: https://github.com/python/cpython/pull/23082 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 13:13:47 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 01 Nov 2020 18:13:47 +0000 Subject: [issue42233] GenericAlias does not support union type expressions In-Reply-To: <1604244730.48.0.778653484179.issue42233@roundup.psfhosted.org> Message-ID: <1604254427.78.0.0687434438312.issue42233@roundup.psfhosted.org> miss-islington added the comment: New changeset 1f7dfb277e5b88cddc13e5024766be787a3e9127 by kj in branch 'master': bpo-42233: Correctly repr GenericAlias when used with typing module (GH-23081) https://github.com/python/cpython/commit/1f7dfb277e5b88cddc13e5024766be787a3e9127 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 13:45:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Nov 2020 18:45:39 +0000 Subject: [issue42236] os.device_encoding() doesn't respect the UTF-8 Mode In-Reply-To: <1604254376.75.0.724076396779.issue42236@roundup.psfhosted.org> Message-ID: <1604256339.18.0.0299893098984.issue42236@roundup.psfhosted.org> STINNER Victor added the comment: In bpo-42208, I added C _Py_GetLocaleEncoding() function and Python _locale._get_locale_encoding() function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 13:47:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Nov 2020 18:47:17 +0000 Subject: [issue42236] os.device_encoding() doesn't respect the UTF-8 Mode In-Reply-To: <1604254376.75.0.724076396779.issue42236@roundup.psfhosted.org> Message-ID: <1604256437.65.0.549201552366.issue42236@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +22001 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23083 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 14:59:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Nov 2020 19:59:42 +0000 Subject: [issue42236] os.device_encoding() doesn't respect the UTF-8 Mode In-Reply-To: <1604254376.75.0.724076396779.issue42236@roundup.psfhosted.org> Message-ID: <1604260782.88.0.307891609113.issue42236@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 82458b6cdbae3b849dc11d0d7dc2ab06ef0451c4 by Victor Stinner in branch 'master': bpo-42236: Enhance _locale._get_locale_encoding() (GH-23083) https://github.com/python/cpython/commit/82458b6cdbae3b849dc11d0d7dc2ab06ef0451c4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 15:07:47 2020 From: report at bugs.python.org (Sebastian Wiedenroth) Date: Sun, 01 Nov 2020 20:07:47 +0000 Subject: [issue42237] test_socket.SendfileUsingSendfileTest fails on illumos Message-ID: <1604261267.98.0.369045235153.issue42237@roundup.psfhosted.org> New submission from Sebastian Wiedenroth : I'm investigating some test failures related to sendfile on illumos: testCount (test.test_socket.SendfileUsingSendfileTest) ... FAIL testCountSmall (test.test_socket.SendfileUsingSendfileTest) ... ok testCountWithOffset (test.test_socket.SendfileUsingSendfileTest) ... ok testEmptyFileSend (test.test_socket.SendfileUsingSendfileTest) ... ok testNonBlocking (test.test_socket.SendfileUsingSendfileTest) ... ok testNonRegularFile (test.test_socket.SendfileUsingSendfileTest) ... ok testOffset (test.test_socket.SendfileUsingSendfileTest) ... ERROR testRegularFile (test.test_socket.SendfileUsingSendfileTest) ... ok testWithTimeout (test.test_socket.SendfileUsingSendfileTest) ... FAIL testWithTimeoutTriggeredSend (test.test_socket.SendfileUsingSendfileTest) ... ok test_errors (test.test_socket.SendfileUsingSendfileTest) ... ok ====================================================================== ERROR: testOffset (test.test_socket.SendfileUsingSendfileTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/cpython/Lib/socket.py", line 386, in _sendfile_use_sendfile sent = os_sendfile(sockno, fileno, offset, blocksize) OSError: [Errno 22] Invalid argument During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/cpython/Lib/test/test_socket.py", line 374, in _tearDown raise exc File "/root/cpython/Lib/test/test_socket.py", line 392, in clientRun test_func() File "/root/cpython/Lib/test/test_socket.py", line 6057, in _testOffset sent = meth(file, offset=5000) File "/root/cpython/Lib/socket.py", line 399, in _sendfile_use_sendfile raise _GiveupOnSendfile(err) socket._GiveupOnSendfile: [Errno 22] Invalid argument ====================================================================== FAIL: testCount (test.test_socket.SendfileUsingSendfileTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/cpython/Lib/test/test_socket.py", line 6085, in testCount self.assertEqual(len(data), count) AssertionError: 5405948743 != 5000007 ====================================================================== FAIL: testWithTimeout (test.test_socket.SendfileUsingSendfileTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/cpython/Lib/test/test_socket.py", line 6159, in testWithTimeout self.assertEqual(len(data), self.FILESIZE) AssertionError: 429006848 != 10485760 ---------------------------------------------------------------------- Ran 11 tests in 33.603s FAILED (failures=2, errors=1) Looking at the testCount case I could observe repeated calls to sendfile() with out_fd=7, in_fd=6 off=0, len=5000007 which returned -1 with errno set to EAGAIN. ---------- components: IO, Library (Lib) messages: 380160 nosy: wiedi priority: normal severity: normal status: open title: test_socket.SendfileUsingSendfileTest fails on illumos versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 15:21:33 2020 From: report at bugs.python.org (Sebastian Wiedenroth) Date: Sun, 01 Nov 2020 20:21:33 +0000 Subject: [issue42237] test_socket.SendfileUsingSendfileTest fails on illumos In-Reply-To: <1604261267.98.0.369045235153.issue42237@roundup.psfhosted.org> Message-ID: <1604262093.51.0.543946427502.issue42237@roundup.psfhosted.org> Change by Sebastian Wiedenroth : ---------- keywords: +patch pull_requests: +22002 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23085 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 15:22:56 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 01 Nov 2020 20:22:56 +0000 Subject: [issue42229] Fix SQLite warnings on macOS In-Reply-To: <1604227772.18.0.746348927327.issue42229@roundup.psfhosted.org> Message-ID: <1604262176.39.0.00895088098781.issue42229@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: FYI, commit 7f331c8 (GH-19581 / bpo-40318) migrates the sqlite3 to the new trace API. There was also a discussion about sqlite3_enable_shared_cache() on bpo, but I think it was closed as "wont-fix", IIRC. ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 15:52:53 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 01 Nov 2020 20:52:53 +0000 Subject: [issue42229] Fix SQLite warnings on macOS In-Reply-To: <1604227772.18.0.746348927327.issue42229@roundup.psfhosted.org> Message-ID: <1604263973.21.0.550161800276.issue42229@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Look at bpo-24464 regarding the shared cache issue. Apparently I did not remember correctly regarding its status. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 15:53:07 2020 From: report at bugs.python.org (Samuel Marks) Date: Sun, 01 Nov 2020 20:53:07 +0000 Subject: [issue42229] Fix SQLite warnings on macOS In-Reply-To: <1604227772.18.0.746348927327.issue42229@roundup.psfhosted.org> Message-ID: <1604263987.78.0.521210313481.issue42229@roundup.psfhosted.org> Samuel Marks added the comment: Yes, this commit extends his changes to include macOS support (for some reason that SQLite version check doesn?t work properly on macOS; so this checks the macOS version, knowing AOT when SQLite trace v1 APIs were deprecated. Curious that `sqlite3_enable_shared_cache` is in the ?wontfix? category? why is this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 15:58:14 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 01 Nov 2020 20:58:14 +0000 Subject: [issue42229] Fix SQLite warnings on macOS In-Reply-To: <1604227772.18.0.746348927327.issue42229@roundup.psfhosted.org> Message-ID: <1604264294.22.0.454051890939.issue42229@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Oh, I see now that you're only mentioning 3.9 here. The issue was fixed in master only (that is 3.10 alpha). Perhaps GH-19581 should be backported to 3.9, or even 3.8, but that's not for me to decide. Note: your patch is against 3.10, not 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 16:11:35 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 01 Nov 2020 21:11:35 +0000 Subject: [issue42229] Fix SQLite warnings on macOS In-Reply-To: <1604227772.18.0.746348927327.issue42229@roundup.psfhosted.org> Message-ID: <1604265095.7.0.416121624034.issue42229@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > Yes, this commit extends his changes to include macOS support (for some reason that SQLite version check doesn?t work properly on macOS I can't reproduce this on master on macOS 10.15.7 with the SQLite 3.28.0 that's shipped with the os. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 16:12:56 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 01 Nov 2020 21:12:56 +0000 Subject: [issue42229] Fix SQLite warnings on macOS In-Reply-To: <1604227772.18.0.746348927327.issue42229@roundup.psfhosted.org> Message-ID: <1604265176.83.0.671882494841.issue42229@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 16:40:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Nov 2020 21:40:25 +0000 Subject: [issue42236] os.device_encoding() doesn't respect the UTF-8 Mode In-Reply-To: <1604254376.75.0.724076396779.issue42236@roundup.psfhosted.org> Message-ID: <1604266825.93.0.524962855138.issue42236@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22003 pull_request: https://github.com/python/cpython/pull/23086 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 17:07:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Nov 2020 22:07:32 +0000 Subject: [issue42236] os.device_encoding() doesn't respect the UTF-8 Mode In-Reply-To: <1604254376.75.0.724076396779.issue42236@roundup.psfhosted.org> Message-ID: <1604268452.01.0.832360738211.issue42236@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e662c398d87f136497f8ec672e83657ae3a599e0 by Victor Stinner in branch 'master': bpo-42236: Use UTF-8 encoding if nl_langinfo(CODESET) fails (GH-23086) https://github.com/python/cpython/commit/e662c398d87f136497f8ec672e83657ae3a599e0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 18:49:23 2020 From: report at bugs.python.org (Julien Palard) Date: Sun, 01 Nov 2020 23:49:23 +0000 Subject: [issue42238] Deprecate suspicious.py? Message-ID: <1604274563.95.0.828690163802.issue42238@roundup.psfhosted.org> New submission from Julien Palard : I was not here 21 years ago when it was introduced [1], but according to the commit message it was introduced to find leftover Latex mardown. It tries to find 4 patterns in Sphinx node text (not in raw rst files): ::(?=[^=])| # two :: (but NOT ::=) This one has ~100 false positive in susp-ignored.csv (pypi classifiers, slices, ipv6, ...) :[a-zA-Z][a-zA-Z0-9]+| # :foo This one has ~300 false positive in susp-ignored.csv (slices, C:\, ipv6, ...) `| # ` (seldom used by itself) This one has ~20 false positive in susp-ignored.csv (mostly reStructuredText in code-blocks) (? _______________________________________ From report at bugs.python.org Sun Nov 1 18:51:12 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 01 Nov 2020 23:51:12 +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: <1604274672.92.0.989607273353.issue37193@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset c41559021213cfc9dc62a83fc63306b3bdc3e64b by MARUYAMA Norihiro in branch 'master': bpo-37193: remove thread objects which finished process its request (GH-13893) https://github.com/python/cpython/commit/c41559021213cfc9dc62a83fc63306b3bdc3e64b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 18:51:19 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 01 Nov 2020 23:51:19 +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: <1604274679.46.0.758127906004.issue37193@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +22004 pull_request: https://github.com/python/cpython/pull/23087 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 18:51:27 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 01 Nov 2020 23:51:27 +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: <1604274687.13.0.195798379877.issue37193@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +22005 pull_request: https://github.com/python/cpython/pull/23088 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 18:51:34 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 01 Nov 2020 23:51:34 +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: <1604274694.02.0.759738890428.issue37193@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +22006 pull_request: https://github.com/python/cpython/pull/23089 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 19:07:26 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Nov 2020 00:07:26 +0000 Subject: [issue42238] Deprecate suspicious.py? In-Reply-To: <1604274563.95.0.828690163802.issue42238@roundup.psfhosted.org> Message-ID: <1604275646.11.0.212841390242.issue42238@roundup.psfhosted.org> Raymond Hettinger added the comment: I would love to see this disappear. For me, it has been a recurring time waster. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 19:48:28 2020 From: report at bugs.python.org (Samuel Marks) Date: Mon, 02 Nov 2020 00:48:28 +0000 Subject: [issue42229] Fix SQLite warnings on macOS In-Reply-To: <1604227772.18.0.746348927327.issue42229@roundup.psfhosted.org> Message-ID: <1604278108.64.0.194511811893.issue42229@roundup.psfhosted.org> Samuel Marks added the comment: @erlendaasland Hmm? just double-checked, and this issue is present on Python 3.8.6 and 3.9.0 but not master [d3b4e068077dd26927ae7485bd0303e09d962c02] as you referenced. Should I close this issue?and PR?then? - Backport from master to these? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 19:51:19 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 02 Nov 2020 00:51:19 +0000 Subject: [issue42238] Deprecate suspicious.py? In-Reply-To: <1604274563.95.0.828690163802.issue42238@roundup.psfhosted.org> Message-ID: <1604278279.28.0.616814835457.issue42238@roundup.psfhosted.org> Ned Deily added the comment: If it still does useful checks, we could just limit it to running by release managers during the release manufacturing process; it is already run then. It would still allow for problems to be caught and fixed by the RM prior to release tagging. But I don't have a strong opinion about its overall usefulness. I recall it catching at least one problem in a release I was involved with and that was probably before we had the CI checks. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 20:43:32 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Nov 2020 01:43:32 +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: <1604281412.07.0.0920540090202.issue37193@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Commit c41559021213cfc9dc62a83fc63306b3bdc3e64b has introduced reference leaks: ---------------------------------------------------------------------- Ran 202 tests in 21.654s OK (skipped=1) ...... test_logging leaked [20, 20, 20] references, sum=60 test_logging leaked [20, 20, 20] memory blocks, sum=60 2 tests failed again: test_logging test_socketserver == Tests result: FAILURE then FAILURE == Example buildbot failure: https://buildbot.python.org/all/#/builders/562/builds/79/steps/5/logs/stdio As there is a release of 3.10 alpha 2 tomorrow I would be great if this could be fixed by tomorrow. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 21:35:11 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 02 Nov 2020 02:35:11 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604284511.42.0.692993645552.issue42225@roundup.psfhosted.org> Terry J. Reedy added the comment: In IDLE on Windows the following prints the first 3 astral planes in a couple of minutes. for i in range(0x10000, 0x40000, 32): chars = ''.join(chr(i+j) for j in range(32)) print(hex(i), chars) Perhaps half of the assigned chars in the first plane are printed instead of being replaced with a narrow box. This includes emoticons as foreground color outlines on background color. Maybe all of the second plane of extended CJK chars are printed. The third plane is unassigned and prints as unassigned boxes (with an X). Fixing OS graphics or tk is out of scope for us. Preventing hangs or crashes when using tkinter is. On Mac, refusing to insert any astral char into a tk widget might be the best solution. Serhiy, could that be done in tkinter/_tkinter? On Linux, the situation appears to be more complex. The SO questioner https://stackoverflow.com/questions/64615570/why-do-some-emoticons-cause-python-idle-to-crash-on-ubuntu could print the two multicolor 'grinning face with smiling eyes' ?, which fails for Serhiy, but not the simpler thumbsup ?. I don't know if we can detect fonts that cause crashes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 21:49:16 2020 From: report at bugs.python.org (Jeremy Howard) Date: Mon, 02 Nov 2020 02:49:16 +0000 Subject: [issue42226] imghdr.what is missing docstring, has a logic error, and is overly complex In-Reply-To: <1604205105.29.0.494636878964.issue42226@roundup.psfhosted.org> Message-ID: <1604285356.72.0.87703235191.issue42226@roundup.psfhosted.org> Change by Jeremy Howard : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 21:50:44 2020 From: report at bugs.python.org (mohamed koubaa) Date: Mon, 02 Nov 2020 02:50:44 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604285444.22.0.104639864229.issue1635741@roundup.psfhosted.org> Change by mohamed koubaa : ---------- pull_requests: +22007 pull_request: https://github.com/python/cpython/pull/23091 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 23:00:00 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 02 Nov 2020 04:00:00 +0000 Subject: [issue40511] IDLE: properly handle '(' and ')' within calls In-Reply-To: <1588680591.22.0.16376057042.issue40511@roundup.psfhosted.org> Message-ID: <1604289600.2.0.49920134216.issue40511@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset da7bb7b4d769350c5fd03e6cfb16b23dc265ed72 by Tal Einat in branch 'master': bpo-40511: Stop unwanted flashing of IDLE calltips (GH-20910) https://github.com/python/cpython/commit/da7bb7b4d769350c5fd03e6cfb16b23dc265ed72 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 23:00:07 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Nov 2020 04:00:07 +0000 Subject: [issue40511] IDLE: properly handle '(' and ')' within calls In-Reply-To: <1588680591.22.0.16376057042.issue40511@roundup.psfhosted.org> Message-ID: <1604289607.09.0.278911735712.issue40511@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +22008 pull_request: https://github.com/python/cpython/pull/23093 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 23:00:14 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Nov 2020 04:00:14 +0000 Subject: [issue40511] IDLE: properly handle '(' and ')' within calls In-Reply-To: <1588680591.22.0.16376057042.issue40511@roundup.psfhosted.org> Message-ID: <1604289614.94.0.0130748403313.issue40511@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +22009 pull_request: https://github.com/python/cpython/pull/23094 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 23:41:31 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 02 Nov 2020 04:41:31 +0000 Subject: [issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable In-Reply-To: <1603974319.88.0.166786801787.issue42195@roundup.psfhosted.org> Message-ID: <1604292091.27.0.15474144934.issue42195@roundup.psfhosted.org> Guido van Rossum added the comment: Actually you can't really change typing.Callable's __args__, because it must be hashable, and lists aren't. If GenericAlias doesn't cache yet, it might very well do so in the future to gain some speed when e.g. list[int] is used at runtime outside annotations, e.g. in cast(), so it will be important there too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 23:49:46 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Nov 2020 04:49:46 +0000 Subject: [issue40511] IDLE: properly handle '(' and ')' within calls In-Reply-To: <1588680591.22.0.16376057042.issue40511@roundup.psfhosted.org> Message-ID: <1604292586.28.0.221127438596.issue40511@roundup.psfhosted.org> miss-islington added the comment: New changeset 79e9f06149f92798a8e11e3f1c62dad171312ab3 by Miss Skeleton (bot) in branch '3.9': bpo-40511: Stop unwanted flashing of IDLE calltips (GH-20910) https://github.com/python/cpython/commit/79e9f06149f92798a8e11e3f1c62dad171312ab3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 23:50:02 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Nov 2020 04:50:02 +0000 Subject: [issue40511] IDLE: properly handle '(' and ')' within calls In-Reply-To: <1588680591.22.0.16376057042.issue40511@roundup.psfhosted.org> Message-ID: <1604292602.6.0.734656881231.issue40511@roundup.psfhosted.org> miss-islington added the comment: New changeset 1341582e165841810e2fbf89e23be0e92b4a9fdd by Miss Skeleton (bot) in branch '3.8': bpo-40511: Stop unwanted flashing of IDLE calltips (GH-20910) https://github.com/python/cpython/commit/1341582e165841810e2fbf89e23be0e92b4a9fdd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 1 23:51:17 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 02 Nov 2020 04:51:17 +0000 Subject: [issue40511] IDLE: properly handle '(' and ')' within calls In-Reply-To: <1588680591.22.0.16376057042.issue40511@roundup.psfhosted.org> Message-ID: <1604292677.82.0.938526195572.issue40511@roundup.psfhosted.org> Terry J. Reedy added the comment: wyz, thank you for the report. It should be fixed now. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 00:01:42 2020 From: report at bugs.python.org (hai shi) Date: Mon, 02 Nov 2020 05:01:42 +0000 Subject: [issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores. In-Reply-To: <1564832053.37.0.298269063007.issue37751@roundup.psfhosted.org> Message-ID: <1604293302.77.0.0395259946817.issue37751@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +22010 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/23096 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 00:17:08 2020 From: report at bugs.python.org (Campbell Barton) Date: Mon, 02 Nov 2020 05:17:08 +0000 Subject: [issue9499] DOC: C/API Execution namespace undocumented. (patch included) In-Reply-To: <1280873534.19.0.920563075759.issue9499@psf.upfronthosting.co.za> Message-ID: <1604294228.99.0.325288417376.issue9499@roundup.psfhosted.org> Campbell Barton added the comment: This patch is still relevant, mentioning this since the patch is from a while ago. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 00:24:17 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 02 Nov 2020 05:24:17 +0000 Subject: [issue42239] IDLE: Restore calltip when needed Message-ID: <1604294657.06.0.127781184025.issue42239@roundup.psfhosted.org> New submission from Terry J. Reedy : If one types 'int(' an int calltip is displayed. If one adds 'float(' then the float calltip is displayed instead. If one adds '"3.1")', the int calltip is restored. (Actually a new int calltip.) Finally, if one closes with ')', the int calltip is removed. If, after 'int(', one adds instead 'f(', where f has no accessible signature or docstring and hence no calltip, the int calltip is dropped with no replacement. When f is closed, the int calltip is not restored because open_calltip in def refresh_calltip_event(self, event): # Bound to ')'. if self.active_calltip and self.active_calltip.tipwindow: self.open_calltip(False) is not called because there is no existing calltip. This issue is about somehow having the int calltip after the f call. Possibilities. 1. Do not drop the int calltip when an inner call has none. 2. Give the inner call a fake calltip, something like "f(". Again, revise open_calltip. 3. Drop the outer calltip and set a 'nested_call flag in open_calltip and test it with 'or' in refresh_calltip_event (and unset the flag -- conditionally?) to restore it. 4. Add a calltip stack and test it for not empty in refresh_calltip_event. Tal, any opinions on the desired behavior. I believe the #40511 revision should make any of the above, with 1 and 2 being easiest and safest. A problem with 3 and 4 is that the text cursor can be moved out of the call and the calltip closed without the call being completed with ')'. I want to add more tests first. ---------- assignee: terry.reedy components: IDLE messages: 380180 nosy: taleinat, terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE: Restore calltip when needed type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 00:26:30 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 02 Nov 2020 05:26:30 +0000 Subject: [issue42239] IDLE: Restore or keep calltip when needed In-Reply-To: <1604294657.06.0.127781184025.issue42239@roundup.psfhosted.org> Message-ID: <1604294790.6.0.603954500177.issue42239@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: IDLE: Restore calltip when needed -> IDLE: Restore or keep calltip when needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 00:38:42 2020 From: report at bugs.python.org (Ken Jin) Date: Mon, 02 Nov 2020 05:38:42 +0000 Subject: [issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable In-Reply-To: <1603974319.88.0.166786801787.issue42195@roundup.psfhosted.org> Message-ID: <1604295522.64.0.913506062559.issue42195@roundup.psfhosted.org> Ken Jin added the comment: Dear Guido, from what I can see in the typing module, _CallableType already casts the args list to a tuple before creating the __CallableGenericAlias, so it should support cacheing. This is taken from the from _CallableType:: def __getitem__(self, params): ... # (some checking code here) args, result = params ... # (some checking code here) params = (tuple(args), result) # args is cast to a tuple return self.__getitem_inner__(params) @_tp_cache # the cache def __getitem_inner__(self, params): args, result = params ... # (some checking code here) # This is the suspect code causing the flattening of args params = args + (result,) return self.copy_with(params) def copy_with(self, params): return _CallableGenericAlias(self.__origin__, params, name=self._name, inst=self._inst) Changing the suspect code from ``params = args + (result,)`` to ``params = (args, result)`` allows typing.Callable to be consistent with collections.abc.Callable's GenericAlias, and also allows for cacheing. With that change: >>> from typing import Callable >>> Callable[[int, ], str].__args__ ((,), ) # note the args is a tuple >>> from collections.abc import Callable >>> Callable[[int, ], str].__args__ ([], ) # note the args is a list This isn't fully consistent with collections.abc.Callable's GenericAlias just yet, but it's close. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 01:24:11 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 02 Nov 2020 06:24:11 +0000 Subject: [issue42229] Fix SQLite warnings on macOS In-Reply-To: <1604227772.18.0.746348927327.issue42229@roundup.psfhosted.org> Message-ID: <1604298251.62.0.394336665515.issue42229@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > Should I close this issue?and PR?then? - Backport from master to these? If this fix is wanted in 3.9 and 3.8, I think the correct way to proceed would be to close GH-23072 and backport GH-19581. Try checking out 3.9 and cherrypicking 7f331c8 to verify that the trace-warning disappears. I'm pretty sure that SQLite3 version detection works on macOS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 01:25:36 2020 From: report at bugs.python.org (Samuel Marks) Date: Mon, 02 Nov 2020 06:25:36 +0000 Subject: [issue42229] Fix SQLite warnings on macOS In-Reply-To: <1604227772.18.0.746348927327.issue42229@roundup.psfhosted.org> Message-ID: <1604298336.53.0.0730744282913.issue42229@roundup.psfhosted.org> Change by Samuel Marks : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 01:25:19 2020 From: report at bugs.python.org (Samuel Marks) Date: Mon, 02 Nov 2020 06:25:19 +0000 Subject: [issue42229] Fix SQLite warnings on macOS In-Reply-To: <1604227772.18.0.746348927327.issue42229@roundup.psfhosted.org> Message-ID: <1604298319.75.0.0356940741779.issue42229@roundup.psfhosted.org> Samuel Marks added the comment: ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 01:29:44 2020 From: report at bugs.python.org (Rudresh Veerkhare) Date: Mon, 02 Nov 2020 06:29:44 +0000 Subject: [issue42240] Add Maxheap version of a heappush into heapq module Message-ID: <1604298584.59.0.170869406843.issue42240@roundup.psfhosted.org> New submission from Rudresh Veerkhare : Main functions required to implement Heap data structure are: function heappush - to push an element in Heap function heappop - to pop an element from Heap for implementing Minheap this functions are present in the module as : heappush - for adding element into Minheap heappop - to pop an element from Minheap for implementing Maxheap only one of this two required functions is present: _heappop_max - to pop an element from Maxheap I suggest adding a Maxheap version of heappush into heapq module. _heappush_max - for adding an element into Maxheap. ---------- components: Library (Lib) messages: 380184 nosy: veerkharerudresh priority: normal severity: normal status: open title: Add Maxheap version of a heappush into heapq module type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 02:17:08 2020 From: report at bugs.python.org (Samuel Marks) Date: Mon, 02 Nov 2020 07:17:08 +0000 Subject: [issue42241] Backport SQLite trace API v2 Message-ID: <1604301428.79.0.759085975242.issue42241@roundup.psfhosted.org> New submission from Samuel Marks : Backports https://github.com/python/cpython/pull/19581 https://bugs.python.org/issue40318 as per https://bugs.python.org/issue42229 ---------- components: Build messages: 380185 nosy: samuelmarks priority: normal pull_requests: 22011 severity: normal status: open title: Backport SQLite trace API v2 type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 02:23:04 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 02 Nov 2020 07:23:04 +0000 Subject: [issue42239] IDLE: Restore or keep calltip when needed In-Reply-To: <1604294657.06.0.127781184025.issue42239@roundup.psfhosted.org> Message-ID: <1604301784.77.0.869693553136.issue42239@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +22012 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/23098 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 02:26:01 2020 From: report at bugs.python.org (Samuel Marks) Date: Mon, 02 Nov 2020 07:26:01 +0000 Subject: [issue42242] Backport SQLite trace API v2 Message-ID: <1604301961.05.0.228655015786.issue42242@roundup.psfhosted.org> New submission from Samuel Marks : Backports https://github.com/python/cpython/pull/19581 https://bugs.python.org/issue40318 as per https://bugs.python.org/issue42229 See also 3.9 backporting: https://bugs.python.org/issue42241 [not sure if this is how you do backporting, a new issue and GH PR for each supported release tag?] ---------- components: Build messages: 380186 nosy: samuelmarks priority: normal pull_requests: 22013 severity: normal status: open title: Backport SQLite trace API v2 type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 02:27:40 2020 From: report at bugs.python.org (Samuel Marks) Date: Mon, 02 Nov 2020 07:27:40 +0000 Subject: [issue42229] Fix SQLite warnings on macOS In-Reply-To: <1604227772.18.0.746348927327.issue42229@roundup.psfhosted.org> Message-ID: <1604302060.88.0.849393250213.issue42229@roundup.psfhosted.org> Samuel Marks added the comment: Opened two issues and two PRs for 3.8 and 3.8: - https://bugs.python.org/issue42241 - https://bugs.python.org/issue42242 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 02:36:47 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 02 Nov 2020 07:36:47 +0000 Subject: [issue42239] IDLE: Restore or keep calltip when needed In-Reply-To: <1604294657.06.0.127781184025.issue42239@roundup.psfhosted.org> Message-ID: <1604302607.02.0.413369356335.issue42239@roundup.psfhosted.org> Tal Einat added the comment: We already have a "<>" virtual event which is triggered upon typing a closing parenthesis ')'. We could just have it always call "open_calltip()" rather than only doing so when one is already open. See PR GH-23098. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 02:37:49 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 02 Nov 2020 07:37:49 +0000 Subject: [issue42239] IDLE: Restore or keep calltip when needed In-Reply-To: <1604294657.06.0.127781184025.issue42239@roundup.psfhosted.org> Message-ID: <1604302669.98.0.689570281626.issue42239@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +22014 pull_request: https://github.com/python/cpython/pull/23100 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 02:38:31 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 02 Nov 2020 07:38:31 +0000 Subject: [issue42239] IDLE: Restore or keep calltip when needed In-Reply-To: <1604294657.06.0.127781184025.issue42239@roundup.psfhosted.org> Message-ID: <1604302711.02.0.258689751876.issue42239@roundup.psfhosted.org> Tal Einat added the comment: We already have a "<>" virtual event which is triggered upon typing a closing parenthesis ')'. We could just have it always call "open_calltip()" rather than only doing so when one is already open. See PR GH-23100. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 02:38:56 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 02 Nov 2020 07:38:56 +0000 Subject: [issue42239] IDLE: Restore or keep calltip when needed In-Reply-To: <1604294657.06.0.127781184025.issue42239@roundup.psfhosted.org> Message-ID: <1604302736.99.0.806082906681.issue42239@roundup.psfhosted.org> Change by Tal Einat : ---------- Removed message: https://bugs.python.org/msg380188 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 02:52:09 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 02 Nov 2020 07:52:09 +0000 Subject: [issue42239] IDLE: Restore or keep calltip when needed In-Reply-To: <1604294657.06.0.127781184025.issue42239@roundup.psfhosted.org> Message-ID: <1604303529.29.0.313803503658.issue42239@roundup.psfhosted.org> Terry J. Reedy added the comment: I dislike the idea of creating a Hyperparser and calling get_surrounding_brackets on every ). For (, the open is the ( just typed and the close is typically the newline to the right. For ), the open may be several lines back. I will test for noticeable delay after sleeping. ---------- stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 03:00:58 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 02 Nov 2020 08:00:58 +0000 Subject: [issue42242] Backport SQLite trace API v2 In-Reply-To: <1604301961.05.0.228655015786.issue42242@roundup.psfhosted.org> Message-ID: <1604304058.05.0.594347686547.issue42242@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch nosy: +erlendaasland nosy_count: 1.0 -> 2.0 pull_requests: +22017 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19581 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 03:00:57 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 02 Nov 2020 08:00:57 +0000 Subject: [issue42241] Backport SQLite trace API v2 In-Reply-To: <1604301428.79.0.759085975242.issue42241@roundup.psfhosted.org> Message-ID: <1604304057.99.0.0443836344488.issue42241@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch nosy: +erlendaasland nosy_count: 1.0 -> 2.0 pull_requests: +22016 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19581 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 03:02:56 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Nov 2020 08:02:56 +0000 Subject: [issue41229] Asynchronous generator memory leak In-Reply-To: <1594123688.2.0.0110904549514.issue41229@roundup.psfhosted.org> Message-ID: <1604304176.12.0.397090185443.issue41229@roundup.psfhosted.org> miss-islington added the comment: New changeset 6e8dcdaaa49d4313bf9fab9f9923ca5828fbb10e by Joongi Kim in branch 'master': bpo-41229: Update docs for explicit aclose()-required cases and add contextlib.aclosing() method (GH-21545) https://github.com/python/cpython/commit/6e8dcdaaa49d4313bf9fab9f9923ca5828fbb10e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 03:09:03 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 02 Nov 2020 08:09:03 +0000 Subject: [issue42242] Backport SQLite trace API v2 In-Reply-To: <1604301961.05.0.228655015786.issue42242@roundup.psfhosted.org> Message-ID: <1604304543.05.0.359422105489.issue42242@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > [not sure if this is how you do backporting, a new issue and GH PR for each supported release tag?] Backports are almost always created as backports of a specific GitHub pull request. The pull request is labelled as, for example, "needs backport to 3.9", and a bot will automatically try to cherry-pick the squashed commit to the target branch. So, if we wanted to backport GH-19581, we would do that directly from the original pull request over at GitHub. That will also preserve commit meta-data. See also: https://devguide.python.org/committing/?highlight=backport#backporting-changes-to-an-older-version ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 03:13:12 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 02 Nov 2020 08:13:12 +0000 Subject: [issue42241] Backport SQLite trace API v2 In-Reply-To: <1604301428.79.0.759085975242.issue42241@roundup.psfhosted.org> Message-ID: <1604304792.61.0.0726699778301.issue42241@roundup.psfhosted.org> Dong-hee Na added the comment: We often submit the backported patch by using the backport label from the origin PR. (https://github.com/python/cpython/pull/19581) So please discuss about the bacporting on bpo-40318 ---------- nosy: +corona10 resolution: -> duplicate stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 03:14:31 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 02 Nov 2020 08:14:31 +0000 Subject: [issue42242] Backport SQLite trace API v2 In-Reply-To: <1604301961.05.0.228655015786.issue42242@roundup.psfhosted.org> Message-ID: <1604304871.66.0.294165504592.issue42242@roundup.psfhosted.org> Dong-hee Na added the comment: We often submit the backported patch by using the backport label from the origin PR. (https://github.com/python/cpython/pull/19581) So please discuss the backporting on bpo-40318 ---------- nosy: +corona10 resolution: -> duplicate stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 03:18:33 2020 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 02 Nov 2020 08:18:33 +0000 Subject: [issue42173] Drop Solaris support In-Reply-To: <1603814348.33.0.839225742612.issue42173@roundup.psfhosted.org> Message-ID: <1604305113.54.0.857948574353.issue42173@roundup.psfhosted.org> Jakub Kulik added the comment: I ran the test and the results are attached (the first one is a complete test and the other one failed tests in verbose mode). I checked the failing tests and divided them into several groups: issues already reported: test_asyncio - reported and being solved here: https://bugs.python.org/issue38323 test_posix - problem with return values, reported here: https://bugs.python.org/issue41839 test_shutil - sendfile for Solaris was disabled in the library, but not in the test suite, which leads to the issues (I asked about reenabling here: https://bugs.python.org/issue41843; that would solve the issue) these failures are probably related to our internal network settings (false positives): test_ssl, test_urllib, test_urllib2, test_urllib2_localnet other: test_float - locale related * test_locale - locale related * test_re - most likely locale related * test_socket - known issues not yet reported upstream (not ready for acceptable PR) test_time - one locale related * and other not yet known test_tcl - yet to investigate *) Locale related failures are due to wchar_t differences between the Linux world and ours. It's something we resolved very recently and have yet to rework it into an upstreamable form and report it. It would be interesting to see Illumos results as well, because while also Solaris, there might be differences due to almost ten years of spit development. ---------- Added file: https://bugs.python.org/file49558/Oracle_Solaris_full_test.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 03:18:43 2020 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 02 Nov 2020 08:18:43 +0000 Subject: [issue42173] Drop Solaris support In-Reply-To: <1603814348.33.0.839225742612.issue42173@roundup.psfhosted.org> Message-ID: <1604305123.81.0.742022028652.issue42173@roundup.psfhosted.org> Change by Jakub Kulik : Added file: https://bugs.python.org/file49559/Oracle_Solaris_detailed_test.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 03:20:25 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 02 Nov 2020 08:20:25 +0000 Subject: [issue42243] Don't access the module dictionary directly Message-ID: <1604305225.53.0.387494771093.issue42243@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : Quoting from https://docs.python.org/3.10/c-api/module.html: "It is recommended extensions use other PyModule_* and PyObject_* functions rather than directly manipulate a module?s __dict__." A number of modules still access the module dictionary directly: zsh % grep -r PyModule_GetDict Modules Modules/errnomodule.c: PyObject *module_dict = PyModule_GetDict(module); Modules/_sre.c: d = PyModule_GetDict(m); Modules/_cursesmodule.c: d = PyModule_GetDict(m); Modules/_threadmodule.c: d = PyModule_GetDict(m); Modules/signalmodule.c: PyObject *d = PyModule_GetDict(m); Modules/_xxsubinterpretersmodule.c: PyObject *ns = PyModule_GetDict(main_mod); // borrowed Modules/_xxsubinterpretersmodule.c: PyObject *ns = PyModule_GetDict(module); // borrowed Modules/socketmodule.c: dict = PyModule_GetDict(m); Modules/_ssl.c: d = PyModule_GetDict(m); Modules/_curses_panel.c: PyObject *d = PyModule_GetDict(mod); Modules/_sqlite/connection.c: module_dict = PyModule_GetDict(module); Modules/_winapi.c: PyObject *d = PyModule_GetDict(m); Modules/pyexpat.c: d = PyModule_GetDict(m); ---------- components: Library (Lib) messages: 380197 nosy: erlendaasland priority: normal severity: normal status: open title: Don't access the module dictionary directly type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 03:33:51 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 02 Nov 2020 08:33:51 +0000 Subject: [issue42243] Don't access the module dictionary directly In-Reply-To: <1604305225.53.0.387494771093.issue42243@roundup.psfhosted.org> Message-ID: <1604306031.25.0.291884661235.issue42243@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +22018 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23101 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 04:02:42 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Nov 2020 09:02:42 +0000 Subject: [issue42243] Don't access the module dictionary directly In-Reply-To: <1604305225.53.0.387494771093.issue42243@roundup.psfhosted.org> Message-ID: <1604307762.22.0.0709139753647.issue42243@roundup.psfhosted.org> Serhiy Storchaka added the comment: Are all these occurrences in the module initialization code? I think there is nothing wrong with this. Yes, the code can be a little clearer if use PyObject_GetArrt or PyModule_Add*, but rewriting can introduce new bugs. The remark in the documentation is rather about reading the module attributes and writing a new code. It does not require rewriting existing code. You can do this, but it will be treated as pure cosmetic change. It can be accepted if the new code is much clearer. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 04:09:38 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 02 Nov 2020 09:09:38 +0000 Subject: [issue40452] Tkinter/IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1604308178.57.0.838890198516.issue40452@roundup.psfhosted.org> Tal Einat added the comment: Perhaps we could get a Tcl/Tk dev to help with this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 04:15:28 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 02 Nov 2020 09:15:28 +0000 Subject: [issue42243] Don't access the module dictionary directly In-Reply-To: <1604305225.53.0.387494771093.issue42243@roundup.psfhosted.org> Message-ID: <1604308528.22.0.946434304516.issue42243@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > Are all these occurrences in the module initialization code? Most of them, but not all. > but rewriting can introduce new bugs. Of course. > You can do this, but it will be treated as pure cosmetic change. It can be accepted if the new code is much clearer. It mostly results in more compact code, which, in my opinion, would improve both readability and maintainability. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 04:19:48 2020 From: report at bugs.python.org (Cristian Martinez de Morentin) Date: Mon, 02 Nov 2020 09:19:48 +0000 Subject: =?utf-8?q?=5Bissue42244=5D_TimedRotatingFileHandler_doesn=E2=80=99t_handl?= =?utf-8?q?e_the_switch_to/from_DST_when_using_daily/midnight_rotation?= Message-ID: <1604308788.03.0.39429090744.issue42244@roundup.psfhosted.org> New submission from Cristian Martinez de Morentin : TimedRotatingFileHandler doesn?t handle the switch to/from DST when using daily/midnight rotation. When DST switch occurs, the previous day logging file is overwritten. The issue is present regardless of the value of the UTC flag (True/False). For instance, we had a DST switch on october 24th in Spain and no logging file was created for that day. Instead, the data was written to october 23rd file. ---------- components: Library (Lib) messages: 380201 nosy: Cristian Martinez de Morentin priority: normal severity: normal status: open title: TimedRotatingFileHandler doesn?t handle the switch to/from DST when using daily/midnight rotation type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 04:37:56 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 02 Nov 2020 09:37:56 +0000 Subject: [issue42240] Add Maxheap version of a heappush into heapq module In-Reply-To: <1604298584.59.0.170869406843.issue42240@roundup.psfhosted.org> Message-ID: <1604309876.34.0.898095270043.issue42240@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 04:38:58 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 02 Nov 2020 09:38:58 +0000 Subject: =?utf-8?q?=5Bissue42244=5D_TimedRotatingFileHandler_doesn=E2=80=99t_handl?= =?utf-8?q?e_the_switch_to/from_DST_when_using_daily/midnight_rotation?= In-Reply-To: <1604308788.03.0.39429090744.issue42244@roundup.psfhosted.org> Message-ID: <1604309938.59.0.0559961683006.issue42244@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 04:53:55 2020 From: report at bugs.python.org (Samuel Marks) Date: Mon, 02 Nov 2020 09:53:55 +0000 Subject: [issue40318] Migrate to SQLite3 trace v2 API In-Reply-To: <1587210970.59.0.35117859461.issue40318@roundup.psfhosted.org> Message-ID: <1604310835.91.0.8887397129.issue40318@roundup.psfhosted.org> Change by Samuel Marks : ---------- nosy: +samuelmarks nosy_count: 4.0 -> 5.0 pull_requests: +22019 pull_request: https://github.com/python/cpython/pull/23102 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 04:54:05 2020 From: report at bugs.python.org (Samuel Marks) Date: Mon, 02 Nov 2020 09:54:05 +0000 Subject: [issue40318] Migrate to SQLite3 trace v2 API In-Reply-To: <1587210970.59.0.35117859461.issue40318@roundup.psfhosted.org> Message-ID: <1604310845.77.0.0432364917457.issue40318@roundup.psfhosted.org> Change by Samuel Marks : ---------- pull_requests: +22020 pull_request: https://github.com/python/cpython/pull/23103 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 04:55:54 2020 From: report at bugs.python.org (Samuel Marks) Date: Mon, 02 Nov 2020 09:55:54 +0000 Subject: [issue42242] Backport SQLite trace API v2 In-Reply-To: <1604301961.05.0.228655015786.issue42242@roundup.psfhosted.org> Message-ID: <1604310954.91.0.734645572525.issue42242@roundup.psfhosted.org> Samuel Marks added the comment: Done, thanks for the how-to: - https://github.com/python/cpython/pull/23103 [3.8] - https://github.com/python/cpython/pull/23102 [3.9] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 05:02:44 2020 From: report at bugs.python.org (John Gardner) Date: Mon, 02 Nov 2020 10:02:44 +0000 Subject: [issue42173] Drop Solaris support In-Reply-To: <1603814348.33.0.839225742612.issue42173@roundup.psfhosted.org> Message-ID: <1604311364.71.0.894389806397.issue42173@roundup.psfhosted.org> John Gardner added the comment: Don't remove, it is still actively used by so many people. If the maintance overhead of 700 lines is a large burdern, then I'm happy to take on whatever work is required for it. ---------- nosy: +jgardner100 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 05:51:56 2020 From: report at bugs.python.org (Markus Israelsson) Date: Mon, 02 Nov 2020 10:51:56 +0000 Subject: [issue42037] Documentation confusion in CookieJar functions In-Reply-To: <1602689022.88.0.876415237077.issue42037@roundup.psfhosted.org> Message-ID: <1604314316.9.0.517273668128.issue42037@roundup.psfhosted.org> Markus Israelsson added the comment: I am currently updating the documentation source code. On the cookiejar page it describes 'unverifiable' as a method. I can however not find that method on the request page because it seems to be just a normal attribute. I will make updates for that as well if that is ok with you? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 05:55:38 2020 From: report at bugs.python.org (Andy Fiddaman) Date: Mon, 02 Nov 2020 10:55:38 +0000 Subject: [issue42173] Drop Solaris support In-Reply-To: <1603814348.33.0.839225742612.issue42173@roundup.psfhosted.org> Message-ID: <1604314538.31.0.748276802967.issue42173@roundup.psfhosted.org> Andy Fiddaman added the comment: Jakub's results looks very familiar to me, having been working on python 3.9 on illumos. For OmniOS, we currently skip these tests via --ignorefile: # wchar_t related failures *.test_re.ReTests.test_locale_compiled *.test_re.ReTests.test_locale_caching # illumos does not support multiple SCM_RIGHTS messages in a packet *FDPassSeparate* # These tests fail on illumos and the first consumes a significant # amount of memory. Investigation required. test.test_socket.SendfileUsingSendfileTest.testCount test.test_socket.SendfileUsingSendfileTest.testWithTimeout test.test_socket.SendfileUsingSendfileTest.testOffset # test.test_asyncio.test_sendfile.* test.test_asyncio.test_subprocess.SubprocessMultiLoopWatcherTests.* We are also carrying some local patches for the following. Several come from Solaris. - Stop python detecting and using epoll() on illumos - scheduling priorities can be < 0 https://github.com/citrus-it/omnios-build/blob/python39/build/python39/patches/mod-posix-sched_priority.patch - differences in sendfile behaviour (improves the situation but is not complete) https://github.com/citrus-it/omnios-build/blob/python39/build/python39/patches/mod-posix-sendfile.patch - Enable sendfile for shutil.copy (mismatch between library and testsuite in terms of whether sendfile() is enabled on illumos) https://github.com/citrus-it/omnios-build/blob/python39/build/python39/patches/mod-shutil-sendfile.patch - Fixes for building the socket module (_XOPEN_SOURCE=600) https://github.com/citrus-it/omnios-build/blob/python39/build/python39/patches/mod-socket-xpg6.patch - Emulate clock_gettime(CLOCK_THREAD_CPUTIME_ID) https://github.com/citrus-it/omnios-build/blob/python39/build/python39/patches/mod-time-threadtime.patch - PTY patch https://github.com/citrus-it/omnios-build/blob/python39/build/python39/patches/pty.patch and a few others, not all of which are suitable for upstream. https://github.com/citrus-it/omnios-build/tree/python39/build/python39/patches With all of this in place, the headline test stats for OmniOS Python 3.9 are: 401 tests OK. 24 tests skipped: test_dbm_gnu test_epoll test_gdb test_idle test_kqueue test_msilib test_ossaudiodev test_smtpnet test_socketserver test_startfile test_tcl test_timeout test_tix test_tk test_ttk_guionly test_ttk_textonly test_turtle test_urllib2net test_urllibnet test_winconsoleio test_winreg test_winsound test_xmlrpc_net test_zipfile64 Tests result: SUCCESS and, additionally, the dtrace tests succeed (we test them separately as they require elevated privileges). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 05:56:50 2020 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 02 Nov 2020 10:56:50 +0000 Subject: [issue42230] Document that asyncio's wait() and as_completed() accept arbitrary iterables In-Reply-To: <1604233021.96.0.386232269828.issue42230@roundup.psfhosted.org> Message-ID: <1604314610.48.0.974256011942.issue42230@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 3d86d090dcbbdfdd3e5a5951cab30612d6131222 by Jakub Stasiak in branch 'master': bpo-42230: Improve asyncio documentation regarding accepting sets vs iterables (GH-23073) https://github.com/python/cpython/commit/3d86d090dcbbdfdd3e5a5951cab30612d6131222 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 05:56:50 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Nov 2020 10:56:50 +0000 Subject: [issue42230] Document that asyncio's wait() and as_completed() accept arbitrary iterables In-Reply-To: <1604233021.96.0.386232269828.issue42230@roundup.psfhosted.org> Message-ID: <1604314610.64.0.616600631114.issue42230@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +22021 pull_request: https://github.com/python/cpython/pull/23104 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 06:10:42 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Mon, 02 Nov 2020 11:10:42 +0000 Subject: [issue42230] Document that asyncio's wait() and as_completed() accept arbitrary iterables In-Reply-To: <1604233021.96.0.386232269828.issue42230@roundup.psfhosted.org> Message-ID: <1604315442.54.0.986318977549.issue42230@roundup.psfhosted.org> Change by Jakub Stasiak : ---------- pull_requests: +22022 pull_request: https://github.com/python/cpython/pull/23105 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 06:19:53 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Nov 2020 11:19:53 +0000 Subject: [issue42230] Document that asyncio's wait() and as_completed() accept arbitrary iterables In-Reply-To: <1604233021.96.0.386232269828.issue42230@roundup.psfhosted.org> Message-ID: <1604315993.71.0.68035302813.issue42230@roundup.psfhosted.org> miss-islington added the comment: New changeset ff852aabf22908e7ef0325af65bab5d02c421fd8 by Miss Skeleton (bot) in branch '3.9': bpo-42230: Improve asyncio documentation regarding accepting sets vs iterables (GH-23073) https://github.com/python/cpython/commit/ff852aabf22908e7ef0325af65bab5d02c421fd8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 06:36:46 2020 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 02 Nov 2020 11:36:46 +0000 Subject: [issue42230] Document that asyncio's wait() and as_completed() accept arbitrary iterables In-Reply-To: <1604233021.96.0.386232269828.issue42230@roundup.psfhosted.org> Message-ID: <1604317006.14.0.173901191191.issue42230@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset ad37c66adcd474e3d42a51c63ecb6a54ca2d23f2 by Jakub Stasiak in branch '3.8': [3.8] bpo-42230: Improve asyncio documentation regarding accepting sets vs iterables (GH-23073) (GH-23105) https://github.com/python/cpython/commit/ad37c66adcd474e3d42a51c63ecb6a54ca2d23f2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 06:37:05 2020 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 02 Nov 2020 11:37:05 +0000 Subject: [issue42230] Document that asyncio's wait() and as_completed() accept arbitrary iterables In-Reply-To: <1604233021.96.0.386232269828.issue42230@roundup.psfhosted.org> Message-ID: <1604317025.35.0.215331177637.issue42230@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 06:43:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Nov 2020 11:43:41 +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: <1604317421.92.0.236206712631.issue37193@roundup.psfhosted.org> STINNER Victor added the comment: The change fixing a leak in socketserver introduces a leak in socketserver :-) $ ./python -m test test_socketserver -u all -m test.test_socketserver.SocketServerTest.test_ThreadingTCPServer -R 3:3 0:00:00 load avg: 0.95 Run tests sequentially 0:00:00 load avg: 0.95 [1/1] test_socketserver beginning 6 repetitions 123456 ...... test_socketserver leaked [3, 3, 3] references, sum=9 test_socketserver leaked [3, 3, 3] memory blocks, sum=9 test_socketserver failed == Tests result: FAILURE == 1 test failed: test_socketserver Total duration: 497 ms Tests result: FAILURE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 06:47:08 2020 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 02 Nov 2020 11:47:08 +0000 Subject: [issue42173] Drop Solaris support In-Reply-To: <1603814348.33.0.839225742612.issue42173@roundup.psfhosted.org> Message-ID: <1604317628.76.0.120286860204.issue42173@roundup.psfhosted.org> Jakub Kulik added the comment: Thanks Andy, good to know we are seeing the same issue! We tried to fix sendfile differences in Python code before as well, but as you said, it was never 100% solved. Recently we finally fixed it in C and it was accepted (https://bugs.python.org/issue41687) and backported to 3.9 so you might/should be ok without the patch as well. CLOCK_THREAD_CPUTIME_ID was issue for us as well but before the patch was accepted upstream, Oracle Solaris implemented it so it was no longer necessary. But the issue is still open https://bugs.python.org/issue35455 and knowing that others will use it, I will dust it off and finish it. Knowing that Oracle and Illumos are facing the same issues, I am much more confident that our patches won't break Illumos. I will start upstream more of them right away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 06:47:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Nov 2020 11:47:46 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604317666.3.0.908114846483.issue42225@roundup.psfhosted.org> STINNER Victor added the comment: > Fixing OS graphics or tk is out of scope for us. Preventing hangs or crashes when using tkinter is. On Mac, refusing to insert any astral char into a tk widget might be the best solution. Serhiy, could that be done in tkinter/_tkinter? I dislike attempting to workaround Tk issues in Python. As you can see, the behavior really depends on the platform. As I wrote, on Fedora 32 it works (the character is rendered properly). I would prefer to not block such character on Fedora 32 because it does crash on some other platforms. Or you should detect the very precise conditions explaining why it works on some platforms and crash on some other platforms... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 06:49:15 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Nov 2020 11:49:15 +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: <1604317755.73.0.392346128107.issue37193@roundup.psfhosted.org> STINNER Victor added the comment: I rejected the backport to 3.8 and 3.9 since the change causes a regression on master. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 06:58:07 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 02 Nov 2020 11:58:07 +0000 Subject: [issue41835] Speed up dict vectorcall creation using keywords In-Reply-To: <1600779404.53.0.758044601526.issue41835@roundup.psfhosted.org> Message-ID: <1604318287.4.0.923536421041.issue41835@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +22023 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23106 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 07:01:40 2020 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 02 Nov 2020 12:01:40 +0000 Subject: [issue35455] Solaris thread_time doesn't work with current implementation In-Reply-To: <1544452341.93.0.788709270274.issue35455@psf.upfronthosting.co.za> Message-ID: <1604318500.9.0.0459552485759.issue35455@roundup.psfhosted.org> Jakub Kulik added the comment: Comment from https://bugs.python.org/issue42173#msg380205 confirmed that this issue is still relevant to Illumos based systems. Because of that, I am happy to resolve it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 07:02:33 2020 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 02 Nov 2020 12:02:33 +0000 Subject: [issue35455] Solaris: thread_time doesn't work with current implementation In-Reply-To: <1544452341.93.0.788709270274.issue35455@psf.upfronthosting.co.za> Message-ID: <1604318553.66.0.130532600922.issue35455@roundup.psfhosted.org> Change by Jakub Kulik : ---------- title: Solaris thread_time doesn't work with current implementation -> Solaris: thread_time doesn't work with current implementation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 07:02:39 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 02 Nov 2020 12:02:39 +0000 Subject: [issue41835] Speed up dict vectorcall creation using keywords In-Reply-To: <1600779404.53.0.758044601526.issue41835@roundup.psfhosted.org> Message-ID: <1604318559.84.0.152556026703.issue41835@roundup.psfhosted.org> Inada Naoki added the comment: > I did PGO+LTO... --enable-optimizations --with-lto I'm sorry about that. PGO+LTO *reduce* noises, but there are still noises. And unpack_sequence is very fragile. I tried your branch again, and unpack_sequence is 10% *slower* than master branch. I am running pyperformance with PR-23106, which simplifies your function and use it from _PyStack_AsDict() and _PyEval_EvalCode(). ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 07:04:38 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 02 Nov 2020 12:04:38 +0000 Subject: [issue42126] Optimize BUILD_CONST_KEY_MAP for distinct keys In-Reply-To: <1603442811.66.0.361695425892.issue42126@roundup.psfhosted.org> Message-ID: <1604318678.75.0.466250402887.issue42126@roundup.psfhosted.org> Inada Naoki added the comment: OK. Microbenchmark don't justify adding complexity to the eval loop and the compiler. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 07:05:57 2020 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 02 Nov 2020 12:05:57 +0000 Subject: [issue35455] Solaris: thread_time doesn't work with current implementation In-Reply-To: <1544452341.93.0.788709270274.issue35455@psf.upfronthosting.co.za> Message-ID: <1604318757.32.0.0148000102845.issue35455@roundup.psfhosted.org> Change by Jakub Kulik : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 07:11:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Nov 2020 12:11:09 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604319069.95.0.600276350814.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: I converted the unicodedata extension to the multi-phase initialization API in bpo-42157 with Mohamed Koubaa. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 08:10:52 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 02 Nov 2020 13:10:52 +0000 Subject: [issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn In-Reply-To: <1604317755.73.0.392346128107.issue37193@roundup.psfhosted.org> Message-ID: <078BDC7E-68A3-42B0-9575-238C2A7BE8E4@jaraco.com> Jason R. Coombs added the comment: I recommend a rollback. I?ll try to get to it later today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 08:15:24 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 02 Nov 2020 13:15:24 +0000 Subject: [issue41835] Speed up dict vectorcall creation using keywords In-Reply-To: <1600779404.53.0.758044601526.issue41835@roundup.psfhosted.org> Message-ID: <1604322924.77.0.277985835967.issue41835@roundup.psfhosted.org> Inada Naoki added the comment: Short result (minspeed=2): Slower (4): - unpack_sequence: 65.2 ns +- 1.3 ns -> 69.2 ns +- 0.4 ns: 1.06x slower (+6%) - unpickle_list: 5.21 us +- 0.04 us -> 5.44 us +- 0.02 us: 1.04x slower (+4%) - chameleon: 9.80 ms +- 0.08 ms -> 10.0 ms +- 0.1 ms: 1.02x slower (+2%) - logging_silent: 202 ns +- 5 ns -> 206 ns +- 5 ns: 1.02x slower (+2%) Faster (9): - pickle_dict: 30.7 us +- 0.1 us -> 29.0 us +- 0.1 us: 1.06x faster (-5%) - scimark_lu: 169 ms +- 3 ms -> 163 ms +- 3 ms: 1.04x faster (-4%) - sympy_str: 396 ms +- 8 ms -> 383 ms +- 5 ms: 1.04x faster (-3%) - sqlite_synth: 3.46 us +- 0.08 us -> 3.34 us +- 0.04 us: 1.03x faster (-3%) - scimark_fft: 415 ms +- 3 ms -> 405 ms +- 3 ms: 1.03x faster (-3%) - pickle_list: 4.91 us +- 0.07 us -> 4.79 us +- 0.04 us: 1.03x faster (-3%) - dulwich_log: 82.4 ms +- 0.8 ms -> 80.4 ms +- 0.8 ms: 1.02x faster (-2%) - scimark_sparse_mat_mult: 5.49 ms +- 0.03 ms -> 5.37 ms +- 0.02 ms: 1.02x faster (-2%) - spectral_norm: 157 ms +- 1 ms -> 153 ms +- 4 ms: 1.02x faster (-2%) Benchmark hidden because not significant (47): ... Geometric mean: 1.00 (faster) Long result is attached. ---------- Added file: https://bugs.python.org/file49560/pr23106.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 08:25:13 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 02 Nov 2020 13:25:13 +0000 Subject: [issue41835] Speed up dict vectorcall creation using keywords In-Reply-To: <1600779404.53.0.758044601526.issue41835@roundup.psfhosted.org> Message-ID: <1604323513.13.0.725121213748.issue41835@roundup.psfhosted.org> Inada Naoki added the comment: And bench_kwcall.py is a microbenchmark for _PyEval_EvalCode. $ cpython/release/python -m pyperf compare_to master.json kwcall-nodup.json kwcall-3: Mean +- std dev: [master] 192 us +- 2 us -> [kwcall-nodup] 175 us +- 1 us: 1.09x faster (-9%) kwcall-6: Mean +- std dev: [master] 327 us +- 6 us -> [kwcall-nodup] 291 us +- 4 us: 1.12x faster (-11%) kwcall-9: Mean +- std dev: [master] 436 us +- 10 us -> [kwcall-nodup] 373 us +- 5 us: 1.17x faster (-14%) Geometric mean: 0.89 (faster) ---------- Added file: https://bugs.python.org/file49561/bench_kwcall.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 08:33:55 2020 From: report at bugs.python.org (DanilZ) Date: Mon, 02 Nov 2020 13:33:55 +0000 Subject: [issue42245] concurrent.futures.ProcessPoolExecutor freezes depending on complexity Message-ID: <1604324035.95.0.0561998847241.issue42245@roundup.psfhosted.org> New submission from DanilZ : Note: problem occurs only after performing the RandomizedSearchCV... When applying a function in a multiprocess using concurrent.futures if the function includes anything else other than print(), it is not executed and the process freezes. Here is the code to reproduce. from xgboost import XGBRegressor from sklearn.model_selection import KFold import concurrent.futures from sklearn.datasets import make_regression import pandas as pd import numpy as np from sklearn.model_selection import RandomizedSearchCV # STEP 1 # ---------------------------------------------------------------------------- # simulate RandomizedSearchCV data = make_regression(n_samples=500, n_features=100, n_informative=10, n_targets=1, random_state=5) X = pd.DataFrame(data[0]) y = pd.Series(data[1]) kf = KFold(n_splits = 3, shuffle = True, random_state = 5) model = XGBRegressor(n_jobs = -1) params = { 'min_child_weight': [0.1, 1, 5], 'subsample': [0.5, 0.7, 1.0], 'colsample_bytree': [0.5, 0.7, 1.0], 'eta': [0.005, 0.01, 0.1], 'n_jobs': [-1] } random_search = RandomizedSearchCV( model, param_distributions = params, n_iter = 50, n_jobs = -1, refit = True, # necessary for random_search.best_estimator_ cv = kf.split(X,y), verbose = 1, random_state = 5 ) random_search.fit(X, np.array(y)) # STEP 2.0 # ---------------------------------------------------------------------------- # test if multiprocessing is working in the first place def just_print(): print('Just printing') with concurrent.futures.ProcessPoolExecutor() as executor: results_temp = [executor.submit(just_print) for i in range(0,12)] # ---------------------------------------------------------------------------- # STEP 2.1 # ---------------------------------------------------------------------------- # test on a slightly more complex function def fit_model(): # JUST CREATING A DATASET, NOT EVEN FITTING ANY MODEL!!! AND IT FREEZES data = make_regression(n_samples=500, n_features=100, n_informative=10, n_targets=1, random_state=5) # model = XGBRegressor(n_jobs = -1) # model.fit(data[0],data[1]) print('Fit complete') with concurrent.futures.ProcessPoolExecutor() as executor: results_temp = [executor.submit(fit_model) for i in range(0,12)] # ---------------------------------------------------------------------------- Attached this code in a .py file. ---------- components: macOS files: concur_fut_freeze.py messages: 380220 nosy: DanilZ, bquinlan, ned.deily, pitrou, ronaldoussoren priority: normal severity: normal status: open title: concurrent.futures.ProcessPoolExecutor freezes depending on complexity versions: Python 3.7 Added file: https://bugs.python.org/file49562/concur_fut_freeze.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 08:56:01 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 02 Nov 2020 13:56:01 +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: <1604325361.85.0.28966227817.issue37193@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +22024 pull_request: https://github.com/python/cpython/pull/23107 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 09:00:55 2020 From: report at bugs.python.org (Eugene-Yuan Kou) Date: Mon, 02 Nov 2020 14:00:55 +0000 Subject: [issue39679] functools: singledispatchmethod doesn't work with classmethod In-Reply-To: <1582053375.25.0.178240077179.issue39679@roundup.psfhosted.org> Message-ID: <1604325655.53.0.226190014817.issue39679@roundup.psfhosted.org> Eugene-Yuan Kou added the comment: Hi, I also encounter to the problem, and I have give my attempt to make the singledispatchmethod support the classmethod, and staticmethod with type annotation. I also adding two tests. Please refer to my fork. I will trying to make a pull request https://github.com/EugenePY/cpython/compare/3.8...fix-issue-39679 ---------- nosy: +EugenePY _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 09:05:20 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 02 Nov 2020 14:05:20 +0000 Subject: [issue40077] Convert static types to heap types: use PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1604325920.19.0.820764245884.issue40077@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +22025 pull_request: https://github.com/python/cpython/pull/23108 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 09:13:06 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 02 Nov 2020 14:13:06 +0000 Subject: [issue41835] Speed up dict vectorcall creation using keywords In-Reply-To: <1600779404.53.0.758044601526.issue41835@roundup.psfhosted.org> Message-ID: <1604326386.91.0.682916955039.issue41835@roundup.psfhosted.org> Inada Naoki added the comment: While this is an interesting optimization, the gain is not enough. I close this issue for now. @Marco Sulla Optimizing dict is a bit hard job. If you want to continue, I have an idea: `dict(zip(keys, row))` is common use case. It is used by asdict() in datacalss, _asdict() in namedtuple, and csv DictReader. Sniffing zip object and presizing dict may be interesting optimization. But note that this idea has low chance of accepted too. We tries many ideas like this and reject them by ourselves even without creating a pull request. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 09:13:24 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 02 Nov 2020 14:13:24 +0000 Subject: [issue34067] Problem with contextlib.nullcontext In-Reply-To: <1530984805.95.0.56676864532.issue34067@psf.upfronthosting.co.za> Message-ID: <1604326404.27.0.674834737177.issue34067@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: -21767 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 09:13:49 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 02 Nov 2020 14:13:49 +0000 Subject: [issue34067] Problem with contextlib.nullcontext In-Reply-To: <1530984805.95.0.56676864532.issue34067@psf.upfronthosting.co.za> Message-ID: <1604326429.18.0.37455541782.issue34067@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 09:16:31 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Nov 2020 14:16:31 +0000 Subject: [issue41435] Allow to retrieve ongoing exception handled by every threads In-Reply-To: <1596037186.46.0.97878619969.issue41435@roundup.psfhosted.org> Message-ID: <1604326591.1.0.812582102776.issue41435@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 64366fa9b3ba71b8a503a8719eff433f4ea49eb9 by Julien Danjou in branch 'master': bpo-41435: Add sys._current_exceptions() function (GH-21689) https://github.com/python/cpython/commit/64366fa9b3ba71b8a503a8719eff433f4ea49eb9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 09:23:22 2020 From: report at bugs.python.org (Florian Bruhin) Date: Mon, 02 Nov 2020 14:23:22 +0000 Subject: [issue42174] shutil.get_terminal_size() returns 0 when run in a pty In-Reply-To: <1603816351.29.0.440046743483.issue42174@roundup.psfhosted.org> Message-ID: <1604327002.61.0.803011797836.issue42174@roundup.psfhosted.org> Florian Bruhin added the comment: Just found another workaround for this in the wild, as part of the "rich" library: https://github.com/willmcgugan/rich/blob/v9.1.0/rich/console.py#L669-L672 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 09:34:21 2020 From: report at bugs.python.org (Ken Jin) Date: Mon, 02 Nov 2020 14:34:21 +0000 Subject: [issue42245] concurrent.futures.ProcessPoolExecutor freezes depending on complexity In-Reply-To: <1604324035.95.0.0561998847241.issue42245@roundup.psfhosted.org> Message-ID: <1604327661.86.0.437624799332.issue42245@roundup.psfhosted.org> Ken Jin added the comment: Hello, it would be great if you can you provide more details. Like your Operating System and version, how many logical CPU cores there are on your machine, and lastly the exact Python version with major and minor versions included (eg. Python 3.8.2). Multiprocessing behaves differently depending on those factors. FWIW I reduced your code down to make it easier to read, and removed all the unused variables: import concurrent.futures from sklearn.datasets import make_regression def just_print(): print('Just printing') def fit_model(): data = make_regression(n_samples=500, n_features=100, n_informative=10, n_targets=1, random_state=5) print('Fit complete') if __name__ == '__main__': with concurrent.futures.ProcessPoolExecutor() as executor: results_temp = [executor.submit(just_print) for i in range(0,12)] with concurrent.futures.ProcessPoolExecutor() as executor: results_temp = [executor.submit(fit_model) for i in range(0,12)] The problem is that I am *unable* to reproduce the bug you are reporting on Windows 10 64-bit, Python 3.7.6. The code runs till completion for both examples. I have a hunch that your problem lies elsewhere in one of the many libraries you imported. >>> Note: problem occurs only after performing the RandomizedSearchCV... Like you have noted, I went to skim through RandomizedSearchCV's source code and docs. RandomizedSearchCV is purportedly able to use multiprocessing backend for parallel tasks. By setting `n_jobs=-1` in your params, you're telling it to use all logical CPU cores. I'm unsure of how many additional processes and pools RandomizedSearchCV's spawns after calling it, but this sounds suspicious. concurrent.futures specifically warns that this may exhaust available workers and cause tasks to never complete. See https://docs.python.org/3/library/concurrent.futures.html#threadpoolexecutor (the docs here are for ThreadPoolExecutor, but they still apply). A temporary workaround might be to reduce n_jobs OR even better: use scikit-learn's multiprocessing parallel backend that's dedicated for that, and should have the necessary protections in place against such behavior. https://joblib.readthedocs.io/en/latest/parallel.html#joblib.parallel_backend TLDR: I don't think this is a Python bug and I'm in favor of this bug being closed as `not a bug`. ---------- nosy: +kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 09:35:20 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Nov 2020 14:35:20 +0000 Subject: [issue42240] Add Maxheap version of a heappush into heapq module In-Reply-To: <1604298584.59.0.170869406843.issue42240@roundup.psfhosted.org> Message-ID: <1604327720.01.0.77572972737.issue42240@roundup.psfhosted.org> Raymond Hettinger added the comment: Only the minheap is in the public API. The maxheap functions are only supposed to be used internally. Thank you for the suggestion, but I think we should decline. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 09:39:22 2020 From: report at bugs.python.org (E. Paine) Date: Mon, 02 Nov 2020 14:39:22 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604327962.89.0.0194787536194.issue42225@roundup.psfhosted.org> E. Paine added the comment: For me, this is not limited to special characters. Trying to load anything in Tk using the 'JoyPixels' font crashes (sometimes it does load but all characters are very random - most are whitespace - and it crashes again after a call to `fc-cache`). IDLE crashes when trying to preview the font. I believe this is what is being experienced on https://askubuntu.com/questions/1236488/x-error-of-failed-request-badlength-poly-request-too-large-or-internal-xlib-le because they are not using any special characters yet are reporting the same problem. ---------- components: -macOS nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 10:06:01 2020 From: report at bugs.python.org (DanilZ) Date: Mon, 02 Nov 2020 15:06:01 +0000 Subject: [issue42245] concurrent.futures.ProcessPoolExecutor freezes depending on complexity In-Reply-To: <1604327661.86.0.437624799332.issue42245@roundup.psfhosted.org> Message-ID: <89BD2CB3-F8E8-4802-92A1-7D2B2F3DF990@me.com> DanilZ added the comment: Hi Ken, thanks for a quick reply. Here are the requested specs. System: Python 3.7.6 OS X 10.15.7 Packages: XGBoost 1.2.0 sklearn 0.22.2 pandas 1.0.5 numpy 1.18.1 I can see that you have reduced the code, which now excludes the RandomizedSearchCV part. This (reduced) code runs without any problems on my side as well, but if running it after the RandomizedSearchCV, the last function fit_model() freezes in a multiprocess. I will read through the docs, but at first it looks as the actual problem is in the concurrent.futures module, because the easy function just_print() runs without issues. So the freeze is triggered by adding minor complexity into the fit_model() function running in a multiprocess. > On 2 Nov 2020, at 17:34, Ken Jin wrote: > > > Ken Jin added the comment: > > Hello, it would be great if you can you provide more details. Like your Operating System and version, how many logical CPU cores there are on your machine, and lastly the exact Python version with major and minor versions included (eg. Python 3.8.2). Multiprocessing behaves differently depending on those factors. > > FWIW I reduced your code down to make it easier to read, and removed all the unused variables: > > import concurrent.futures > from sklearn.datasets import make_regression > > def just_print(): > print('Just printing') > > def fit_model(): > data = make_regression(n_samples=500, n_features=100, n_informative=10, n_targets=1, random_state=5) > print('Fit complete') > > if __name__ == '__main__': > with concurrent.futures.ProcessPoolExecutor() as executor: > results_temp = [executor.submit(just_print) for i in range(0,12)] > > with concurrent.futures.ProcessPoolExecutor() as executor: > results_temp = [executor.submit(fit_model) for i in range(0,12)] > > The problem is that I am *unable* to reproduce the bug you are reporting on Windows 10 64-bit, Python 3.7.6. The code runs till completion for both examples. I have a hunch that your problem lies elsewhere in one of the many libraries you imported. > >>>> Note: problem occurs only after performing the RandomizedSearchCV... > > Like you have noted, I went to skim through RandomizedSearchCV's source code and docs. RandomizedSearchCV is purportedly able to use multiprocessing backend for parallel tasks. By setting `n_jobs=-1` in your params, you're telling it to use all logical CPU cores. I'm unsure of how many additional processes and pools RandomizedSearchCV's spawns after calling it, but this sounds suspicious. concurrent.futures specifically warns that this may exhaust available workers and cause tasks to never complete. See https://docs.python.org/3/library/concurrent.futures.html#threadpoolexecutor (the docs here are for ThreadPoolExecutor, but they still apply). > > A temporary workaround might be to reduce n_jobs OR even better: use scikit-learn's multiprocessing parallel backend that's dedicated for that, and should have the necessary protections in place against such behavior. https://joblib.readthedocs.io/en/latest/parallel.html#joblib.parallel_backend > > > TLDR: I don't think this is a Python bug and I'm in favor of this bug being closed as `not a bug`. > > ---------- > nosy: +kj > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 10:06:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Nov 2020 15:06:40 +0000 Subject: [issue42236] os.device_encoding() doesn't respect the UTF-8 Mode In-Reply-To: <1604254376.75.0.724076396779.issue42236@roundup.psfhosted.org> Message-ID: <1604329600.85.0.815991444325.issue42236@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22026 pull_request: https://github.com/python/cpython/pull/23109 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 10:14:56 2020 From: report at bugs.python.org (DanilZ) Date: Mon, 02 Nov 2020 15:14:56 +0000 Subject: [issue42245] concurrent.futures.ProcessPoolExecutor freezes depending on complexity In-Reply-To: <1604327661.86.0.437624799332.issue42245@roundup.psfhosted.org> Message-ID: <4F6E0C77-38B5-47F0-B1CD-7864C6FEDEDB@me.com> DanilZ added the comment: Here is a gif of what?s going on in my ActivityMonitor on a Mac while this code is executed: https://gfycat.com/unselfishthatgraysquirrel ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 10:27:40 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 02 Nov 2020 15:27:40 +0000 Subject: [issue42224] test_format:test_locale fails when locale does not set grouping in thousands In-Reply-To: <1604183976.7.0.233218767398.issue42224@roundup.psfhosted.org> Message-ID: <1604330860.98.0.142299948943.issue42224@roundup.psfhosted.org> Lysandros Nikolaou added the comment: New changeset 301822859b3fc34801a06f1090d62f9f2ee5b092 by Lysandros Nikolaou in branch 'master': bpo-42224: Fix test_format when locale does not expect number grouping (GH-23067) https://github.com/python/cpython/commit/301822859b3fc34801a06f1090d62f9f2ee5b092 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 10:27:46 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Nov 2020 15:27:46 +0000 Subject: [issue42224] test_format:test_locale fails when locale does not set grouping in thousands In-Reply-To: <1604183976.7.0.233218767398.issue42224@roundup.psfhosted.org> Message-ID: <1604330866.72.0.975463682155.issue42224@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +22027 pull_request: https://github.com/python/cpython/pull/23110 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 10:29:12 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 02 Nov 2020 15:29:12 +0000 Subject: [issue42224] test_format:test_locale fails when locale does not set grouping in thousands In-Reply-To: <1604183976.7.0.233218767398.issue42224@roundup.psfhosted.org> Message-ID: <1604330952.84.0.390990985167.issue42224@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +22028 pull_request: https://github.com/python/cpython/pull/23111 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 10:32:42 2020 From: report at bugs.python.org (Mark Shannon) Date: Mon, 02 Nov 2020 15:32:42 +0000 Subject: [issue42246] Implement PEP 626 Message-ID: <1604331162.26.0.596873070589.issue42246@roundup.psfhosted.org> New submission from Mark Shannon : Implementation of PEP 626 requires: 1. Implementation of the new line number table and associated APIs. 2. Removal of BEGIN_DO_NOT_EMIT_BYTECODE and END_DO_NOT_EMIT_BYTECODE from the compiler as they do not understand line numbers and may remove lines from the bytecode that they shouldn't. 3. Enhance compiler front-end and CFG optimizer to avoid the negative performance impact of PEP. a) Duplicate the tests in while blocks to avoid the extra jump instruction at the end of the loop. b) Duplicate and renumber terminator blocks that have no line numbers. Guaranteeing that f_lineno is correct without hurting performance ----------------------------------------------------------------- PEP 626 mandates that the f_lineno attribute of a frame is always correct, even after a return or raise, but we don't want to hurt performance. Since the interpreter ensures that the f_lasti attribute of a frame is always correct, we can ensure correctness of f_lineno at zero cost, by ensuring that all RETURN_VALUE, RAISE_VARARGS and RERAISE instruction have a non-negative line number. Then f_lineno can always be lazily computed from f_lasti. The front-end generates artificial RERAISEs and RETURN_VALUE that have no line number. To give these instructions a valid line number we can take advantage of the fact that such terminator blocks (blocks with no successors) can be freely duplicated. Once duplicated, each terminator block will have only one predecessor and can acquire the line number of the preceding block, without causing false line events. ---------- assignee: Mark.Shannon messages: 380231 nosy: Mark.Shannon, pablogsal priority: normal severity: normal status: open title: Implement PEP 626 type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 10:39:07 2020 From: report at bugs.python.org (Roundup Robot) Date: Mon, 02 Nov 2020 15:39:07 +0000 Subject: [issue42037] Documentation confusion in CookieJar functions In-Reply-To: <1602689022.88.0.876415237077.issue42037@roundup.psfhosted.org> Message-ID: <1604331547.66.0.484550617872.issue42037@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 3.0 -> 4.0 pull_requests: +22029 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23112 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 10:43:17 2020 From: report at bugs.python.org (Mark Shannon) Date: Mon, 02 Nov 2020 15:43:17 +0000 Subject: [issue42246] Implement PEP 626 In-Reply-To: <1604331162.26.0.596873070589.issue42246@roundup.psfhosted.org> Message-ID: <1604331797.56.0.645363730616.issue42246@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +22030 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23113 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 10:46:09 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Nov 2020 15:46:09 +0000 Subject: [issue42224] test_format:test_locale fails when locale does not set grouping in thousands In-Reply-To: <1604183976.7.0.233218767398.issue42224@roundup.psfhosted.org> Message-ID: <1604331969.32.0.404089748496.issue42224@roundup.psfhosted.org> miss-islington added the comment: New changeset 1e96de9ed4b1ca96d345b7e309a8fe3802638f4a by Miss Skeleton (bot) in branch '3.8': bpo-42224: Fix test_format when locale does not expect number grouping (GH-23067) https://github.com/python/cpython/commit/1e96de9ed4b1ca96d345b7e309a8fe3802638f4a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 10:48:29 2020 From: report at bugs.python.org (DanilZ) Date: Mon, 02 Nov 2020 15:48:29 +0000 Subject: [issue42245] concurrent.futures.ProcessPoolExecutor freezes depending on complexity In-Reply-To: <1604327661.86.0.437624799332.issue42245@roundup.psfhosted.org> Message-ID: <0B8C64D6-380D-4CF3-9F1E-EB8E917ACA19@me.com> DanilZ added the comment: FYI: I?ve tried all the three of the possible backends: ?loky? (default) / ?threading? / ?multiprocessing?. None of them solved the problem. > On 2 Nov 2020, at 17:34, Ken Jin wrote: > > A temporary workaround might be to reduce n_jobs OR even better: use scikit-learn's multiprocessing parallel backend that's dedicated for that, and should have the necessary protections in place against such behavior. https://joblib.readthedocs.io/en/latest/parallel.html#joblib.parallel_backend ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 10:50:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Nov 2020 15:50:02 +0000 Subject: [issue42236] os.device_encoding() doesn't respect the UTF-8 Mode In-Reply-To: <1604254376.75.0.724076396779.issue42236@roundup.psfhosted.org> Message-ID: <1604332202.79.0.443884758552.issue42236@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4b9aad49992a825d8c76e428ed1aca81dd3878b2 by Victor Stinner in branch 'master': bpo-42236: Enhance init and encoding documentation (GH-23109) https://github.com/python/cpython/commit/4b9aad49992a825d8c76e428ed1aca81dd3878b2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 10:52:04 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 02 Nov 2020 15:52:04 +0000 Subject: [issue42224] test_format:test_locale fails when locale does not set grouping in thousands In-Reply-To: <1604183976.7.0.233218767398.issue42224@roundup.psfhosted.org> Message-ID: <1604332324.29.0.897430333909.issue42224@roundup.psfhosted.org> Lysandros Nikolaou added the comment: New changeset 723e21a8e79815ae77474d1f21b9847b9c9bdbeb by Lysandros Nikolaou in branch '3.9': bpo-42224: Fix test_format when locale does not expect number grouping (GH-23067) https://github.com/python/cpython/commit/723e21a8e79815ae77474d1f21b9847b9c9bdbeb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 11:03:10 2020 From: report at bugs.python.org (Ken Jin) Date: Mon, 02 Nov 2020 16:03:10 +0000 Subject: [issue42245] concurrent.futures.ProcessPoolExecutor freezes depending on complexity In-Reply-To: <1604324035.95.0.0561998847241.issue42245@roundup.psfhosted.org> Message-ID: <1604332990.12.0.126899957704.issue42245@roundup.psfhosted.org> Ken Jin added the comment: Hmm apologies I'm stumped then. The only things I managed to surmise from xgboost's and scikit-learn's GitHub issues is that this is a recurring issue specifically when using GridSearchCV : Threads with discussions on workarounds: https://github.com/scikit-learn/scikit-learn/issues/6627 https://github.com/scikit-learn/scikit-learn/issues/5115 Issues reported: https://github.com/dmlc/xgboost/issues/2163 https://github.com/scikit-learn/scikit-learn/issues/10533 https://github.com/scikit-learn/scikit-learn/issues/10538 (this looks quite similar to your issue) Some quick workarounds I saw were: 1. Remove n_jobs argument from GridSearchCV 2. Use parallel_backend from sklearn.externals.joblib rather than concurrent.futures so that the pools from both libraries don't have weird interactions. I recommend opening an issue on scikit-learn/XGBoost's GitHub. This seems like a common problem that they face. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 11:49:31 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Nov 2020 16:49:31 +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: <1604335771.86.0.77201686183.issue37193@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset aca67da4fe68d5420401ac1782203d302875eb27 by Jason R. Coombs in branch 'master': Revert "bpo-37193: remove thread objects which finished process its request (GH-13893)" (GH-23107) https://github.com/python/cpython/commit/aca67da4fe68d5420401ac1782203d302875eb27 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 11:54:33 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Nov 2020 16:54:33 +0000 Subject: [issue42180] Missing a plural in library/functions In-Reply-To: <1603883314.74.0.667097394746.issue42180@roundup.psfhosted.org> Message-ID: <1604336073.54.0.665865467532.issue42180@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +22031 pull_request: https://github.com/python/cpython/pull/23114 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 12:00:40 2020 From: report at bugs.python.org (hai shi) Date: Mon, 02 Nov 2020 17:00:40 +0000 Subject: [issue41832] PyType_FromSpec() should accept tp_doc=NULL In-Reply-To: <1600770571.99.0.249807543427.issue41832@roundup.psfhosted.org> Message-ID: <1604336440.12.0.760304104081.issue41832@roundup.psfhosted.org> hai shi added the comment: I will take a look in this weekend :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 12:14:37 2020 From: report at bugs.python.org (Sree) Date: Mon, 02 Nov 2020 17:14:37 +0000 Subject: [issue42210] float.hex discards sign from -nan In-Reply-To: <1604073869.82.0.718371202647.issue42210@roundup.psfhosted.org> Message-ID: <1604337277.53.0.972188084534.issue42210@roundup.psfhosted.org> Sree added the comment: Thanks, all. I just wanted to know if this was a deliberate decision or an oversight. It also took me a while to realize it washex, and not fromhex. That allows the current behaviour to be easily worked around in Python code, and a backwards compatible optional parameter to hex() might allow -nan in the future without breaking existing software. Surprisingly, the standard does allow this [but this may not have been the intent] -- (Section 6.2) "Recognize that format conversions, including conversions between supported formats and external representations as character sequences, might be unable to deliver the same NaN." The conversion to character sequences text is key since I'm using a test harness written in Python that writes out and reads back text files containing float data. Section 6.3 in the standard also adds more details on when the sign bit in NaNs is relevant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 12:28:06 2020 From: report at bugs.python.org (DanilZ) Date: Mon, 02 Nov 2020 17:28:06 +0000 Subject: [issue42245] concurrent.futures.ProcessPoolExecutor freezes depending on complexity In-Reply-To: <1604332990.12.0.126899957704.issue42245@roundup.psfhosted.org> Message-ID: <4114B4BC-2E46-412D-A5F4-6F5C7CB1AA08@me.com> DanilZ added the comment: Thank you so much for the input! I will study all the links you have sent: Here is a screen recording of some additional experiments: https://vimeo.com/user50681456/review/474733642/b712c12c2c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 12:45:19 2020 From: report at bugs.python.org (Gordon Ross) Date: Mon, 02 Nov 2020 17:45:19 +0000 Subject: [issue42173] Drop Solaris support In-Reply-To: <1603814348.33.0.839225742612.issue42173@roundup.psfhosted.org> Message-ID: <1604339119.05.0.0523318625868.issue42173@roundup.psfhosted.org> Gordon Ross added the comment: I can understand the frustrations around dealing with minority platforms, but please remember that the illumos project (www.illumos.org) is basically the inheritor of problems around "Build on Solaris" for 3rd party software like Python. There are several OS distributions based on illumos that would be impacted by removing the ability to (easily) build Python. I'm confident we can find some people to help maintain build-bots etc. if that's what it takes. If you're still looking for such help, let me know and I'll ask on developers at list.illumos.org for volunteers. Thanks! -GWR ---------- nosy: +gwr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 12:48:22 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 02 Nov 2020 17:48:22 +0000 Subject: [issue42228] Activate.ps1 clears PYTHONHOME In-Reply-To: <1604227589.68.0.567841470196.issue42228@roundup.psfhosted.org> Message-ID: <1604339302.92.0.913019040229.issue42228@roundup.psfhosted.org> Steve Dower added the comment: If `\Lib\os.py` exists, then you shouldn't need either a registry entry or environment variable. This sounds the same as the approach used on GitHub Actions and Azure Pipelines, and also through the packages at https://www.nuget.org/packages/python. These work fine, as far as I'm aware. If there is some other reason you need PYTHONHOME to be set inside an activated virtual environment, you could set it _after_ activating the environment, or just modify the Activate.ps1 that is included in your tarball. However, I seem to recall there were some fairly obscure bugs if a venv didn't resolve itself normally. So your best bet is to make sure that it can be resolved without needing the setting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 13:18:19 2020 From: report at bugs.python.org (Ben Boeckel) Date: Mon, 02 Nov 2020 18:18:19 +0000 Subject: [issue42228] Activate.ps1 clears PYTHONHOME In-Reply-To: <1604227589.68.0.567841470196.issue42228@roundup.psfhosted.org> Message-ID: <1604341099.57.0.100150405015.issue42228@roundup.psfhosted.org> Ben Boeckel added the comment: We build our own applications which run Python interpreters internally, so the auto-discovery won't work. It also doesn't seem to work for venvs either since the venv's `python.exe` is under `Scripts` which makes it not able to find things either on its own. I've worked around it so far by just ignoring `Activate.ps1` completely and setting up PATH, PYTHONHOME, and PYTHONPATH instead, but this tells me that `Activate.ps1` probably needs some consideration for other use cases. The layout certainly seems wrong for auto-discovery at least. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 13:25:59 2020 From: report at bugs.python.org (David Mandelberg) Date: Mon, 02 Nov 2020 18:25:59 +0000 Subject: [issue42247] unittest hides traceback frames in chained exceptions Message-ID: <1604341559.53.0.224869314437.issue42247@roundup.psfhosted.org> New submission from David Mandelberg : The traceback in the output of the attached test (see below) doesn't include line 5, which is where the original exception is raised. I think this is because https://github.com/python/cpython/blob/b9ee4af4c643a323779fd7076e80b29d611f2709/Lib/unittest/result.py#L180-L186 uses the `limit` parameter to try to hide the implementation of `self.fail()` from the traceback, but `traceback.TracebackException.format()` applies the limit to the chained exception. I'm not sure if that's a bug in unittest or traceback, but from the comment in the above part of unittest, I don't think it's intentional. F ====================================================================== FAIL: test_foo (__main__.FooTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "foo.py", line 12, in test_foo foo() ValueError: foo During handling of the above exception, another exception occurred: Traceback (most recent call last): File "foo.py", line 14, in test_foo self.fail('foo() raised ValueError') AssertionError: foo() raised ValueError ---------------------------------------------------------------------- Ran 1 test in 0.000s FAILED (failures=1) ---------- components: Library (Lib) files: foo.py messages: 380244 nosy: dseomn priority: normal severity: normal status: open title: unittest hides traceback frames in chained exceptions type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49563/foo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 14:08:13 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Nov 2020 19:08:13 +0000 Subject: [issue42246] Implement PEP 626 In-Reply-To: <1604331162.26.0.596873070589.issue42246@roundup.psfhosted.org> Message-ID: <1604344093.07.0.147368955329.issue42246@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I'm happy that we are removing BEGIN_DO_NOT_EMIT_BYTECODE and END_DO_NOT_EMIT_BYTECODE but could you elaborate how this is related? These macros protect the compiler from emitting bytecode that corresponds to deaf code and by definition, unreachable. Could you give an example of a situation in which they create something that messes up the line numbers? Is this something to be with cleanup blocks in dead code or something similar? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 14:25:36 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Nov 2020 19:25:36 +0000 Subject: [issue41943] unittest.assertLogs passes unexpectedly In-Reply-To: <1601908800.0.0.297130696317.issue41943@roundup.psfhosted.org> Message-ID: <1604345136.33.0.00346377953808.issue41943@roundup.psfhosted.org> miss-islington added the comment: New changeset 6fdfcec5b11f44f27aae3d53ddeb004150ae1f61 by Irit Katriel in branch 'master': bpo-41943: Fix bug where assertLogs doesn't correctly filter messages? (GH-22565) https://github.com/python/cpython/commit/6fdfcec5b11f44f27aae3d53ddeb004150ae1f61 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 14:42:24 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Nov 2020 19:42:24 +0000 Subject: [issue42243] Don't access the module dictionary directly In-Reply-To: <1604305225.53.0.387494771093.issue42243@roundup.psfhosted.org> Message-ID: <1604346144.2.0.390348058613.issue42243@roundup.psfhosted.org> Raymond Hettinger added the comment: I would leave it as-is. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 15:16:57 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 02 Nov 2020 20:16:57 +0000 Subject: [issue42228] Activate.ps1 clears PYTHONHOME In-Reply-To: <1604227589.68.0.567841470196.issue42228@roundup.psfhosted.org> Message-ID: <1604348217.79.0.426528213492.issue42228@roundup.psfhosted.org> Steve Dower added the comment: > I've worked around it so far by just ignoring `Activate.ps1` completely and setting up PATH, PYTHONHOME, and PYTHONPATH instead This sounds like the right approach. Though if you're genuinely embedding Python in your application you should consider just including a copy of the runtime that you can fully control. > this tells me that `Activate.ps1` probably needs some consideration for other use cases. The layout certainly seems wrong for auto-discovery at least. Activate.ps1 only has one use case: to activate a virtual environment created with -m venv against a regular installation. Once you're customising the base install, you can use a python._pth file [1], a regular .pth file [2], or environment variables, but the venv tool isn't really for that case. 1: https://docs.python.org/3/using/windows.html#finding-modules 2: https://docs.python.org/3/library/site.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 15:46:49 2020 From: report at bugs.python.org (Eric Froemling) Date: Mon, 02 Nov 2020 20:46:49 +0000 Subject: [issue42248] Raised exception in Enum keeping user objects alive unnecessarily Message-ID: <1604350009.17.0.208770748804.issue42248@roundup.psfhosted.org> New submission from Eric Froemling : I've run into an issue where exceptions thrown by Enum constructors are keeping my objects alive. The underlying issue seems to be the same as https://bugs.python.org/issue36820 The same method used to fix the issue above seems to work here: simply adding a try/finally clause around the error handling at the end of enum.Enum.__new__() which sets ve_exc and exc to None does the trick. I've attached a short script which demonstrates the issue. I realize that the cyclic garbage collector will eventually handle this case, but its a bummer to lose determinism in the destruction of my objects. I'd be happy to create a PR for this or whatever I can do to help; just let me know if I should (I'm new here). ---------- components: Library (Lib) files: enum_ref_loop_example.py messages: 380249 nosy: efroemling priority: normal severity: normal status: open title: Raised exception in Enum keeping user objects alive unnecessarily versions: Python 3.8 Added file: https://bugs.python.org/file49564/enum_ref_loop_example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 15:54:45 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Nov 2020 20:54:45 +0000 Subject: [issue41435] Allow to retrieve ongoing exception handled by every threads In-Reply-To: <1596037186.46.0.97878619969.issue41435@roundup.psfhosted.org> Message-ID: <1604350485.72.0.150736384194.issue41435@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 Nov 2 16:02:11 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Nov 2020 21:02:11 +0000 Subject: [issue42103] [security] DoS (MemError via CPU and RAM exhaustion) when processing malformed Apple Property List files in binary format In-Reply-To: <1603239911.48.0.657036824442.issue42103@roundup.psfhosted.org> Message-ID: <1604350931.11.0.153033959418.issue42103@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 34637a0ce21e7261b952fbd9d006474cc29b681f by Serhiy Storchaka in branch 'master': bpo-42103: Improve validation of Plist files. (GH-22882) https://github.com/python/cpython/commit/34637a0ce21e7261b952fbd9d006474cc29b681f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 16:02:11 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Nov 2020 21:02:11 +0000 Subject: [issue42103] [security] DoS (MemError via CPU and RAM exhaustion) when processing malformed Apple Property List files in binary format In-Reply-To: <1603239911.48.0.657036824442.issue42103@roundup.psfhosted.org> Message-ID: <1604350931.29.0.626724431383.issue42103@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +22032 pull_request: https://github.com/python/cpython/pull/23115 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 16:03:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Nov 2020 21:03:35 +0000 Subject: [issue41796] _ast module state should be made per interpreter In-Reply-To: <1600251024.87.0.709557549839.issue41796@roundup.psfhosted.org> Message-ID: <1604351015.66.0.138237807603.issue41796@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 5cf4782a2630629d0978bf4cf6b6340365f449b2 by Victor Stinner in branch 'master': bpo-41796: Make _ast module state per interpreter (GH-23024) https://github.com/python/cpython/commit/5cf4782a2630629d0978bf4cf6b6340365f449b2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 16:17:38 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Nov 2020 21:17:38 +0000 Subject: [issue42103] [security] DoS (MemError via CPU and RAM exhaustion) when processing malformed Apple Property List files in binary format In-Reply-To: <1603239911.48.0.657036824442.issue42103@roundup.psfhosted.org> Message-ID: <1604351858.69.0.660837418852.issue42103@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +22033 pull_request: https://github.com/python/cpython/pull/23116 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 16:26:43 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Nov 2020 21:26:43 +0000 Subject: [issue42103] [security] DoS (MemError via CPU and RAM exhaustion) when processing malformed Apple Property List files in binary format In-Reply-To: <1603239911.48.0.657036824442.issue42103@roundup.psfhosted.org> Message-ID: <1604352403.53.0.826720635079.issue42103@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +22034 pull_request: https://github.com/python/cpython/pull/23117 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 16:34:51 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Nov 2020 21:34:51 +0000 Subject: [issue42103] [security] DoS (MemError via CPU and RAM exhaustion) when processing malformed Apple Property List files in binary format In-Reply-To: <1603239911.48.0.657036824442.issue42103@roundup.psfhosted.org> Message-ID: <1604352891.3.0.552746150072.issue42103@roundup.psfhosted.org> miss-islington added the comment: New changeset e277cb76989958fdbc092bf0b2cb55c43e86610a by Miss Skeleton (bot) in branch '3.9': bpo-42103: Improve validation of Plist files. (GH-22882) https://github.com/python/cpython/commit/e277cb76989958fdbc092bf0b2cb55c43e86610a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 16:39:30 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 02 Nov 2020 21:39:30 +0000 Subject: [issue42224] test_format:test_locale fails when locale does not set grouping in thousands In-Reply-To: <1604183976.7.0.233218767398.issue42224@roundup.psfhosted.org> Message-ID: <1604353170.46.0.938357684911.issue42224@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 Nov 2 16:40:36 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Nov 2020 21:40:36 +0000 Subject: [issue42103] [security] DoS (MemError via CPU and RAM exhaustion) when processing malformed Apple Property List files in binary format In-Reply-To: <1603239911.48.0.657036824442.issue42103@roundup.psfhosted.org> Message-ID: <1604353236.68.0.378207414256.issue42103@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +22035 pull_request: https://github.com/python/cpython/pull/23118 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 17:03:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Nov 2020 22:03:11 +0000 Subject: [issue42236] os.device_encoding() doesn't respect the UTF-8 Mode In-Reply-To: <1604254376.75.0.724076396779.issue42236@roundup.psfhosted.org> Message-ID: <1604354591.83.0.874896481301.issue42236@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22036 pull_request: https://github.com/python/cpython/pull/23119 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 17:15:01 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Nov 2020 22:15:01 +0000 Subject: [issue41796] _ast module state should be made per interpreter In-Reply-To: <1600251024.87.0.709557549839.issue41796@roundup.psfhosted.org> Message-ID: <1604355301.16.0.121618969434.issue41796@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 Nov 2 17:17:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Nov 2020 22:17:49 +0000 Subject: [issue26789] logging: Trying to log during Python finalization with NameError: name 'open' is not defined In-Reply-To: <1460905927.74.0.222378341822.issue26789@psf.upfronthosting.co.za> Message-ID: <1604355469.96.0.395926603845.issue26789@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 45df61fd2d58e8db33179f3b5d00e53fe6a7e592 by Victor Stinner in branch 'master': bpo-26789: Fix logging.FileHandler._open() at exit (GH-23053) https://github.com/python/cpython/commit/45df61fd2d58e8db33179f3b5d00e53fe6a7e592 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 17:32:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Nov 2020 22:32:14 +0000 Subject: [issue26789] logging: Trying to log during Python finalization with NameError: name 'open' is not defined In-Reply-To: <1460905927.74.0.222378341822.issue26789@psf.upfronthosting.co.za> Message-ID: <1604356334.49.0.22094073465.issue26789@roundup.psfhosted.org> STINNER Victor added the comment: I fixed the issue in the master and I will not backport the change to stable branches on purpose. Thanks for the review Vinay! -- I pushed a change in Python 3.10 which reduces the risk of "NameError: name 'open' is not defined" when logging really late during the Python finalization. It's a workaround on fragile finalization code. Please don't rely on it! You should release resources explicitly at exit. Don't rely on implicit __del__() finalizers. I chose to enhance the logging module anyway since the initial issue was that asyncio failed to log a message at exit, a message which is supposed to help developer to fix their code. It's a convenient tool to ease debugging. But, again, it would be really bad idea to rely on it to ensure that logging still works after logging.shutdown() has been called! About asyncio, for development, you can try to frequently call gc.collect() using call_later() or something, to get issues like "never-retrieved exceptions": https://docs.python.org/dev/library/asyncio-dev.html I chose to restrict this issue to the very specific case of NameError when calling logging.FileHandler.emit() late during the Python finalization. If someone wants to enhance another function, please open a new issue. I will not backport my change since the Python finalization is really fragile and my logging fix rely on many enhancements made in the master that will not be backported to Python 3.9 and older on purpose. Changes on the finalization are also fragile and can introduce new subtile bugs. It happened multiple times. But overall, step by step, the Python finalization becomes more and more reliable ;-) For curious people, here are my notes on the Python finalization: https://pythondev.readthedocs.io/finalization.html -- About the logging, honestly, I'm not sure that it's a good idea that FileHandler.emit() reopens the file after logging.shutdown() has been called (this function calls FileHandler.close() which closes the file). But if someone disagrees, please open a separated issue ;-) This one is now closed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 18:10:17 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Nov 2020 23:10:17 +0000 Subject: [issue35455] Solaris: thread_time doesn't work with current implementation In-Reply-To: <1544452341.93.0.788709270274.issue35455@psf.upfronthosting.co.za> Message-ID: <1604358617.05.0.791956650785.issue35455@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 9568622c9983b682b2a2a7bacfd3c341028ea099 by Jakub Kul?k in branch 'master': bpo-35455: Fix thread_time for Solaris OS (GH-11118) https://github.com/python/cpython/commit/9568622c9983b682b2a2a7bacfd3c341028ea099 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 18:10:46 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Nov 2020 23:10:46 +0000 Subject: [issue35455] Solaris: thread_time doesn't work with current implementation In-Reply-To: <1544452341.93.0.788709270274.issue35455@psf.upfronthosting.co.za> Message-ID: <1604358646.6.0.86938771802.issue35455@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 18:29:10 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 02 Nov 2020 23:29:10 +0000 Subject: [issue42173] Drop Solaris support In-Reply-To: <1603814348.33.0.839225742612.issue42173@roundup.psfhosted.org> Message-ID: <1604359750.43.0.96183885358.issue42173@roundup.psfhosted.org> Terry J. Reedy added the comment: People interested in helping Solaris issues should see my post above, msg380006. Issue #35455, about thread time on Solaris, with a simple but non-trivial patch, was just closed as fixed after reviews from 2 coredevs and a 3rd person. I presume Victor will close his proposed PR when there is a buildbot and additional action on issues. We have gotten new information that supports doing so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 18:44:51 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Nov 2020 23:44:51 +0000 Subject: [issue42173] Drop Solaris support In-Reply-To: <1603814348.33.0.839225742612.issue42173@roundup.psfhosted.org> Message-ID: <1604360691.48.0.411505348091.issue42173@roundup.psfhosted.org> Raymond Hettinger added the comment: Victor, are you going to close the PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 20:09:10 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 03 Nov 2020 01:09:10 +0000 Subject: [issue42180] Missing a plural in library/functions In-Reply-To: <1603883314.74.0.667097394746.issue42180@roundup.psfhosted.org> Message-ID: <1604365750.47.0.947468529254.issue42180@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 6b7a90db362253d67201c2a438a3f38f1ec6180c by Miss Skeleton (bot) in branch '3.9': bpo-42180: fix plural in arguments and control (GH-23015) (GH-23114) https://github.com/python/cpython/commit/6b7a90db362253d67201c2a438a3f38f1ec6180c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 21:25:51 2020 From: report at bugs.python.org (Chris Xiao) Date: Tue, 03 Nov 2020 02:25:51 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1604370351.49.0.699246639453.issue42153@roundup.psfhosted.org> Chris Xiao added the comment: maybe?you can try to contact the webmaster of the University of Washington to get the correct url ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 22:04:57 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 03 Nov 2020 03:04:57 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604372697.53.0.763318388808.issue42225@roundup.psfhosted.org> Terry J. Reedy added the comment: Victor, does my test run to completion (without exception) on your Fedora? If it does, I definitely would not disable astral char display on Fedora. This version catches exceptions and reports them separately and runs directly with tkinter, in about a second. tk = True if tk: from tkinter import Tk from tkinter.scrolledtext import ScrolledText root = Tk() text = ScrolledText(root, width=80, height=40) text.pack() def print(txt): text.insert('insert', txt+'\n') errors = [] for i in range(0x10000, 0x40000, 32): chars = ''.join(chr(i+j) for j in range(32)) try: print(f"{hex(i)} {chars}") except Exception as e: errors.append(f"{hex(i)} {e}") print("ERRORS:") for line in errors: print(line) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 2 23:16:19 2020 From: report at bugs.python.org (hai shi) Date: Tue, 03 Nov 2020 04:16:19 +0000 Subject: [issue40077] Convert static types to heap types: use PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1604376979.16.0.804568947343.issue40077@roundup.psfhosted.org> Change by hai shi : ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 00:15:52 2020 From: report at bugs.python.org (Inada Naoki) Date: Tue, 03 Nov 2020 05:15:52 +0000 Subject: [issue42236] os.device_encoding() doesn't respect the UTF-8 Mode In-Reply-To: <1604254376.75.0.724076396779.issue42236@roundup.psfhosted.org> Message-ID: <1604380552.24.0.265746203185.issue42236@roundup.psfhosted.org> Inada Naoki added the comment: I don't think UTF-8 mode should override os.device_encoding() on Windows. UTF-8 mode can be used to ignore legacy locale encoding, and os.device_encoding() uses the locale encoding on Unix. So overriding it make sense. But locale encoding and console cp are different on Windows. Users may want to know console cp even when they want to use UTF-8 by default for reading/writing text files. ---------- nosy: +methane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 01:33:43 2020 From: report at bugs.python.org (shakir_juolay) Date: Tue, 03 Nov 2020 06:33:43 +0000 Subject: [issue42196] Python Windows Installation Error 0x800705aa In-Reply-To: <1603978740.79.0.0573376832754.issue42196@roundup.psfhosted.org> Message-ID: <1604385223.18.0.925446794014.issue42196@roundup.psfhosted.org> shakir_juolay added the comment: I updated my Windows using Windows Update. Attempted one more time and failed with different errors(images attached). Tried with Python3.8.1 and failed with initial error 0x800705aa. Rebooted my machine and tried again with Python3.9 and it worked. Thanks all for your help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 01:34:23 2020 From: report at bugs.python.org (shakir_juolay) Date: Tue, 03 Nov 2020 06:34:23 +0000 Subject: [issue42196] Python Windows Installation Error 0x800705aa In-Reply-To: <1603978740.79.0.0573376832754.issue42196@roundup.psfhosted.org> Message-ID: <1604385263.19.0.152619431297.issue42196@roundup.psfhosted.org> Change by shakir_juolay : Added file: https://bugs.python.org/file49565/Installation Screen Shots - 2.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 01:36:12 2020 From: report at bugs.python.org (shakir_juolay) Date: Tue, 03 Nov 2020 06:36:12 +0000 Subject: [issue42196] Python Windows Installation Error 0x800705aa In-Reply-To: <1603978740.79.0.0573376832754.issue42196@roundup.psfhosted.org> Message-ID: <1604385372.51.0.0541871871968.issue42196@roundup.psfhosted.org> Change by shakir_juolay : ---------- stage: -> resolved status: open -> closed Added file: https://bugs.python.org/file49566/Installation Screen Shots.docx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 02:21:29 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Nov 2020 07:21:29 +0000 Subject: [issue42249] Plistlib cannot create binary Plist file larger than 4GiB Message-ID: <1604388089.74.0.470654148102.issue42249@roundup.psfhosted.org> New submission from Serhiy Storchaka : Due to a typo plistlib uses at most 32 bits for references and offsets. It will fail if try to create a file larger than 4GiB or containing more than 2**32 unique objects (the latter of course implies the former). ---------- components: Library (Lib), macOS messages: 380263 nosy: ned.deily, ronaldoussoren, serhiy.storchaka priority: normal severity: normal status: open title: Plistlib cannot create binary Plist file larger than 4GiB type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 02:25:26 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Nov 2020 07:25:26 +0000 Subject: [issue42249] Plistlib cannot create binary Plist file larger than 4GiB In-Reply-To: <1604388089.74.0.470654148102.issue42249@roundup.psfhosted.org> Message-ID: <1604388326.23.0.516850044571.issue42249@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +22037 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23121 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 02:29:06 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Nov 2020 07:29:06 +0000 Subject: [issue35455] Solaris: thread_time doesn't work with current implementation In-Reply-To: <1544452341.93.0.788709270274.issue35455@psf.upfronthosting.co.za> Message-ID: <1604388546.29.0.539652898543.issue35455@roundup.psfhosted.org> Serhiy Storchaka added the comment: Perhaps we should also use gethrtime() and gethrvtime() on HP-UX, but this is a different issue. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 02:32:31 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Nov 2020 07:32:31 +0000 Subject: [issue42103] [security] DoS (MemError via CPU and RAM exhaustion) when processing malformed Apple Property List files in binary format In-Reply-To: <1603239911.48.0.657036824442.issue42103@roundup.psfhosted.org> Message-ID: <1604388751.23.0.0199427433856.issue42103@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 547d2bcc55e348043b2f338027c1acd9549ada76 by Serhiy Storchaka in branch '3.8': [3.8] bpo-42103: Improve validation of Plist files. (GH-22882) (GH-23116) https://github.com/python/cpython/commit/547d2bcc55e348043b2f338027c1acd9549ada76 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 02:33:40 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Nov 2020 07:33:40 +0000 Subject: [issue42103] [security] DoS (MemError via CPU and RAM exhaustion) when processing malformed Apple Property List files in binary format In-Reply-To: <1603239911.48.0.657036824442.issue42103@roundup.psfhosted.org> Message-ID: <1604388820.66.0.422733286789.issue42103@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +lukasz.langa priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 02:53:16 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Nov 2020 07:53:16 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604389996.04.0.750286501338.issue42225@roundup.psfhosted.org> Serhiy Storchaka added the comment: It works on Ubuntu if uninstall the color Emoji font (package fonts-noto-color-emoji). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 04:39:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Nov 2020 09:39:06 +0000 Subject: [issue40077] Convert static types to heap types: use PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1604396346.27.0.845635812187.issue40077@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 74b4eda98b650245216292ace8d7e30d3997baa7 by Erlend Egeberg Aasland in branch 'master': bpo-40077: Convert mmap.mmap static type to a heap type (GH-23108) https://github.com/python/cpython/commit/74b4eda98b650245216292ace8d7e30d3997baa7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 05:42:59 2020 From: report at bugs.python.org (Mark Shannon) Date: Tue, 03 Nov 2020 10:42:59 +0000 Subject: [issue42246] Implement PEP 626 In-Reply-To: <1604331162.26.0.596873070589.issue42246@roundup.psfhosted.org> Message-ID: <1604400179.28.0.816626213543.issue42246@roundup.psfhosted.org> Mark Shannon added the comment: The following code is completely eliminated by the macros. 1. if 0: 2. secret_debugging_code() PEP 626 says that all executed lines of code must generate trace events, so we need to emit an instruction for line 1. Dead code elimination will remove the `secret_debugging_code()`, but leave the test. The peephole optimiser can then reduce it to a NOP, but won't eliminate it as it is the only instruction for line 1. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 05:49:29 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 03 Nov 2020 10:49:29 +0000 Subject: [issue42250] test_ast leaked [23640, 23636, 23640] references Message-ID: <1604400569.36.0.556312833681.issue42250@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : https://buildbot.python.org/all/#/builders/205/builds/83 OK ...... test_ast leaked [23640, 23636, 23640] references, sum=70916 test_ast leaked [7932, 7930, 7932] memory blocks, sum=23794 1 test failed again: test_ast ---------- messages: 380269 nosy: pablogsal priority: normal severity: normal status: open title: test_ast leaked [23640, 23636, 23640] references _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 05:52:51 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 03 Nov 2020 10:52:51 +0000 Subject: [issue42250] test_ast leaked [23640, 23636, 23640] references In-Reply-To: <1604400569.36.0.556312833681.issue42250@roundup.psfhosted.org> Message-ID: <1604400771.35.0.633795135676.issue42250@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- components: +Tests nosy: +BTaskaya, vstinner -pablogsal versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 05:51:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Nov 2020 10:51:33 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604400693.44.0.918716034486.issue1635741@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22038 pull_request: https://github.com/python/cpython/pull/23122 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 05:53:38 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 03 Nov 2020 10:53:38 +0000 Subject: [issue42250] test_ast leaked [23640, 23636, 23640] references In-Reply-To: <1604400569.36.0.556312833681.issue42250@roundup.psfhosted.org> Message-ID: <1604400818.82.0.956962852718.issue42250@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- assignee: -> vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 06:37:02 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 03 Nov 2020 11:37:02 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604403422.74.0.288969908274.issue1635741@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: I've converted _sre to multi-phase init in this branch: https://github.com/erlend-aasland/cpython/tree/bpo-1635741/sre I'm waiting for GH-23101 to be merged (or rejected) before I submit the PR. It's a fairly large PR (1 file changed, 259 insertions(+), 173 deletions(-), ex. clinic code). Let me know if you want me to split it up. Here's an overview over the commits in the branch (clinic included): 97fc9aad3f (HEAD -> bpo-1635741/sre, origin/bpo-1635741/sre) Convert _sre to multi-phase initialisation 1 file changed, 55 insertions(+), 15 deletions(-) f2cc4bdf45 Convert global state to module state 2 files changed, 212 insertions(+), 345 deletions(-) 0d9b3cb47e Establish global module state and add types to it 1 file changed, 28 insertions(+), 14 deletions(-) 823767cf9a Convert _sre scanner type to heap type 1 file changed, 19 insertions(+), 37 deletions(-) a018a9ce15 Convert _sre match type to heap type 1 file changed, 31 insertions(+), 43 deletions(-) 7e6e997b59 Convert _sre pattern type to heap type 1 file changed, 35 insertions(+), 44 deletions(-) 06d23e377c Add convenience macro 1 file changed, 12 insertions(+) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 07:31:10 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Nov 2020 12:31:10 +0000 Subject: [issue42250] test_ast leaked [23640, 23636, 23640] references In-Reply-To: <1604400569.36.0.556312833681.issue42250@roundup.psfhosted.org> Message-ID: <1604406670.41.0.80673293294.issue42250@roundup.psfhosted.org> STINNER Victor added the comment: I prefer to track the regression in bpo-41796. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> _ast module state should be made per interpreter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 07:33:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Nov 2020 12:33:55 +0000 Subject: [issue41796] _ast module state should be made per interpreter In-Reply-To: <1600251024.87.0.709557549839.issue41796@roundup.psfhosted.org> Message-ID: <1604406835.23.0.602314755978.issue41796@roundup.psfhosted.org> STINNER Victor added the comment: There is a leak (I just marked bpo-42250 as duplicate of this issue): https://buildbot.python.org/all/#/builders/205/builds/83 OK ...... test_ast leaked [23640, 23636, 23640] references, sum=70916 test_ast leaked [7932, 7930, 7932] memory blocks, sum=23794 1 test failed again: test_ast test_subinterpreter() test leaks. There are two problems: * _PyAST_Fini() is only called in the main interpreter, I forgot to remove the "if _Py_IsMainInterpreter()" * _PyAST_Fini() is called after the last GC collection, whereas AST_type contains a reference to itself (as any Python type) in its tp_mro member. A GC collection is required to destroy the type. _PyAST_Fini() must be called before the last GC collection. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 07:44:58 2020 From: report at bugs.python.org (hai shi) Date: Tue, 03 Nov 2020 12:44:58 +0000 Subject: [issue41832] PyType_FromSpec() should accept tp_doc=NULL In-Reply-To: <1600770571.99.0.249807543427.issue41832@roundup.psfhosted.org> Message-ID: <1604407498.93.0.148362122483.issue41832@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +22039 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23123 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 07:47:12 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 03 Nov 2020 12:47:12 +0000 Subject: [issue40077] Convert static types to heap types: use PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1604407632.21.0.0705904287698.issue40077@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +22040 pull_request: https://github.com/python/cpython/pull/23124 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 08:15:23 2020 From: report at bugs.python.org (Mario Corchero) Date: Tue, 03 Nov 2020 13:15:23 +0000 Subject: [issue42251] Add threading.gettrace and threading.getprofile Message-ID: <1604409323.63.0.865948030488.issue42251@roundup.psfhosted.org> New submission from Mario Corchero : When working in a C extension from a non-python created thread which calls PyGILState_Ensure as it later calls a Python callback on user code, I wished there was a way to set the trace function similar to what a native Python thread would do. We could just call sys.gettrace within the thread, but the application might have chosen to set threading.settrace differently. Same applies for threading.setprofile. ---------- components: Library (Lib) messages: 380273 nosy: mariocj89 priority: normal severity: normal status: open title: Add threading.gettrace and threading.getprofile versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 08:17:22 2020 From: report at bugs.python.org (Tom Kent) Date: Tue, 03 Nov 2020 13:17:22 +0000 Subject: [issue42252] Embeddable Python indicates that it uses PYTHONPATH Message-ID: <1604409442.14.0.226700475813.issue42252@roundup.psfhosted.org> New submission from Tom Kent : According to the documentation https://docs.python.org/3/using/windows.html#windows-embeddable > When extracted, the embedded distribution is (almost) fully isolated > from the user?s system, including environment variables, system registry > settings, and installed packages The embedded distribution should ignore the environment variables. This is echoed in this prior issue that thought `PYTHONPATH` not being respected was a bug: https://bugs.python.org/issue28245 Regardless of the decision to respect environment variables, the message that is displayed when running the distribution's `python --help` needs to indicate how it will act. Currently, for the embedded distribution, which doesn't respect the env variables, there is a section in the output from running `python -help` that indicates: ``` Other environment variables: PYTHONSTARTUP: file executed on interactive startup (no default) PYTHONPATH : ';'-separated list of directories prefixed to the default module search path. The result is sys.path. PYTHONHOME : alternate directory (or ;). The default module search path uses \python{major}{minor}. PYTHONPLATLIBDIR : override sys.platlibdir. PYTHONCASEOK : ignore case in 'import' statements (Windows). PYTHONUTF8: if set to 1, enable the UTF-8 mode. PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr. PYTHONFAULTHANDLER: dump the Python traceback on fatal errors. PYTHONHASHSEED: if this variable is set to 'random', a random value is used to seed the hashes of str and bytes objects. It can also be set to an integer in the range [0,4294967295] to get hash values with a predictable seed. PYTHONMALLOC: set the Python memory allocators and/or install debug hooks on Python memory allocators. Use PYTHONMALLOC=debug to install debug hooks. PYTHONCOERCECLOCALE: if this variable is set to 0, it disables the locale coercion behavior. Use PYTHONCOERCECLOCALE=warn to request display of locale coercion and locale compatibility warnings on stderr. PYTHONBREAKPOINT: if this variable is set to 0, it disables the default debugger. It can be set to the callable of your debugger of choice. PYTHONDEVMODE: enable the development mode. PYTHONPYCACHEPREFIX: root directory for bytecode cache (pyc) files. ``` This may lead users (it did lead this one) to assume that they are doing something wrong when for example the output of `sys.path` doesn't included items in `os.environ["PYTHONPATH"]`. Realizing that it may be difficult to achieve, the help output should match the state of what the interpreter will actually do if run. ---------- components: Windows messages: 380274 nosy: paul.moore, steve.dower, teeks99, tim.golden, zach.ware priority: normal severity: normal status: open title: Embeddable Python indicates that it uses PYTHONPATH versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 08:18:56 2020 From: report at bugs.python.org (Mario Corchero) Date: Tue, 03 Nov 2020 13:18:56 +0000 Subject: [issue42251] Add threading.gettrace and threading.getprofile In-Reply-To: <1604409323.63.0.865948030488.issue42251@roundup.psfhosted.org> Message-ID: <1604409536.56.0.898596003701.issue42251@roundup.psfhosted.org> Change by Mario Corchero : ---------- keywords: +patch pull_requests: +22041 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 08:29:21 2020 From: report at bugs.python.org (wyz23x2) Date: Tue, 03 Nov 2020 13:29:21 +0000 Subject: [issue40511] IDLE: properly handle '(' and ')' within calls In-Reply-To: <1588680591.22.0.16376057042.issue40511@roundup.psfhosted.org> Message-ID: <1604410161.23.0.280819619652.issue40511@roundup.psfhosted.org> wyz23x2 added the comment: Thanks! :D ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 08:49:18 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 03 Nov 2020 13:49:18 +0000 Subject: [issue42246] Implement PEP 626 In-Reply-To: <1604331162.26.0.596873070589.issue42246@roundup.psfhosted.org> Message-ID: <1604411358.44.0.124409506475.issue42246@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Dead code elimination will remove the `secret_debugging_code()`, but leave the test. The peephole optimiser can then reduce it to a NOP, but won't eliminate it as it is the only instruction for line 1. Gotcha. I am pretty sure that this will have a similar problem as the coverage people were claiming when we were not properly removing all dead code (slightly less coverage percentage). This is not a problem of course, but we should ping the coverage folks so they are aware of this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 09:03:02 2020 From: report at bugs.python.org (Jens Diemer) Date: Tue, 03 Nov 2020 14:03:02 +0000 Subject: [issue42253] xml.dom.minidom.rst missed informations Message-ID: <1604412182.71.0.862314326589.issue42253@roundup.psfhosted.org> New submission from Jens Diemer : The standalone arguments was added in Python 3.9. This information is missed in the docu. ---------- messages: 380277 nosy: jedie2 priority: normal pull_requests: 22042 severity: normal status: open title: xml.dom.minidom.rst missed informations versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 09:04:47 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 03 Nov 2020 14:04:47 +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: <1604412287.14.0.552683440337.issue37193@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +22043 pull_request: https://github.com/python/cpython/pull/23127 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 09:16:04 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Nov 2020 14:16:04 +0000 Subject: [issue42249] Plistlib cannot create binary Plist file larger than 4GiB In-Reply-To: <1604388089.74.0.470654148102.issue42249@roundup.psfhosted.org> Message-ID: <1604412964.58.0.949049764972.issue42249@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 212d32f45c91849c17a82750df1ac498d63976be by Serhiy Storchaka in branch 'master': bpo-42249: Fix writing binary Plist files larger than 4 GiB. (GH-23121) https://github.com/python/cpython/commit/212d32f45c91849c17a82750df1ac498d63976be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 09:16:16 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Nov 2020 14:16:16 +0000 Subject: [issue42249] Plistlib cannot create binary Plist file larger than 4GiB In-Reply-To: <1604388089.74.0.470654148102.issue42249@roundup.psfhosted.org> Message-ID: <1604412976.34.0.450607639273.issue42249@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +22044 pull_request: https://github.com/python/cpython/pull/23128 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 09:24:54 2020 From: report at bugs.python.org (hai shi) Date: Tue, 03 Nov 2020 14:24:54 +0000 Subject: [issue42035] [C API] PyType_GetSlot cannot get tp_name In-Reply-To: <1602683525.08.0.938781399322.issue42035@roundup.psfhosted.org> Message-ID: <1604413494.76.0.959255036796.issue42035@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 09:35:42 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 03 Nov 2020 14:35:42 +0000 Subject: [issue41796] _ast module state should be made per interpreter In-Reply-To: <1600251024.87.0.709557549839.issue41796@roundup.psfhosted.org> Message-ID: <1604414142.03.0.652416698466.issue41796@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 10:02:03 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Nov 2020 15:02:03 +0000 Subject: [issue42249] Plistlib cannot create binary Plist file larger than 4GiB In-Reply-To: <1604388089.74.0.470654148102.issue42249@roundup.psfhosted.org> Message-ID: <1604415723.16.0.778039130185.issue42249@roundup.psfhosted.org> miss-islington added the comment: New changeset ac70175fc038e0f06034c4d61c577ef4b923464a by Miss Skeleton (bot) in branch '3.8': bpo-42249: Fix writing binary Plist files larger than 4 GiB. (GH-23121) https://github.com/python/cpython/commit/ac70175fc038e0f06034c4d61c577ef4b923464a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 10:02:26 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Nov 2020 15:02:26 +0000 Subject: [issue42249] Plistlib cannot create binary Plist file larger than 4GiB In-Reply-To: <1604388089.74.0.470654148102.issue42249@roundup.psfhosted.org> Message-ID: <1604415746.06.0.374649414653.issue42249@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +22045 pull_request: https://github.com/python/cpython/pull/23129 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 10:13:46 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Nov 2020 15:13:46 +0000 Subject: [issue35455] Solaris: thread_time doesn't work with current implementation In-Reply-To: <1544452341.93.0.788709270274.issue35455@psf.upfronthosting.co.za> Message-ID: <1604416426.65.0.82962444258.issue35455@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +22046 pull_request: https://github.com/python/cpython/pull/23130 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 10:41:19 2020 From: report at bugs.python.org (Mark Shannon) Date: Tue, 03 Nov 2020 15:41:19 +0000 Subject: [issue42246] Implement PEP 626 In-Reply-To: <1604331162.26.0.596873070589.issue42246@roundup.psfhosted.org> Message-ID: <1604418079.55.0.357307645586.issue42246@roundup.psfhosted.org> Change by Mark Shannon : ---------- nosy: +nedbat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 11:40:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Nov 2020 16:40:45 +0000 Subject: [issue41796] _ast module state should be made per interpreter In-Reply-To: <1600251024.87.0.709557549839.issue41796@roundup.psfhosted.org> Message-ID: <1604421645.83.0.0890044311763.issue41796@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22047 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/23131 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 11:42:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Nov 2020 16:42:45 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604421765.48.0.778167860182.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: In PR 23131, I added a comment to _PyInterpreter_Clear() to remind me that trying to destroy a Python type after the last GC collection doesn't work as expected: // All Python types must be destroyed before the last GC collection. Python // types create a reference cycle to themselves in their in their // PyTypeObject.tp_mro member (the tuple contains the type). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 11:59:38 2020 From: report at bugs.python.org (Eryk Sun) Date: Tue, 03 Nov 2020 16:59:38 +0000 Subject: [issue42252] Embeddable Python indicates that it uses PYTHONPATH In-Reply-To: <1604409442.14.0.226700475813.issue42252@roundup.psfhosted.org> Message-ID: <1604422778.34.0.656981037047.issue42252@roundup.psfhosted.org> Eryk Sun added the comment: The embeddable distribution isn't intended for end users to run Python scripts from the command line, so I don't think the CLI help needs to be special cased. The documentation you quoted should be clarified as something like "isolated from user and system Python settings, including environment variables such as PYTHONPATH, registry settings, and installed packages". It would be helpful as well if the Windows download links on python.org explained or linked to the intended use case for the embeddable distribution. Sometimes people mistakenly download it when they really need a normal Python installation. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 12:00:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Nov 2020 17:00:22 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604422822.37.0.525813424132.issue42225@roundup.psfhosted.org> STINNER Victor added the comment: The following program fails with: --- X Error of failed request: BadLength (poly request too large or internal Xlib length error) Major opcode of failed request: 138 (RENDER) Minor opcode of failed request: 20 (RenderAddGlyphs) Serial number of failed request: 4248 Current serial number in output stream: 4956 --- Python program: --- from tkinter import Tk from tkinter.scrolledtext import ScrolledText root = Tk() text = ScrolledText(root, width=80, height=40) text.pack() for i in range(0x10000, 0x40000, 32): chars = ''.join(chr(i+j) for j in range(32)) text.insert('insert', f"{hex(i)} {chars}\n") input("Press enter to exit") --- It seems like the first character which triggers this RenderAddGlyphs BadLength issue is: U+1f6c2. See attached emoji.png screenshot. As you can see, some emojis are rendered in color in Gnome Terminal. I guess that it uses the Gtk 3 pango library to render these characters. ---------- Added file: https://bugs.python.org/file49567/emojis.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 12:01:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Nov 2020 17:01:49 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604422909.28.0.0668217828162.issue42225@roundup.psfhosted.org> STINNER Victor added the comment: > This version catches exceptions and reports them separately and runs directly with tkinter, in about a second. The X Error is displayed and then the process exit. Python cannot catch this fatal X Error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 12:07:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Nov 2020 17:07:19 +0000 Subject: [issue41796] _ast module state should be made per interpreter In-Reply-To: <1600251024.87.0.709557549839.issue41796@roundup.psfhosted.org> Message-ID: <1604423239.11.0.215404272807.issue41796@roundup.psfhosted.org> STINNER Victor added the comment: New changeset fd957c124c44441d9c5eaf61f7af8cf266bafcb1 by Victor Stinner in branch 'master': bpo-41796: Call _PyAST_Fini() earlier to fix a leak (GH-23131) https://github.com/python/cpython/commit/fd957c124c44441d9c5eaf61f7af8cf266bafcb1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 12:08:50 2020 From: report at bugs.python.org (Tom Kent) Date: Tue, 03 Nov 2020 17:08:50 +0000 Subject: [issue42252] Embeddable Python indicates that it uses PYTHONPATH In-Reply-To: <1604409442.14.0.226700475813.issue42252@roundup.psfhosted.org> Message-ID: <1604423330.35.0.0925054597728.issue42252@roundup.psfhosted.org> Tom Kent added the comment: I'm not sure I agree with that. One possible use-case is to package it along with another program to use the interpreter. In this case they could use the other program's native language features (e.g. .Net's Process.Start(), Win32 API's CreateProcess(), Even Python's subprocess but why?, etc) to run `python.exe myscript.py`. In this case, the user may assume that adding something to the `PYTHONPATH` env variable, as most of the launching methods allow, would take hold. When this fails, the first attempt at debugging would be to try it interactively with the same command, then promptly look at python --help when that fails. Maybe a better question is why should the embeddable distribution's python.exe ignore env variables? Wouldn't it make more sense to depend on the user to add a `-E` if that is what they desire? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 12:32:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Nov 2020 17:32:34 +0000 Subject: [issue41796] _ast module state should be made per interpreter In-Reply-To: <1600251024.87.0.709557549839.issue41796@roundup.psfhosted.org> Message-ID: <1604424754.08.0.781199245463.issue41796@roundup.psfhosted.org> STINNER Victor added the comment: The leak is fixed, I close again the issue. Thanks for the report Pablo. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 12:49:42 2020 From: report at bugs.python.org (signing_agreement) Date: Tue, 03 Nov 2020 17:49:42 +0000 Subject: [issue42254] inspect.getmembers iterator version Message-ID: <1604425782.8.0.580845588744.issue42254@roundup.psfhosted.org> New submission from signing_agreement : inspect.getmembers should have a generator version. ---------- components: Library (Lib) messages: 380287 nosy: signing_agreement priority: normal severity: normal status: open title: inspect.getmembers iterator version type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 13:16:19 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 03 Nov 2020 18:16:19 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604427379.36.0.593561371463.issue42225@roundup.psfhosted.org> Ronald Oussoren added the comment: @Kevin Walzer: Is the problem were seeing a known issue with Tk? ---------- nosy: +wordtech _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 13:18:33 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 03 Nov 2020 18:18:33 +0000 Subject: [issue42254] inspect.getmembers iterator version In-Reply-To: <1604425782.8.0.580845588744.issue42254@roundup.psfhosted.org> Message-ID: <1604427513.13.0.607803149382.issue42254@roundup.psfhosted.org> Ronald Oussoren added the comment: why? ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 13:45:18 2020 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 03 Nov 2020 18:45:18 +0000 Subject: [issue7175] Define a standard location and API for configuration files In-Reply-To: <1256037677.34.0.670034749287.issue7175@psf.upfronthosting.co.za> Message-ID: <1604429118.34.0.303119175472.issue7175@roundup.psfhosted.org> ?ric Araujo added the comment: This ticket did not reach a consensus. It seems there would be little value in changing the existing scheme for IDLE and such; external tools can (and often do) already use appdirs; I suggest closing this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 13:52:36 2020 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 03 Nov 2020 18:52:36 +0000 Subject: [issue42158] http.server doesn't guess n-quads, n-triples, notation3 and TriG MIME types In-Reply-To: <1603735016.36.0.247111341461.issue42158@roundup.psfhosted.org> Message-ID: <1604429556.74.0.433448631058.issue42158@roundup.psfhosted.org> ?ric Araujo added the comment: Editing /etc/mime.types is one way of customizing the types returned; another one is to make a pull request to add them to the list inside the mimetypes module. ---------- nosy: +eric.araujo stage: -> needs patch versions: -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 14:11:36 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 03 Nov 2020 19:11:36 +0000 Subject: [issue38647] Why only the MacOSXOSAScript in webbrowser does not have the name property? In-Reply-To: <1572456767.92.0.8897291562.issue38647@roundup.psfhosted.org> Message-ID: <1604430696.35.0.418301193229.issue38647@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- keywords: +patch pull_requests: +22048 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23134 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 14:12:37 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 03 Nov 2020 19:12:37 +0000 Subject: [issue38647] Why only the MacOSXOSAScript in webbrowser does not have the name property? In-Reply-To: <1572456767.92.0.8897291562.issue38647@roundup.psfhosted.org> Message-ID: <1604430757.88.0.101571280812.issue38647@roundup.psfhosted.org> Ronald Oussoren added the comment: I've created a PR for adding the attribute. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 14:15:01 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 03 Nov 2020 19:15:01 +0000 Subject: [issue42255] webbrowser.MacOSX is unused, untested and undocumented Message-ID: <1604430901.68.0.981211049507.issue42255@roundup.psfhosted.org> New submission from Ronald Oussoren : class webbrower.MacOSX is untested and undocumented. It is also not used by webbrowser itself (webbrowser.MacOSXOSAScript is used to launch browsers). It's probably safe to just remove the class, otherwise deprecate in 3.10 for removal in 3.11. ---------- components: Library (Lib), macOS messages: 380293 nosy: ned.deily, ronaldoussoren priority: normal severity: normal status: open title: webbrowser.MacOSX is unused, untested and undocumented type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 14:17:21 2020 From: report at bugs.python.org (Paulie Pena) Date: Tue, 03 Nov 2020 19:17:21 +0000 Subject: [issue42256] BaseCookie.__parse_string() doesn't work with expires= between cookies Message-ID: <1604431041.17.0.875441243707.issue42256@roundup.psfhosted.org> New submission from Paulie Pena : Since `requests` creates a comma-separated list for any duplicated headers, this causes a problem when `expires=...` is between two `Set-Cookie` header values. `BaseCookie.__parse_string()` in https://github.com/python/cpython/blob/master/Lib/http/cookies.py, in that case, will just give up, since it thinks it was given an invalid cookie. The fix is to replace the comma at the end of each trailing `expires=...` with a semicolon. Inside `BaseCookie.__parse_string()`, before the `while` loop, all that should be needed is to add this: ``` str = re.sub('(=\w{3},\s[\w\d\s-]{9,11}\s[\d:]{8}\sGMT),', r'\1;', str) ``` ---------- components: Library (Lib) messages: 380294 nosy: paulie4 priority: normal severity: normal status: open title: BaseCookie.__parse_string() doesn't work with expires= between cookies 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 Tue Nov 3 14:19:47 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 03 Nov 2020 19:19:47 +0000 Subject: [issue42100] Add _PyType_GetModuleByDef In-Reply-To: <1603226105.52.0.971925860816.issue42100@roundup.psfhosted.org> Message-ID: <1604431187.72.0.899261714191.issue42100@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 14:23:38 2020 From: report at bugs.python.org (signing_agreement) Date: Tue, 03 Nov 2020 19:23:38 +0000 Subject: [issue42254] inspect.getmembers iterator version In-Reply-To: <1604425782.8.0.580845588744.issue42254@roundup.psfhosted.org> Message-ID: <1604431418.95.0.855135335783.issue42254@roundup.psfhosted.org> signing_agreement added the comment: The object it deals with is already loaded, but in cases I see online, users tend to examine one member at a time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 14:25:00 2020 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 03 Nov 2020 19:25:00 +0000 Subject: [issue42205] Add image/webp to list of non-standard mimetypes In-Reply-To: <1604049363.03.0.933855009454.issue42205@roundup.psfhosted.org> Message-ID: <1604431500.96.0.743130436189.issue42205@roundup.psfhosted.org> ?ric Araujo added the comment: Hello! Why open a second ticket? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 14:33:44 2020 From: report at bugs.python.org (Paulie Pena) Date: Tue, 03 Nov 2020 19:33:44 +0000 Subject: [issue42256] BaseCookie.__parse_string() doesn't work with expires= between cookies In-Reply-To: <1604431041.17.0.875441243707.issue42256@roundup.psfhosted.org> Message-ID: <1604432024.32.0.420043196398.issue42256@roundup.psfhosted.org> Paulie Pena added the comment: whoops, the first string should also be a raw string, i.e. `r'...'` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 14:35:52 2020 From: report at bugs.python.org (=?utf-8?q?Volker_Wei=C3=9Fmann?=) Date: Tue, 03 Nov 2020 19:35:52 +0000 Subject: [issue17852] Built-in module _io can lose data from buffered files in reference cycles In-Reply-To: <1367048010.96.0.3580561262.issue17852@psf.upfronthosting.co.za> Message-ID: <1604432152.1.0.982933988996.issue17852@roundup.psfhosted.org> Change by Volker Wei?mann : ---------- nosy: +Volker Wei?mann nosy_count: 12.0 -> 13.0 pull_requests: +22049 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23135 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 15:09:09 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 03 Nov 2020 20:09:09 +0000 Subject: [issue42254] inspect.getmembers iterator version In-Reply-To: <1604425782.8.0.580845588744.issue42254@roundup.psfhosted.org> Message-ID: <1604434149.72.0.265229207481.issue42254@roundup.psfhosted.org> Ronald Oussoren added the comment: I personally don't think it is worthwhile to add another API for this without a good use case. The memory overhead of eagerly creating a list should be fairly small. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 15:19:57 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 03 Nov 2020 20:19:57 +0000 Subject: [issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489) In-Reply-To: <1602963425.44.0.576962569847.issue42064@roundup.psfhosted.org> Message-ID: <1604434797.39.0.257288489875.issue42064@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: FYI, rebased https://github.com/erlend-aasland/cpython/tree/bpo-42064/all onto master, added Petr Viktorin's _PyType_GetModuleByDef() for use in item 7 (module state). I still run into problems in item 8, but I haven't devoted much time for this yet: Modules/gcmodule.c:116: gc_decref: Assertion "gc_get_refs(g) > 0" failed: refcount is too small Enable tracemalloc to get the memory block allocation traceback object address : 0x7f861140c6b0 object refcount : 2 object type : 0x109666678 object type name: type object repr : Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed Python runtime state: finalizing (tstate=0x7f8631409000) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 15:20:54 2020 From: report at bugs.python.org (signing_agreement) Date: Tue, 03 Nov 2020 20:20:54 +0000 Subject: [issue42254] inspect.getmembers iterator version In-Reply-To: <1604425782.8.0.580845588744.issue42254@roundup.psfhosted.org> Message-ID: <1604434854.46.0.159119809703.issue42254@roundup.psfhosted.org> signing_agreement added the comment: That is a fair point. I selected a few popular python libraries to test, and they all return a small list. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 15:57:29 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 03 Nov 2020 20:57:29 +0000 Subject: [issue40077] Convert static types to heap types: use PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1604437049.24.0.225149737548.issue40077@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +22050 pull_request: https://github.com/python/cpython/pull/23136 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 16:33:06 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Nov 2020 21:33:06 +0000 Subject: [issue42249] Plistlib cannot create binary Plist file larger than 4GiB In-Reply-To: <1604388089.74.0.470654148102.issue42249@roundup.psfhosted.org> Message-ID: <1604439186.29.0.242553802406.issue42249@roundup.psfhosted.org> miss-islington added the comment: New changeset 9bc07874e34930d4e816a9a3330aab009404991e by Miss Skeleton (bot) in branch '3.9': bpo-42249: Fix writing binary Plist files larger than 4 GiB. (GH-23121) https://github.com/python/cpython/commit/9bc07874e34930d4e816a9a3330aab009404991e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 16:58:50 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 03 Nov 2020 21:58:50 +0000 Subject: [issue41832] PyType_FromSpec() should accept tp_doc=NULL In-Reply-To: <1600770571.99.0.249807543427.issue41832@roundup.psfhosted.org> Message-ID: <1604440730.15.0.769383905828.issue41832@roundup.psfhosted.org> Petr Viktorin added the comment: The PyType_Slot documentation says that the pointer may not be NULL: https://docs.python.org/3/c-api/type.html?highlight=pytype_fromspec#c.PyType_Slot.PyType_Slot.pfunc If you change this, why do it only for tp_doc, but for all the slots? NULL should *always* mean that the slot is set to NULL instead of inherited. (Except maybe in cases where this is dangerous; then it should result in an error?) See: https://bugs.python.org/issue26979 If you want to only change this for tp_doc, please also update the PyType_Slot documentation to cover the exception. ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 17:26:00 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 03 Nov 2020 22:26:00 +0000 Subject: [issue41618] [C API] How many slots of static types should be exposed in PyType_GetSlot() In-Reply-To: <1598172498.12.0.869607269568.issue41618@roundup.psfhosted.org> Message-ID: <1604442360.35.0.0941904332471.issue41618@roundup.psfhosted.org> Petr Viktorin added the comment: > Can we write those info to docs? In case some developer want to exposing slot in future. Do you mean something like "only expose a slot if you have a reason for exposing it"? That sounds like a tautology. Where in the docs would this go? > nb_inserved in PyNumberMethods should be removed? You mean nb_reserved, right? It can't be removed; old-style initialization is positional. But it could be replaced according to PEP387: - in 3.x, raise a warning if it is not set to NULL (in static types) - in 3.x+2, throw an error if it is not set to NULL (in static types) - in 3.x+3 or later, it can be replaced by another slot, if there's something we need to add to PyNumberMethods ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 17:30:44 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 03 Nov 2020 22:30:44 +0000 Subject: [issue42100] Add _PyType_GetModuleByDef In-Reply-To: <1603226105.52.0.971925860816.issue42100@roundup.psfhosted.org> Message-ID: <1604442644.58.0.0454716715382.issue42100@roundup.psfhosted.org> Change by Petr Viktorin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 17:58:45 2020 From: report at bugs.python.org (Irit Katriel) Date: Tue, 03 Nov 2020 22:58:45 +0000 Subject: [issue1633941] for line in sys.stdin: doesn't notice EOF the first time Message-ID: <1604444325.8.0.0398583122488.issue1633941@roundup.psfhosted.org> Irit Katriel added the comment: Since this is a python 2 only issue, should this issue be closed as out of date? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 19:59:23 2020 From: report at bugs.python.org (Kevin Walzer) Date: Wed, 04 Nov 2020 00:59:23 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604451563.39.0.37394713917.issue42225@roundup.psfhosted.org> Kevin Walzer added the comment: Some work has been done this year on expanding support for these types of glyphs in Tk, but I'm not sure of its current state--it's not my area of expertise. Can you open a ticket at https://core.tcl-lang.org/tk/ so one of the folks working on this can take a look? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 20:09:24 2020 From: report at bugs.python.org (Steve Dower) Date: Wed, 04 Nov 2020 01:09:24 +0000 Subject: [issue42252] Embeddable Python indicates that it uses PYTHONPATH In-Reply-To: <1604409442.14.0.226700475813.issue42252@roundup.psfhosted.org> Message-ID: <1604452164.62.0.177407279996.issue42252@roundup.psfhosted.org> Steve Dower added the comment: Updating the documentation link on the download page is being discussed as we speak. > One possible use-case is to package it along with another program to use the interpreter. This is the primary use case. If you're doing something else with it, you're probably misusing it :) > In this case, the user may assume that adding something to the `PYTHONPATH` env variable, as most of the launching methods allow, would take hold. Agreed. The documentation explains this, though likely doesn't make clear enough that it's the presence of the ._pth file that triggers the behaviour. > ... then promptly look at python --help when that fails. I'm pretty sure the help text is generated before we've tried to detect any local configuration, so it's far from trivial to make it dynamic based on context. > Maybe a better question is why should the embeddable distribution's python.exe ignore env variables? Wouldn't it make more sense to depend on the user to add a `-E` if that is what they desire? It's to make it non-exploitable by default. The theory being that it will likely be installed into Program Files by an admin, which means file-based configuration is locked down from regular users and an attacker can't rely on a fully functioning Python runtime being present. Most people wildly underestimate how exploitable CPython is via environment variables. In an embedded scenario, you also have other ways to update paths, either statically (in the ._pth file) or in Python code (via sys.path modification). And you can of course delete the ._pth file if you don't feel you need the isolation, but there are legitimate reasons we don't recommend that one. Not enough of this is documented that well, unfortunately. It sounds like we should: * add a note to the environment variables section of --help that some other options may disable these * add a link to https://docs.python.org/3/using/windows.html#windows-embeddable back to the download page (it was removed in the 3.9 releases for some reason) * expand that doc section to link forward to https://docs.python.org/3/using/windows.html#finding-modules and maybe rearrange for making it more obvious how to use this package ---------- versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 20:34:03 2020 From: report at bugs.python.org (Tom Kent) Date: Wed, 04 Nov 2020 01:34:03 +0000 Subject: [issue42252] Embeddable Python indicates that it uses PYTHONPATH In-Reply-To: <1604409442.14.0.226700475813.issue42252@roundup.psfhosted.org> Message-ID: <1604453643.53.0.487776716861.issue42252@roundup.psfhosted.org> Tom Kent added the comment: A couple things... >> One possible use-case is to package it along with another program to use the interpreter. > This is the primary use case. If you're doing something else with it, you're probably misusing it :) Interesting, I'd been expecting this was commonly used as the way to give access to python3X.dll. We actually do (or are trying to do) both from our installation. I've been mostly focusing on `PYTHONPATH` because that's where I encountered the issue. Which if any of the other env variables are respected? Would there be an argument to add additional command line options that could be used as a more secure alternative to the env variables? A command line argument `-e` that is the opposite of `-E` and enables the usage of PYTHON* env? Maybe this doesn't make sense since you said it is the ._pth that causes this...just thinking aloud. The two options you mention (modify ._pth and append to sys.path) aren't great because we 1) would prefer to use the un-modified python distro 2) don't own the scripts that we are embedding, they are from a 3rd party so modifications are complicated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 20:39:18 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 04 Nov 2020 01:39:18 +0000 Subject: [issue1633941] for line in sys.stdin: doesn't notice EOF the first time Message-ID: <1604453958.35.0.201058737677.issue1633941@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> out of date stage: test needed -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 20:41:42 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 01:41:42 +0000 Subject: [issue1643712] Emphasize buffering issues when sys.stdin is used Message-ID: <1604454102.3.0.168342402601.issue1643712@roundup.psfhosted.org> Irit Katriel added the comment: Closed along with 1633941. ---------- nosy: +iritkatriel resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 20:46:36 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 01:46:36 +0000 Subject: [issue17344] checking size of size_t... configure: error: In-Reply-To: <1362378724.97.0.818399526609.issue17344@psf.upfronthosting.co.za> Message-ID: <1604454396.71.0.309635991731.issue17344@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 21:07:43 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 02:07:43 +0000 Subject: [issue5537] LWPCookieJar cannot handle cookies with expirations of 2038 or greater on 32-bit platforms In-Reply-To: <1237744231.54.0.279066174651.issue5537@psf.upfronthosting.co.za> Message-ID: <1604455663.0.0.292252152368.issue5537@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: -patch versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 21:16:18 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 02:16:18 +0000 Subject: [issue15128] inspect raises exception when frames are misleading about source line numbers In-Reply-To: <1340301668.18.0.785702018205.issue15128@psf.upfronthosting.co.za> Message-ID: <1604456178.92.0.253279039774.issue15128@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 21:39:26 2020 From: report at bugs.python.org (waicalibre) Date: Wed, 04 Nov 2020 02:39:26 +0000 Subject: [issue38902] image/webp support in mimetypes In-Reply-To: <1574548382.26.0.67471558876.issue38902@roundup.psfhosted.org> Message-ID: <1604457566.84.0.0161134041416.issue38902@roundup.psfhosted.org> Change by waicalibre : ---------- keywords: +patch nosy: +waicalibre nosy_count: 3.0 -> 4.0 pull_requests: +22051 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22718 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 21:39:45 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 04 Nov 2020 02:39:45 +0000 Subject: [issue42049] Add image/webp to list of media types in mimetypes.py In-Reply-To: <1602826491.72.0.784851705448.issue42049@roundup.psfhosted.org> Message-ID: <1604457585.9.0.794179398972.issue42049@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> duplicate superseder: -> image/webp support in mimetypes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 21:40:29 2020 From: report at bugs.python.org (waicalibre) Date: Wed, 04 Nov 2020 02:40:29 +0000 Subject: [issue38902] image/webp support in mimetypes In-Reply-To: <1574548382.26.0.67471558876.issue38902@roundup.psfhosted.org> Message-ID: <1604457629.12.0.442951749938.issue38902@roundup.psfhosted.org> Change by waicalibre : ---------- pull_requests: +22052 pull_request: https://github.com/python/cpython/pull/23034 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 21:40:40 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 04 Nov 2020 02:40:40 +0000 Subject: [issue42205] Add image/webp to list of non-standard mimetypes In-Reply-To: <1604049363.03.0.933855009454.issue42205@roundup.psfhosted.org> Message-ID: <1604457640.56.0.285101226303.issue42205@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> duplicate superseder: -> image/webp support in mimetypes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 21:41:12 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 02:41:12 +0000 Subject: [issue4999] multiprocessing.Queue does not order objects In-Reply-To: <1232369845.16.0.0391307501892.issue4999@psf.upfronthosting.co.za> Message-ID: <1604457672.65.0.194418749501.issue4999@roundup.psfhosted.org> Irit Katriel added the comment: I see the documentation mentions it now (in the second gray box here: https://docs.python.org/3.8/library/multiprocessing.html#pipes-and-queues ) and it also suggests to use a shared queue if this is an issue. Any objections to closing this issue? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 21:42:44 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 04 Nov 2020 02:42:44 +0000 Subject: [issue38902] image/webp support in mimetypes In-Reply-To: <1574548382.26.0.67471558876.issue38902@roundup.psfhosted.org> Message-ID: <1604457764.69.0.0553241590221.issue38902@roundup.psfhosted.org> Inada Naoki added the comment: I'm +1 to add it in common types, because webp is really de-facto standard. https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types If no objection, I will merge this in next week. ---------- nosy: +methane versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 21:43:23 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 04 Nov 2020 02:43:23 +0000 Subject: [issue42205] Add image/webp to list of non-standard mimetypes In-Reply-To: <1604049363.03.0.933855009454.issue42205@roundup.psfhosted.org> Message-ID: <1604457803.94.0.646975915588.issue42205@roundup.psfhosted.org> Change by Inada Naoki : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 3 21:43:33 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 04 Nov 2020 02:43:33 +0000 Subject: [issue42049] Add image/webp to list of media types in mimetypes.py In-Reply-To: <1602826491.72.0.784851705448.issue42049@roundup.psfhosted.org> Message-ID: <1604457813.89.0.452182240236.issue42049@roundup.psfhosted.org> Change by Inada Naoki : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 01:01:55 2020 From: report at bugs.python.org (Kurochan) Date: Wed, 04 Nov 2020 06:01:55 +0000 Subject: [issue42257] platform.libc_ver() doesn't consider in case of executable is empty string Message-ID: <1604469715.55.0.889552705694.issue42257@roundup.psfhosted.org> New submission from Kurochan : Currently, `platform.libc_ver()` doesn't consider in case of `executable` variable is an empty string. However, with Python 3.8, the following code could pass an empty string `executable` to the `platform.libc_ver()` function. https://github.com/python/cpython/blob/efc782d29e229924076ffb6645a72f26242fb3ef/Lib/platform.py#L1205 https://docs.python.org/3/library/sys.html#sys.executable Because the `sys.executable` could return an empty string, so I would like to add the empty string handler. https://github.com/python/cpython/blob/efc782d29e229924076ffb6645a72f26242fb3ef/Lib/platform.py#L174 Or please also merge the following PR to Python 3.8. https://github.com/python/cpython/pull/14418 ---------- components: Library (Lib) messages: 380311 nosy: kurochan priority: normal severity: normal status: open title: platform.libc_ver() doesn't consider in case of executable is empty string type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 01:17:23 2020 From: report at bugs.python.org (Kurochan) Date: Wed, 04 Nov 2020 06:17:23 +0000 Subject: [issue42257] platform.libc_ver() doesn't consider in case of executable is empty string In-Reply-To: <1604469715.55.0.889552705694.issue42257@roundup.psfhosted.org> Message-ID: <1604470643.92.0.402728635843.issue42257@roundup.psfhosted.org> Change by Kurochan : ---------- keywords: +patch pull_requests: +22053 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23140 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 02:24:13 2020 From: report at bugs.python.org (serge-sans-paille) Date: Wed, 04 Nov 2020 07:24:13 +0000 Subject: [issue42207] Python 3.9 testing fails when building with clang and optimizations are enabled In-Reply-To: <1604069104.85.0.435616508554.issue42207@roundup.psfhosted.org> Message-ID: <1604474653.53.0.569572426102.issue42207@roundup.psfhosted.org> Change by serge-sans-paille : ---------- pull_requests: +22054 pull_request: https://github.com/python/cpython/pull/23141 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 04:27:57 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 04 Nov 2020 09:27:57 +0000 Subject: [issue42251] Add threading.gettrace and threading.getprofile In-Reply-To: <1604409323.63.0.865948030488.issue42251@roundup.psfhosted.org> Message-ID: <1604482077.4.0.819252875327.issue42251@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 Nov 4 04:28:11 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 04 Nov 2020 09:28:11 +0000 Subject: [issue42251] Add threading.gettrace and threading.getprofile In-Reply-To: <1604409323.63.0.865948030488.issue42251@roundup.psfhosted.org> Message-ID: <1604482091.0.0.593246666113.issue42251@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 0001a1b69ecda47b0406daa88c2943877580bcae by Mario Corchero in branch 'master': bpo-42251: Add gettrace and getprofile to threading (GH-23125) https://github.com/python/cpython/commit/0001a1b69ecda47b0406daa88c2943877580bcae ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 05:20:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 10:20:19 +0000 Subject: [issue42236] os.device_encoding() doesn't respect the UTF-8 Mode In-Reply-To: <1604254376.75.0.724076396779.issue42236@roundup.psfhosted.org> Message-ID: <1604485219.35.0.607716288997.issue42236@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3529718925f40d14ed48d281d809187bc7314a14 by Victor Stinner in branch 'master': bpo-42236: os.device_encoding() respects UTF-8 Mode (GH-23119) https://github.com/python/cpython/commit/3529718925f40d14ed48d281d809187bc7314a14 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 05:26:56 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 10:26:56 +0000 Subject: [issue42236] os.device_encoding() doesn't respect the UTF-8 Mode In-Reply-To: <1604254376.75.0.724076396779.issue42236@roundup.psfhosted.org> Message-ID: <1604485616.13.0.765573716684.issue42236@roundup.psfhosted.org> STINNER Victor added the comment: > But locale encoding and console cp are different on Windows. Users may want to know console cp even when they want to use UTF-8 by default for reading/writing text files. You're right. My final change leaves Windows unchanged. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 05:45:27 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 10:45:27 +0000 Subject: [issue4683] tests missing in urllib2 In-Reply-To: <1229523259.96.0.571468029932.issue4683@psf.upfronthosting.co.za> Message-ID: <1604486727.96.0.783738477609.issue4683@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Tests resolution: fixed -> title: urllib2.HTTPDigestAuthHandler fails on third hostname? -> tests missing in urllib2 versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 06:21:13 2020 From: report at bugs.python.org (mendelmaleh) Date: Wed, 04 Nov 2020 11:21:13 +0000 Subject: [issue42258] argparse: show choices once per argument Message-ID: <1604488873.92.0.395352183605.issue42258@roundup.psfhosted.org> Change by mendelmaleh : ---------- components: Library (Lib) nosy: mendelmaleh priority: normal severity: normal status: open title: argparse: show choices once per argument type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 06:39:21 2020 From: report at bugs.python.org (Roundup Robot) Date: Wed, 04 Nov 2020 11:39:21 +0000 Subject: [issue4225] unicode_literals doesn't work in exec In-Reply-To: <1225231604.07.0.232278936912.issue4225@psf.upfronthosting.co.za> Message-ID: <1604489961.46.0.793114121384.issue4225@roundup.psfhosted.org> Change by Roundup Robot : ---------- nosy: +python-dev nosy_count: 3.0 -> 4.0 pull_requests: +22055 pull_request: https://github.com/python/cpython/pull/23143 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 06:39:38 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 11:39:38 +0000 Subject: [issue5038] urrlib2/httplib doesn't reset file position between requests In-Reply-To: <1232730438.9.0.904675957675.issue5038@psf.upfronthosting.co.za> Message-ID: <1604489978.94.0.970216327442.issue5038@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Documentation stage: patch review -> needs patch versions: +Python 3.10, Python 3.9 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 06:42:06 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 11:42:06 +0000 Subject: [issue1767511] SocketServer.DatagramRequestHandler with empty response Message-ID: <1604490126.54.0.410901713056.issue1767511@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python stage: patch review -> needs patch versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 06:44:31 2020 From: report at bugs.python.org (Danylo Hlynskyi) Date: Wed, 04 Nov 2020 11:44:31 +0000 Subject: [issue42259] pprint: infinite recursion for saferepr() when using nested objects, but str() works Message-ID: <1604490271.59.0.652277780579.issue42259@roundup.psfhosted.org> New submission from Danylo Hlynskyi : First, here's an example using str(): ``` class NiceObject: def __str__(self): return str(self.__dict__) def __repr__(self): return str(self) s = NiceObject() s.self = s ``` This outputs: ``` >>> s {'self': {...}} ``` When I replace str() call with pprint.saferepr(), I end up in infinite recursion. ``` import pprint class ReallyNiceObject: def __str__(self): return pprint.saferepr(self.__dict__) def __repr__(self): return str(self) ``` Same happens for pprint.pformat(), with depth set. Is this expected behavior? ---------- components: Library (Lib) messages: 380315 nosy: danbst priority: normal severity: normal status: open title: pprint: infinite recursion for saferepr() when using nested objects, but str() works type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 06:49:24 2020 From: report at bugs.python.org (Roundup Robot) Date: Wed, 04 Nov 2020 11:49:24 +0000 Subject: [issue42258] argparse: show choices once per argument Message-ID: <1604490564.47.0.608621412877.issue42258@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +22056 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23143 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 07:07:31 2020 From: report at bugs.python.org (hai shi) Date: Wed, 04 Nov 2020 12:07:31 +0000 Subject: [issue41832] PyType_FromSpec() should accept tp_doc=NULL In-Reply-To: <1600770571.99.0.249807543427.issue41832@roundup.psfhosted.org> Message-ID: <1604491651.99.0.717285576395.issue41832@roundup.psfhosted.org> hai shi added the comment: > If you change this, why do it only for tp_doc, but for all the slots? NULL should *always* mean that the slot is set to NULL instead of inherited. (Except maybe in cases where this is dangerous; then it should result in an error? IMO, it's a proper user case. >From bpo-26978: "I'll also try making an explicit `{Py_tp_dealloc, NULL}` override the inherited value, as per Serhiy's suggestion." Petr, do you have a PR about it? > If you want to only change this for tp_doc, please also update the PyType_Slot documentation to cover the exception. Copy that, I will update it soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 07:59:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 12:59:24 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604494764.38.0.314862971753.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8021875bbcf7385e651def51bc597472a569042c by Victor Stinner in branch 'master': bpo-1635741: Add PyModule_AddObjectRef() function (GH-23122) https://github.com/python/cpython/commit/8021875bbcf7385e651def51bc597472a569042c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 08:00:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 13:00:44 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604494844.18.0.766688564032.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: I added a new PyModule_AddObjectRef() function which does not steal a reference to the value on success. I suggest to use this new function instead of PyModule_AddObject() which is usually misused (creating reference leaks). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 08:05:59 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 04 Nov 2020 13:05:59 +0000 Subject: [issue42249] Plistlib cannot create binary Plist file larger than 4GiB In-Reply-To: <1604388089.74.0.470654148102.issue42249@roundup.psfhosted.org> Message-ID: <1604495158.98.0.671068243258.issue42249@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 Nov 4 08:09:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 13:09:52 +0000 Subject: [issue41944] [security][CVE-2020-27619] Python testsuite calls eval() on content received via HTTP In-Reply-To: <1601908852.29.0.0266876682235.issue41944@roundup.psfhosted.org> Message-ID: <1604495392.45.0.899832409798.issue41944@roundup.psfhosted.org> STINNER Victor added the comment: Red Hat advisory: https://access.redhat.com/security/cve/CVE-2020-27619 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 08:09:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 13:09:32 +0000 Subject: [issue41944] [security][CVE-2020-27619] Python testsuite calls eval() on content received via HTTP In-Reply-To: <1601908852.29.0.0266876682235.issue41944@roundup.psfhosted.org> Message-ID: <1604495372.19.0.39346269937.issue41944@roundup.psfhosted.org> STINNER Victor added the comment: The CVE-2020-27619 has been assigned to this issue. ---------- title: [security] Python testsuite calls eval() on content received via HTTP -> [security][CVE-2020-27619] Python testsuite calls eval() on content received via HTTP _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 08:16:33 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 04 Nov 2020 13:16:33 +0000 Subject: [issue35455] Solaris: thread_time doesn't work with current implementation In-Reply-To: <1544452341.93.0.788709270274.issue35455@psf.upfronthosting.co.za> Message-ID: <1604495793.1.0.521714485827.issue35455@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 72bb4c6c1fc5f5209819a2e62d55475ddc888192 by Miss Skeleton (bot) in branch '3.9': bpo-35455: Fix thread_time for Solaris OS (GH-11118) (GH-23130) https://github.com/python/cpython/commit/72bb4c6c1fc5f5209819a2e62d55475ddc888192 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 08:29:28 2020 From: report at bugs.python.org (Jakub Kulik) Date: Wed, 04 Nov 2020 13:29:28 +0000 Subject: [issue35455] Solaris: thread_time doesn't work with current implementation In-Reply-To: <1544452341.93.0.788709270274.issue35455@psf.upfronthosting.co.za> Message-ID: <1604496568.85.0.519791595196.issue35455@roundup.psfhosted.org> Change by Jakub Kulik : ---------- pull_requests: +22057 pull_request: https://github.com/python/cpython/pull/23145 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 08:33:35 2020 From: report at bugs.python.org (Jakub Kulik) Date: Wed, 04 Nov 2020 13:33:35 +0000 Subject: [issue35455] Solaris: thread_time doesn't work with current implementation In-Reply-To: <1544452341.93.0.788709270274.issue35455@psf.upfronthosting.co.za> Message-ID: <1604496815.41.0.46003481317.issue35455@roundup.psfhosted.org> Change by Jakub Kulik : ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 08:47:47 2020 From: report at bugs.python.org (Jordan Williams) Date: Wed, 04 Nov 2020 13:47:47 +0000 Subject: [issue8978] "tarfile.ReadError: file could not be opened successfully" if compiled without zlib In-Reply-To: <1276292933.37.0.137444086026.issue8978@psf.upfronthosting.co.za> Message-ID: <1604497667.17.0.126341996873.issue8978@roundup.psfhosted.org> Jordan Williams added the comment: This issue took me a long time to diagnose when attempting to decompress a bzip2-compressed tarball. This occurs with Python 3.9.0. Since I was using asdf, which uses Pyenv internally, to build and manage my Python version, I failed to notice it was missing development libraries. A slightly more informative message could easily have tipped me off to this in short order. ---------- nosy: +jwillikers type: behavior -> crash versions: +Python 3.9 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 08:58:01 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 13:58:01 +0000 Subject: [issue40512] [subinterpreters] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1604498281.13.0.70209977452.issue40512@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-15751: "Make the PyGILState API compatible with subinterpreters". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 08:58:15 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 13:58:15 +0000 Subject: [issue40522] [subinterpreters] Get the current Python interpreter state from Thread Local Storage (autoTSSkey) In-Reply-To: <1588698734.65.0.223552100195.issue40522@roundup.psfhosted.org> Message-ID: <1604498295.56.0.98389494207.issue40522@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-15751: "Make the PyGILState API compatible with subinterpreters". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 08:58:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 13:58:42 +0000 Subject: [issue15751] [subinterpreters] Make the PyGILState API compatible with subinterpreters In-Reply-To: <1345526301.75.0.455071650321.issue15751@psf.upfronthosting.co.za> Message-ID: <1604498322.47.0.647097637623.issue15751@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-40522: Get the current Python interpreter state from Thread Local Storage (autoTSSkey). ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 09:02:24 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 04 Nov 2020 14:02:24 +0000 Subject: [issue15751] [subinterpreters] Make the PyGILState API compatible with subinterpreters In-Reply-To: <1345526301.75.0.455071650321.issue15751@psf.upfronthosting.co.za> Message-ID: <1604498544.84.0.129163288689.issue15751@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 09:07:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 14:07:32 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604498852.73.0.543984291644.issue1635741@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22058 pull_request: https://github.com/python/cpython/pull/23146 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 09:17:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 14:17:32 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604499452.86.0.507251513758.issue1635741@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22059 pull_request: https://github.com/python/cpython/pull/23147 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 09:19:21 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 04 Nov 2020 14:19:21 +0000 Subject: [issue35455] Solaris: thread_time doesn't work with current implementation In-Reply-To: <1544452341.93.0.788709270274.issue35455@psf.upfronthosting.co.za> Message-ID: <1604499561.59.0.798539618418.issue35455@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset a12f459ec2a31b96a21c735eb18f3d0fd19e99ff by Jakub Kul?k in branch '3.8': [3.8] bpo-35455: Fix thread_time for Solaris OS (GH-11118). (GH-23145) https://github.com/python/cpython/commit/a12f459ec2a31b96a21c735eb18f3d0fd19e99ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 09:43:22 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 04 Nov 2020 14:43:22 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604501002.0.0.933358217908.issue1635741@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +22060 pull_request: https://github.com/python/cpython/pull/23148 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 09:45:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 14:45:21 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter Message-ID: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> New submission from STINNER Victor : This issue is a follow-up of the PEP 567 which introduced the PyConfig C API and is related to PEP 432 which wants to rewrite Modules/getpath.c in Python. I would like to add a new PyInterpreterState_SetConfig() function to be able to reconfigure a Python interpreter in C. One example is to write a custom sys.path, to implement of virtual environment (common request for embedded Python), etc. Currently, it's really complex to tune the Python configuration. The use case is to tune Python for embedded Python. First, I would like to add new functions to the C API for that: * PyInterpreterState_GetConfigCopy() * PyInterpreterState_SetConfig() The second step will to be expose these two functions in Python (I'm not sure where for now), and gives the ablity to tune the Python configuration in pure Python. The site module already does that for sys.path, but it is running "too late" in the Python initialization. Here the idea is to configure Python before it does access any file on disk, after the "core" initialization and before the "main" initialization. One concrete example would be to reimplement Modules/getpath.c in Python, convert it to a frozen module, and run it at Python startup to populate sys.path. It would allow to move some of the site code into this module to run it earlier. Pseudo-code in C: --------------------- void init_core(void) { // "Core" initialization PyConfig config; PyConfig_InitPython(&config); PyConfig._init_main = 0 Py_InitializeFromc(&config); PyConfig_Clear(&config); } void tune_config(void) { PyConfig config; PyConfig_InitPython(&config); // Get a copy of the current configuration PyInterpreterState_GetConfigCopy(&config); // <== NEW API! // ... put your code to tune config ... // dummy example, current not possible in Python config.bytes_warnings = 1; // Reconfigure Python with the updated configuration PyInterpreterState_SetConfig(&config); // <=== NEW API! PyConfig_Clear(&config); } int main() { init_core(); tune_config(); // <=== THE USE CASE! _Py_InitializeMain(); return Py_RunMain(); } --------------------- In this example, tune_config() is implemented in C. But later, it will be possible to convert the configuration to a Python dict and run Python code to tune the configuration. The PEP 587 added a "Multi-Phase Initialization Private Provisional API": * PyConfig._init_main = 0 * _Py_InitializeMain() https://docs.python.org/dev/c-api/init_config.html#multi-phase-initialization-private-provisional-api ---------- components: C API messages: 380327 nosy: vstinner priority: normal severity: normal status: open title: [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 09:52:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 14:52:03 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1604501523.47.0.909750158889.issue42260@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +22061 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23149 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 10:15:57 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 15:15:57 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1604502957.37.0.590732228106.issue42260@roundup.psfhosted.org> STINNER Victor added the comment: New changeset cfb41e80c1ac5940ec6f2246c9ab4a3d16ef757e by Victor Stinner in branch 'master': bpo-42260: Reorganize PyConfig (GH-23149) https://github.com/python/cpython/commit/cfb41e80c1ac5940ec6f2246c9ab4a3d16ef757e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 10:16:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 15:16:02 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1604502962.25.0.63860902288.issue42260@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22062 pull_request: https://github.com/python/cpython/pull/23150 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 10:20:48 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 04 Nov 2020 15:20:48 +0000 Subject: [issue42261] Windows legacy I/O mode mistakenly ignores the device encoding Message-ID: <1604503248.47.0.606925187106.issue42261@roundup.psfhosted.org> New submission from Eryk Sun : In Python 3.8+, legacy standard I/O mode uses the process code page from GetACP instead of the correct device encoding from GetConsoleCP and GetConsoleOutputCP. For example: C:\>chcp 850 Active code page: 850 C:\>set PYTHONLEGACYWINDOWSSTDIO=1 C:\>py -3.7 -c "import sys; print(sys.stdin.encoding)" cp850 C:\>py -3.8 -c "import sys; print(sys.stdin.encoding)" cp1252 C:\>py -3.9 -c "import sys; print(sys.stdin.encoding)" cp1252 This is based on config_init_stdio_encoding() in Python/initconfig.c, which sets config->stdio_encoding via config_get_locale_encoding(). Cannot config->stdio_encoding be set to NULL for default behavior? Computing this ahead of time would require separate encodings config->stdin_encoding, config->stdout_encoding, and config->stderr_encoding. And _Py_device_encoding would have to be duplicated as something like config_get_device_encoding(PyConfig *config, int fd, wchar_t **device_encoding). ---------- components: IO, Interpreter Core, Windows messages: 380329 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Windows legacy I/O mode mistakenly ignores the device encoding type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 10:24:56 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 04 Nov 2020 15:24:56 +0000 Subject: [issue42261] Windows legacy I/O mode mistakenly ignores the device encoding In-Reply-To: <1604503248.47.0.606925187106.issue42261@roundup.psfhosted.org> Message-ID: <1604503496.27.0.886538325467.issue42261@roundup.psfhosted.org> Eryk Sun added the comment: There's a related issue that affects opening duplicated file descriptors and opening "CON", "CONIN$", and "CONOUT$" in legacy I/O mode, but this case has always been broken. For Windows, _Py_device_encoding needs to be generalized to use _get_osfhandle and GetNumberOfConsoleInputEvents to detect and differentiate console input and output, instead of using isatty() and hard coding file descriptors 0-2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 10:34:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 15:34:04 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604504044.18.0.408274530141.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 988f1ec8d2643a0d00851903abcdae90d57ac0e6 by Victor Stinner in branch 'master': bpo-1635741: _contextvars uses PyModule_AddType() (GH-23147) https://github.com/python/cpython/commit/988f1ec8d2643a0d00851903abcdae90d57ac0e6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 10:37:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 15:37:14 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604504234.86.0.106917059406.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 18ce7f1d0a3d65f34f25c5964da588743a1bfe3c by Victor Stinner in branch 'master': bpo-1635741: _ast uses PyModule_AddObjectRef() (GH-23146) https://github.com/python/cpython/commit/18ce7f1d0a3d65f34f25c5964da588743a1bfe3c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 10:42:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 15:42:24 +0000 Subject: [issue42261] Windows legacy I/O mode mistakenly ignores the device encoding In-Reply-To: <1604503248.47.0.606925187106.issue42261@roundup.psfhosted.org> Message-ID: <1604504544.15.0.112310587465.issue42261@roundup.psfhosted.org> STINNER Victor added the comment: > This is based on config_init_stdio_encoding() in Python/initconfig.c, which sets config->stdio_encoding via config_get_locale_encoding(). Cannot config->stdio_encoding be set to NULL for default behavior? I would like to get a PyConfig structure fully populated to make the Python initialization more deterministic and reliable. So PyConfig fully control used encodings. The solution here is to fix config_init_stdio_encoding() to use GetConsoleCP() and GetConsoleOutputCP() to build a "cpXXX" string. This issue seems to be a regression that I introduced in Python 3.8 with the PEP 587 (PyConfig). I didn't notice this subtle case during my refactoring. Relying on os.device_encoding() when the encoding is NULL is not obvious. That's why I prefer to get PyConfig full populated ;-) It would be nice to get an unit test for this case. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 10:44:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 15:44:24 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604504664.73.0.254073789645.issue1635741@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22063 pull_request: https://github.com/python/cpython/pull/23151 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 10:45:48 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 04 Nov 2020 15:45:48 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604504748.01.0.877455404521.issue1635741@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: -christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 10:58:18 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 15:58:18 +0000 Subject: [issue25573] FrameSummary repr() does not support previously working uses of repr in traceback module In-Reply-To: <1446845666.11.0.0803768990935.issue25573@psf.upfronthosting.co.za> Message-ID: <1604505498.55.0.0782680380923.issue25573@roundup.psfhosted.org> Irit Katriel added the comment: I think the fourth element (the code line) was omitted from repr because it is not one of the constructor args for FrameSummary (it is derived from them), so it's redundant in terms of describing this instance. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 11:13:08 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 04 Nov 2020 16:13:08 +0000 Subject: [issue42261] Windows legacy I/O mode mistakenly ignores the device encoding In-Reply-To: <1604503248.47.0.606925187106.issue42261@roundup.psfhosted.org> Message-ID: <1604506388.67.0.290415099198.issue42261@roundup.psfhosted.org> Eryk Sun added the comment: > The solution here is to fix config_init_stdio_encoding() to use > GetConsoleCP() and GetConsoleOutputCP() to build a "cpXXX" string. But, as I mentioned, that's only possible by replacing config->stdio_encoding with three separate settings: config->stdin_encoding, config->stdout_encoding, and config->stderr_encoding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 11:16:10 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 16:16:10 +0000 Subject: [issue30384] traceback.TracebackException.format shouldn't format_exc_only() when __traceback__ is None In-Reply-To: <1494993815.34.0.567809017687.issue30384@psf.upfronthosting.co.za> Message-ID: <1604506570.72.0.314587406905.issue30384@roundup.psfhosted.org> Irit Katriel added the comment: Setting __traceback__ to None is not going to make the exception disappear. Note that TracebackException does not represent a traceback, it represent an exception (for rendering in tracebacks). So all information of the exception is rendered by TracebackException.format(), not only the exception's traceback. It's not entirely clear to me what you are trying to do (what is the output you are hoping to get?) but this looks more like a question than a bug report, so I am closing this issue. If this is still relevant, I'd suggest you ask on the python users list or StackOverflow - you are more likely to receive a prompt response there. ---------- nosy: +iritkatriel resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 11:20:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 16:20:34 +0000 Subject: [issue42262] [C API] Add Py_NewRef() function to get a new strong reference to an object Message-ID: <1604506834.94.0.230929451807.issue42262@roundup.psfhosted.org> New submission from STINNER Victor : In C, the following pattern (A) is very common: Py_INCREF(sysdict); interp->sysdict = sysdict; * (1) Increment the reference counter * (2) Store a reference to the object somewhere Similar pattern (B) using return: Py_INCREF(temp); return temp; The problem in these patterns is that the object has to be written twice. I propose to add a simple new Py_NewRef() function which returns a new strong reference. In short, it's just: static inline PyObject* Py_NewRef(PyObject *obj) { Py_INCREF(obj); return obj; } (The actual implementation is just a little bit more complex, to also export it as a regular function.) Pattern (A) becomes: interp->sysdict = Py_NewRef(sysdict); Pattern (B) becomes: return Py_NewRef(temp); Py_NewRef() might help to prepare a C extension to be converted to HPy which uses a HPy_Dup() function. HPy_Dup() is different than "Py_INCREF(obj), obj" for subtle reasons. I let you dig into HPy documentation for the rationale: https://hpy.readthedocs.io/en/latest/api.html#handles Even if you ignore HPy, Py_NewRef() avoids to repeat the object variable, and so makes the code simpler. Simple example: -#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None +#define Py_RETURN_NONE return Py_NewRef(Py_None) ---------- components: C API messages: 380337 nosy: vstinner priority: normal severity: normal status: open title: [C API] Add Py_NewRef() function to get a new strong reference to an object versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 11:23:03 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 16:23:03 +0000 Subject: [issue14655] traceback module docs should show how to print/fomat an exception object In-Reply-To: <1335216172.17.0.173976069373.issue14655@psf.upfronthosting.co.za> Message-ID: <1604506983.52.0.548021804875.issue14655@roundup.psfhosted.org> Irit Katriel added the comment: As of 3.5 there is this option: traceback.TracebackException.from_exception(exc).format() Perhaps that can be mentioned in the doc for traceback.format_exception(). ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, iritkatriel versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 11:24:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 16:24:25 +0000 Subject: [issue42262] [C API] Add Py_NewRef() function to get a new strong reference to an object In-Reply-To: <1604506834.94.0.230929451807.issue42262@roundup.psfhosted.org> Message-ID: <1604507065.21.0.357729146243.issue42262@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +22064 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23152 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 11:31:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 16:31:42 +0000 Subject: [issue42262] [C API] Add Py_NewRef() function to get a new strong reference to an object In-Reply-To: <1604506834.94.0.230929451807.issue42262@roundup.psfhosted.org> Message-ID: <1604507502.92.0.739493354041.issue42262@roundup.psfhosted.org> STINNER Victor added the comment: > The problem in these patterns is that the object has to be written twice. I'm talking about the variable name which has to be repeated (written twice) in the source code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 11:32:56 2020 From: report at bugs.python.org (Simon Cross) Date: Wed, 04 Nov 2020 16:32:56 +0000 Subject: [issue42262] [C API] Add Py_NewRef() function to get a new strong reference to an object In-Reply-To: <1604506834.94.0.230929451807.issue42262@roundup.psfhosted.org> Message-ID: <1604507576.34.0.765103462155.issue42262@roundup.psfhosted.org> Change by Simon Cross : ---------- nosy: +hodgestar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 11:33:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 16:33:16 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604507596.59.0.716325581809.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 58ca33b4674f39189b03c9a39fa7b676b43b3d08 by Victor Stinner in branch 'master': bpo-1635741: Fix ref leak in _PyWarnings_Init() error path (GH-23151) https://github.com/python/cpython/commit/58ca33b4674f39189b03c9a39fa7b676b43b3d08 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 11:34:36 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 16:34:36 +0000 Subject: [issue12535] Chained tracebacks are confusing because the first traceback is minimal In-Reply-To: <1310405583.64.0.419150537523.issue12535@psf.upfronthosting.co.za> Message-ID: <1604507676.37.0.728789511263.issue12535@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.9 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 11:34:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 16:34:40 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1604507680.24.0.637924552883.issue42260@roundup.psfhosted.org> STINNER Victor added the comment: New changeset af1d64d9f7a7cf673279725fdbaf4adcca51d41f by Victor Stinner in branch 'master': bpo-42260: Main init modify sys.flags in-place (GH-23150) https://github.com/python/cpython/commit/af1d64d9f7a7cf673279725fdbaf4adcca51d41f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 11:45:10 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 16:45:10 +0000 Subject: [issue16855] traceback module leaves off module name in last line of formatted tracebacks In-Reply-To: <1357249745.89.0.552193091281.issue16855@psf.upfronthosting.co.za> Message-ID: <1604508310.31.0.69419070545.issue16855@roundup.psfhosted.org> Irit Katriel added the comment: This is a python 2 only issue. ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 11:50:47 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 04 Nov 2020 16:50:47 +0000 Subject: [issue42261] Windows legacy I/O mode mistakenly ignores the device encoding In-Reply-To: <1604503248.47.0.606925187106.issue42261@roundup.psfhosted.org> Message-ID: <1604508647.71.0.209141877351.issue42261@roundup.psfhosted.org> Eryk Sun added the comment: > It would be nice to get an unit test for this case. The process code page from GetACP() is either an ANSI code page or CP_UTF8 (65001). It should never be a Western OEM code page such as 850. In that case, a reliable unit test would check that the configured encoding is a particular OEM code page. For example, spawn a new interpreter in a windowless console session (i.e. creationflags=CREATE_NO_WINDOW). Set the session's input code page to 850 via ctypes.WinDLL('kernel32').SetConsoleCP(850). Set os.environ['PYTHONLEGACYWINDOWSSTDIO'] = '1'. Then spawn [sys.executable, '-c', 'import sys; print(sys.stdin.encoding)'], and verify that the output is 'cp850'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 12:01:30 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 17:01:30 +0000 Subject: [issue19206] Support disabling file I/O when doing traceback formatting In-Reply-To: <1381324623.16.0.375897659555.issue19206@psf.upfronthosting.co.za> Message-ID: <1604509290.46.0.572594654162.issue19206@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 12:10:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 17:10:03 +0000 Subject: [issue40747] sysconfig.get_config_var("py_version_nodot") should return 3_10 In-Reply-To: <1590266866.08.0.16909581495.issue40747@roundup.psfhosted.org> Message-ID: <1604509803.26.0.961979309023.issue40747@roundup.psfhosted.org> STINNER Victor added the comment: Links about the "AssertionError: would build wheel with unsupported tag ('cp310', 'cp310', 'linux_x86_64')" error: * PEP 641 -- Using an underscore in the version portion of Python 3.10 compatibility tags https://www.python.org/dev/peps/pep-0641/ * PEP 641 discussion: https://discuss.python.org/t/pep-641-using-an-underscore-in-the-version-portion-of-python-3-10-compatibility-tags/5513 * CPython PR 20333: "bpo-40747: Make py_version_nodot 3_10 not 310" https://github.com/python/cpython/pull/20333 * wheel: "Fails to build wheel for Python 3.10" https://github.com/pypa/wheel/issues/354 * python3-setuptools: "python-setuptools fails to build with Python 3.10: AssertionError: would build wheel with unsupported tag ('cp310', 'cp310', 'linux_x86_64')" https://bugzilla.redhat.com/show_bug.cgi?id=1891840 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 12:19:43 2020 From: report at bugs.python.org (Steve Dower) Date: Wed, 04 Nov 2020 17:19:43 +0000 Subject: [issue42252] Embeddable Python indicates that it uses PYTHONPATH In-Reply-To: <1604409442.14.0.226700475813.issue42252@roundup.psfhosted.org> Message-ID: <1604510383.16.0.926905669853.issue42252@roundup.psfhosted.org> Steve Dower added the comment: > I'd been expecting this was commonly used as the way to give access to python3X.dll. Yeah, both. The idea is to delete the files you don't want - so if you don't need python.exe, just don't include it. Same goes for some of the native modules (e.g. deleting _socket.pyd and _ssl.pyd are an easy way to make sure you aren't offering networking). > I've been mostly focusing on `PYTHONPATH` because that's where I encountered the issue. Which if any of the other env variables are respected? It's the equivalent of passing -I. That's the flag that gets set when a ._pth is detected: PC/getpathp.c#L563 > Would there be an argument to add additional command line options that could be used as a more secure alternative to the env variables? ... Maybe this doesn't make sense since you said it is the ._pth that causes this...just thinking aloud. Yeah, the ._pth file is the more secure alternative. To change the import search path, an attacker has to be able to modify a (likely admin-only) file on disk, rather than just launching an executable with a specific command line. (For a bit more context, many exploits try to schedule tasks, which allows arbitrary executable path and arguments. So anything resembling a security feature can't be allowed to be overridden by environment or arguments.) > The two options you mention (modify ._pth and append to sys.path) aren't great because we 1) would prefer to use the un-modified python distro 2) don't own the scripts that we are embedding, they are from a 3rd party so modifications are complicated. None of the other options are better :) Overriding the ._pth file should just be a matter of replacing the file. It's deliberately relative to its location, which means it should almost always be static. If you need your embedded interpreter to pick up paths from the local environment, just delete the file instead of updating it (which will make your copy of Python exploitable, but that's the tradeoff). I don't know what your particular scripts look like, but I've had to go through and modify a number of third-party packages to make them work with this kind of setup. It's certainly possible to work around the limitation in a number of ways, often transparently to the code that's eventually going to be executed - the runpy module is often helpful. (And yeah, an attacker could do it as well, just not as trivially as it would be without the restriction.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 12:34:38 2020 From: report at bugs.python.org (Mattias Amnefelt) Date: Wed, 04 Nov 2020 17:34:38 +0000 Subject: [issue1346874] httplib simply ignores CONTINUE Message-ID: <1604511278.74.0.794069450313.issue1346874@roundup.psfhosted.org> Change by Mattias Amnefelt : ---------- nosy: +Mattias Amnefelt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 12:37:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 17:37:29 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604511449.48.0.836845800091.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 7184218e186811e75be663be78e57d5302bf8af6 by Mohamed Koubaa in branch 'master': bpo-1635741: Fix PyInit_pyexpat() error handling (GH-22489) https://github.com/python/cpython/commit/7184218e186811e75be663be78e57d5302bf8af6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 12:55:49 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 17:55:49 +0000 Subject: [issue1514420] Traceback display code can attempt to open a file named "" Message-ID: <1604512549.23.0.948185870217.issue1514420@roundup.psfhosted.org> Irit Katriel added the comment: I was able to reproduce it on 3.8, but I'm confused about where the open is happening because linecache.updatecache tries to avoid this: if not filename or (filename.startswith('<') and filename.endswith('>')): return [] ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 13:00:34 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 18:00:34 +0000 Subject: [issue23915] [doc] traceback set with BaseException.with_traceback() pushed back on raise In-Reply-To: <1428769760.16.0.251757749986.issue23915@psf.upfronthosting.co.za> Message-ID: <1604512834.86.0.236764241626.issue23915@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: traceback set with BaseException.with_traceback() overwritten on raise -> [doc] traceback set with BaseException.with_traceback() pushed back on raise versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 13:07:33 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 04 Nov 2020 18:07:33 +0000 Subject: [issue42262] [C API] Add Py_NewRef() function to get a new strong reference to an object In-Reply-To: <1604506834.94.0.230929451807.issue42262@roundup.psfhosted.org> Message-ID: <1604513253.83.0.590459587238.issue42262@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 13:17:04 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 18:17:04 +0000 Subject: [issue11007] stack tracebacks should give the relevant class name In-Reply-To: <1295968345.3.0.31737747868.issue11007@psf.upfronthosting.co.za> Message-ID: <1604513824.78.0.33410601761.issue11007@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 13:39:26 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Wed, 04 Nov 2020 18:39:26 +0000 Subject: [issue42237] test_socket.SendfileUsingSendfileTest fails on illumos In-Reply-To: <1604261267.98.0.369045235153.issue42237@roundup.psfhosted.org> Message-ID: <1604515166.57.0.11030113094.issue42237@roundup.psfhosted.org> Jakub Stasiak added the comment: I thought I'd give it a shot and I believe i found the issue. Let's use the testCount test as an example. The client side (or the data sending side) looks like this: def _testCount(self): address = self.serv.getsockname() file = open(os_helper.TESTFN, 'rb') sock = socket.create_connection(address, timeout=support.LOOPBACK_TIMEOUT) with sock, file: count = 5000007 meth = self.meth_from_sock(sock) sent = meth(file, count=count) self.assertEqual(sent, count) self.assertEqual(file.tell(), count) So we're sending 5000007 bytes of data at once to a socket that has a timeout of 5.0 seconds set (default in those tests). Somewhere along the way socket._sendfile_use_sendfile() is called and in it there's a loop: try: while True: (...) try: sent = os_sendfile(sockno, fileno, offset, blocksize) except BlockingIOError: if not timeout: # Block until the socket is ready to send some # data; avoids hogging CPU resources. selector_select() continue (...) return total_sent On my test VM running openindiana 5.11 (I think that's the version number?) this is basically an infinite loop (I think it'll end at some point, but I didn't have the patience to verify this). That's because trying to send 5000007 bytes to that socket with 5 seconds timeout will trigger BlockingIOError. Why? This is the relevant part of os.sendfile() implementation from posixmodule.c: do { Py_BEGIN_ALLOW_THREADS ret = sendfile(out_fd, in_fd, &offset, count); Py_END_ALLOW_THREADS } while (ret < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals())); if (ret < 0) return (!async_err) ? posix_error() : NULL; return Py_BuildValue("n", ret); offset is 0 in our case, but its exact value doesn't matter. The trouble is this is what illumos sendfile man page[1] says: RETURN VALUES (...) In some error cases sendfile() may still write some data before encountering an error and returning -1. When that occurs, off is updated to point to the byte that follows the last byte copied and should be compared with its value before calling sendfile() to determine how much data was sent. After some input from Jakub Kulik I believe this is a unique behavior (Linux, Oracle Solaris, Mac OS, FreeBSD and likely all or almost all other OSes don't do this) and it lacks handling on the Python side. I tested this and indeed the sendfile(out_fd, in_fd, &offset, count) call *does* do partial writes in our case which gets reported as EAGAIN which gets converted to BlockingIOError which makes socket._sendfile_use_sendfile() retry again and again, each time resending the very beginning of the data and not going any further, therefore accumulating a lot of garbage on the receiving socket's side. This patch works for me and I run the whole test_socket test suite with it, no more failures: diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 203f98515dfd..eeff11b5b8ea 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -9475,13 +9475,20 @@ os_sendfile_impl(PyObject *module, int out_fd, int in_fd, PyObject *offobj, } #endif + off_t original_offset = offset; do { Py_BEGIN_ALLOW_THREADS ret = sendfile(out_fd, in_fd, &offset, count); Py_END_ALLOW_THREADS } while (ret < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals())); - if (ret < 0) - return (!async_err) ? posix_error() : NULL; + if (ret < 0) { + if (offset != original_offset) { + ret = offset - original_offset; + } + else { + return (!async_err) ? posix_error() : NULL; + } + } return Py_BuildValue("n", ret); #endif } If it's verified to be a good change I'm happy to resubmit it in a PR with appropriate illumos-specific #ifndefs. [1] https://illumos.org/man/3ext/sendfile ---------- nosy: +jstasiak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 13:46:08 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 18:46:08 +0000 Subject: [issue34463] Discrepancy between traceback.print_exception and sys.__excepthook__ In-Reply-To: <1534964466.61.0.56676864532.issue34463@psf.upfronthosting.co.za> Message-ID: <1604515568.16.0.279444034537.issue34463@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.10: Running Release|Win32 interpreter... Python 3.10.0a1+ (heads/exceptionGroup-stage1-dirty:928c211ad8, Oct 28 2020, 14:36:37) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> raise SyntaxError("some message") Traceback (most recent call last): File "", line 1, in SyntaxError: some message >>> import traceback >>> import sys >>> sys.excepthook = traceback.print_exception >>> raise SyntaxError("some message") Traceback (most recent call last): File "", line 1, in File "", line None SyntaxError: some message ---------- components: +Library (Lib) -Demos and Tools nosy: +iritkatriel versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 14:22:07 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 19:22:07 +0000 Subject: [issue14379] Several traceback docs improvements In-Reply-To: <1332328007.08.0.704590425302.issue14379@psf.upfronthosting.co.za> Message-ID: <1604517727.09.0.775423066023.issue14379@roundup.psfhosted.org> Irit Katriel added the comment: Closing this issue is out of date. Most if not all of the points mentioned have been resolved by now, and there is also a section on traceback objects [1] which is linked from the exc_info doc [2]. [1] https://docs.python.org/3/reference/datamodel.html#traceback-objects [2] https://docs.python.org/3/library/sys.html#sys.exc_info ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 14:32:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 19:32:02 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604518322.33.0.952025398.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 789359f47c2a744caa9a405131706099fd7ad6bd by Erlend Egeberg Aasland in branch 'master': bpo-1635741: _sqlite3 uses PyModule_AddObjectRef() (GH-23148) https://github.com/python/cpython/commit/789359f47c2a744caa9a405131706099fd7ad6bd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 14:41:49 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 19:41:49 +0000 Subject: [issue38197] Meaning of tracebacklimit differs between sys.tracebacklimit and traceback module In-Reply-To: <1568716495.17.0.305052685385.issue38197@roundup.psfhosted.org> Message-ID: <1604518909.41.0.449614283681.issue38197@roundup.psfhosted.org> Irit Katriel added the comment: If you change your script to do sys.tracebacklimit = abs(limit) and run it with arg -3, then you get the output you expect: C:\Users\User\src\cpython>python.bat x.py -3 Running Release|Win32 interpreter... limit -3 from traceback module: Traceback (most recent call last): File "C:\Users\User\src\cpython\x.py", line 14, in x3 x2() File "C:\Users\User\src\cpython\x.py", line 12, in x2 x1() File "C:\Users\User\src\cpython\x.py", line 10, in x1 1 / 0 ZeroDivisionError: division by zero from interpreter: Traceback (most recent call last): File "C:\Users\User\src\cpython\x.py", line 14, in x3 x2() File "C:\Users\User\src\cpython\x.py", line 12, in x2 x1() File "C:\Users\User\src\cpython\x.py", line 10, in x1 1 / 0 ZeroDivisionError: division by zero The documentation for traceback mentions the possibility of using negative limits and their meaning: Print up to limit stack trace entries from traceback object tb (starting from the caller?s frame) if limit is positive. Otherwise, print the last abs(limit) entries. https://docs.python.org/3/library/traceback.html#traceback.print_tb ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 14:42:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 19:42:29 +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: <1604518949.41.0.854408297207.issue40170@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22065 pull_request: https://github.com/python/cpython/pull/23153 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 14:42:45 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 04 Nov 2020 19:42:45 +0000 Subject: [issue42263] Removing thread reference in thread results in leaked reference Message-ID: <1604518965.9.0.468423053621.issue42263@roundup.psfhosted.org> New submission from Jason R. Coombs : In issue37193, I'd worked on an implementation in which a thread reference would be removed as the thread was closing, but this led to a memory leak caught by the buildbots (https://bugs.python.org/issue37193#msg380172). As I tracked down the issue in GH-23127, I discovered that removing the reference to the thread from within the thread triggered the reference leak detection. I've distilled that behavior into its own test which fails on master: ``` cpython master $ git diff diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index e0e5406ac2..2b4924d4d0 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -443,6 +443,15 @@ def _run(self, other_ref, yet_another): msg=('%d references still around' % sys.getrefcount(weak_raising_cyclic_object()))) + def test_remove_thread_ref_in_thread(self): + def remove_ref(): + threads[:] = [] + + threads = [ + threading.Thread(target=remove_ref), + ] + threads[0].start() + def test_old_threading_api(self): # Just a quick sanity check to make sure the old method names are # still present ``` Running that test with refcount checks leads to this failure: ``` cpython master $ ./python.exe Tools/scripts/run_tests.py -R 3:3 test.test_threading -m test_remove_thread_ref_in_thread /Users/jaraco/code/public/cpython/python.exe -u -W default -bb -E -m test -r -w -j 0 -u all,-largefile,-audio,-gui -R 3:3 test.test_threading -m test_remove_thread_ref_in_thread Using random seed 8650903 0:00:00 load avg: 1.76 Run tests in parallel using 10 child processes 0:00:01 load avg: 1.78 [1/1/1] test.test_threading failed == Tests result: FAILURE == 1 test failed: test.test_threading 0:00:01 load avg: 1.78 0:00:01 load avg: 1.78 Re-running failed tests in verbose mode 0:00:01 load avg: 1.78 Re-running test.test_threading in verbose mode beginning 6 repetitions 123456 ...... test.test_threading leaked [1, 1, 1] references, sum=3 test.test_threading leaked [3, 1, 1] memory blocks, sum=5 beginning 6 repetitions 123456 test_remove_thread_ref_in_thread (test.test_threading.ThreadTests) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.001s OK .test_remove_thread_ref_in_thread (test.test_threading.ThreadTests) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.001s OK .test_remove_thread_ref_in_thread (test.test_threading.ThreadTests) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.001s OK .test_remove_thread_ref_in_thread (test.test_threading.ThreadTests) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.001s OK .test_remove_thread_ref_in_thread (test.test_threading.ThreadTests) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.001s OK .test_remove_thread_ref_in_thread (test.test_threading.ThreadTests) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.001s OK . test.test_threading leaked [1, 1, 1] references, sum=3 test.test_threading leaked [1, 1, 1] memory blocks, sum=3 1 test failed again: test.test_threading == Tests result: FAILURE then FAILURE == 1 test failed: test.test_threading 1 re-run test: test.test_threading Total duration: 2.0 sec Tests result: FAILURE then FAILURE ``` Is that behavior by design? Is it simply not possible to remove a reference to a thread from within the thread? ---------- messages: 380353 nosy: jaraco priority: normal severity: normal status: open title: Removing thread reference in thread results in leaked reference versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 14:43:56 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 04 Nov 2020 19:43:56 +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: <1604519036.75.0.630627569756.issue37193@roundup.psfhosted.org> Jason R. Coombs added the comment: I filed issue42263 to capture the underlying cause of the memory leak that led to the buildbot failures and the rollback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 14:48:39 2020 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Wed, 04 Nov 2020 19:48:39 +0000 Subject: [issue38197] Meaning of tracebacklimit differs between sys.tracebacklimit and traceback module In-Reply-To: <1568716495.17.0.305052685385.issue38197@roundup.psfhosted.org> Message-ID: <1604519319.53.0.366494849539.issue38197@roundup.psfhosted.org> Carl Friedrich Bolz-Tereick added the comment: It's still inconsistent between the two ways to get a traceback, and the inconsistency is not documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 15:01:31 2020 From: report at bugs.python.org (Sebastian Wiedenroth) Date: Wed, 04 Nov 2020 20:01:31 +0000 Subject: [issue42237] test_socket.SendfileUsingSendfileTest fails on illumos In-Reply-To: <1604261267.98.0.369045235153.issue42237@roundup.psfhosted.org> Message-ID: <1604520091.32.0.438391327496.issue42237@roundup.psfhosted.org> Sebastian Wiedenroth added the comment: Excellent analysis, that's it! I've also tested your patch on SmartOS and it works great. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 15:03:08 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 04 Nov 2020 20:03:08 +0000 Subject: [issue42131] [zipimport] Update zipimport to use specs In-Reply-To: <1603490733.54.0.490063164948.issue42131@roundup.psfhosted.org> Message-ID: <1604520188.3.0.236462572597.issue42131@roundup.psfhosted.org> Change by Brett Cannon : ---------- superseder: -> zipimport is not PEP 3147 or PEP 488 compliant _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 15:03:15 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 04 Nov 2020 20:03:15 +0000 Subject: [issue42131] [zipimport] Update zipimport to use specs In-Reply-To: <1603490733.54.0.490063164948.issue42131@roundup.psfhosted.org> Message-ID: <1604520195.37.0.975544881343.issue42131@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 15:19:56 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Nov 2020 20:19:56 +0000 Subject: [issue42263] Removing thread reference in thread results in leaked reference In-Reply-To: <1604518965.9.0.468423053621.issue42263@roundup.psfhosted.org> Message-ID: <1604521196.47.0.81367518333.issue42263@roundup.psfhosted.org> Ronald Oussoren added the comment: Could this be a race condition? The thread that's created in the test is not waited on (join), it may or may not have exited by the time the test function returns. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 15:34:06 2020 From: report at bugs.python.org (Jakub Kulik) Date: Wed, 04 Nov 2020 20:34:06 +0000 Subject: [issue42237] test_socket.SendfileUsingSendfileTest fails on illumos In-Reply-To: <1604261267.98.0.369045235153.issue42237@roundup.psfhosted.org> Message-ID: <1604522046.45.0.606118547113.issue42237@roundup.psfhosted.org> Jakub Kulik added the comment: I did some further digging, and this is indeed not possible on Oracle Solaris (that is, sendfile() cannot write bytes and fail during the same call). We considered this a bug and changed/fixed it several years ago. Manual page doesn't mention that either: https://docs.oracle.com/cd/E88353_01/html/E37843/sendfile-3c.html I am not sure whether Illumos will want to change this as well (probably not since it is mentioned in the man page as expected behavior), but either way, the proposed change doesn't harm Oracle Solaris because 'if (offset != original_offset)' can never be true. ---------- nosy: +kulikjak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 15:41:17 2020 From: report at bugs.python.org (Aaron Meurer) Date: Wed, 04 Nov 2020 20:41:17 +0000 Subject: [issue30384] traceback.TracebackException.format shouldn't format_exc_only() when __traceback__ is None In-Reply-To: <1494993815.34.0.567809017687.issue30384@psf.upfronthosting.co.za> Message-ID: <1604522477.63.0.352990323059.issue30384@roundup.psfhosted.org> Aaron Meurer added the comment: > It's not entirely clear to me what you are trying to do (what is the output you are hoping to get?) but this looks more like a question than a bug report, so I am closing this issue. If this is still relevant, I'd suggest you ask on the python users list or StackOverflow - you are more likely to receive a prompt response there. If you don't understand an issue, the correct response isn't to close it because you don't understand it. If an issue is unclear, you should ask for clarification, not insult the person who opened it. What you described *is* the bug report. If you read even the title you would see that the report is that setting __traceback__ to None doesn't affect the printing of the exception. ---------- nosy: +asmeurer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 15:52:08 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 20:52:08 +0000 Subject: [issue30384] traceback.TracebackException.format shouldn't format_exc_only() when __traceback__ is None In-Reply-To: <1494993815.34.0.567809017687.issue30384@psf.upfronthosting.co.za> Message-ID: <1604523128.18.0.345159196535.issue30384@roundup.psfhosted.org> Irit Katriel added the comment: I had no intention to insult you and apologize if I did. I assumed that you forgot about this issue since you didn't chase it for 3 years, but you are right that I should have asked. I am reopening it so that you can explain the question. Since you didn't get a response so far, I'm probably not the only one who needs that. What do you mean by "completely hide an exception", and why do you think that setting __traceback__ to None should achieve that? ---------- resolution: not a bug -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 15:58:50 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 20:58:50 +0000 Subject: [issue30384] traceback.TracebackException.format shouldn't format_exc_only() when __traceback__ is None In-Reply-To: <1494993815.34.0.567809017687.issue30384@psf.upfronthosting.co.za> Message-ID: <1604523530.01.0.39702791047.issue30384@roundup.psfhosted.org> Change by Irit Katriel : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:02:50 2020 From: report at bugs.python.org (Aaron Meurer) Date: Wed, 04 Nov 2020 21:02:50 +0000 Subject: [issue30384] traceback.TracebackException.format shouldn't format_exc_only() when __traceback__ is None In-Reply-To: <1494993815.34.0.567809017687.issue30384@psf.upfronthosting.co.za> Message-ID: <1604523770.68.0.264027615758.issue30384@roundup.psfhosted.org> Aaron Meurer added the comment: I think I found another way to achieve what I was trying to do, which is why I never pursued this. But I still think it's a bug. __traceback__ = None isn't documented anywhere that I could find, so I was only able to deduce how it should work from reading the source code. If it is documented somewhere let me know. I admit my initial report is a bit unclear. If you play with the test.py you can see what is going on import traceback try: raise ValueError except Exception as e: e.__traceback__ = None try: raise TypeError except: traceback.print_exc() produces this output: ValueError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "test.py", line 8, in raise TypeError TypeError My goal is to completely hide the caught exception in the traceback printed from the traceback module. It seems odd that it hides everything except for the actual ValueError. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:12:39 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Wed, 04 Nov 2020 21:12:39 +0000 Subject: [issue42237] test_socket.SendfileUsingSendfileTest fails on illumos In-Reply-To: <1604261267.98.0.369045235153.issue42237@roundup.psfhosted.org> Message-ID: <1604524359.56.0.900492304978.issue42237@roundup.psfhosted.org> Change by Jakub Stasiak : ---------- pull_requests: +22066 pull_request: https://github.com/python/cpython/pull/23154 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:15:08 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Wed, 04 Nov 2020 21:15:08 +0000 Subject: [issue42237] test_socket.SendfileUsingSendfileTest fails on illumos In-Reply-To: <1604261267.98.0.369045235153.issue42237@roundup.psfhosted.org> Message-ID: <1604524507.99.0.592733436149.issue42237@roundup.psfhosted.org> Jakub Stasiak added the comment: Thank you! I submitted a PR with a slightly modified patch (the comparison only happens on Solaris family of systems), I'd appreciate your confirmation that it still works (it's working for me on openindiana). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:24:26 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 04 Nov 2020 21:24:26 +0000 Subject: [issue42264] Deprecate or remove sqlite3.OptimizedUnicode Message-ID: <1604525066.61.0.869187561497.issue42264@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : Ref. discussion on GH-23148: https://github.com/python/cpython/pull/23148#discussion_r517536083 OptimizedUnicode was obsoleted and undocumented in Python 3.3 (see commit 86dc732f1f). Suggesting to either deprecate OptimizedUnicode in 3.10 and remove it in 3.11, or just simply remove it in 3.10. Relevant history: 48b13f0427 (undoc) bc35bebb45 (clean up and undoc, closing bpo-13921) (Pablo, adding you to nosy since you're the release manager; hope that's ok) ---------- components: Library (Lib) messages: 380363 nosy: berker.peksag, erlendaasland, pablogsal, vstinner priority: normal severity: normal status: open title: Deprecate or remove sqlite3.OptimizedUnicode versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:27:46 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 21:27:46 +0000 Subject: [issue30384] traceback.TracebackException.format shouldn't format_exc_only() when __traceback__ is None In-Reply-To: <1494993815.34.0.567809017687.issue30384@psf.upfronthosting.co.za> Message-ID: <1604525266.3.0.464161338344.issue30384@roundup.psfhosted.org> Irit Katriel added the comment: The traceback is only one part of an exception. It is simply a list of frames that show where the exception travelled between being raised and being caught. An exception contains information about an error, including the type of the exception, sometimes some parameters like an exception message, and sometimes a traceback. When exception is just created and before it is ever raised, its traceback is None. But you can still print the rest of the information in it (its type and args). I guess you're saying that the __context__ exception of the TypeError in your example has an empty traceback, which means it was never raised, which doesn't make sense because then how did it end up being the __context__ of another exception? Yeah, __context__ is in a funny state, and the traceback module doesn't try to inspect it and interpret what you may have meant by doing that, it just prints the exception like it prints any other exception and you get a funny output. I still don't a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:35:07 2020 From: report at bugs.python.org (Anatoliy Platonov) Date: Wed, 04 Nov 2020 21:35:07 +0000 Subject: [issue42265] Remove binhex module following PEP-594 Message-ID: <1604525707.18.0.925908508614.issue42265@roundup.psfhosted.org> New submission from Anatoliy Platonov : https://www.python.org/dev/peps/pep-0594/#id163 ---------- components: Library (Lib), Tests messages: 380365 nosy: p4m-dev priority: normal severity: normal status: open title: Remove binhex module following PEP-594 versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:35:52 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 04 Nov 2020 21:35:52 +0000 Subject: [issue26216] run runtktests.py error when test tkinter In-Reply-To: <1453901780.17.0.263140202656.issue26216@psf.upfronthosting.co.za> Message-ID: <1604525752.86.0.433898704173.issue26216@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:36:36 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 04 Nov 2020 21:36:36 +0000 Subject: [issue26205] Better specify number of nested scopes In-Reply-To: <1453774587.84.0.143729632402.issue26205@psf.upfronthosting.co.za> Message-ID: <1604525796.79.0.28166714355.issue26205@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:36:58 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 04 Nov 2020 21:36:58 +0000 Subject: [issue26153] PyImport_GetModuleDict: no module dictionary! when `__del__` triggers a warning In-Reply-To: <1453205670.9.0.210259286868.issue26153@psf.upfronthosting.co.za> Message-ID: <1604525818.72.0.201885343536.issue26153@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:37:09 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 04 Nov 2020 21:37:09 +0000 Subject: [issue26137] [idea] use the Microsoft Antimalware Scan Interface In-Reply-To: <1453023852.0.0.39090079449.issue26137@psf.upfronthosting.co.za> Message-ID: <1604525829.18.0.100002126475.issue26137@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:37:20 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 04 Nov 2020 21:37:20 +0000 Subject: [issue26031] Add stat caching option to pathlib In-Reply-To: <1452120089.84.0.0792910513701.issue26031@psf.upfronthosting.co.za> Message-ID: <1604525840.29.0.230289396389.issue26031@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:38:44 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 04 Nov 2020 21:38:44 +0000 Subject: [issue26388] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True) In-Reply-To: <1455835021.39.0.133039555561.issue26388@psf.upfronthosting.co.za> Message-ID: <1604525924.08.0.971719204028.issue26388@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:39:05 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 04 Nov 2020 21:39:05 +0000 Subject: [issue26300] "unpacked" bytecode In-Reply-To: <1454710664.23.0.316699327961.issue26300@psf.upfronthosting.co.za> Message-ID: <1604525945.33.0.505242598572.issue26300@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:39:41 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 04 Nov 2020 21:39:41 +0000 Subject: [issue26285] Garbage collection of unused input sections from CPython binaries In-Reply-To: <1454601388.85.0.405033419332.issue26285@psf.upfronthosting.co.za> Message-ID: <1604525981.53.0.12493470964.issue26285@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:39:52 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 04 Nov 2020 21:39:52 +0000 Subject: [issue26584] pyclbr module needs to be more flexible on loader support In-Reply-To: <1458238800.08.0.676127110581.issue26584@psf.upfronthosting.co.za> Message-ID: <1604525992.01.0.609731536396.issue26584@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:40:56 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 04 Nov 2020 21:40:56 +0000 Subject: [issue26394] Have argparse provide ability to require a fallback value be present In-Reply-To: <1455985031.95.0.488150837583.issue26394@psf.upfronthosting.co.za> Message-ID: <1604526056.38.0.260139968412.issue26394@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:43:41 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 04 Nov 2020 21:43:41 +0000 Subject: [issue26031] Add stat caching option to pathlib In-Reply-To: <1452120089.84.0.0792910513701.issue26031@psf.upfronthosting.co.za> Message-ID: <1604526221.51.0.957643767805.issue26031@roundup.psfhosted.org> Guido van Rossum added the comment: Okay, I am giving up on this. ---------- resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:43:51 2020 From: report at bugs.python.org (Aaron Meurer) Date: Wed, 04 Nov 2020 21:43:51 +0000 Subject: [issue30384] traceback.TracebackException.format shouldn't format_exc_only() when __traceback__ is None In-Reply-To: <1494993815.34.0.567809017687.issue30384@psf.upfronthosting.co.za> Message-ID: <1604526231.71.0.0344368745701.issue30384@roundup.psfhosted.org> Aaron Meurer added the comment: I don't think it's helpful to make such a literalistic interpretation. Just because the variable is called "traceback" doesn't mean it should apply only to the things that are *technically* a traceback (and I don't agree anyway that the line containing the exception isn't part of the "traceback"). > I guess you're saying that the __context__ exception of the TypeError in your example has an empty traceback, which means it was never raised Does it mean that? Again, __traceback__ isn't documented anywhere, so I don't know what it being None really means. All I know is that it apparently disables the printing of tracebacks in the traceback module, but fails to omit the exception line itself, leading to an unreadable traceback in my example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:44:40 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 04 Nov 2020 21:44:40 +0000 Subject: [issue42265] Remove binhex module following PEP-594 In-Reply-To: <1604525707.18.0.925908508614.issue42265@roundup.psfhosted.org> Message-ID: <1604526280.86.0.773336043922.issue42265@roundup.psfhosted.org> Eric V. Smith added the comment: PEP 594 hasn't been accepted yet. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:47:01 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 21:47:01 +0000 Subject: [issue30384] traceback.TracebackException.format shouldn't format_exc_only() when __traceback__ is None In-Reply-To: <1494993815.34.0.567809017687.issue30384@psf.upfronthosting.co.za> Message-ID: <1604526421.85.0.169661500061.issue30384@roundup.psfhosted.org> Irit Katriel added the comment: __traceback__ doesn't disable printing tracebacks. It *is* the traceback. By setting it to None you erased the exception's traceback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 16:56:10 2020 From: report at bugs.python.org (Kevin Modzelewski) Date: Wed, 04 Nov 2020 21:56:10 +0000 Subject: [issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior Message-ID: <1604526970.3.0.249891884923.issue42266@roundup.psfhosted.org> New submission from Kevin Modzelewski : The problem is that the descriptor-ness of a type-level attribute is only checked at opcache-set time, not at opcache-hit time. $ python3.8 test.py 2 $ ./python --version Python 3.10.0a2+ $ git rev-parse --short HEAD 789359f47c $ ./python test.py 1 ---------- components: Interpreter Core files: test.py messages: 380370 nosy: Kevin Modzelewski, pablogsal priority: normal severity: normal status: open title: LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior type: behavior versions: Python 3.10 Added file: https://bugs.python.org/file49568/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 17:00:25 2020 From: report at bugs.python.org (pmp-p) Date: Wed, 04 Nov 2020 22:00:25 +0000 Subject: [issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior In-Reply-To: <1604526970.3.0.249891884923.issue42266@roundup.psfhosted.org> Message-ID: <1604527224.99.0.0864304549093.issue42266@roundup.psfhosted.org> Change by pmp-p : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 17:11:58 2020 From: report at bugs.python.org (E. Paine) Date: Wed, 04 Nov 2020 22:11:58 +0000 Subject: [issue42142] FAIL tkinter ttk LabeledScale test_resize, and more In-Reply-To: <1603582160.73.0.386671878138.issue42142@roundup.psfhosted.org> Message-ID: <1604527918.75.0.419490404125.issue42142@roundup.psfhosted.org> E. Paine added the comment: I was wrong trying to blame Azure. I have now seen this happen on an Ubuntu Github Action for PR-22947 (https://github.com/python/cpython/pull/22947/checks?check_run_id=1354118848). test_virtual_event (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... Timeout (0:20:00)! Thread 0x00007f549f9d6080 (most recent call first): File "/home/runner/work/cpython/cpython/Lib/tkinter/__init__.py", line 696 in wait_visibility File "/home/runner/work/cpython/cpython/Lib/tkinter/test/test_ttk/test_widgets.py", line 452 in test_virtual_event I am tempted just to remove all calls to `wait_visibility` in our tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 17:24:47 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 04 Nov 2020 22:24:47 +0000 Subject: [issue30384] traceback.TracebackException.format shouldn't format_exc_only() when __traceback__ is None In-Reply-To: <1494993815.34.0.567809017687.issue30384@psf.upfronthosting.co.za> Message-ID: <1604528687.97.0.277682007521.issue30384@roundup.psfhosted.org> Irit Katriel added the comment: I'm going to close this issue because it's not a bug. I understand your question now, as well as the source of your confusion: you thought that traceback is "the thing that is printed to the screen when an exception is raised" and that __traceback__ is something that controls how it's printed. Those are two misunderstandings and I can see why you thought, on that basis, that there is a bug. The traceback is only part of what is printed to the screen when an exception is raised, and the __traceback__ field of an exception is a pointer to the actual traceback data. ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 17:27:40 2020 From: report at bugs.python.org (Olivier Croquette) Date: Wed, 04 Nov 2020 22:27:40 +0000 Subject: [issue37351] Drop libpython38.a from Windows release In-Reply-To: <1561049656.76.0.375565616699.issue37351@roundup.psfhosted.org> Message-ID: <1604528860.17.0.473094725169.issue37351@roundup.psfhosted.org> Olivier Croquette added the comment: I don't know what version of gendef is meant, but the one from MSYS2 / MinGW64 doesn't output the result on stdout, but rather writes the file "python38.def" itself. So the commands are the following: cd libs gendef ..\python38.dll dlltool --dllname python38.dll --def python38.def --output-lib libpython38.a ---------- nosy: +ocroquette _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 17:32:16 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 04 Nov 2020 22:32:16 +0000 Subject: [issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior In-Reply-To: <1604526970.3.0.249891884923.issue42266@roundup.psfhosted.org> Message-ID: <1604529136.65.0.295591685517.issue42266@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Good catch, Kevin! Would you like to submit a PR for fixing this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 17:37:43 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 04 Nov 2020 22:37:43 +0000 Subject: [issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior In-Reply-To: <1604526970.3.0.249891884923.issue42266@roundup.psfhosted.org> Message-ID: <1604529463.23.0.441517667416.issue42266@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Given that having attributes that are classes is quite uncommon, I think we can not optimize of the attribute itself is a class instead of checking for descriptors on every hit, hurting the performance gains ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 17:49:28 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 04 Nov 2020 22:49:28 +0000 Subject: [issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior In-Reply-To: <1604526970.3.0.249891884923.issue42266@roundup.psfhosted.org> Message-ID: <1604530168.84.0.148733940292.issue42266@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Yury, any preference here? ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 17:52:48 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 04 Nov 2020 22:52:48 +0000 Subject: [issue42142] FAIL tkinter ttk LabeledScale test_resize, and more In-Reply-To: <1603582160.73.0.386671878138.issue42142@roundup.psfhosted.org> Message-ID: <1604530368.76.0.512718631657.issue42142@roundup.psfhosted.org> Terry J. Reedy added the comment: All 3 of these timeout failures are Ubuntu. They are a $*#(*&(#& nuisance for a required test. Please submit a PR to skip on Ubuntu, if we can detect that, or linux, if not. I have the impression that LabeledScale and Combobox are both composite widgets, in some sense. Correct? If so, we might limit the skip to those until the wait fails for something else. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 17:53:07 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 04 Nov 2020 22:53:07 +0000 Subject: [issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior In-Reply-To: <1604526970.3.0.249891884923.issue42266@roundup.psfhosted.org> Message-ID: <1604530387.07.0.080349747585.issue42266@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: We could also store the tag of the type object if is a descriptor and compare against that on the cache hit to check that our assumptions are valid. The price here would be an extra pointer on the cache per opcode that may not even be used most of the time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 18:06:04 2020 From: report at bugs.python.org (E. Paine) Date: Wed, 04 Nov 2020 23:06:04 +0000 Subject: [issue42142] FAIL tkinter ttk LabeledScale test_resize, and more In-Reply-To: <1603582160.73.0.386671878138.issue42142@roundup.psfhosted.org> Message-ID: <1604531164.31.0.198279389306.issue42142@roundup.psfhosted.org> Change by E. Paine : ---------- keywords: +patch pull_requests: +22067 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23156 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 18:10:13 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 04 Nov 2020 23:10:13 +0000 Subject: [issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior In-Reply-To: <1604526970.3.0.249891884923.issue42266@roundup.psfhosted.org> Message-ID: <1604531413.97.0.501627041165.issue42266@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: s/the attribute itself is a class/the attribute itself is in the class/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 18:12:20 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 04 Nov 2020 23:12:20 +0000 Subject: [issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior In-Reply-To: <1604526970.3.0.249891884923.issue42266@roundup.psfhosted.org> Message-ID: <1604531540.31.0.533216347199.issue42266@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +22068 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23157 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 18:13:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 23:13:58 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1604531638.79.0.568951219733.issue42260@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22069 pull_request: https://github.com/python/cpython/pull/23158 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 18:14:48 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Nov 2020 23:14:48 +0000 Subject: [issue42207] Python 3.9 testing fails when building with clang and optimizations are enabled In-Reply-To: <1604069104.85.0.435616508554.issue42207@roundup.psfhosted.org> Message-ID: <1604531688.28.0.416236649438.issue42207@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +22070 pull_request: https://github.com/python/cpython/pull/23155 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 18:34:10 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 04 Nov 2020 23:34:10 +0000 Subject: [issue42263] Removing thread reference in thread results in leaked reference In-Reply-To: <1604518965.9.0.468423053621.issue42263@roundup.psfhosted.org> Message-ID: <1604532850.19.0.379970438187.issue42263@roundup.psfhosted.org> Jason R. Coombs added the comment: I don't think it's a race condition for two reasons: adding a `time.sleep(1)` after `.start` still raises errors, and in issue37193, there were 10 threads created, with at least 9 of those reaching termination before the test ended, yet it showed 10 reference leaks. If you join the thread in the test, the leak is not detected. However, I believe that's because, in order to join on the thread, you must also hold a handle to the thread, so the condition isn't triggered. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 18:46:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Nov 2020 23:46:04 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1604533564.04.0.289663895867.issue42260@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 048a35659aa8074afe7d7d054e7cea1f8ee6d366 by Victor Stinner in branch 'master': bpo-42260: Add _PyInterpreterState_SetConfig() (GH-23158) https://github.com/python/cpython/commit/048a35659aa8074afe7d7d054e7cea1f8ee6d366 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 18:17:09 2020 From: report at bugs.python.org (=?utf-8?q?Axel_Grull=C3=B3n?=) Date: Wed, 04 Nov 2020 23:17:09 +0000 Subject: [issue42267] Python 3.9 broken installer Message-ID: <1604531829.54.0.433305713685.issue42267@roundup.psfhosted.org> New submission from Axel Grull?n : Initially the Python 3.9 installer worked perfectly, I had every tool at my disposal and every component installed. After I tried installing discord.py an error was shown and it was about certain components that were missing. To my ignorance I uninstalled Python 3.9 and deleted every key and sub-key related to it thinking it would allow me to do a fresh install of Python 3.9 and fix the issue. What I get now is a disastrous incomplete installation when I try to install this Python version, a programmer with knowledge on it told me that no matter the registry keys deleted the installer should be able to install the version without issues. Without further ado, this is the error I get: Python path configuration: PYTHONHOME = (not set) PYTHONPATH = (not set) program name = 'python' isolated = 0 environment = 1 user site = 1 import site = 1 sys._base_executable = 'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python39\\python.exe' sys.base_prefix = '' sys.base_exec_prefix = '' sys.platlibdir = 'lib' sys.executable = 'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python39\\python.exe' sys.prefix = '' sys.exec_prefix = '' sys.path = [ 'C:\\WINDOWS\\SYSTEM32\\python39.zip', 'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python39\\Lib\\', 'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python39\\DLLs\\', 'C:\\Program Files\\Python39\\Lib\\', 'C:\\Program Files\\Python39\\DLLs\\', 'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python39', ] Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized ModuleNotFoundError: No module named 'encodings' Current thread 0x00002254 (most recent call first): But of course I get such error because a plethora of essential files are missing. C:\Users\user\AppData\Local\Programs\Python\Python39>tree /f Folder PATH listing Volume serial number is 8820-2829 C:. ? LICENSE.txt ? NEWS.txt ? python.exe ? pythonw.exe ? vcruntime140.dll ? vcruntime140_1.dll ? ????DLLs ? py.ico ? pyc.ico ? pyd.ico ? tcl86t.dll ? tk86t.dll ? _tkinter.pyd ? ????Doc ? python390.chm ? ????Lib ? ????idlelib ? ? ? autocomplete.py ? ? ? autocomplete_w.py ? ? ? autoexpand.py ? ? ? browser.py ? ? ? calltip.py ? ? ? calltip_w.py ? ? ? ChangeLog ? ? ? codecontext.py ? ? ? colorizer.py ? ? ? config-extensions.def ? ? ? config-highlight.def ? ? ? config-keys.def ? ? ? config-main.def ? ? ? config.py ? ? ? configdialog.py ? ? ? config_key.py ? ? ? CREDITS.txt ? ? ? debugger.py ? ? ? debugger_r.py ? ? ? debugobj.py ? ? ? debugobj_r.py ? ? ? delegator.py ? ? ? dynoption.py ? ? ? editor.py ? ? ? extend.txt ? ? ? filelist.py ? ? ? format.py ? ? ? grep.py ? ? ? help.html ? ? ? help.py ? ? ? help_about.py ? ? ? history.py ? ? ? HISTORY.txt ? ? ? hyperparser.py ? ? ? idle.bat ? ? ? idle.py ? ? ? idle.pyw ? ? ? iomenu.py ? ? ? macosx.py ? ? ? mainmenu.py ? ? ? multicall.py ? ? ? NEWS.txt ? ? ? NEWS2x.txt ? ? ? outwin.py ? ? ? parenmatch.py ? ? ? pathbrowser.py ? ? ? percolator.py ? ? ? pyparse.py ? ? ? pyshell.py ? ? ? query.py ? ? ? README.txt ? ? ? redirector.py ? ? ? replace.py ? ? ? rpc.py ? ? ? run.py ? ? ? runscript.py ? ? ? scrolledlist.py ? ? ? search.py ? ? ? searchbase.py ? ? ? searchengine.py ? ? ? sidebar.py ? ? ? squeezer.py ? ? ? stackviewer.py ? ? ? statusbar.py ? ? ? textview.py ? ? ? TODO.txt ? ? ? tooltip.py ? ? ? tree.py ? ? ? undo.py ? ? ? window.py ? ? ? zoomheight.py ? ? ? zzdummy.py ? ? ? __init__.py ? ? ? __main__.py ? ? ? ? ? ????Icons ? ? ? folder.gif ? ? ? idle.ico ? ? ? idle_16.gif ? ? ? idle_16.png ? ? ? idle_256.png ? ? ? idle_32.gif ? ? ? idle_32.png ? ? ? idle_48.gif ? ? ? idle_48.png ? ? ? minusnode.gif ? ? ? openfolder.gif ? ? ? plusnode.gif ? ? ? python.gif ? ? ? README.txt ? ? ? tk.gif ? ? ? ? ? ????idle_test ? ? ? ? htest.py ? ? ? ? mock_idle.py ? ? ? ? mock_tk.py ? ? ? ? README.txt ? ? ? ? template.py ? ? ? ? test_autocomplete.py ? ? ? ? test_autocomplete_w.py ? ? ? ? test_autoexpand.py ? ? ? ? test_browser.py ? ? ? ? test_calltip.py ? ? ? ? test_calltip_w.py ? ? ? ? test_codecontext.py ? ? ? ? test_colorizer.py ? ? ? ? test_config.py ? ? ? ? test_configdialog.py ? ? ? ? test_config_key.py ? ? ? ? test_debugger.py ? ? ? ? test_debugger_r.py ? ? ? ? test_debugobj.py ? ? ? ? test_debugobj_r.py ? ? ? ? test_delegator.py ? ? ? ? test_editmenu.py ? ? ? ? test_editor.py ? ? ? ? test_filelist.py ? ? ? ? test_format.py ? ? ? ? test_grep.py ? ? ? ? test_help.py ? ? ? ? test_help_about.py ? ? ? ? test_history.py ? ? ? ? test_hyperparser.py ? ? ? ? test_iomenu.py ? ? ? ? test_macosx.py ? ? ? ? test_mainmenu.py ? ? ? ? test_multicall.py ? ? ? ? test_outwin.py ? ? ? ? test_parenmatch.py ? ? ? ? test_pathbrowser.py ? ? ? ? test_percolator.py ? ? ? ? test_pyparse.py ? ? ? ? test_pyshell.py ? ? ? ? test_query.py ? ? ? ? test_redirector.py ? ? ? ? test_replace.py ? ? ? ? test_rpc.py ? ? ? ? test_run.py ? ? ? ? test_runscript.py ? ? ? ? test_scrolledlist.py ? ? ? ? test_search.py ? ? ? ? test_searchbase.py ? ? ? ? test_searchengine.py ? ? ? ? test_sidebar.py ? ? ? ? test_squeezer.py ? ? ? ? test_stackviewer.py ? ? ? ? test_statusbar.py ? ? ? ? test_text.py ? ? ? ? test_textview.py ? ? ? ? test_tooltip.py ? ? ? ? test_tree.py ? ? ? ? test_undo.py ? ? ? ? test_warning.py ? ? ? ? test_window.py ? ? ? ? test_zoomheight.py ? ? ? ? __init__.py ? ? ? ? ? ? ? ????__pycache__ ? ? ????__pycache__ ? ????tkinter ? ? ? colorchooser.py ? ? ? commondialog.py ? ? ? constants.py ? ? ? dialog.py ? ? ? dnd.py ? ? ? filedialog.py ? ? ? font.py ? ? ? messagebox.py ? ? ? scrolledtext.py ? ? ? simpledialog.py ? ? ? tix.py ? ? ? ttk.py ? ? ? __init__.py ? ? ? __main__.py ? ? ? ? ? ????test ? ? ? ? README ? ? ? ? runtktests.py ? ? ? ? support.py ? ? ? ? widget_tests.py ? ? ? ? __init__.py ? ? ? ? ? ? ? ????test_tkinter ? ? ? ? ? test_font.py ? ? ? ? ? test_geometry_managers.py ? ? ? ? ? test_images.py ? ? ? ? ? test_loadtk.py ? ? ? ? ? test_misc.py ? ? ? ? ? test_text.py ? ? ? ? ? test_variables.py ? ? ? ? ? test_widgets.py ? ? ? ? ? __init__.py ? ? ? ? ? ? ? ? ? ????__pycache__ ? ? ? ????test_ttk ? ? ? ? ? test_extensions.py ? ? ? ? ? test_functions.py ? ? ? ? ? test_style.py ? ? ? ? ? test_widgets.py ? ? ? ? ? __init__.py ? ? ? ? ? ? ? ? ? ????__pycache__ ? ? ? ????__pycache__ ? ? ????__pycache__ ? ????turtledemo ? ? bytedesign.py ? ? chaos.py ? ? clock.py ? ? colormixer.py ? ? forest.py ? ? fractalcurves.py ? ? lindenmayer.py ? ? minimal_hanoi.py ? ? nim.py ? ? paint.py ? ? peace.py ? ? penrose.py ? ? planet_and_moon.py ? ? rosette.py ? ? round_dance.py ? ? sorting_animate.py ? ? tree.py ? ? turtle.cfg ? ? two_canvases.py ? ? yinyang.py ? ? __init__.py ? ? __main__.py ? ? ? ????__pycache__ ????libs ? _tkinter.lib ? ????tcl ? tcl86t.lib ? tclConfig.sh ? tclooConfig.sh ? tclstub86.lib ? tk86t.lib ? tkstub86.lib ? ????dde1.4 ? pkgIndex.tcl ? tcldde14.dll ? ????nmake ? nmakehlp.c ? rules.vc ? targets.vc ? tcl.nmake ? ????reg1.3 ? pkgIndex.tcl ? tclreg13.dll ? ????tcl8 ? ????8.4 ? ? ? platform-1.0.14.tm ? ? ? ? ? ????platform ? ? shell-1.1.4.tm ? ? ? ????8.5 ? ? msgcat-1.6.1.tm ? ? tcltest-2.5.0.tm ? ? ? ????8.6 ? http-2.9.0.tm ? ????tcl8.6 ? ? auto.tcl ? ? clock.tcl ? ? history.tcl ? ? init.tcl ? ? package.tcl ? ? parray.tcl ? ? safe.tcl ? ? tclIndex ? ? tm.tcl ? ? word.tcl ? ? ? ????encoding ? ? ascii.enc ? ? big5.enc ? ? cp1250.enc ? ? cp1251.enc ? ? cp1252.enc ? ? cp1253.enc ? ? cp1254.enc ? ? cp1255.enc ? ? cp1256.enc ? ? cp1257.enc ? ? cp1258.enc ? ? cp437.enc ? ? cp737.enc ? ? cp775.enc ? ? cp850.enc ? ? cp852.enc ? ? cp855.enc ? ? cp857.enc ? ? cp860.enc ? ? cp861.enc ? ? cp862.enc ? ? cp863.enc ? ? cp864.enc ? ? cp865.enc ? ? cp866.enc ? ? cp869.enc ? ? cp874.enc ? ? cp932.enc ? ? cp936.enc ? ? cp949.enc ? ? cp950.enc ? ? dingbats.enc ? ? ebcdic.enc ? ? euc-cn.enc ? ? euc-jp.enc ? ? euc-kr.enc ? ? gb12345.enc ? ? gb1988.enc ? ? gb2312-raw.enc ? ? gb2312.enc ? ? iso2022-jp.enc ? ? iso2022-kr.enc ? ? iso2022.enc ? ? iso8859-1.enc ? ? iso8859-10.enc ? ? iso8859-13.enc ? ? iso8859-14.enc ? ? iso8859-15.enc ? ? iso8859-16.enc ? ? iso8859-2.enc ? ? iso8859-3.enc ? ? iso8859-4.enc ? ? iso8859-5.enc ? ? iso8859-6.enc ? ? iso8859-7.enc ? ? iso8859-8.enc ? ? iso8859-9.enc ? ? jis0201.enc ? ? jis0208.enc ? ? jis0212.enc ? ? koi8-r.enc ? ? koi8-u.enc ? ? ksc5601.enc ? ? macCentEuro.enc ? ? macCroatian.enc ? ? macCyrillic.enc ? ? macDingbats.enc ? ? macGreek.enc ? ? macIceland.enc ? ? macJapan.enc ? ? macRoman.enc ? ? macRomania.enc ? ? macThai.enc ? ? macTurkish.enc ? ? macUkraine.enc ? ? shiftjis.enc ? ? symbol.enc ? ? tis-620.enc ? ? ? ????http1.0 ? ? http.tcl ? ? pkgIndex.tcl ? ? ? ????msgs ? ? af.msg ? ? af_za.msg ? ? ar.msg ? ? ar_in.msg ? ? ar_jo.msg ? ? ar_lb.msg ? ? ar_sy.msg ? ? be.msg ? ? bg.msg ? ? bn.msg ? ? bn_in.msg ? ? ca.msg ? ? cs.msg ? ? da.msg ? ? de.msg ? ? de_at.msg ? ? de_be.msg ? ? el.msg ? ? en_au.msg ? ? en_be.msg ? ? en_bw.msg ? ? en_ca.msg ? ? en_gb.msg ? ? en_hk.msg ? ? en_ie.msg ? ? en_in.msg ? ? en_nz.msg ? ? en_ph.msg ? ? en_sg.msg ? ? en_za.msg ? ? en_zw.msg ? ? eo.msg ? ? es.msg ? ? es_ar.msg ? ? es_bo.msg ? ? es_cl.msg ? ? es_co.msg ? ? es_cr.msg ? ? es_do.msg ? ? es_ec.msg ? ? es_gt.msg ? ? es_hn.msg ? ? es_mx.msg ? ? es_ni.msg ? ? es_pa.msg ? ? es_pe.msg ? ? es_pr.msg ? ? es_py.msg ? ? es_sv.msg ? ? es_uy.msg ? ? es_ve.msg ? ? et.msg ? ? eu.msg ? ? eu_es.msg ? ? fa.msg ? ? fa_in.msg ? ? fa_ir.msg ? ? fi.msg ? ? fo.msg ? ? fo_fo.msg ? ? fr.msg ? ? fr_be.msg ? ? fr_ca.msg ? ? fr_ch.msg ? ? ga.msg ? ? ga_ie.msg ? ? gl.msg ? ? gl_es.msg ? ? gv.msg ? ? gv_gb.msg ? ? he.msg ? ? hi.msg ? ? hi_in.msg ? ? hr.msg ? ? hu.msg ? ? id.msg ? ? id_id.msg ? ? is.msg ? ? it.msg ? ? it_ch.msg ? ? ja.msg ? ? kl.msg ? ? kl_gl.msg ? ? ko.msg ? ? kok.msg ? ? kok_in.msg ? ? ko_kr.msg ? ? kw.msg ? ? kw_gb.msg ? ? lt.msg ? ? lv.msg ? ? mk.msg ? ? mr.msg ? ? mr_in.msg ? ? ms.msg ? ? ms_my.msg ? ? mt.msg ? ? nb.msg ? ? nl.msg ? ? nl_be.msg ? ? nn.msg ? ? pl.msg ? ? pt.msg ? ? pt_br.msg ? ? ro.msg ? ? ru.msg ? ? ru_ua.msg ? ? sh.msg ? ? sk.msg ? ? sl.msg ? ? sq.msg ? ? sr.msg ? ? sv.msg ? ? sw.msg ? ? ta.msg ? ? ta_in.msg ? ? te.msg ? ? te_in.msg ? ? th.msg ? ? tr.msg ? ? uk.msg ? ? vi.msg ? ? zh.msg ? ? zh_cn.msg ? ? zh_hk.msg ? ? zh_sg.msg ? ? zh_tw.msg ? ? ? ????opt0.4 ? ? optparse.tcl ? ? pkgIndex.tcl ? ? ? ????tzdata ? ? CET ? ? CST6CDT ? ? Cuba ? ? EET ? ? Egypt ? ? Eire ? ? EST ? ? EST5EDT ? ? GB ? ? GB-Eire ? ? GMT ? ? GMT+0 ? ? GMT-0 ? ? GMT0 ? ? Greenwich ? ? Hongkong ? ? HST ? ? Iceland ? ? Iran ? ? Israel ? ? Jamaica ? ? Japan ? ? Kwajalein ? ? Libya ? ? MET ? ? MST ? ? MST7MDT ? ? Navajo ? ? NZ ? ? NZ-CHAT ? ? Poland ? ? Portugal ? ? PRC ? ? PST8PDT ? ? ROC ? ? ROK ? ? Singapore ? ? Turkey ? ? UCT ? ? Universal ? ? UTC ? ? W-SU ? ? WET ? ? Zulu ? ? ? ????Africa ? ? Abidjan ? ? Accra ? ? Addis_Ababa ? ? Algiers ? ? Asmara ? ? Asmera ? ? Bamako ? ? Bangui ? ? Banjul ? ? Bissau ? ? Blantyre ? ? Brazzaville ? ? Bujumbura ? ? Cairo ? ? Casablanca ? ? Ceuta ? ? Conakry ? ? Dakar ? ? Dar_es_Salaam ? ? Djibouti ? ? Douala ? ? El_Aaiun ? ? Freetown ? ? Gaborone ? ? Harare ? ? Johannesburg ? ? Juba ? ? Kampala ? ? Khartoum ? ? Kigali ? ? Kinshasa ? ? Lagos ? ? Libreville ? ? Lome ? ? Luanda ? ? Lubumbashi ? ? Lusaka ? ? Malabo ? ? Maputo ? ? Maseru ? ? Mbabane ? ? Mogadishu ? ? Monrovia ? ? Nairobi ? ? Ndjamena ? ? Niamey ? ? Nouakchott ? ? Ouagadougou ? ? Porto-Novo ? ? Sao_Tome ? ? Timbuktu ? ? Tripoli ? ? Tunis ? ? Windhoek ? ? ? ????America ? ? ? Adak ? ? ? Anchorage ? ? ? Anguilla ? ? ? Antigua ? ? ? Araguaina ? ? ? Aruba ? ? ? Asuncion ? ? ? Atikokan ? ? ? Atka ? ? ? Bahia ? ? ? Bahia_Banderas ? ? ? Barbados ? ? ? Belem ? ? ? Belize ? ? ? Blanc-Sablon ? ? ? Boa_Vista ? ? ? Bogota ? ? ? Boise ? ? ? Buenos_Aires ? ? ? Cambridge_Bay ? ? ? Campo_Grande ? ? ? Cancun ? ? ? Caracas ? ? ? Catamarca ? ? ? Cayenne ? ? ? Cayman ? ? ? Chicago ? ? ? Chihuahua ? ? ? Coral_Harbour ? ? ? Cordoba ? ? ? Costa_Rica ? ? ? Creston ? ? ? Cuiaba ? ? ? Curacao ? ? ? Danmarkshavn ? ? ? Dawson ? ? ? Dawson_Creek ? ? ? Denver ? ? ? Detroit ? ? ? Dominica ? ? ? Edmonton ? ? ? Eirunepe ? ? ? El_Salvador ? ? ? Ensenada ? ? ? Fortaleza ? ? ? Fort_Nelson ? ? ? Fort_Wayne ? ? ? Glace_Bay ? ? ? Godthab ? ? ? Goose_Bay ? ? ? Grand_Turk ? ? ? Grenada ? ? ? Guadeloupe ? ? ? Guatemala ? ? ? Guayaquil ? ? ? Guyana ? ? ? Halifax ? ? ? Havana ? ? ? Hermosillo ? ? ? Indianapolis ? ? ? Inuvik ? ? ? Iqaluit ? ? ? Jamaica ? ? ? Jujuy ? ? ? Juneau ? ? ? Knox_IN ? ? ? Kralendijk ? ? ? La_Paz ? ? ? Lima ? ? ? Los_Angeles ? ? ? Louisville ? ? ? Lower_Princes ? ? ? Maceio ? ? ? Managua ? ? ? Manaus ? ? ? Marigot ? ? ? Martinique ? ? ? Matamoros ? ? ? Mazatlan ? ? ? Mendoza ? ? ? Menominee ? ? ? Merida ? ? ? Metlakatla ? ? ? Mexico_City ? ? ? Miquelon ? ? ? Moncton ? ? ? Monterrey ? ? ? Montevideo ? ? ? Montreal ? ? ? Montserrat ? ? ? Nassau ? ? ? New_York ? ? ? Nipigon ? ? ? Nome ? ? ? Noronha ? ? ? Ojinaga ? ? ? Panama ? ? ? Pangnirtung ? ? ? Paramaribo ? ? ? Phoenix ? ? ? Port-au-Prince ? ? ? Porto_Acre ? ? ? Porto_Velho ? ? ? Port_of_Spain ? ? ? Puerto_Rico ? ? ? Punta_Arenas ? ? ? Rainy_River ? ? ? Rankin_Inlet ? ? ? Recife ? ? ? Regina ? ? ? Resolute ? ? ? Rio_Branco ? ? ? Rosario ? ? ? Santarem ? ? ? Santa_Isabel ? ? ? Santiago ? ? ? Santo_Domingo ? ? ? Sao_Paulo ? ? ? Scoresbysund ? ? ? Shiprock ? ? ? Sitka ? ? ? St_Barthelemy ? ? ? St_Johns ? ? ? St_Kitts ? ? ? St_Lucia ? ? ? St_Thomas ? ? ? St_Vincent ? ? ? Swift_Current ? ? ? Tegucigalpa ? ? ? Thule ? ? ? Thunder_Bay ? ? ? Tijuana ? ? ? Toronto ? ? ? Tortola ? ? ? Vancouver ? ? ? Virgin ? ? ? Whitehorse ? ? ? Winnipeg ? ? ? Yakutat ? ? ? Yellowknife ? ? ? ? ? ????Argentina ? ? ? Buenos_Aires ? ? ? Catamarca ? ? ? ComodRivadavia ? ? ? Cordoba ? ? ? Jujuy ? ? ? La_Rioja ? ? ? Mendoza ? ? ? Rio_Gallegos ? ? ? Salta ? ? ? San_Juan ? ? ? San_Luis ? ? ? Tucuman ? ? ? Ushuaia ? ? ? ? ? ????Indiana ? ? ? Indianapolis ? ? ? Knox ? ? ? Marengo ? ? ? Petersburg ? ? ? Tell_City ? ? ? Vevay ? ? ? Vincennes ? ? ? Winamac ? ? ? ? ? ????Kentucky ? ? ? Louisville ? ? ? Monticello ? ? ? ? ? ????North_Dakota ? ? Beulah ? ? Center ? ? New_Salem ? ? ? ????Antarctica ? ? Casey ? ? Davis ? ? DumontDUrville ? ? Macquarie ? ? Mawson ? ? McMurdo ? ? Palmer ? ? Rothera ? ? South_Pole ? ? Syowa ? ? Troll ? ? Vostok ? ? ? ????Arctic ? ? Longyearbyen ? ? ? ????Asia ? ? Aden ? ? Almaty ? ? Amman ? ? Anadyr ? ? Aqtau ? ? Aqtobe ? ? Ashgabat ? ? Ashkhabad ? ? Atyrau ? ? Baghdad ? ? Bahrain ? ? Baku ? ? Bangkok ? ? Barnaul ? ? Beirut ? ? Bishkek ? ? Brunei ? ? Calcutta ? ? Chita ? ? Choibalsan ? ? Chongqing ? ? Chungking ? ? Colombo ? ? Dacca ? ? Damascus ? ? Dhaka ? ? Dili ? ? Dubai ? ? Dushanbe ? ? Famagusta ? ? Gaza ? ? Harbin ? ? Hebron ? ? Hong_Kong ? ? Hovd ? ? Ho_Chi_Minh ? ? Irkutsk ? ? Istanbul ? ? Jakarta ? ? Jayapura ? ? Jerusalem ? ? Kabul ? ? Kamchatka ? ? Karachi ? ? Kashgar ? ? Kathmandu ? ? Katmandu ? ? Khandyga ? ? Kolkata ? ? Krasnoyarsk ? ? Kuala_Lumpur ? ? Kuching ? ? Kuwait ? ? Macao ? ? Macau ? ? Magadan ? ? Makassar ? ? Manila ? ? Muscat ? ? Nicosia ? ? Novokuznetsk ? ? Novosibirsk ? ? Omsk ? ? Oral ? ? Phnom_Penh ? ? Pontianak ? ? Pyongyang ? ? Qatar ? ? Qyzylorda ? ? Rangoon ? ? Riyadh ? ? Saigon ? ? Sakhalin ? ? Samarkand ? ? Seoul ? ? Shanghai ? ? Singapore ? ? Srednekolymsk ? ? Taipei ? ? Tashkent ? ? Tbilisi ? ? Tehran ? ? Tel_Aviv ? ? Thimbu ? ? Thimphu ? ? Tokyo ? ? Tomsk ? ? Ujung_Pandang ? ? Ulaanbaatar ? ? Ulan_Bator ? ? Urumqi ? ? Ust-Nera ? ? Vientiane ? ? Vladivostok ? ? Yakutsk ? ? Yangon ? ? Yekaterinburg ? ? Yerevan ? ? ? ????Atlantic ? ? Azores ? ? Bermuda ? ? Canary ? ? Cape_Verde ? ? Faeroe ? ? Faroe ? ? Jan_Mayen ? ? Madeira ? ? Reykjavik ? ? South_Georgia ? ? Stanley ? ? St_Helena ? ? ? ????Australia ? ? ACT ? ? Adelaide ? ? Brisbane ? ? Broken_Hill ? ? Canberra ? ? Currie ? ? Darwin ? ? Eucla ? ? Hobart ? ? LHI ? ? Lindeman ? ? Lord_Howe ? ? Melbourne ? ? North ? ? NSW ? ? Perth ? ? Queensland ? ? South ? ? Sydney ? ? Tasmania ? ? Victoria ? ? West ? ? Yancowinna ? ? ? ????Brazil ? ? Acre ? ? DeNoronha ? ? East ? ? West ? ? ? ????Canada ? ? Atlantic ? ? Central ? ? East-Saskatchewan ? ? Eastern ? ? Mountain ? ? Newfoundland ? ? Pacific ? ? Saskatchewan ? ? Yukon ? ? ? ????Chile ? ? Continental ? ? EasterIsland ? ? ? ????Etc ? ? GMT ? ? GMT+0 ? ? GMT+1 ? ? GMT+10 ? ? GMT+11 ? ? GMT+12 ? ? GMT+2 ? ? GMT+3 ? ? GMT+4 ? ? GMT+5 ? ? GMT+6 ? ? GMT+7 ? ? GMT+8 ? ? GMT+9 ? ? GMT-0 ? ? GMT-1 ? ? GMT-10 ? ? GMT-11 ? ? GMT-12 ? ? GMT-13 ? ? GMT-14 ? ? GMT-2 ? ? GMT-3 ? ? GMT-4 ? ? GMT-5 ? ? GMT-6 ? ? GMT-7 ? ? GMT-8 ? ? GMT-9 ? ? GMT0 ? ? Greenwich ? ? UCT ? ? Universal ? ? UTC ? ? Zulu ? ? ? ????Europe ? ? Amsterdam ? ? Andorra ? ? Astrakhan ? ? Athens ? ? Belfast ? ? Belgrade ? ? Berlin ? ? Bratislava ? ? Brussels ? ? Bucharest ? ? Budapest ? ? Busingen ? ? Chisinau ? ? Copenhagen ? ? Dublin ? ? Gibraltar ? ? Guernsey ? ? Helsinki ? ? Isle_of_Man ? ? Istanbul ? ? Jersey ? ? Kaliningrad ? ? Kiev ? ? Kirov ? ? Lisbon ? ? Ljubljana ? ? London ? ? Luxembourg ? ? Madrid ? ? Malta ? ? Mariehamn ? ? Minsk ? ? Monaco ? ? Moscow ? ? Nicosia ? ? Oslo ? ? Paris ? ? Podgorica ? ? Prague ? ? Riga ? ? Rome ? ? Samara ? ? San_Marino ? ? Sarajevo ? ? Saratov ? ? Simferopol ? ? Skopje ? ? Sofia ? ? Stockholm ? ? Tallinn ? ? Tirane ? ? Tiraspol ? ? Ulyanovsk ? ? Uzhgorod ? ? Vaduz ? ? Vatican ? ? Vienna ? ? Vilnius ? ? Volgograd ? ? Warsaw ? ? Zagreb ? ? Zaporozhye ? ? Zurich ? ? ? ????Indian ? ? Antananarivo ? ? Chagos ? ? Christmas ? ? Cocos ? ? Comoro ? ? Kerguelen ? ? Mahe ? ? Maldives ? ? Mauritius ? ? Mayotte ? ? Reunion ? ? ? ????Mexico ? ? BajaNorte ? ? BajaSur ? ? General ? ? ? ????Pacific ? ? Apia ? ? Auckland ? ? Bougainville ? ? Chatham ? ? Chuuk ? ? Easter ? ? Efate ? ? Enderbury ? ? Fakaofo ? ? Fiji ? ? Funafuti ? ? Galapagos ? ? Gambier ? ? Guadalcanal ? ? Guam ? ? Honolulu ? ? Johnston ? ? Kiritimati ? ? Kosrae ? ? Kwajalein ? ? Majuro ? ? Marquesas ? ? Midway ? ? Nauru ? ? Niue ? ? Norfolk ? ? Noumea ? ? Pago_Pago ? ? Palau ? ? Pitcairn ? ? Pohnpei ? ? Ponape ? ? Port_Moresby ? ? Rarotonga ? ? Saipan ? ? Samoa ? ? Tahiti ? ? Tarawa ? ? Tongatapu ? ? Truk ? ? Wake ? ? Wallis ? ? Yap ? ? ? ????SystemV ? ? AST4 ? ? AST4ADT ? ? CST6 ? ? CST6CDT ? ? EST5 ? ? EST5EDT ? ? HST10 ? ? MST7 ? ? MST7MDT ? ? PST8 ? ? PST8PDT ? ? YST9 ? ? YST9YDT ? ? ? ????US ? Alaska ? Aleutian ? Arizona ? Central ? East-Indiana ? Eastern ? Hawaii ? Indiana-Starke ? Michigan ? Mountain ? Pacific ? Pacific-New ? Samoa ? ????tix8.4.3 ? ? Balloon.tcl ? ? BtnBox.tcl ? ? ChkList.tcl ? ? CObjView.tcl ? ? ComboBox.tcl ? ? Compat.tcl ? ? Console.tcl ? ? Control.tcl ? ? DefSchm.tcl ? ? DialogS.tcl ? ? DirBox.tcl ? ? DirDlg.tcl ? ? DirList.tcl ? ? DirTree.tcl ? ? DragDrop.tcl ? ? DtlList.tcl ? ? EFileBox.tcl ? ? EFileDlg.tcl ? ? Event.tcl ? ? FileBox.tcl ? ? FileCbx.tcl ? ? FileDlg.tcl ? ? FileEnt.tcl ? ? FloatEnt.tcl ? ? fs.tcl ? ? Grid.tcl ? ? HList.tcl ? ? HListDD.tcl ? ? IconView.tcl ? ? Init.tcl ? ? LabEntry.tcl ? ? LabFrame.tcl ? ? LabWidg.tcl ? ? ListNBk.tcl ? ? Makefile ? ? Meter.tcl ? ? MultView.tcl ? ? NoteBook.tcl ? ? OldUtil.tcl ? ? OptMenu.tcl ? ? PanedWin.tcl ? ? pkgIndex.tcl ? ? PopMenu.tcl ? ? Primitiv.tcl ? ? ResizeH.tcl ? ? Select.tcl ? ? SGrid.tcl ? ? Shell.tcl ? ? SHList.tcl ? ? SimpDlg.tcl ? ? SListBox.tcl ? ? StackWin.tcl ? ? StatBar.tcl ? ? StdBBox.tcl ? ? StdShell.tcl ? ? SText.tcl ? ? STList.tcl ? ? SWidget.tcl ? ? SWindow.tcl ? ? Tix.tcl ? ? tix84.dll ? ? tix84.lib ? ? TList.tcl ? ? Tree.tcl ? ? Utils.tcl ? ? Variable.tcl ? ? VResize.tcl ? ? VStack.tcl ? ? VTree.tcl ? ? WInfo.tcl ? ? ? ????bitmaps ? ? act_fold.gif ? ? act_fold.xbm ? ? act_fold.xpm ? ? balarrow.xbm ? ? cbxarrow.xbm ? ? ck_def.xbm ? ? ck_off.xbm ? ? ck_on.xbm ? ? cross.xbm ? ? decr.xbm ? ? drop.xbm ? ? file.gif ? ? file.xbm ? ? file.xpm ? ? folder.gif ? ? folder.xbm ? ? folder.xpm ? ? harddisk.xbm ? ? hourglas.mask ? ? hourglas.xbm ? ? incr.xbm ? ? info.gif ? ? info.xpm ? ? maximize.xbm ? ? minimize.xbm ? ? minus.gif ? ? minus.xbm ? ? minus.xpm ? ? minusarm.gif ? ? minusarm.xbm ? ? minusarm.xpm ? ? mktransgif.tcl ? ? network.xbm ? ? no_entry.gif ? ? no_entry.xpm ? ? openfile.xbm ? ? openfold.gif ? ? openfold.xbm ? ? openfold.xpm ? ? plus.gif ? ? plus.xbm ? ? plus.xpm ? ? plusarm.gif ? ? plusarm.xbm ? ? plusarm.xpm ? ? resize1.xbm ? ? resize2.xbm ? ? restore.xbm ? ? srcfile.gif ? ? srcfile.xbm ? ? srcfile.xpm ? ? system.xbm ? ? textfile.gif ? ? textfile.xbm ? ? textfile.xpm ? ? tick.xbm ? ? warning.gif ? ? warning.xpm ? ? ? ????demos ? ? ? MkChoose.tcl ? ? ? MkDirLis.tcl ? ? ? MkSample.tcl ? ? ? MkScroll.tcl ? ? ? tclIndex ? ? ? tixwidgets.tcl ? ? ? widget ? ? ? ? ? ????bitmaps ? ? ? about.xpm ? ? ? bold.xbm ? ? ? capital.xbm ? ? ? centerj.xbm ? ? ? code.xpm ? ? ? combobox.xbm ? ? ? combobox.xpm ? ? ? drivea.xbm ? ? ? drivea.xpm ? ? ? exit.xpm ? ? ? filebox.xbm ? ? ? filebox.xpm ? ? ? harddisk.xbm ? ? ? harddisk.xpm ? ? ? italic.xbm ? ? ? justify.xbm ? ? ? leftj.xbm ? ? ? netw.xbm ? ? ? netw.xpm ? ? ? network.xbm ? ? ? network.xpm ? ? ? optmenu.xpm ? ? ? rightj.xbm ? ? ? select.xpm ? ? ? tix.gif ? ? ? underlin.xbm ? ? ? ? ? ????samples ? ? AllSampl.tcl ? ? ArrowBtn.tcl ? ? Balloon.tcl ? ? BtnBox.tcl ? ? ChkList.tcl ? ? CmpImg.tcl ? ? CmpImg1.tcl ? ? CmpImg2.tcl ? ? CmpImg3.tcl ? ? CmpImg4.tcl ? ? CObjView.tcl ? ? ComboBox.tcl ? ? Control.tcl ? ? DirDlg.tcl ? ? DirList.tcl ? ? DirTree.tcl ? ? DragDrop.tcl ? ? DynTree.tcl ? ? EditGrid.tcl ? ? EFileDlg.tcl ? ? FileDlg.tcl ? ? FileEnt.tcl ? ? HList1.tcl ? ? LabEntry.tcl ? ? LabFrame.tcl ? ? ListNBK.tcl ? ? Meter.tcl ? ? NoteBook.tcl ? ? OptMenu.tcl ? ? PanedWin.tcl ? ? PopMenu.tcl ? ? Sample.tcl ? ? Select.tcl ? ? SGrid0.tcl ? ? SGrid1.tcl ? ? SHList.tcl ? ? SHList2.tcl ? ? SListBox.tcl ? ? StdBBox.tcl ? ? SText.tcl ? ? STList1.tcl ? ? STList2.tcl ? ? STList3.tcl ? ? SWindow.tcl ? ? Tree.tcl ? ? Xpm.tcl ? ? Xpm1.tcl ? ? ? ????pref ? ? 10Point.fs ? ? 10Point.fsc ? ? 12Point.fs ? ? 12Point.fsc ? ? 14Point.fs ? ? 14Point.fsc ? ? Bisque.cs ? ? Bisque.csc ? ? Blue.cs ? ? Blue.csc ? ? Gray.cs ? ? Gray.csc ? ? Makefile ? ? Old12Pt.fs ? ? Old14Pt.fs ? ? pkgIndex.tcl ? ? SGIGray.cs ? ? SGIGray.csc ? ? TixGray.cs ? ? TixGray.csc ? ? tixmkpref ? ? TK.cs ? ? TK.csc ? ? TK.fs ? ? TK.fsc ? ? TkWin.cs ? ? TkWin.csc ? ? TkWin.fs ? ? TkWin.fsc ? ? WmDefault.cs ? ? WmDefault.csc ? ? WmDefault.fs ? ? WmDefault.fsc ? ? WmDefault.py ? ? WmDefault.tcl ? ? WmDefault.txt ? ? ? ????__pycache__ ????tk8.6 ? bgerror.tcl ? button.tcl ? choosedir.tcl ? clrpick.tcl ? comdlg.tcl ? console.tcl ? dialog.tcl ? entry.tcl ? focus.tcl ? fontchooser.tcl ? iconlist.tcl ? icons.tcl ? license.terms ? listbox.tcl ? megawidget.tcl ? menu.tcl ? mkpsenc.tcl ? msgbox.tcl ? obsolete.tcl ? optMenu.tcl ? palette.tcl ? panedwindow.tcl ? pkgIndex.tcl ? safetk.tcl ? scale.tcl ? scrlbar.tcl ? spinbox.tcl ? tclIndex ? tearoff.tcl ? text.tcl ? tk.tcl ? tkfbox.tcl ? unsupported.tcl ? xmfbox.tcl ? ????demos ? ? anilabel.tcl ? ? aniwave.tcl ? ? arrow.tcl ? ? bind.tcl ? ? bitmap.tcl ? ? browse ? ? button.tcl ? ? check.tcl ? ? clrpick.tcl ? ? colors.tcl ? ? combo.tcl ? ? cscroll.tcl ? ? ctext.tcl ? ? dialog1.tcl ? ? dialog2.tcl ? ? en.msg ? ? entry1.tcl ? ? entry2.tcl ? ? entry3.tcl ? ? filebox.tcl ? ? floor.tcl ? ? fontchoose.tcl ? ? form.tcl ? ? goldberg.tcl ? ? hello ? ? hscale.tcl ? ? icon.tcl ? ? image1.tcl ? ? image2.tcl ? ? items.tcl ? ? ixset ? ? knightstour.tcl ? ? label.tcl ? ? labelframe.tcl ? ? license.terms ? ? mclist.tcl ? ? menu.tcl ? ? menubu.tcl ? ? msgbox.tcl ? ? nl.msg ? ? paned1.tcl ? ? paned2.tcl ? ? pendulum.tcl ? ? plot.tcl ? ? puzzle.tcl ? ? radio.tcl ? ? README ? ? rmt ? ? rolodex ? ? ruler.tcl ? ? sayings.tcl ? ? search.tcl ? ? spin.tcl ? ? square ? ? states.tcl ? ? style.tcl ? ? tclIndex ? ? tcolor ? ? text.tcl ? ? textpeer.tcl ? ? timer ? ? toolbar.tcl ? ? tree.tcl ? ? ttkbut.tcl ? ? ttkmenu.tcl ? ? ttknote.tcl ? ? ttkpane.tcl ? ? ttkprogress.tcl ? ? ttkscale.tcl ? ? twind.tcl ? ? unicodeout.tcl ? ? vscale.tcl ? ? widget ? ? ? ????images ? earth.gif ? earthmenu.png ? earthris.gif ? flagdown.xbm ? flagup.xbm ? gray25.xbm ? letters.xbm ? noletter.xbm ? ouster.png ? pattern.xbm ? tcllogo.gif ? teapot.ppm ? ????images ? logo.eps ? logo100.gif ? logo64.gif ? logoLarge.gif ? logoMed.gif ? pwrdLogo.eps ? pwrdLogo100.gif ? pwrdLogo150.gif ? pwrdLogo175.gif ? pwrdLogo200.gif ? pwrdLogo75.gif ? README ? tai-ku.gif ? ????msgs ? cs.msg ? da.msg ? de.msg ? el.msg ? en.msg ? en_gb.msg ? eo.msg ? es.msg ? fr.msg ? hu.msg ? it.msg ? nl.msg ? pl.msg ? pt.msg ? ru.msg ? sv.msg ? ????ttk altTheme.tcl aquaTheme.tcl button.tcl clamTheme.tcl classicTheme.tcl combobox.tcl cursors.tcl defaults.tcl entry.tcl fonts.tcl menubutton.tcl notebook.tcl panedwindow.tcl progress.tcl scale.tcl scrollbar.tcl sizegrip.tcl spinbox.tcl treeview.tcl ttk.tcl utils.tcl vistaTheme.tcl winTheme.tcl xpTheme.tcl ---- I hope this is enough information to discover the issue. ---------- components: Windows messages: 380380 nosy: JackSkellington, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Python 3.9 broken installer type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 19:25:03 2020 From: report at bugs.python.org (Aaron Meurer) Date: Thu, 05 Nov 2020 00:25:03 +0000 Subject: [issue30384] traceback.TracebackException.format shouldn't format_exc_only() when __traceback__ is None In-Reply-To: <1494993815.34.0.567809017687.issue30384@psf.upfronthosting.co.za> Message-ID: <1604535903.27.0.265922763255.issue30384@roundup.psfhosted.org> Aaron Meurer added the comment: Neither of those things preclude the possibility of the traceback module doing a better job of printing tracebacks for exceptions where __traceback__ = None. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 19:34:45 2020 From: report at bugs.python.org (Irit Katriel) Date: Thu, 05 Nov 2020 00:34:45 +0000 Subject: [issue42259] pprint: infinite recursion for saferepr() when using nested objects, but str() works In-Reply-To: <1604490271.59.0.652277780579.issue42259@roundup.psfhosted.org> Message-ID: <1604536485.23.0.325228408902.issue42259@roundup.psfhosted.org> Irit Katriel added the comment: I think this is a bug. There is recursion detection in pprint for dicts, lists and tuples, but it only applies when __repr__ has not been overridden in a subclass. If you remove the __repr__ definition from NiceObject then str(s) works. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 19:37:06 2020 From: report at bugs.python.org (JaonHax) Date: Thu, 05 Nov 2020 00:37:06 +0000 Subject: [issue42268] ./configure failing when --with-memory-sanitizer specified Message-ID: <1604536626.36.0.392712714368.issue42268@roundup.psfhosted.org> Change by JaonHax : ---------- components: Build nosy: JaonHax priority: normal severity: normal status: open title: ./configure failing when --with-memory-sanitizer specified type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 19:38:20 2020 From: report at bugs.python.org (Irit Katriel) Date: Thu, 05 Nov 2020 00:38:20 +0000 Subject: [issue30384] traceback.TracebackException.format shouldn't format_exc_only() when __traceback__ is None In-Reply-To: <1494993815.34.0.567809017687.issue30384@psf.upfronthosting.co.za> Message-ID: <1604536700.29.0.633708499265.issue30384@roundup.psfhosted.org> Irit Katriel added the comment: The python-ideas list is where ideas for enhancements and improvements are discussed. I suggest you bring this up there. https://mail.python.org/mailman3/lists/python-ideas.python.org/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 19:38:28 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 05 Nov 2020 00:38:28 +0000 Subject: [issue26584] pyclbr module needs to be more flexible on loader support In-Reply-To: <1458238800.08.0.676127110581.issue26584@psf.upfronthosting.co.za> Message-ID: <1604536708.15.0.0427242506098.issue26584@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +BTaskaya, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 19:39:35 2020 From: report at bugs.python.org (JaonHax) Date: Thu, 05 Nov 2020 00:39:35 +0000 Subject: [issue42268] ./configure failing when --with-memory-sanitizer specified Message-ID: <1604536775.12.0.717833990014.issue42268@roundup.psfhosted.org> New submission from JaonHax : Exact command run is as follows: sudo ./configure --with-pymalloc --with-assertions --enable-optimizations --enable-loadable-sqlite-extensions --enable-shared --with-address-sanitizer --with-undefined-behavior-sanitizer --with-memory-sanitizer -C (ran with root because it seemed to make more things succeed in the checks without those flags) The command's output is attached in configure-out.txt ---------- Added file: https://bugs.python.org/file49569/configure-out.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 19:53:37 2020 From: report at bugs.python.org (Martin Panter) Date: Thu, 05 Nov 2020 00:53:37 +0000 Subject: [issue42263] Removing thread reference in thread results in leaked reference In-Reply-To: <1604518965.9.0.468423053621.issue42263@roundup.psfhosted.org> Message-ID: <1604537617.09.0.722910186519.issue42263@roundup.psfhosted.org> Change by Martin Panter : ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 19:59:18 2020 From: report at bugs.python.org (Irit Katriel) Date: Thu, 05 Nov 2020 00:59:18 +0000 Subject: [issue11346] Generator object should be mentioned in gc module document In-Reply-To: <1298818993.14.0.492098392223.issue11346@psf.upfronthosting.co.za> Message-ID: <1604537958.46.0.810850362142.issue11346@roundup.psfhosted.org> Irit Katriel added the comment: This section is very different now: https://docs.python.org/3/library/gc.html#gc.garbage Should this be closed as out of date? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 20:05:18 2020 From: report at bugs.python.org (Martin Panter) Date: Thu, 05 Nov 2020 01:05:18 +0000 Subject: [issue42263] Removing thread reference in thread results in leaked reference In-Reply-To: <1604518965.9.0.468423053621.issue42263@roundup.psfhosted.org> Message-ID: <1604538318.86.0.124236252811.issue42263@roundup.psfhosted.org> Martin Panter added the comment: Maybe this is related to (or duplicate of) Issue 37788? Python 3.7 has a regression where threads that are never joined cause leaks; previous code was written assuming you didn't need to join threads. Do you still see the leak even if you don't clear the "threads" list (change the target to a no-op), or if you never create a list in the first place? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 20:19:30 2020 From: report at bugs.python.org (JaonHax) Date: Thu, 05 Nov 2020 01:19:30 +0000 Subject: [issue42268] ./configure failing when --with-memory-sanitizer specified In-Reply-To: <1604536775.12.0.717833990014.issue42268@roundup.psfhosted.org> Message-ID: <1604539170.89.0.795504120474.issue42268@roundup.psfhosted.org> JaonHax added the comment: Additional note, since I forgot it in the initial message: I'm building Python 3.9.0 from source on Debian v10, specifically the Debian VM on Chromebooks (which I believe is called Crostini). I've made sure to install all the proper dependencies, as far as I know, and I'm 99% sure that I can successfully build it if I remove the --with-memory-sanitizer flag. Running the command again without it to double-check. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 20:28:49 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 05 Nov 2020 01:28:49 +0000 Subject: [issue42263] Removing thread reference in thread results in leaked reference In-Reply-To: <1604518965.9.0.468423053621.issue42263@roundup.psfhosted.org> Message-ID: <1604539729.44.0.727396000514.issue42263@roundup.psfhosted.org> Jason R. Coombs added the comment: Yes, I agree it's a duplicate of issue37788. And yes, it does still leak if the list is never created or if the target is a no-op. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> fix for bpo-36402 (threading._shutdown() race condition) causes reference leak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 20:33:21 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 05 Nov 2020 01:33:21 +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: <1604540001.85.0.983469728478.issue37788@roundup.psfhosted.org> Jason R. Coombs added the comment: I marked bpo-42263 as a duplicate of this issue. This issue is implicated in preventing the desired fix for bpo-37193, where a thread wishes to remove the handle to itself after performing its duty. By removing its own handle, it can never be joined, and thus obviates the most straightforward way to directly remove the handle for a thread within that thread. ---------- nosy: +jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 20:33:33 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 05 Nov 2020 01:33:33 +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: <1604540013.3.0.979811832784.issue37788@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 20:37:46 2020 From: report at bugs.python.org (JaonHax) Date: Thu, 05 Nov 2020 01:37:46 +0000 Subject: [issue42268] ./configure failing when --with-memory-sanitizer specified In-Reply-To: <1604536775.12.0.717833990014.issue42268@roundup.psfhosted.org> Message-ID: <1604540266.18.0.10527666362.issue42268@roundup.psfhosted.org> JaonHax added the comment: Yeah, exactly as I thought, ran the exact same command except without --with-memory-sanitizer and the configuration was successful. The successful output has been attached in configure-out-1.txt for cross-comparison, if it's necessary. ---------- Added file: https://bugs.python.org/file49570/configure-out-1.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 21:00:12 2020 From: report at bugs.python.org (Vladimir Ryabtsev) Date: Thu, 05 Nov 2020 02:00:12 +0000 Subject: [issue38413] Remove or change "Multithreading" section In-Reply-To: <1570563042.6.0.0902531064636.issue38413@roundup.psfhosted.org> Message-ID: <1604541612.47.0.116352875131.issue38413@roundup.psfhosted.org> Change by Vladimir Ryabtsev : ---------- pull_requests: +22071 pull_request: https://github.com/python/cpython/pull/23159 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 21:09:15 2020 From: report at bugs.python.org (Yonatan Goldschmidt) Date: Thu, 05 Nov 2020 02:09:15 +0000 Subject: [issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior In-Reply-To: <1604526970.3.0.249891884923.issue42266@roundup.psfhosted.org> Message-ID: <1604542155.49.0.0224263967912.issue42266@roundup.psfhosted.org> Change by Yonatan Goldschmidt : ---------- nosy: +Yonatan Goldschmidt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 21:28:49 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 05 Nov 2020 02:28:49 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604543329.93.0.296485999422.issue42225@roundup.psfhosted.org> Terry J. Reedy added the comment: Kevin, Serhiy tried to report this upstream but failed. msg380143. Perhaps you could. One person running my test program reported """ Fedora 32 x86-64 Cinnamon 4.6.7 Linux 5.8.16-200.fc32.x86_64 Python 3.8.6 (default, Sep 25 2020, 00:00:00) [GCC 10.2.1 20200723 (Red Hat 10.2.1-1)] on linux Running line-by-line in terminal, the for-loop crashes with: <<< X Error of failed request: BadLength (poly request too large or internal Xlib length error) Major opcode of failed request: 138 (RENDER) Minor opcode of failed request: 20 (RenderAddGlyphs) Serial number of failed request: 3925 Current serial number in output stream: 4865 """ Another reported "Seems to produce garbage on my system: [ads at ADS4 x]$ uname -a Linux ADS4 5.8.17-100.fc31.x86_64 #1 SMP Thu Oct 29 18:58:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux" But the program ran to completion without errors. A copy of the output from the window was attached. I have asked for the tcl/tk version. My response included: """ On *nix, Python (unicode) chars are utf-8 encoded by _tkinter for tk. The encoding of astral non-BMP chars uses 4 bytes. Perhaps tk on your ADS Linux (new to me) displays the 4 bytes as 4 chars instead of 1. For each block of 32, the first 3 are the same. This is true in this file, but easily seeing this depends on the display software. I don't know what you saw, but Notepad++ displays control chars with the high bit set (C1 controls) as their reversed type (white on black) 3 char acronym as defined on https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block) Character table. Thus the first astral U+10000 is encoded as b"\xF0\x90\x80\x80. In Notepad++, what is in the file appears as 4 characters, not 1, displayed '?DCSPADPAD', with the part after ? being being the correct white on black triplets for code points U+90 and U+80. The first char '\xf0' == '?' is the same for all quadruples shown by Notepad++. The next 3 vary as appropriate. In some cases, all 4 are normal printable chars, such as 0x29aa0, a CJK char, showing as "??? " If I cut the first 4 chars from Notepad++ to Thunderbird the result is "????". I see only ? but the presence of 3 0-width chars is revealed by moving through the string with arrow keys. """ Here on Firefox the C1 controls, invisible in Thunderbird, display as squares with digits 0090, 0080 in two rows. Serhiy probably understands these reports better than I do. This tc in ADS4 Linux seems to doing something like what Serhiy described as "Tcl fails to decode the string from UTF-8 and falls back to Latin1" before his _tkinter fix. As far as IDLE and Linux is concerned, I am just going to consider what to change or add in "User output in Shell" in the IDLE doc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 21:57:31 2020 From: report at bugs.python.org (Vladimir Ryabtsev) Date: Thu, 05 Nov 2020 02:57:31 +0000 Subject: [issue42179] Clarify chaining exceptions in tutorial/errors.rst In-Reply-To: <1603873891.9.0.500762071742.issue42179@roundup.psfhosted.org> Message-ID: <1604545051.53.0.348981647959.issue42179@roundup.psfhosted.org> Change by Vladimir Ryabtsev : ---------- keywords: +patch pull_requests: +22072 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23160 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 4 22:55:21 2020 From: report at bugs.python.org (Inada Naoki) Date: Thu, 05 Nov 2020 03:55:21 +0000 Subject: [issue42179] Clarify chaining exceptions in tutorial/errors.rst In-Reply-To: <1603873891.9.0.500762071742.issue42179@roundup.psfhosted.org> Message-ID: <1604548521.52.0.881691976308.issue42179@roundup.psfhosted.org> Inada Naoki added the comment: Please note that tutorial is a tutorial. It is document to help new user who are learning Python. Do you believe special attributes like __cause__ and __contexts__ are really worth to teach for tutorial readers? Generally speaking, I think we should *reduce* some details from tutorial. ---------- nosy: +methane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 02:24:50 2020 From: report at bugs.python.org (Jakub Kulik) Date: Thu, 05 Nov 2020 07:24:50 +0000 Subject: [issue42237] test_socket.SendfileUsingSendfileTest fails on illumos In-Reply-To: <1604261267.98.0.369045235153.issue42237@roundup.psfhosted.org> Message-ID: <1604561090.71.0.676959261461.issue42237@roundup.psfhosted.org> Change by Jakub Kulik : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 02:43:10 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 05 Nov 2020 07:43:10 +0000 Subject: [issue42265] Remove binhex module following PEP-594 In-Reply-To: <1604525707.18.0.925908508614.issue42265@roundup.psfhosted.org> Message-ID: <1604562190.53.0.767701693051.issue42265@roundup.psfhosted.org> Steven D'Aprano added the comment: PEP 594 is a draft, it has not been accepted. It is premature to start cancelling perfectly good modules and breaking people's code. https://conroy.org/breaking-python-packages If you have some concrete reason for removing the binhex module, other than just PEP 594, then we can consider depreciating it in 3.10 or 3.11, and removing it in 3.12 or 3.13, or possibly later. ---------- nosy: +steven.daprano resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 03:18:39 2020 From: report at bugs.python.org (Vladimir Ryabtsev) Date: Thu, 05 Nov 2020 08:18:39 +0000 Subject: [issue42179] Clarify chaining exceptions in tutorial/errors.rst In-Reply-To: <1603873891.9.0.500762071742.issue42179@roundup.psfhosted.org> Message-ID: <1604564319.85.0.856354719681.issue42179@roundup.psfhosted.org> Vladimir Ryabtsev added the comment: 1. Such understanding of a tutorial is debatable. Tutorial is just a material for learning written with some system in mind, which is more interesting to read than dry reference material. A tutorial, generally dpeaking, may be both for beginners and for professionals. 2. The question about exception chaining is popular on Stackoverflow in people who came to Python with Java or C# background (see ?python inner exception?). 3. Whatever material is given, it should not cause confusion, but now it does. Since this section has been added recently, it is better to fix it rather than remove entirely, aren?t you agree? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 03:51:11 2020 From: report at bugs.python.org (Inada Naoki) Date: Thu, 05 Nov 2020 08:51:11 +0000 Subject: [issue42179] Clarify chaining exceptions in tutorial/errors.rst In-Reply-To: <1603873891.9.0.500762071742.issue42179@roundup.psfhosted.org> Message-ID: <1604566271.15.0.768586645212.issue42179@roundup.psfhosted.org> Inada Naoki added the comment: > 1. Such understanding of a tutorial is debatable. Tutorial is just a material for learning written with some system in mind, which is more interesting to read than dry reference material. A tutorial, generally dpeaking, may be both for beginners and for professionals. OK, I will send this topic to python-dev first. > 2. The question about exception chaining is popular on Stackoverflow in people who came to Python with Java or C# background (see ?python inner exception?). > 3. Whatever material is given, it should not cause confusion, but now it does. I searched it but I can not find confusion caused by this tutorial section. Please write a concrete URL caused by current tutorial? > Since this section has been added recently, it is better to fix it rather than remove entirely, aren?t you agree? I prefer removing mention to __cause__, instead of adding mention to __context__. No need to remove entire section. We can introduce high level overview of context chaining. Describing the default behavior and "from None" is enough for new users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 03:52:51 2020 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 05 Nov 2020 08:52:51 +0000 Subject: [issue40816] Add missed AsyncContextDecorator to contextlib In-Reply-To: <1590763993.17.0.319482222949.issue40816@roundup.psfhosted.org> Message-ID: <1604566371.89.0.552884308281.issue40816@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 178695b7aee7a7aacd49a3086060e06347d1e556 by Kazantcev Andrey in branch 'master': bpo-40816 Add AsyncContextDecorator class (GH-20516) https://github.com/python/cpython/commit/178695b7aee7a7aacd49a3086060e06347d1e556 ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 03:53:43 2020 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 05 Nov 2020 08:53:43 +0000 Subject: [issue40816] Add missed AsyncContextDecorator to contextlib In-Reply-To: <1590763993.17.0.319482222949.issue40816@roundup.psfhosted.org> Message-ID: <1604566423.16.0.607385233823.issue40816@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 04:05:04 2020 From: report at bugs.python.org (Inada Naoki) Date: Thu, 05 Nov 2020 09:05:04 +0000 Subject: [issue37826] Document PEP 3134 in tutorials/errors.rst In-Reply-To: <1565548566.46.0.213467869715.issue37826@roundup.psfhosted.org> Message-ID: <1604567104.17.0.858783384127.issue37826@roundup.psfhosted.org> Change by Inada Naoki : ---------- nosy: +methane nosy_count: 4.0 -> 5.0 pull_requests: +22073 pull_request: https://github.com/python/cpython/pull/23162 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 04:23:33 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 05 Nov 2020 09:23:33 +0000 Subject: [issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior In-Reply-To: <1604526970.3.0.249891884923.issue42266@roundup.psfhosted.org> Message-ID: <1604568213.73.0.622596287367.issue42266@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 80449f243b13311d660eab3a751648029bcdd833 by Pablo Galindo in branch 'master': bpo-42266: Handle monkey-patching descriptors in LOAD_ATTR cache (GH-23157) https://github.com/python/cpython/commit/80449f243b13311d660eab3a751648029bcdd833 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 04:23:52 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 05 Nov 2020 09:23:52 +0000 Subject: [issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior In-Reply-To: <1604526970.3.0.249891884923.issue42266@roundup.psfhosted.org> Message-ID: <1604568232.84.0.00807162396299.issue42266@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 04:41:13 2020 From: report at bugs.python.org (Inada Naoki) Date: Thu, 05 Nov 2020 09:41:13 +0000 Subject: [issue42179] Clarify chaining exceptions in tutorial/errors.rst In-Reply-To: <1603873891.9.0.500762071742.issue42179@roundup.psfhosted.org> Message-ID: <1604569273.3.0.815334149435.issue42179@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +22074 pull_request: https://github.com/python/cpython/pull/23162 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 04:44:14 2020 From: report at bugs.python.org (Samuel Marks) Date: Thu, 05 Nov 2020 09:44:14 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1604569454.76.0.684939236247.issue41810@roundup.psfhosted.org> Samuel Marks added the comment: Since we're bringing these back, would you accept a backport of these types? [I'm writing a bunch of parsers/emitters?and starting to maintain an old runtime type-checker?for 3.6+] ---------- nosy: +samuelmarks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 04:51:11 2020 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 05 Nov 2020 09:51:11 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1604569871.55.0.707877622405.issue41810@roundup.psfhosted.org> Eric V. Smith added the comment: I don't think we should backport them. It's definitely a new feature, and our policy is no new features in micro versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 04:52:01 2020 From: report at bugs.python.org (Irit Katriel) Date: Thu, 05 Nov 2020 09:52:01 +0000 Subject: [issue10529] [doc] Write argparse i18n howto In-Reply-To: <1290688089.28.0.749623528369.issue10529@psf.upfronthosting.co.za> Message-ID: <1604569921.38.0.31776237315.issue10529@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: Write argparse i18n howto -> [doc] Write argparse i18n howto versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 05:03:39 2020 From: report at bugs.python.org (Anatoliy Platonov) Date: Thu, 05 Nov 2020 10:03:39 +0000 Subject: [issue42265] Remove binhex module following PEP-594 In-Reply-To: <1604525707.18.0.925908508614.issue42265@roundup.psfhosted.org> Message-ID: <1604570619.03.0.000491610780088.issue42265@roundup.psfhosted.org> Anatoliy Platonov added the comment: Yeah, this was my mistake. I hurried a little with this issue and didn't notice that PEP is in draft state. Binhex module already marked as deprecated, since 3.9 I think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 05:07:54 2020 From: report at bugs.python.org (Irit Katriel) Date: Thu, 05 Nov 2020 10:07:54 +0000 Subject: [issue26053] regression in pdb output between 2.7 and 3.5 In-Reply-To: <1452296621.32.0.373600761217.issue26053@psf.upfronthosting.co.za> Message-ID: <1604570874.17.0.0891190509566.issue26053@roundup.psfhosted.org> Change by Irit Katriel : ---------- Removed message: https://bugs.python.org/msg377666 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 05:44:00 2020 From: report at bugs.python.org (Jan Novak) Date: Thu, 05 Nov 2020 10:44:00 +0000 Subject: [issue41945] http.cookies.SimpleCookie.parse error after [keys] In-Reply-To: <1601911186.95.0.178044136501.issue41945@roundup.psfhosted.org> Message-ID: <1604573040.16.0.409403420886.issue41945@roundup.psfhosted.org> Jan Novak added the comment: Possible patch, load parts one by one: http_cookie = 'id=12345; [object Object]=data; something=not_loaded' for cookie_key in http_cookie.split(';'): c.load(cookie_key) print c Set-Cookie: id=12345 Set-Cookie: something=not_loaded ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 06:09:27 2020 From: report at bugs.python.org (Tal Einat) Date: Thu, 05 Nov 2020 11:09:27 +0000 Subject: [issue26053] regression in pdb output between 2.7 and 3.5 In-Reply-To: <1452296621.32.0.373600761217.issue26053@psf.upfronthosting.co.za> Message-ID: <1604574567.9.0.201260386098.issue26053@roundup.psfhosted.org> Tal Einat added the comment: I'm also uneasy about the sys.argv mangling. It seem to me that it would be safer, and more explicit, to pass the desired arguments in the Restart exception instance. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 06:21:26 2020 From: report at bugs.python.org (Irit Katriel) Date: Thu, 05 Nov 2020 11:21:26 +0000 Subject: [issue26053] regression in pdb output between 2.7 and 3.5 In-Reply-To: <1452296621.32.0.373600761217.issue26053@psf.upfronthosting.co.za> Message-ID: <1604575286.14.0.731358270095.issue26053@roundup.psfhosted.org> Irit Katriel added the comment: I like the idea of adding it to the Restart exception. Should we do this refactor in the same PR as fixing the regression or keep them separate? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 06:39:24 2020 From: report at bugs.python.org (Tal Einat) Date: Thu, 05 Nov 2020 11:39:24 +0000 Subject: [issue24160] Pdb sometimes raises exception when trying to remove a breakpoint defined in a different debugger session In-Reply-To: <1431275416.99.0.134014878289.issue24160@psf.upfronthosting.co.za> Message-ID: <1604576364.78.0.396853250609.issue24160@roundup.psfhosted.org> Tal Einat added the comment: Irit, I like the approach of your PR for an immediate fix, that we could consider backporting. In the long term, ISTM that we should refactor to store the breakpoints with only a single source of truth, and avoid the duplication between Breakpoint.bplist, Breakpoint.bpbynumber and Bdb.breaks. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 06:54:02 2020 From: report at bugs.python.org (Tal Einat) Date: Thu, 05 Nov 2020 11:54:02 +0000 Subject: [issue26053] regression in pdb output between 2.7 and 3.5 In-Reply-To: <1452296621.32.0.373600761217.issue26053@psf.upfronthosting.co.za> Message-ID: <1604577242.55.0.834768350795.issue26053@roundup.psfhosted.org> Tal Einat added the comment: Since it's a different implementation approach, I'd prefer a separate PR. Whether we merge the existing one depends on whether we'd like to backport a fix for this to 3.9 and 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 07:03:22 2020 From: report at bugs.python.org (John Belmonte) Date: Thu, 05 Nov 2020 12:03:22 +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: <1604577802.86.0.418831834919.issue31861@roundup.psfhosted.org> John Belmonte added the comment: Adding this would be a nice compliment to aclosing(), which was already merged for 3.10. Otherwise, witness the ugliness of using aclosing() with an async iterable object: async with aclosing(foo.__aiter__()) as agen: async for item in agen: ... I'd like: async with aclosing(aiter(foo)) as agen: async for item in agen: ... ---------- nosy: +John Belmonte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 07:30:50 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 05 Nov 2020 12:30:50 +0000 Subject: [issue42264] Deprecate or remove sqlite3.OptimizedUnicode In-Reply-To: <1604525066.61.0.869187561497.issue42264@roundup.psfhosted.org> Message-ID: <1604579450.96.0.692744615365.issue42264@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +22075 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23163 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 09:02:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Nov 2020 14:02:40 +0000 Subject: [issue42262] [C API] Add Py_NewRef() function to get a new strong reference to an object In-Reply-To: <1604506834.94.0.230929451807.issue42262@roundup.psfhosted.org> Message-ID: <1604584960.4.0.290321740138.issue42262@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 53a03aafd5812018a3821a2e83063fd3d6cd2576 by Victor Stinner in branch 'master': bpo-42262: Add Py_NewRef() and Py_XNewRef() (GH-23152) https://github.com/python/cpython/commit/53a03aafd5812018a3821a2e83063fd3d6cd2576 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 09:11:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Nov 2020 14:11:51 +0000 Subject: [issue42262] [C API] Add Py_NewRef() function to get a new strong reference to an object In-Reply-To: <1604506834.94.0.230929451807.issue42262@roundup.psfhosted.org> Message-ID: <1604585511.5.0.225491485903.issue42262@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 09:54:45 2020 From: report at bugs.python.org (=?utf-8?q?Micka=C3=ABl_Schoentgen?=) Date: Thu, 05 Nov 2020 14:54:45 +0000 Subject: [issue42108] HTTPSConnection hangs forever when the percentage completed of the upload drops from 100 to 0 In-Reply-To: <1603290489.3.0.079937646803.issue42108@roundup.psfhosted.org> Message-ID: <1604588085.56.0.769810504489.issue42108@roundup.psfhosted.org> Micka?l Schoentgen added the comment: So, after several weeks we found the issue. And it is not related to Python but a missing TCP keep alive option not set. ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 09:55:07 2020 From: report at bugs.python.org (=?utf-8?q?Micka=C3=ABl_Schoentgen?=) Date: Thu, 05 Nov 2020 14:55:07 +0000 Subject: [issue42108] HTTPSConnection hangs forever when the percentage completed of the upload drops from 100 to 0 In-Reply-To: <1603290489.3.0.079937646803.issue42108@roundup.psfhosted.org> Message-ID: <1604588107.33.0.814971655376.issue42108@roundup.psfhosted.org> Change by Micka?l Schoentgen : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 10:01:13 2020 From: report at bugs.python.org (Yash Shete) Date: Thu, 05 Nov 2020 15:01:13 +0000 Subject: [issue41712] REDoS in purge In-Reply-To: <1599212842.75.0.630288607393.issue41712@roundup.psfhosted.org> Message-ID: <1604588473.66.0.957876210979.issue41712@roundup.psfhosted.org> Yash Shete added the comment: converted regex from \w+\d+ to ([A-Za-z_]*\d)+ as asked. you can modify the sub-pattern \w+\d+ to ([A-Za-z_]*\d)+ and is working fine ---------- nosy: +Pixmew Added file: https://bugs.python.org/file49571/purge.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 10:03:53 2020 From: report at bugs.python.org (Yash Shete) Date: Thu, 05 Nov 2020 15:03:53 +0000 Subject: [issue41712] REDoS in purge In-Reply-To: <1599212842.75.0.630288607393.issue41712@roundup.psfhosted.org> Message-ID: <1604588633.68.0.190572541764.issue41712@roundup.psfhosted.org> Change by Yash Shete : Removed file: https://bugs.python.org/file49571/purge.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 10:12:45 2020 From: report at bugs.python.org (Ken Jin) Date: Thu, 05 Nov 2020 15:12:45 +0000 Subject: [issue40816] Add missed AsyncContextDecorator to contextlib In-Reply-To: <1590763993.17.0.319482222949.issue40816@roundup.psfhosted.org> Message-ID: <1604589165.33.0.173475770548.issue40816@roundup.psfhosted.org> Change by Ken Jin : ---------- nosy: +kj nosy_count: 5.0 -> 6.0 pull_requests: +22076 pull_request: https://github.com/python/cpython/pull/23164 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 10:14:34 2020 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiBCcm/FvmVr?=) Date: Thu, 05 Nov 2020 15:14:34 +0000 Subject: [issue41877] Check against misspellings of assert etc. in mock In-Reply-To: <1601317157.88.0.730935461305.issue41877@roundup.psfhosted.org> Message-ID: <1604589274.03.0.192250675754.issue41877@roundup.psfhosted.org> Change by V?clav Bro?ek : ---------- keywords: +patch pull_requests: +22077 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23165 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 10:19:18 2020 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiBCcm/FvmVr?=) Date: Thu, 05 Nov 2020 15:19:18 +0000 Subject: [issue41877] Check against misspellings of assert etc. in mock In-Reply-To: <1601317157.88.0.730935461305.issue41877@roundup.psfhosted.org> Message-ID: <1604589558.9.0.581793526879.issue41877@roundup.psfhosted.org> V?clav Bro?ek added the comment: A pull request implementing the first part of this issue (Wrong prefixes of mock asserts: asert/aseert/assrt -> assert) is at https://github.com/python/cpython/pull/23165. I acknowledge that this is a controversial topic and I put forward my reasons to carry on with the above pull request in msg378569. I welcome a further discussion on the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 10:26:11 2020 From: report at bugs.python.org (Yash Shete) Date: Thu, 05 Nov 2020 15:26:11 +0000 Subject: [issue41712] REDoS in purge In-Reply-To: <1599212842.75.0.630288607393.issue41712@roundup.psfhosted.org> Message-ID: <1604589971.82.0.339604080974.issue41712@roundup.psfhosted.org> Yash Shete added the comment: Vulnerable regex conditions are removed bpo-41712: Removal of Vulnerable regex conditions Using suggestion ""For example, you can modify the sub-pattern \w+\d+ to ([A-Za-z_]*\d)+"" and converted to ([A-za-z_]+\d+) which should Fix the issue of vulnerable regex. Test Result : Working as intended Sorry if this not much this is my first pr to big org ---------- Added file: https://bugs.python.org/file49572/purge.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 10:28:09 2020 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 05 Nov 2020 15:28:09 +0000 Subject: [issue41618] [C API] How many slots of static types should be exposed in PyType_GetSlot() In-Reply-To: <1598172498.12.0.869607269568.issue41618@roundup.psfhosted.org> Message-ID: <1604590089.42.0.421530425253.issue41618@roundup.psfhosted.org> Petr Viktorin added the comment: My views on individual slots: Not a function, shouldn't be used with PyType_Slot: * tp_dict - I'd add a PyType_GetDict if there is a need to get this * tp_mro - I'd add a PyType_GetMRO if there is a need to get this (There are existing slots that aren't functions; I'd like to deprecate them in the long term.) internal use only, do not expose: * tp_cache * tp_subclasses * tp_weaklist * tp_as_* Not part of limited API, do not expose: * tp_vectorcall Can be exposed if we deem all of the related API stable: * bf_getbuffer * bf_releasebuffer ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 10:31:52 2020 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 05 Nov 2020 15:31:52 +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: <1604590312.09.0.291425618535.issue41111@roundup.psfhosted.org> Petr Viktorin added the comment: > Maybe we can do add new members for the 8 missing slots See: https://bugs.python.org/issue41618?#msg380414 ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 10:38:14 2020 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 05 Nov 2020 15:38:14 +0000 Subject: [issue42269] Add ability to set __slots__ in dataclasses Message-ID: <1604590694.08.0.0173517280171.issue42269@roundup.psfhosted.org> New submission from Eric V. Smith : I resisted adding the ability to set __slots__ in the first version of dataclasses, since it requires that instead of modifying an existing class, an entirely new class is returned. But I think this feature would be useful enough that I'm now willing to add it. I have the code ready, I just need to work on tests and documentation. ---------- assignee: eric.smith components: Library (Lib) messages: 380416 nosy: eric.smith priority: normal severity: normal status: open title: Add ability to set __slots__ in dataclasses type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 10:47:24 2020 From: report at bugs.python.org (Ken Jin) Date: Thu, 05 Nov 2020 15:47:24 +0000 Subject: [issue20774] collections.deque should ship with a stdlib json serializer In-Reply-To: <1393362950.58.0.308283739635.issue20774@psf.upfronthosting.co.za> Message-ID: <1604591244.22.0.762003095913.issue20774@roundup.psfhosted.org> Ken Jin added the comment: Sorry to butt into this conversation, but I wanted to add that I have interest in this feature - deques are the fourth most common container types I use in Python. Is there any way I can help to get this PR across the finish line? So far I've forked the PR, rebased it, then applied some changes (docs, news, and performance) to try to lessen the impact of checking for deque: (Python/master branch) >>> timeit.timeit(stmt="json.dumps(['test'])", setup="import json", number=1_000_000) 2.2583862999999997 >>> timeit.timeit(stmt="json.dumps(10000)", setup="import json", number=1_000_000) 1.9845121999999975 (Python/pr_830 branch) >>> timeit.timeit(stmt="json.dumps(['test'])", setup="import json", number=1_000_000) 2.324303399999991 >>> timeit.timeit(stmt="json.dumps(10000)", setup="import json", number=1_000_000) 1.9680711999999971 The PR branch is here https://github.com/Fidget-Spinner/cpython/tree/pr_830. I'm not a Git wizard, so I don't know what's the best next step. Do I a. Make a PR against Lisa's PR (or) b. Make a brand new PR against cpython master ? If the core devs here feel that after 6 years, this change might be unneeded after all, I don't mind closing the branch either. Thanks for reading. ---------- nosy: +kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 10:48:14 2020 From: report at bugs.python.org (Yash Shete) Date: Thu, 05 Nov 2020 15:48:14 +0000 Subject: [issue41712] REDoS in purge In-Reply-To: <1599212842.75.0.630288607393.issue41712@roundup.psfhosted.org> Message-ID: <1604591294.48.0.346497455705.issue41712@roundup.psfhosted.org> Change by Yash Shete : ---------- keywords: +patch pull_requests: +22078 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23166 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 10:56:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Nov 2020 15:56:28 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1604591788.02.0.0188919893189.issue42260@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22079 pull_request: https://github.com/python/cpython/pull/23167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 11:21:06 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Thu, 05 Nov 2020 16:21:06 +0000 Subject: [issue42173] Drop Solaris support In-Reply-To: <1603814348.33.0.839225742612.issue42173@roundup.psfhosted.org> Message-ID: <1604593266.93.0.514942750079.issue42173@roundup.psfhosted.org> Change by Jakub Stasiak : ---------- nosy: +jstasiak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 11:32:09 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Thu, 05 Nov 2020 16:32:09 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1604593929.38.0.886866804836.issue38323@roundup.psfhosted.org> Change by Jakub Stasiak : ---------- nosy: +jstasiak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 11:42:34 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Thu, 05 Nov 2020 16:42:34 +0000 Subject: [issue41839] Solaris: Fix error checking in sched_get_priority_ functions In-Reply-To: <1600854291.47.0.647428852002.issue41839@roundup.psfhosted.org> Message-ID: <1604594554.05.0.379397844519.issue41839@roundup.psfhosted.org> Jakub Stasiak added the comment: I think negative values aren't possible on Linux if one's to trust the sched_get_priority_min man page: Linux allows the static priority range 1 to 99 for the SCHED_FIFO and SCHED_RR policies, and the priority 0 for the remaining policies. Scheduling priority ranges for the various policies are not alterable. But yeah, it seems that negative values need to be accepted on Solaris. ---------- nosy: +jstasiak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 11:52:02 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 05 Nov 2020 16:52:02 +0000 Subject: [issue41877] Check against misspellings of assert etc. in mock In-Reply-To: <1601317157.88.0.730935461305.issue41877@roundup.psfhosted.org> Message-ID: <1604595122.2.0.0223844798579.issue41877@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 11:57:37 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 05 Nov 2020 16:57:37 +0000 Subject: [issue41877] Check against misspellings of assert etc. in mock In-Reply-To: <1601317157.88.0.730935461305.issue41877@roundup.psfhosted.org> Message-ID: <1604595457.89.0.949281940247.issue41877@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 11:56:52 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Thu, 05 Nov 2020 16:56:52 +0000 Subject: [issue42269] Add ability to set __slots__ in dataclasses In-Reply-To: <1604590694.08.0.0173517280171.issue42269@roundup.psfhosted.org> Message-ID: <1604595412.02.0.893192336918.issue42269@roundup.psfhosted.org> Change by Jakub Stasiak : ---------- nosy: +jstasiak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 12:01:08 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 05 Nov 2020 17:01:08 +0000 Subject: [issue24651] Mock.assert* API is in user namespace In-Reply-To: <1437119760.12.0.974021198911.issue24651@psf.upfronthosting.co.za> Message-ID: <1604595668.59.0.47305606314.issue24651@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 12:01:14 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 05 Nov 2020 17:01:14 +0000 Subject: [issue24651] Mock.assert* API is in user namespace In-Reply-To: <1437119760.12.0.974021198911.issue24651@psf.upfronthosting.co.za> Message-ID: <1604595674.95.0.896071741076.issue24651@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- versions: +Python 3.10 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 12:01:59 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Thu, 05 Nov 2020 17:01:59 +0000 Subject: [issue41843] Reenable sendfile in shutil.copyfile() on Solaris In-Reply-To: <1600867452.06.0.35884925988.issue41843@roundup.psfhosted.org> Message-ID: <1604595719.85.0.629114186452.issue41843@roundup.psfhosted.org> Change by Jakub Stasiak : ---------- nosy: +jstasiak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 12:04:46 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 05 Nov 2020 17:04:46 +0000 Subject: [issue41877] Check against misspellings of assert etc. in mock In-Reply-To: <1601317157.88.0.730935461305.issue41877@roundup.psfhosted.org> Message-ID: <1604595886.23.0.141072273893.issue41877@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 4662fa9bfe4a849fe87bfb321d8ef0956c89a772 by vabr-g in branch 'master': bpo-41877 Check for asert, aseert, assrt in mocks (GH-23165) https://github.com/python/cpython/commit/4662fa9bfe4a849fe87bfb321d8ef0956c89a772 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 12:08:34 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Thu, 05 Nov 2020 17:08:34 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1604596114.58.0.552184575697.issue38323@roundup.psfhosted.org> Jakub Stasiak added the comment: FYI your PR 20142 together with my PR https://github.com/python/cpython/pull/23154 allow me to run the whole test_asyncio test suite on OpenIndiana 5.11: $ ./python -m unittest -v test.test_asyncio (...) Ran 2298 tests in 71.668s OK (skipped=52) without your PR at least one of the tests is hanging forever. So, this PR improves Solaris/SunOS/illumos/OpenIndiana side of things as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 12:12:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Nov 2020 17:12:41 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1604596361.04.0.0543561551015.issue42260@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f3cb81431574453aac3b6dcadb3120331e6a8f1c by Victor Stinner in branch 'master': bpo-42260: Add _PyConfig_FromDict() (GH-23167) https://github.com/python/cpython/commit/f3cb81431574453aac3b6dcadb3120331e6a8f1c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 12:33:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Nov 2020 17:33:36 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1604597616.47.0.0356816144078.issue42260@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22080 pull_request: https://github.com/python/cpython/pull/23168 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 12:49:31 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 05 Nov 2020 17:49:31 +0000 Subject: [issue41877] Check against misspellings of assert etc. in mock In-Reply-To: <1601317157.88.0.730935461305.issue41877@roundup.psfhosted.org> Message-ID: <1604598571.14.0.0395200453982.issue41877@roundup.psfhosted.org> Gregory P. Smith added the comment: Thanks for the patch! I'm leaving this open as dealing with the other aspect: * Wrong attribute names around asserts: autospect/auto_spec -> autospec, set_spec -> spec_set is still a possibility. (given you also found a number of those in our codebase leading to hidden testing bugs) Vedran: We're not claiming these are fixes for the fundamental problem. But they are useful practical bandaids on the existing APIs that a hundred of millions of lines of existing unittest code around the world make use of to prevent common unintended consequences of our existing API's now well know flaws. issue24651 looks like the better place to take up future design ideas. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 12:52:28 2020 From: report at bugs.python.org (Trevor) Date: Thu, 05 Nov 2020 17:52:28 +0000 Subject: [issue42270] libregrtest BrokenPipeError on OpenEmbedded builds Message-ID: <1604598748.13.0.380375862374.issue42270@roundup.psfhosted.org> New submission from Trevor : In OpenEmbedded we have a test wrapper for tests such as those in Python, and currently we are experiencing the following error when running them: sed: couldn't flush stdout: Resource temporarily unavailable [37/1846] test test_strftime crashed -- Traceback (most recent call last): File "/usr/lib/python3.9/test/libregrtest/runtest.py", line 270, in _runtest_inner refleak = _runtest_inner2(ns, test_name) File "/usr/lib/python3.9/test/libregrtest/runtest.py", line 234, in _runtest_inner2 test_runner() File "/usr/lib/python3.9/test/libregrtest/runtest.py", line 209, in _test_module support.run_unittest(tests) File "/usr/lib/python3.9/test/support/__init__.py", line 1918, in run_unittest _run_suite(suite) File "/usr/lib/python3.9/test/support/__init__.py", line 1796, in _run_suite result = runner.run(suite) File "/usr/lib/python3.9/unittest/runner.py", line 176, in run test(result) File "/usr/lib/python3.9/unittest/suite.py", line 84, in __call__ return self.run(*args, **kwds) File "/usr/lib/python3.9/unittest/suite.py", line 122, in run test(result) File "/usr/lib/python3.9/unittest/suite.py", line 84, in __call__ return self.run(*args, **kwds) File "/usr/lib/python3.9/unittest/suite.py", line 122, in run test(result) File "/usr/lib/python3.9/unittest/suite.py", line 84, in __call__ return self.run(*args, **kwds) File "/usr/lib/python3.9/unittest/suite.py", line 122, in run test(result) File "/usr/lib/python3.9/unittest/case.py", line 653, in __call__ return self.run(*args, **kwds) File "/usr/lib/python3.9/unittest/case.py", line 566, in run result.startTest(self) File "/usr/lib/python3.9/test/support/testresult.py", line 49, in startTest self.stream.flush() BrokenPipeError: [Errno 32] Broken pipe Traceback (most recent call last): File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/usr/lib/python3.9/test/__main__.py", line 2, in main() File "/usr/lib/python3.9/test/libregrtest/main.py", line 716, in main Regrtest().main(tests=tests, **kwargs) File "/usr/lib/python3.9/test/libregrtest/main.py", line 638, in main self._main(tests, kwargs) File "/usr/lib/python3.9/test/libregrtest/main.py", line 691, in _main self.run_tests() File "/usr/lib/python3.9/test/libregrtest/main.py", line 518, in run_tests self.run_tests_sequential() File "/usr/lib/python3.9/test/libregrtest/main.py", line 409, in run_tests_sequential self.display_progress(test_index, text) File "/usr/lib/python3.9/test/libregrtest/main.py", line 169, in display_progress self.log(f"[{line}] {text}") File "/usr/lib/python3.9/test/libregrtest/main.py", line 158, in log print(line, flush=True) BrokenPipeError: [Errno 32] Broken pipe Warning -- Unraisable exception Exception ignored in: <_io.TextIOWrapper name=1 mode='w' encoding='utf-8'> BrokenPipeError: [Errno 32] Broken pipe --- I'm looking into it already, but need to document it. ---------- components: Tests messages: 380423 nosy: threexc priority: normal severity: normal status: open title: libregrtest BrokenPipeError on OpenEmbedded builds type: crash versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 12:58:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Nov 2020 17:58:14 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1604599094.36.0.727658281506.issue42260@roundup.psfhosted.org> STINNER Victor added the comment: New changeset dc42af8fd16b10127ce1fc93c13bc1bfd2674aa2 by Victor Stinner in branch 'master': bpo-42260: PyConfig_Read() only parses argv once (GH-23168) https://github.com/python/cpython/commit/dc42af8fd16b10127ce1fc93c13bc1bfd2674aa2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 12:58:39 2020 From: report at bugs.python.org (hai shi) Date: Thu, 05 Nov 2020 17:58:39 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1604599119.95.0.141849715354.issue42260@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 13:20:59 2020 From: report at bugs.python.org (Sebastian Berg) Date: Thu, 05 Nov 2020 18:20:59 +0000 Subject: [issue40522] [subinterpreters] Get the current Python interpreter state from Thread Local Storage (autoTSSkey) In-Reply-To: <1588698734.65.0.223552100195.issue40522@roundup.psfhosted.org> Message-ID: <1604600459.79.0.962272039796.issue40522@roundup.psfhosted.org> Change by Sebastian Berg : ---------- nosy: +seberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 13:27:57 2020 From: report at bugs.python.org (Vladimir Ryabtsev) Date: Thu, 05 Nov 2020 18:27:57 +0000 Subject: [issue42179] Clarify chaining exceptions in tutorial/errors.rst In-Reply-To: <1603873891.9.0.500762071742.issue42179@roundup.psfhosted.org> Message-ID: <1604600877.6.0.431429339464.issue42179@roundup.psfhosted.org> Vladimir Ryabtsev added the comment: > I can not find confusion caused by this tutorial section Inada, have you read the very first message in this ticket? It explains why this wording may cause confusion (and it did in me), and describes the problem part. A link for your convenience: https://docs.python.org/3/tutorial/errors.html#exception-chaining > Describing the default behavior and "from None" is enough for new users Strange that you think that "from None" is more useful for beginners than these special attributes. Without understanding of __cause__ and __context__, stack traceback message looks like magic. Say you want to handle an exception and retrieve its cause (context) in runtime (this is what exception chaining for) ? this section makes no clues about how to do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 13:49:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Nov 2020 18:49:11 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1604602151.33.0.924085582572.issue42260@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22081 pull_request: https://github.com/python/cpython/pull/23169 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 13:51:46 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 05 Nov 2020 18:51:46 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604602306.51.0.535618799378.issue1635741@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +22082 pull_request: https://github.com/python/cpython/pull/23170 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 13:56:14 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 05 Nov 2020 18:56:14 +0000 Subject: [issue42267] Python 3.9 broken installer In-Reply-To: <1604531829.54.0.433305713685.issue42267@roundup.psfhosted.org> Message-ID: <1604602574.45.0.0888363371859.issue42267@roundup.psfhosted.org> Steve Dower added the comment: You need to use the installer to remove Python, as you have likely not cleaned up all of the registration. I suggest searching in Start for "Apps & Features" and finding Python in the list, and either choosing to Modify and then Repair it, or Uninstall it and then reinstall. To remove other packages, you would probably be best to Uninstall, then delete the installation directory (%LocalAppData%\Programs\Python\Python39) before you reinstall. Alternatively, unless the package is doing something *very* wrong, you should be able to just remove it from Python39\Lib\site-packages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 13:57:41 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 05 Nov 2020 18:57:41 +0000 Subject: [issue42267] Python 3.9 broken installer In-Reply-To: <1604531829.54.0.433305713685.issue42267@roundup.psfhosted.org> Message-ID: <1604602661.95.0.673639823741.issue42267@roundup.psfhosted.org> Steve Dower added the comment: As an alternative, you could install Python through the Microsoft Store. This version comes with a "Reset" button (also through Apps & Features) that will remove any packages you've installed into it and bring it back to a clean state very quickly. The main difference between the two versions is it's much harder to mess with the install directory of the version from the Store. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 14:21:47 2020 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Thu, 05 Nov 2020 19:21:47 +0000 Subject: [issue42271] Remove the error and the zipfile.ZipFile.BadZipfile aliases Message-ID: <1604604107.76.0.819797887285.issue42271@roundup.psfhosted.org> New submission from Bo?tjan Mejak : Remove the long-forgotten aliases 'error' and 'BadZipfile' in 'zipfile.ZipFile' class which are just pre-3.2 compatibility names. Python 3.10 should finally remove these aliases. ---------- components: Library (Lib) messages: 380428 nosy: PedanticHacker priority: normal pull_requests: 22083 severity: normal status: open title: Remove the error and the zipfile.ZipFile.BadZipfile aliases type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 15:06:37 2020 From: report at bugs.python.org (Kevin Locke) Date: Thu, 05 Nov 2020 20:06:37 +0000 Subject: [issue42272] Warning filter message/module documentation is misleading Message-ID: <1604606797.18.0.328122375746.issue42272@roundup.psfhosted.org> New submission from Kevin Locke : "The Warnings Filter" section of the documentation for the warnings module describes the message and module filters as "a string containing a regular expression". While that is true when they are arguments to the filterwarnings function, it is not true when they appear in -W or $PYTHONWARNINGS where they are matched literally (after stripping any starting/ending whitespace). Additionally, in the "Describing Warning Filters" section, the example "error:::mymodule[.*]" does not behave as described. If it were used as an argument to filterwarnings, where it would be treated as a regular expression, it would match the (invalid) module names mymodule. or mymodule* while it would match mymodule[.*] literally if passed via -W or $PYTHONWARNINGS. ---------- assignee: docs at python components: Documentation messages: 380429 nosy: docs at python, kevinoid priority: normal severity: normal status: open title: Warning filter message/module documentation is misleading type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 15:08:10 2020 From: report at bugs.python.org (JackSkellington) Date: Thu, 05 Nov 2020 20:08:10 +0000 Subject: [issue42267] Python 3.9 broken installer In-Reply-To: <1604531829.54.0.433305713685.issue42267@roundup.psfhosted.org> Message-ID: <1604606890.97.0.383400307781.issue42267@roundup.psfhosted.org> JackSkellington added the comment: Thank you so much for these alternatives. The only working one is the Microsoft Store one so far, but I'd like to know if the .msi package one is fixable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 15:10:30 2020 From: report at bugs.python.org (JackSkellington) Date: Thu, 05 Nov 2020 20:10:30 +0000 Subject: [issue42267] Python 3.9 broken installer In-Reply-To: <1604531829.54.0.433305713685.issue42267@roundup.psfhosted.org> Message-ID: <1604607030.77.0.243546215745.issue42267@roundup.psfhosted.org> JackSkellington added the comment: Also. How do I set the path for the Microsoft Store version of Python 3.9? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 15:12:08 2020 From: report at bugs.python.org (Kevin Locke) Date: Thu, 05 Nov 2020 20:12:08 +0000 Subject: [issue42272] Warning filter message/module documentation is misleading In-Reply-To: <1604606797.18.0.328122375746.issue42272@roundup.psfhosted.org> Message-ID: <1604607128.88.0.219732041368.issue42272@roundup.psfhosted.org> Change by Kevin Locke : ---------- keywords: +patch pull_requests: +22084 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23172 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 15:16:06 2020 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 05 Nov 2020 20:16:06 +0000 Subject: [issue42179] Clarify chaining exceptions in tutorial/errors.rst In-Reply-To: <1603873891.9.0.500762071742.issue42179@roundup.psfhosted.org> Message-ID: <1604607366.5.0.0677503293083.issue42179@roundup.psfhosted.org> ?ric Araujo added the comment: I prefer the patch by Inada-san! >> Describing the default behavior and "from None" is enough for new users > Strange that you think that "from None" is more useful for beginners than these special attributes. Doesn?t feel strange to me: `raise Exc from exc` or `from None` shows how to use the mecanism, whereas the special attributes are about the implementation. A tutorial can show how to use language features like for loops or with statements, but shouldn?t explain how to implement the protocols, that?s too much detail if you?re just starting to learn programming. ---------- nosy: +eric.araujo, maxking, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 15:54:12 2020 From: report at bugs.python.org (E. Paine) Date: Thu, 05 Nov 2020 20:54:12 +0000 Subject: [issue42142] FAIL tkinter ttk LabeledScale test_resize, and more In-Reply-To: <1603582160.73.0.386671878138.issue42142@roundup.psfhosted.org> Message-ID: <1604609652.37.0.657190642816.issue42142@roundup.psfhosted.org> E. Paine added the comment: I have been looking for a more permanent solution to that proposed in PR-23156. The most obvious solution is probably what I suggested in msg380371 as I don't believe the calls to `wait_visibility` are required (though, I don't really know enough to say for certain so am wary of making the tests unstable in a different way). Another initial idea I had would be to mess around with threads and interrupt the main thread (which would be caught and ignored) if `wait_visibility` took too long. It would be better, though, if we could actively predict a `wait_visibility` failure. I looked again at the Tcler's wiki (https://wiki.tcl-lang.org/page/tkwait+visibility) and noticed the hidden discussion titled "Windows bug or whatever - looking for help". In that discussion is a description of exactly the issue we are facing: "Under strange totally unrelated circumstances [...] tkwait waits forever." There, the OP includes a version which only calls `wait_visibility` if `winfo_ismapped` is 1, saying: "The "winfo ismapped" is only 0 if the tkwait will stall" In some initial testing (see attached demo script - uncomment the update call for `wait_visibility` to stall) I found the opposite to be true (`wait_visibility` fails when the widget *is already* mapped - I think this is because `wait_visibility` is waiting for VisibilityNotify but this was already issued when the widget was being mapped). Another proposed solution on the wiki is to avoid `wait_visibility` completely and instead use a combination of various calls including `tkraise` & `focus_force` (ideas/opinions?) Note: I included both `winfo_ismapped` and `winfo_viewable` in the test script to try and find a case where the value of one is not the same as the other but I believe `winfo_ismapped` is the one we would want to use. ---------- Added file: https://bugs.python.org/file49573/ismapped.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 16:11:08 2020 From: report at bugs.python.org (Vladimir Ryabtsev) Date: Thu, 05 Nov 2020 21:11:08 +0000 Subject: [issue42179] Clarify chaining exceptions in tutorial/errors.rst In-Reply-To: <1603873891.9.0.500762071742.issue42179@roundup.psfhosted.org> Message-ID: <1604610668.88.0.94913883187.issue42179@roundup.psfhosted.org> Vladimir Ryabtsev added the comment: We have automatic chaining, so you don't need to use "from X" unless you want to have some control on the traceback message. Even without knowing of this syntax (and without using "from exc"), a user will get a traceback message similar to what is shown in the example. What is the purpose of the entire section then? As I see it, the purpose might be providing some details about how exactly chaining works, so a user: a) could make an informed decision whether they need "from X" or not, b) would know how to retrieve the linked exception programmatically. I generally feel that we don't want to deprive a user from special attributes, in Python they are everywhere, you cannot even construct a class instance without __init__(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 16:17:26 2020 From: report at bugs.python.org (Vladimir Ryabtsev) Date: Thu, 05 Nov 2020 21:17:26 +0000 Subject: [issue42179] Clarify chaining exceptions in tutorial/errors.rst In-Reply-To: <1603873891.9.0.500762071742.issue42179@roundup.psfhosted.org> Message-ID: <1604611046.39.0.513204836202.issue42179@roundup.psfhosted.org> Vladimir Ryabtsev added the comment: Also, the choice of the exception type in the example looks not very apt: you raise "IOError" but the traceback message says "OSError" (which is due to strange design decision "IOError = OSError"). For the tutorial, I would choose an exception that does not disguise as another exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 16:55:31 2020 From: report at bugs.python.org (Carol Willing) Date: Thu, 05 Nov 2020 21:55:31 +0000 Subject: [issue42179] Clarify chaining exceptions in tutorial/errors.rst In-Reply-To: <1603873891.9.0.500762071742.issue42179@roundup.psfhosted.org> Message-ID: <1604613331.66.0.236134840298.issue42179@roundup.psfhosted.org> Carol Willing added the comment: Thanks Vladimir for raising the issue, and Inada-san and Eric for following up on it. I recommend the following: - merge PR-23162 including its reference to builtin exceptions - after merge of PR-23162, reworking PR-23160 to provide a brief note about __cause__ and __contex__ before the reference link to builtin exceptions This would provide a clear tutorial example for the majority of users. For the fraction of users, like Vladimir, a sentence as part of the reference link could address a bit more about __cause__ and __context__ without confusing folks. ---------- nosy: +willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 17:14:23 2020 From: report at bugs.python.org (Kevin Keating) Date: Thu, 05 Nov 2020 22:14:23 +0000 Subject: [issue42273] Using LazyLoader leads to AttributeError Message-ID: <1604614463.81.0.853919807892.issue42273@roundup.psfhosted.org> New submission from Kevin Keating : Steps to reproduce: Create the following three files (or download the attached zip file, which contains these files): main.py import foo from foo import a from foo import b print(foo.b.my_function()) foo/a.py import importlib.util import sys # implementation copied from https://github.com/python/cpython/blob/master/Doc/library/importlib.rst#implementing-lazy-imports def lazy_import(name): spec = importlib.util.find_spec(name) loader = importlib.util.LazyLoader(spec.loader) spec.loader = loader module = importlib.util.module_from_spec(spec) sys.modules[name] = module loader.exec_module(module) return module b = lazy_import("foo.b") foo/b.py def my_function(): return "my_function" and then run main.py Expected results my_function should be printed to the terminal Actual results The following traceback is printed to the terminal Traceback (most recent call last): File "F:\Documents\lazy_import\main.py", line 6, in print(foo.b.my_function()) AttributeError: module 'foo' has no attribute 'b' If you comment out "from foo import a" from main.py, then the traceback doesn't occur and my_function gets printed. Alternatively, if you move "from foo import a" after "from foo import b", then the traceback doesn't occur and my_function gets printed. Adding "foo.b = b" before "print(foo.b.my_function())" will also fix the traceback. A colleague of mine originally ran into this bug when writing unit tests for lazily imported code, since mock.patch("foo.b.my_function") triggers the same AttributeError. I've reproduced this on Windows using both Python 3.8.3 and Python 3.9.0, and my colleague was using Python 3.8.3 on Mac. ---------- components: Library (Lib) files: lazy_import.zip messages: 380437 nosy: KevKeating priority: normal severity: normal status: open title: Using LazyLoader leads to AttributeError versions: Python 3.8, Python 3.9 Added file: https://bugs.python.org/file49574/lazy_import.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 17:18:58 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 05 Nov 2020 22:18:58 +0000 Subject: [issue26389] Expand traceback module API to accept just an exception as an argument In-Reply-To: <1455836350.85.0.0162824201978.issue26389@psf.upfronthosting.co.za> Message-ID: <1604614738.41.0.509790973526.issue26389@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 91e93794d5dd1aa91fbe142099c2955e0c4c1660 by Zackery Spytz in branch 'master': bpo-26389: Allow passing an exception object in the traceback module (GH-22610) https://github.com/python/cpython/commit/91e93794d5dd1aa91fbe142099c2955e0c4c1660 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 17:19:23 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 05 Nov 2020 22:19:23 +0000 Subject: [issue26389] Expand traceback module API to accept just an exception as an argument In-Reply-To: <1455836350.85.0.0162824201978.issue26389@psf.upfronthosting.co.za> Message-ID: <1604614763.27.0.0939913763558.issue26389@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 17:40:26 2020 From: report at bugs.python.org (David Martinez) Date: Thu, 05 Nov 2020 22:40:26 +0000 Subject: [issue42179] Clarify chaining exceptions in tutorial/errors.rst In-Reply-To: <1603873891.9.0.500762071742.issue42179@roundup.psfhosted.org> Message-ID: <1604616026.74.0.41809480593.issue42179@roundup.psfhosted.org> Change by David Martinez : Added file: https://bugs.python.org/file49575/Cellular-Z 20200909 14:25:47 SLOT1.CSV _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 17:46:42 2020 From: report at bugs.python.org (Zachary Ware) Date: Thu, 05 Nov 2020 22:46:42 +0000 Subject: [issue42179] Clarify chaining exceptions in tutorial/errors.rst In-Reply-To: <1603873891.9.0.500762071742.issue42179@roundup.psfhosted.org> Message-ID: <1604616402.09.0.222732044348.issue42179@roundup.psfhosted.org> Change by Zachary Ware : Removed file: https://bugs.python.org/file49575/Cellular-Z 20200909 14:25:47 SLOT1.CSV _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 18:58:49 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 05 Nov 2020 23:58:49 +0000 Subject: [issue42267] Python 3.9 broken installer In-Reply-To: <1604531829.54.0.433305713685.issue42267@roundup.psfhosted.org> Message-ID: <1604620729.23.0.931425134893.issue42267@roundup.psfhosted.org> Steve Dower added the comment: The store version should be available everywhere as "python.exe", "python3.exe" and "python3.9.exe" already, but if not then search Start for "Manage app execution aliases" to enable it. The MSI should be able to repair itself if you didn't delete those registry keys. If you did delete them, you might be able to re-run the installer, but likely not. It may be irrecoverable in that case, sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 21:45:08 2020 From: report at bugs.python.org (Inada Naoki) Date: Fri, 06 Nov 2020 02:45:08 +0000 Subject: [issue42179] Clarify chaining exceptions in tutorial/errors.rst In-Reply-To: <1603873891.9.0.500762071742.issue42179@roundup.psfhosted.org> Message-ID: <1604630708.75.0.558674638033.issue42179@roundup.psfhosted.org> Inada Naoki added the comment: New changeset bde33e428d5b5f88ec7667598fd27d1091840537 by Inada Naoki in branch 'master': bpo-42179: Doc/tutorial: Remove mention of __cause__ (GH-23162) https://github.com/python/cpython/commit/bde33e428d5b5f88ec7667598fd27d1091840537 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 21:45:35 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 06 Nov 2020 02:45:35 +0000 Subject: [issue42179] Clarify chaining exceptions in tutorial/errors.rst In-Reply-To: <1603873891.9.0.500762071742.issue42179@roundup.psfhosted.org> Message-ID: <1604630735.73.0.793647983148.issue42179@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +22086 pull_request: https://github.com/python/cpython/pull/23173 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 5 22:06:07 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 06 Nov 2020 03:06:07 +0000 Subject: [issue42179] Clarify chaining exceptions in tutorial/errors.rst In-Reply-To: <1603873891.9.0.500762071742.issue42179@roundup.psfhosted.org> Message-ID: <1604631967.31.0.334239314786.issue42179@roundup.psfhosted.org> miss-islington added the comment: New changeset e74fb2d7666eea43ad738528a565bb56bc88c28d by Miss Islington (bot) in branch '3.9': bpo-42179: Doc/tutorial: Remove mention of __cause__ (GH-23162) https://github.com/python/cpython/commit/e74fb2d7666eea43ad738528a565bb56bc88c28d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 00:10:39 2020 From: report at bugs.python.org (Vrashab Kotian) Date: Fri, 06 Nov 2020 05:10:39 +0000 Subject: [issue42274] Imaplib hangs up infinitely when performing append operation Message-ID: <1604639439.38.0.466893832242.issue42274@roundup.psfhosted.org> New submission from Vrashab Kotian : Dear all, We are facing an issue while using imaplib's append operation. We are using append function of imaplib to move a mail from inbox to another folder (we are performing this operation on Outlook 365 account). Sometimes, when our process (the process is running Azure linux VM) performs this operation, it gets hangs up at this point infinitely . When this happens there is no response being returned back for the email server. This issue is causing a huge problem. Please analyse this problem and give us some solution or suggestion on the same Thanking you in advance ---------- messages: 380442 nosy: vrashab.kotian priority: normal severity: normal status: open title: Imaplib hangs up infinitely when performing append operation type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 02:45:55 2020 From: report at bugs.python.org (Vinay Sharma) Date: Fri, 06 Nov 2020 07:45:55 +0000 Subject: [issue38119] resource tracker destroys shared memory segments when other processes should still have valid access In-Reply-To: <1568217506.85.0.770661201111.issue38119@roundup.psfhosted.org> Message-ID: <1604648755.84.0.0663608124385.issue38119@roundup.psfhosted.org> Change by Vinay Sharma : ---------- pull_requests: +22087 pull_request: https://github.com/python/cpython/pull/23174 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 03:20:48 2020 From: report at bugs.python.org (Inada Naoki) Date: Fri, 06 Nov 2020 08:20:48 +0000 Subject: [issue11346] Generator object should be mentioned in gc module document In-Reply-To: <1298818993.14.0.492098392223.issue11346@psf.upfronthosting.co.za> Message-ID: <1604650848.09.0.752177016116.issue11346@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 04:46:37 2020 From: report at bugs.python.org (shakir_juolay) Date: Fri, 06 Nov 2020 09:46:37 +0000 Subject: [issue42275] Jupyter Lab Terminals not available (error was No module named 'winpty.cywinpty') Message-ID: <1604655997.12.0.439112752086.issue42275@roundup.psfhosted.org> New submission from shakir_juolay : I get the below message when I run Jupyter Lab D:\Users\sjuolay>jupyter lab [W 12:37:50.862 LabApp] Terminals not available (error was No module named 'winpty.cywinpty') [I 12:37:51.170 LabApp] JupyterLab extension loaded from d:\users\sjuolay\documents\python\python39\lib\site-packages\jupyterlab [I 12:37:51.171 LabApp] JupyterLab application directory is d:\users\sjuolay\documents\python\python39\share\jupyter\lab [I 12:37:51.300 LabApp] Serving notebooks from local directory: D:\Users\sjuolay [I 12:37:51.301 LabApp] Jupyter Notebook 6.1.4 is running at: [I 12:37:51.301 LabApp] http://localhost:8888/?token=9a64c8f9a15b970ecc775090c4e5b8c90677f1456a83a932 [I 12:37:51.301 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 12:37:51.330 LabApp] To access the notebook, open this file in a browser: file:///D:/Users/sjuolay/AppData/Roaming/jupyter/runtime/nbserver-7928-open.html Or copy and paste one of these URLs: http://localhost:8888/?token=9a64c8f9a15b970ecc775090c4e5b8c90677f1456a83a932 [I 12:37:53.917 LabApp] Build is up to date And when I run the below from Python IDLE I get >>> import winpty Traceback (most recent call last): File "", line 1, in import winpty File "D:\Users\sjuolay\Documents\Python\Python39\lib\site-packages\winpty\__init__.py", line 11, in from .ptyprocess import PtyProcess File "D:\Users\sjuolay\Documents\Python\Python39\lib\site-packages\winpty\ptyprocess.py", line 21, in from .winpty_wrapper import PTY, PY2 File "D:\Users\sjuolay\Documents\Python\Python39\lib\site-packages\winpty\winpty_wrapper.py", line 12, in from .cywinpty import Agent ModuleNotFoundError: No module named 'winpty.cywinpty' Software Details Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32 Jupyter Lab 2.2.9 pywinpty 0.5.7 Any idea how much of an impact the error has on Jupyter Lab, since it is launched in browser? How to fix this? ---------- components: Library (Lib) messages: 380443 nosy: shakir_juolay priority: normal severity: normal status: open title: Jupyter Lab Terminals not available (error was No module named 'winpty.cywinpty') type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 05:04:14 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 06 Nov 2020 10:04:14 +0000 Subject: [issue42271] Remove the error and the zipfile.ZipFile.BadZipfile aliases In-Reply-To: <1604604107.76.0.819797887285.issue42271@roundup.psfhosted.org> Message-ID: <1604657054.28.0.229061946728.issue42271@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +alanmcintyre, serhiy.storchaka, twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 05:03:33 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 06 Nov 2020 10:03:33 +0000 Subject: [issue42275] Jupyter Lab Terminals not available (error was No module named 'winpty.cywinpty') In-Reply-To: <1604655997.12.0.439112752086.issue42275@roundup.psfhosted.org> Message-ID: <1604657013.3.0.666581952432.issue42275@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: The tracker is for issues related to CPython and doesn't seem to be caused due to python itself. I would suggest following it up on jupyterlab's issue tracker and forums. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 07:18:35 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 06 Nov 2020 12:18:35 +0000 Subject: [issue42274] Imaplib hangs up infinitely when performing append operation In-Reply-To: <1604639439.38.0.466893832242.issue42274@roundup.psfhosted.org> Message-ID: <1604665115.09.0.424732346991.issue42274@roundup.psfhosted.org> Eric V. Smith added the comment: The bug tracker isn't the appropriate place to ask for help. Your problem is most likely with your code, or possibly with the server you're talking to. But you haven't provided us any way of knowing which. I suggest you ask for help on the python-list mailing list, or maybe on Stack Overflow. But no matter where you ask for help, you'll need to show the code that is causing your problem. You'll want to reproduce the problem with a small example. You should remove any code that doesn't relate to reproducing the problem, and preferably without using any third party libraries. If you can show that this is a bug in Python, then you can re-open this issue. ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 07:44:20 2020 From: report at bugs.python.org (Guo) Date: Fri, 06 Nov 2020 12:44:20 +0000 Subject: [issue42276] Bug in adfuller test and a suggested fix Message-ID: <1604666660.35.0.85933411244.issue42276@roundup.psfhosted.org> New submission from Guo : from statsmodels.tsa.stattools import adfuller adf = adfuller(x, regression=?c?, autolag=?t-stat?) Sometimes comes error message: UnboundLocalError: local variable ?bestlag? referenced before assignment I found the reason: when using t-stat, bestlag is only assigned, when the last lag becomes significant the first time, so if no lag has a significant t-value, then bestlag is never assigned I fixed this bug this way: open the file stattools.py and find the lines: elif method == ?t-stat?: #stop = stats.norm.ppf(.95) stop = 1.6448536269514722 Then add here following two lines: bestlag = startlag icbest = np.abs(results[startlag].tvalues[-1]) This way, the code won?t crash again and t-stat simply uses no lag when there is no significant value ---------- components: Library (Lib) messages: 380446 nosy: gyllila priority: normal severity: normal status: open title: Bug in adfuller test and a suggested fix type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 07:54:02 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 06 Nov 2020 12:54:02 +0000 Subject: [issue42276] Bug in adfuller test and a suggested fix In-Reply-To: <1604666660.35.0.85933411244.issue42276@roundup.psfhosted.org> Message-ID: <1604667242.21.0.527288892133.issue42276@roundup.psfhosted.org> Ronald Oussoren added the comment: Statsmodel is not part of the Python standard library. The issue tracker for this packages seems to be at: https://github.com/statsmodels/statsmodels/issues ---------- nosy: +ronaldoussoren resolution: -> third party stage: -> resolved status: open -> closed type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 09:05:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Nov 2020 14:05:16 +0000 Subject: [issue42207] Python 3.9 testing fails when building with clang and optimizations are enabled In-Reply-To: <1604069104.85.0.435616508554.issue42207@roundup.psfhosted.org> Message-ID: <1604671516.8.0.90366141179.issue42207@roundup.psfhosted.org> STINNER Victor added the comment: commit 100964e0310d3a2040d0db976f7984d0507b2dbd Author: serge-sans-paille Date: Wed Nov 4 23:01:08 2020 +0000 Disable peg generator tests when building with PGO (GH-23141) Otherwise, when running the testsuite, test_peg_generator tries to compile C code using the optimized flags and fails because it cannot find the profile data. commit 3997a4e6bca18c7f220d6212ef1e86d8aa9c7aee (upstream/3.9, 3.9) Author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> Date: Wed Nov 4 15:22:13 2020 -0800 Disable peg generator tests when building with PGO (GH-23141) Otherwise, when running the testsuite, test_peg_generator tries to compile C code using the optimized flags and fails because it cannot find the profile data. (cherry picked from commit 100964e0310d3a2040d0db976f7984d0507b2dbd) Co-authored-by: serge-sans-paille ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 09:30:19 2020 From: report at bugs.python.org (Jakub Kulik) Date: Fri, 06 Nov 2020 14:30:19 +0000 Subject: [issue42277] Solaris & PEP 3149: start using ABI version tagged .so files Message-ID: <1604673019.95.0.76532678004.issue42277@roundup.psfhosted.org> New submission from Jakub Kulik : Solaris doesn't have ABI version tagged .so files enabled in upstream CPython yet, but almost every Solaris distribution* patches this functionality in: Oracle Solaris: https://github.com/oracle/solaris-userland/blob/master/components/python/python39/patches/13-SOABI.patch OpenIndiana: https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/python/python37/patches/13-SOABI.patch OmniOS: https://github.com/omniosorg/omnios-build/blob/master/build/python37/patches/13-SOABI.patch Because of that, I think it should be merged into master. *) The only exception is pkgsrc (used in SmartOS), but they are patching it out for every system, so no change there: https://github.com/joyent/pkgsrc/blob/trunk/lang/python39/patches/patch-configure ---------- components: Build messages: 380449 nosy: kulikjak priority: normal severity: normal status: open title: Solaris & PEP 3149: start using ABI version tagged .so files type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 09:35:32 2020 From: report at bugs.python.org (Jakub Kulik) Date: Fri, 06 Nov 2020 14:35:32 +0000 Subject: [issue42277] Solaris & PEP 3149: start using ABI version tagged .so files In-Reply-To: <1604673019.95.0.76532678004.issue42277@roundup.psfhosted.org> Message-ID: <1604673332.41.0.133374941921.issue42277@roundup.psfhosted.org> Change by Jakub Kulik : ---------- keywords: +patch pull_requests: +22088 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23182 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 09:57:52 2020 From: report at bugs.python.org (E. Paine) Date: Fri, 06 Nov 2020 14:57:52 +0000 Subject: [issue42278] Remove usage of tempfile.mktemp in stdlib Message-ID: <1604674672.14.0.368213492276.issue42278@roundup.psfhosted.org> New submission from E. Paine : Currently, there are many uses of `tempfile.mktemp` in the stdlib. I couldn't find an issue where this has already been discussed, but I think the usage of mktemp in the stdlib should be completely reviewed. I grepped the Lib and a slightly filtered version is the following: Lib/asyncio/windows_utils.py:34: address = tempfile.mktemp( Lib/distutils/command/bdist_wininst.py:185: archive_basename = mktemp() Lib/distutils/util.py:386: (script_fd, script_name) = None, mktemp(".py") Lib/msilib/__init__.py:214: filename = mktemp() Lib/multiprocessing/connection.py:81: return tempfile.mktemp(prefix='listener-', dir=util.get_temp_dir()) Lib/multiprocessing/connection.py:83: return tempfile.mktemp(prefix=r'\.\pipe\pyc-%d-%d-' % Lib/pydoc.py:1620: filename = tempfile.mktemp() Lib/test/bisect_cmd.py:75: tmp = tempfile.mktemp() Lib/test/test_bytes.py:1193: tfn = tempfile.mktemp() Lib/test/test_contextlib.py:316: tfn = tempfile.mktemp() Lib/test/test_doctest.py:2724: >>> fn = tempfile.mktemp() Lib/test/test_doctest.py:2734: >>> fn = tempfile.mktemp() Lib/test/test_doctest.py:2744: >>> fn = tempfile.mktemp() Lib/test/test_faulthandler.py:51: filename = tempfile.mktemp() Lib/test/test_shutil.py:1624: filename = tempfile.mktemp(dir=dirname) Lib/test/test_shutil.py:1935: dst_dir = tempfile.mktemp(dir=self.mkdtemp()) Lib/test/test_shutil.py:2309: name = tempfile.mktemp(dir=os.getcwd()) Lib/test/test_shutil.py:272: filename = tempfile.mktemp(dir=self.mkdtemp()) Lib/test/test_shutil.py:677: dst = tempfile.mktemp(dir=self.mkdtemp()) Lib/test/test_socket.py:699: path = tempfile.mktemp(dir=self.dir_path) Lib/test/test_socketserver.py:100: fn = tempfile.mktemp(prefix='unix_socket.', dir=dir) I am hoping this issue will be spotted as I couldn't find who to add to the nosy for this. I think, bearing in mind that use of this method is a security issue, we should reduce this number as low as feasible (though, I am sure that a number of those will have good reasons for using mktemp, and will be doing so in a safe way). ---------- components: Library (Lib) messages: 380450 nosy: epaine priority: normal severity: normal status: open title: Remove usage of tempfile.mktemp in stdlib type: security versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 10:00:03 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 15:00:03 +0000 Subject: [issue6304] Confusing error message when passing bytes to print with file pointing to a binary file In-Reply-To: <1245293505.96.0.175038220478.issue6304@psf.upfronthosting.co.za> Message-ID: <1604674803.32.0.887252405016.issue6304@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: test needed -> versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 10:35:27 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 06 Nov 2020 15:35:27 +0000 Subject: [issue42278] Remove usage of tempfile.mktemp in stdlib In-Reply-To: <1604674672.14.0.368213492276.issue42278@roundup.psfhosted.org> Message-ID: <1604676927.8.0.930575115457.issue42278@roundup.psfhosted.org> Change by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 10:49:23 2020 From: report at bugs.python.org (Jakub Kulik) Date: Fri, 06 Nov 2020 15:49:23 +0000 Subject: [issue41839] Solaris: Fix error checking in sched_get_priority_ functions In-Reply-To: <1600854291.47.0.647428852002.issue41839@roundup.psfhosted.org> Message-ID: <1604677763.27.0.926283821298.issue41839@roundup.psfhosted.org> Jakub Kulik added the comment: > Checking for -1 rather than all negative values fixes this issue. To be 100% exact, it should be "checking for -1 and errno" (as other Jakub noted in the PR). Here is the standard for reference: https://pubs.opengroup.org/onlinepubs/009695399/functions/sched_get_priority_min.html Sticking to it should hopefully not break anything. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 11:00:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Nov 2020 16:00:34 +0000 Subject: [issue42142] test_ttk timeout: FAIL tkinter ttk LabeledScale test_resize, and more In-Reply-To: <1603582160.73.0.386671878138.issue42142@roundup.psfhosted.org> Message-ID: <1604678434.02.0.568871031011.issue42142@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: FAIL tkinter ttk LabeledScale test_resize, and more -> test_ttk timeout: FAIL tkinter ttk LabeledScale test_resize, and more _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 11:03:48 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 16:03:48 +0000 Subject: [issue13433] [doc] Improve string format documentation regarding %g In-Reply-To: <1321707692.58.0.601543510069.issue13433@psf.upfronthosting.co.za> Message-ID: <1604678628.67.0.743184651173.issue13433@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: String format documentation contains error regarding %g -> [doc] Improve string format documentation regarding %g versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 11:04:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Nov 2020 16:04:59 +0000 Subject: [issue41832] PyType_FromSpec() should accept tp_doc=NULL In-Reply-To: <1600770571.99.0.249807543427.issue41832@roundup.psfhosted.org> Message-ID: <1604678699.05.0.059518396332.issue41832@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 88c2cfd9ffbcfc43fd1364f2984852a819547d43 by Hai Shi in branch 'master': bpo-41832: PyType_FromModuleAndSpec() now accepts NULL tp_doc (GH-23123) https://github.com/python/cpython/commit/88c2cfd9ffbcfc43fd1364f2984852a819547d43 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 11:05:26 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Nov 2020 16:05:26 +0000 Subject: [issue41832] PyType_FromSpec() should accept tp_doc=NULL In-Reply-To: <1600770571.99.0.249807543427.issue41832@roundup.psfhosted.org> Message-ID: <1604678726.79.0.961430061064.issue41832@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Hai Shi. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 11:10:27 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 16:10:27 +0000 Subject: [issue13122] Out of date links in the sidebar of the documentation index of versions 3.1 and 3.2 In-Reply-To: <1317999740.46.0.922190010194.issue13122@psf.upfronthosting.co.za> Message-ID: <1604679027.36.0.559077882717.issue13122@roundup.psfhosted.org> Irit Katriel added the comment: This is still unresolved. For instance, this says 3.7 is in development: https://docs.python.org/release/3.6.2/ ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 11:30:03 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 16:30:03 +0000 Subject: [issue16238] Automatically remove build directory when build options changed In-Reply-To: <1350300834.63.0.981208567885.issue16238@psf.upfronthosting.co.za> Message-ID: <1604680203.09.0.558406420802.issue16238@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 11:31:07 2020 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 06 Nov 2020 16:31:07 +0000 Subject: [issue16238] Automatically remove build directory when build options changed In-Reply-To: <1350300834.63.0.981208567885.issue16238@psf.upfronthosting.co.za> Message-ID: <1604680267.66.0.734218739744.issue16238@roundup.psfhosted.org> Change by ?ric Araujo : ---------- assignee: eric.araujo -> components: -Distutils versions: -Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 11:32:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Nov 2020 16:32:11 +0000 Subject: [issue42173] Drop Solaris support In-Reply-To: <1603814348.33.0.839225742612.issue42173@roundup.psfhosted.org> Message-ID: <1604680331.72.0.339113390228.issue42173@roundup.psfhosted.org> STINNER Victor added the comment: Copy of my email sent to python-dev. https://mail.python.org/archives/list/python-dev at python.org/message/46UUJ4J5YLCWF2JQMC5L7OIYG6PNQLRL/ Since I created the issue and the PR, and sent this email to python-dev (one week ago), many Solaris and Solaris-like (ex: Illumos) users replied that the operating system is definitively alive. I didn't know that Oracle still ships new Solaris updates every month: that's a good thing! But this is not enough to support a platform. We would need proactive contributors to fix known Solaris issues, but also fix new Solaris issues (either regressions, or bugs newly discovered). We would also need a buildbot to run the Python test suite on Solaris (or again, a Solaris-like OS). The good news is that Jakub Kulik started to fix some Solaris issues. I understood that Solaris and Solaris-like operating systems do have downstream patches on Python to fix a bunch of bugs. It seems like some people want to push these fixes to Python upstream which is also a good sign. The other problem that I wanted to discuss is that fixing Solaris issues require core devs (who merge PRs) accessing Solaris. If contributors send patches and some core devs are fine with merging fixes without being able to test them manually, I'm also fine with that. My first intent was to remove support for a definitely dead operating system, but it seems like I was completely wrong (it's alive!). Thanks to people starting to fix Solaris issues, I close my PR and I no longer plan to drop Solaris support. I prefer to leave bpo-42173 open for now, since people decide to use it as a place to collaborate on fixing Solaris issues. Once most tests will pass on the master branch, I also hope that someone will set up a buildbot *and* fix issues discovered by this buildbot. Sorry but just setting up a buildbot doesn't solve any problem, it only increases the maintenance burden for people who maintain the buildbot fleet. For example, we have two AIX buildbots, I report bugs on bugs.python.org, but it seems like nobody is available to fix them... Overall, I'm quite happy with what is happening with Solaris! More collaboration, issues being fixed in Python upstream. I just hope that this work will continue next months. ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 11:33:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Nov 2020 16:33:22 +0000 Subject: [issue42173] Drop Solaris support In-Reply-To: <1603814348.33.0.839225742612.issue42173@roundup.psfhosted.org> Message-ID: <1604680402.89.0.342322739703.issue42173@roundup.psfhosted.org> STINNER Victor added the comment: This issue title is "Drop Solaris support". I no longer plan to drop Solaris support. I suggest to open new issues and continue the discussion there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 11:34:02 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 16:34:02 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1604680442.49.0.744423346756.issue16212@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 11:37:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Nov 2020 16:37:59 +0000 Subject: [issue42173] Drop Solaris support In-Reply-To: <1603814348.33.0.839225742612.issue42173@roundup.psfhosted.org> Message-ID: <1604680679.81.0.666519301266.issue42173@roundup.psfhosted.org> STINNER Victor added the comment: Gaige B Paulsen offered to set up a SmartOS (Illumos-derived) buildbot: https://mail.python.org/archives/list/python-buildbots at python.org/thread/7HGPHD3WZG6V6NVP6EGQO6NHZ3DAPPXN/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 11:38:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Nov 2020 16:38:53 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1604680733.13.0.198065373254.issue16212@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 12:05:13 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 17:05:13 +0000 Subject: [issue14791] setup.py only adds /prefix/lib, not /prefix/lib64 In-Reply-To: <1336840843.09.0.565460268003.issue14791@psf.upfronthosting.co.za> Message-ID: <1604682313.7.0.0426521887594.issue14791@roundup.psfhosted.org> Irit Katriel added the comment: Was this resolved by the fix for https://bugs.python.org/issue32059? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 12:20:11 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 17:20:11 +0000 Subject: [issue15049] [doc] say in open() doc that line buffering only applies to write In-Reply-To: <1339463724.73.0.621165878269.issue15049@psf.upfronthosting.co.za> Message-ID: <1604683211.3.0.34273459527.issue15049@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: line buffering isn't always -> [doc] say in open() doc that line buffering only applies to write versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 12:24:04 2020 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 06 Nov 2020 17:24:04 +0000 Subject: [issue38119] resource tracker destroys shared memory segments when other processes should still have valid access In-Reply-To: <1568217506.85.0.770661201111.issue38119@roundup.psfhosted.org> Message-ID: <1604683444.8.0.536457915751.issue38119@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 12:30:22 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 17:30:22 +0000 Subject: [issue12739] read stuck with multithreading and simultaneous subprocess.Popen In-Reply-To: <1313119224.46.0.971895609334.issue12739@psf.upfronthosting.co.za> Message-ID: <1604683822.7.0.773703510341.issue12739@roundup.psfhosted.org> Irit Katriel added the comment: I will close this as out of date unless someone objects. ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 12:33:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Nov 2020 17:33:59 +0000 Subject: [issue12739] read stuck with multithreading and simultaneous subprocess.Popen In-Reply-To: <1313119224.46.0.971895609334.issue12739@psf.upfronthosting.co.za> Message-ID: <1604684039.84.0.470977752831.issue12739@roundup.psfhosted.org> STINNER Victor added the comment: > Oh by the way, this issue was fixed on UNIX in Python 3.2: all file descriptors are now closed by default (close_fds=True by default on UNIX). Issue fixed in Python 3.4 (sorry, 3.4, not 3.2): https://www.python.org/dev/peps/pep-0446/ ---------- resolution: -> fixed stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 12:40:19 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 17:40:19 +0000 Subject: [issue25769] Crash due to using weakref referent without acquiring a strong reference In-Reply-To: <1448860564.76.0.866220529061.issue25769@psf.upfronthosting.co.za> Message-ID: <1604684419.08.0.897011189257.issue25769@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 12:45:09 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 17:45:09 +0000 Subject: [issue25516] threading.Condition._is_owned() is wrong when using threading.Lock In-Reply-To: <1446165392.31.0.717642417411.issue25516@psf.upfronthosting.co.za> Message-ID: <1604684709.29.0.353304012504.issue25516@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 12:49:18 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Nov 2020 17:49:18 +0000 Subject: [issue25516] threading.Condition._is_owned() is wrong when using threading.Lock In-Reply-To: <1446165392.31.0.717642417411.issue25516@psf.upfronthosting.co.za> Message-ID: <1604684958.45.0.699596652895.issue25516@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 12:53:10 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 17:53:10 +0000 Subject: [issue8988] import + coding = failure (3.1.2/win32) In-Reply-To: <1276426235.15.0.873898512927.issue8988@psf.upfronthosting.co.za> Message-ID: <1604685190.33.0.507009578543.issue8988@roundup.psfhosted.org> Irit Katriel added the comment: I think this can be closed as out of date. ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 13:01:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Nov 2020 18:01:17 +0000 Subject: [issue8988] import + coding = failure (3.1.2/win32) In-Reply-To: <1276426235.15.0.873898512927.issue8988@psf.upfronthosting.co.za> Message-ID: <1604685677.25.0.965251857318.issue8988@roundup.psfhosted.org> STINNER Victor added the comment: > See also #3080 for the full unicode support in the import machinery. I'm confident that I fixed this issue in bpo-3080. I mark this one as a duplicate. ---------- resolution: -> duplicate stage: test needed -> resolved status: pending -> closed superseder: -> Full unicode import system _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 13:15:25 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 18:15:25 +0000 Subject: [issue8576] test_support.find_unused_port can cause socket conflicts on Windows In-Reply-To: <1272619084.25.0.373754420183.issue8576@psf.upfronthosting.co.za> Message-ID: <1604686525.9.0.4480294545.issue8576@roundup.psfhosted.org> Irit Katriel added the comment: There are still several tests that use find_unused_port: test_asyncio/test_events.py test_asyncio/test_proactor_events.py test_asyncio/test_sendfile.py test_asyncio/test_unix_events.py test_ftplib.py test_httplib.py test_largefile.py test_socket.py test_smtplib.py ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 13:25:05 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 18:25:05 +0000 Subject: [issue12625] sporadic test_unittest failure In-Reply-To: <1311454495.5.0.801093056111.issue12625@psf.upfronthosting.co.za> Message-ID: <1604687105.53.0.0419541190716.issue12625@roundup.psfhosted.org> Irit Katriel added the comment: Is this test still failing? Or can this be closed? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 13:27:07 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 18:27:07 +0000 Subject: [issue12588] test_capi.test_subinterps() failed on OpenBSD (powerpc) In-Reply-To: <1311111401.9.0.18298571301.issue12588@psf.upfronthosting.co.za> Message-ID: <1604687227.42.0.695655604181.issue12588@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 13:34:48 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 18:34:48 +0000 Subject: [issue8488] Docstrings of non-data descriptors "ignored" In-Reply-To: <1271874309.07.0.567011993617.issue8488@psf.upfronthosting.co.za> Message-ID: <1604687688.18.0.639225098073.issue8488@roundup.psfhosted.org> Irit Katriel added the comment: I got this output on 3.10, so I think this has been fixed: lass Demo(builtins.object) | Readonly properties defined here: | | data | | non_data | | prop | Doc of a property. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 13:37:29 2020 From: report at bugs.python.org (John Dutcher) Date: Fri, 06 Nov 2020 18:37:29 +0000 Subject: [issue42279] replacements function corrupts file Message-ID: <1604687849.79.0.792944285105.issue42279@roundup.psfhosted.org> New submission from John Dutcher : If the file below 0f 239 records is processed by the code below it throws no errors and writes the output...but the output has 615 records instead of 239 seemingly having written any revised ones three times instead of only once. replacements = {'/1':'/01', '9/':'09/', '7/':'07/'} file2 = open(r"c:\users\liddvdp\desktop\IBC CAP OUT.txt", "w") with open(r"c:\users\liddvdp\desktop\IBC CAP.txt", "r") as reader: for line in reader: for src, target in replacements.items(): line = line.replace(src, target) file2.write(line) ---------- assignee: terry.reedy components: IDLE files: IBC CAP.txt messages: 380466 nosy: dutch58, terry.reedy priority: normal severity: normal status: open title: replacements function corrupts file type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file49576/IBC CAP.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 13:49:58 2020 From: report at bugs.python.org (jack1142) Date: Fri, 06 Nov 2020 18:49:58 +0000 Subject: [issue42280] The list of standard generic collections is incomplete Message-ID: <1604688598.04.0.446732481114.issue42280@roundup.psfhosted.org> New submission from jack1142 : It looks like the documentation lists standard library collections that support parameterized generics[1] however, it seems to only feature a part of all the collections that support parametrizing (I'm going by the list that was produced by Ethan Smith[2], it could be slightly inaccurate now, but that can be cross-checked when making the contribution). I would be interested in making a PR adding these if/when this issue gets accepted. [1] https://docs.python.org/3.10/library/stdtypes.html#standard-generic-collections [2] https://github.com/gvanrossum/cpython/pull/1#issuecomment-582781121 ---------- assignee: docs at python components: Documentation messages: 380467 nosy: docs at python, jack1142 priority: normal severity: normal status: open title: The list of standard generic collections is incomplete type: enhancement versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 13:50:42 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 18:50:42 +0000 Subject: [issue10016] shutil.copyfile -- allow sparse copying In-Reply-To: <1286029015.57.0.815158740908.issue10016@psf.upfronthosting.co.za> Message-ID: <1604688642.34.0.672661747363.issue10016@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 14:07:09 2020 From: report at bugs.python.org (Zachary Ware) Date: Fri, 06 Nov 2020 19:07:09 +0000 Subject: [issue42279] replacements function corrupts file In-Reply-To: <1604687849.79.0.792944285105.issue42279@roundup.psfhosted.org> Message-ID: <1604689629.6.0.384470014437.issue42279@roundup.psfhosted.org> Zachary Ware added the comment: That's because you're writing an output line once per replacement rather than once per input line. For usage questions such as this, you'll be better off on a forum such as discuss.python.org, the python-list at python.org mailing list, or the Python Discord community (pythondiscord.com). ---------- assignee: terry.reedy -> nosy: +zach.ware resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 14:07:31 2020 From: report at bugs.python.org (Zachary Ware) Date: Fri, 06 Nov 2020 19:07:31 +0000 Subject: [issue42279] replacements function corrupts file In-Reply-To: <1604687849.79.0.792944285105.issue42279@roundup.psfhosted.org> Message-ID: <1604689651.69.0.29829071202.issue42279@roundup.psfhosted.org> Change by Zachary Ware : ---------- components: -IDLE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 14:11:50 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 19:11:50 +0000 Subject: [issue32300] print(os.environ.keys()) should only print the keys In-Reply-To: <1513154220.65.0.213398074469.issue32300@psf.upfronthosting.co.za> Message-ID: <1604689910.45.0.591554921437.issue32300@roundup.psfhosted.org> Change by Irit Katriel : ---------- type: -> behavior versions: +Python 3.10, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 14:20:57 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 19:20:57 +0000 Subject: [issue12611] 2to3 crashes when converting doctest using reduce() In-Reply-To: <1311349982.31.0.854147036767.issue12611@psf.upfronthosting.co.za> Message-ID: <1604690457.84.0.570248540277.issue12611@roundup.psfhosted.org> Irit Katriel added the comment: The test in issue12611_test.patch is still failing. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 14:28:14 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 19:28:14 +0000 Subject: [issue25228] Regression in http.cookies parsing with brackets and quotes In-Reply-To: <1443113876.69.0.763546669405.issue25228@psf.upfronthosting.co.za> Message-ID: <1604690894.37.0.467736316298.issue25228@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 14:36:33 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 06 Nov 2020 19:36:33 +0000 Subject: [issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously In-Reply-To: <1465106608.99.0.622112847685.issue27226@psf.upfronthosting.co.za> Message-ID: <1604691393.92.0.751976150833.issue27226@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 14:37:09 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 06 Nov 2020 19:37:09 +0000 Subject: [issue27182] PEP 519 support in the stdlib In-Reply-To: <1464887789.1.0.970652730446.issue27182@psf.upfronthosting.co.za> Message-ID: <1604691429.81.0.72976822429.issue27182@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 14:37:26 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 06 Nov 2020 19:37:26 +0000 Subject: [issue27129] Wordcode, part 2 In-Reply-To: <1464268387.83.0.862540030058.issue27129@psf.upfronthosting.co.za> Message-ID: <1604691446.08.0.678472877512.issue27129@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 14:37:38 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 19:37:38 +0000 Subject: [issue10551] mimetypes read from the registry should not overwrite standard mime mappings In-Reply-To: <1290885326.33.0.141249546234.issue10551@psf.upfronthosting.co.za> Message-ID: <1604691458.72.0.24510380789.issue10551@roundup.psfhosted.org> Irit Katriel added the comment: >From the discussion I conclude that all three issues reported here have been resolved. If nobody objects I will close this issue. ---------- nosy: +iritkatriel resolution: not a bug -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 14:37:39 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 06 Nov 2020 19:37:39 +0000 Subject: [issue27387] Thread hangs on str.encode() when locale is not set In-Reply-To: <1466892219.46.0.416121805197.issue27387@psf.upfronthosting.co.za> Message-ID: <1604691459.74.0.225166232738.issue27387@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 14:41:47 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 06 Nov 2020 19:41:47 +0000 Subject: [issue27408] Document importlib.abc.ExecutionLoader implements get_data() In-Reply-To: <1467166923.22.0.634971996974.issue27408@psf.upfronthosting.co.za> Message-ID: <1604691707.12.0.394547419763.issue27408@roundup.psfhosted.org> Brett Cannon added the comment: Not necessary to specify as InspectLoader also provides get_data() concretely now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 14:41:53 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 06 Nov 2020 19:41:53 +0000 Subject: [issue27408] Document importlib.abc.ExecutionLoader implements get_data() In-Reply-To: <1467166923.22.0.634971996974.issue27408@psf.upfronthosting.co.za> Message-ID: <1604691713.81.0.194933450463.issue27408@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 14:44:06 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 19:44:06 +0000 Subject: [issue6253] optparse.OptionParser.get_usage uses wrong formatter In-Reply-To: <1244644097.18.0.346116774289.issue6253@psf.upfronthosting.co.za> Message-ID: <1604691846.92.0.663894191645.issue6253@roundup.psfhosted.org> Irit Katriel added the comment: Jan, if you are still interested in fixing this you would need to add a test to the patch. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 14:49:13 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 19:49:13 +0000 Subject: [issue8041] No documentation for Py_TPFLAGS_HAVE_STACKLESS_EXTENSION or Py_TPFLAGS_HAVE_VERSION_TAG. In-Reply-To: <1267544098.65.0.440493208051.issue8041@psf.upfronthosting.co.za> Message-ID: <1604692153.52.0.588284342306.issue8041@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 14:58:06 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 19:58:06 +0000 Subject: [issue1576313] [doc] os.execvp[e] on win32 fails for current directory Message-ID: <1604692686.21.0.1041754783.issue1576313@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: os.execvp[e] on win32 fails for current directory -> [doc] os.execvp[e] on win32 fails for current directory versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 15:00:24 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 20:00:24 +0000 Subject: [issue1375011] http.cookies, Cookie.py: Improper handling of duplicate cookies Message-ID: <1604692824.86.0.569297490489.issue1375011@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 15:03:35 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 20:03:35 +0000 Subject: [issue16399] argparse: append action with default list adds to list instead of overriding In-Reply-To: <1351992623.71.0.851432414607.issue16399@psf.upfronthosting.co.za> Message-ID: <1604693015.72.0.423933919077.issue16399@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 15:05:29 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 20:05:29 +0000 Subject: [issue12436] [doc] Missing items in installation/setup instructions In-Reply-To: <1309305395.29.0.101516779086.issue12436@psf.upfronthosting.co.za> Message-ID: <1604693129.98.0.632189767209.issue12436@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: Missing items in installation/setup instructions -> [doc] Missing items in installation/setup instructions versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 15:28:21 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Fri, 06 Nov 2020 20:28:21 +0000 Subject: [issue41972] bytes.find consistently hangs in a particular scenario In-Reply-To: <1602113519.53.0.297229304628.issue41972@roundup.psfhosted.org> Message-ID: <1604694501.39.0.37585698692.issue41972@roundup.psfhosted.org> Dennis Sweeney added the comment: I am attempting to better understand the performance characteristics to determine where a cutoff should go. Attached is a colorful table of benchmarks of the existing algorithm to the PR with the cutoff changed to `if (1)` (always two-way) or `if (0)` (always status quo), and tested on a variety of needle lengths and haystack lengths. ---------- Added file: https://bugs.python.org/file49577/Table of benchmarks on lengths.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 15:31:37 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Fri, 06 Nov 2020 20:31:37 +0000 Subject: [issue41972] bytes.find consistently hangs in a particular scenario In-Reply-To: <1602113519.53.0.297229304628.issue41972@roundup.psfhosted.org> Message-ID: <1604694697.59.0.0472805298394.issue41972@roundup.psfhosted.org> Dennis Sweeney added the comment: I used the following script, and the raw results are attached. import pyperf runner = pyperf.Runner() ms = [12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536] ns = [2000, 3000, 4000, 6000, 8000, 12000, 16000, 24000, 32000, 48000, 64000, 96000] for n, m in product(ns, ms): runner.timeit(f"needle={m}, haystack={n}", setup="needle = zipf_string(m); haystack = zipf_string(n)", stmt="needle in haystack", globals=locals() | globals()) ---------- Added file: https://bugs.python.org/file49578/length_benchmarks.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 15:33:38 2020 From: report at bugs.python.org (shakir_juolay) Date: Fri, 06 Nov 2020 20:33:38 +0000 Subject: [issue42275] Jupyter Lab Terminals not available (error was No module named 'winpty.cywinpty') In-Reply-To: <1604655997.12.0.439112752086.issue42275@roundup.psfhosted.org> Message-ID: <1604694818.14.0.881173544676.issue42275@roundup.psfhosted.org> shakir_juolay added the comment: I do not think the issue is related to Jupyter since even import winpty in Python IDLE is giving the same error. I resolved the issue by doing the following but I do not know which of them is the main culprit. 1. Downgraded to Python 3.8.5 (pywinpty currently does not have cp39 version wheel file) 2. pip install wheel (since when I trying to pip install pywinpty in Python 3.9.0 I was getting the message package 'wheel' is not installed using setup.py instead, and as I understand .whl files are better options for installation, and some folks on Google have resolved this issue using manual wheel files from Christoph Gohlke's PythonLibs) 3. pip install jupyterlab (I noticed pywinpty was installed using .whl file) ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 16:28:40 2020 From: report at bugs.python.org (Tim Peters) Date: Fri, 06 Nov 2020 21:28:40 +0000 Subject: [issue41972] bytes.find consistently hangs in a particular scenario In-Reply-To: <1602113519.53.0.297229304628.issue41972@roundup.psfhosted.org> Message-ID: <1604698120.79.0.131756045932.issue41972@roundup.psfhosted.org> Tim Peters added the comment: I'm sorry I haven't been able to give more time to this. I love what's been done, but am just overwhelmed :-( The main thing here is to end quadratic-time disasters, without doing significant damage in other cases. Toward that end it would be fine to use "very high" cutoffs, and save tuning for later. It's clear that we _can_ get significant benefit even in many non-disastrous cases, but unclear exactly how to exploit that. But marking the issue report as "fixed" doesn't require resolving that - and I want to see this improvement in the next Python release. An idea that hasn't been tried: in the world of sorting, quicksort is usually the fastest method - but it's prone to quadratic-time disasters. OTOH, heapsort never suffers disasters, but is almost always significantly slower in ordinary cases. So the more-or-less straightforward "introsort" compromises, by starting with a plain quicksort, but with "introspection" code added to measure how quickly it's making progress. If quicksort appears to be thrashing, it switches to heapsort. It's possible an "introsearch" would work well too. Start with pure brute force (not even with the current preprocessing), and switch to something else if it's making slow progress. That's easy to measure: compare the number of character comparisons we've made so far to how many character positions we've advanced the search window so far. If that ratio exceeds (say) 3, we're heading out of linear-time territory, so should switch to a different approach. With no preprocessing at all, that's likely to be faster than even the current code for very short needles, and in all cases where the needle is found at the start of the haystack. This context is trickier, though, in that the current code, and pure C&P, can also enjoy sub-linear time cases. It's always something ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 16:46:13 2020 From: report at bugs.python.org (Tim Peters) Date: Fri, 06 Nov 2020 21:46:13 +0000 Subject: [issue41972] bytes.find consistently hangs in a particular scenario In-Reply-To: <1602113519.53.0.297229304628.issue41972@roundup.psfhosted.org> Message-ID: <1604699173.07.0.569408792463.issue41972@roundup.psfhosted.org> Tim Peters added the comment: But that also suggests a different approach: start with the current code, but add introspection to switch to your enhancement of C&P if the current code is drifting out of linear-time territory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 17:02:52 2020 From: report at bugs.python.org (Itamar Turner-Trauring) Date: Fri, 06 Nov 2020 22:02:52 +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: <1604700172.68.0.181084441495.issue40379@roundup.psfhosted.org> Itamar Turner-Trauring added the comment: Another person with the same issue: https://twitter.com/volcan01010/status/1324764531139248128 ---------- nosy: +itamarst2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 17:17:46 2020 From: report at bugs.python.org (Roundup Robot) Date: Fri, 06 Nov 2020 22:17:46 +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: <1604701066.73.0.931183322317.issue29086@roundup.psfhosted.org> Change by Roundup Robot : ---------- nosy: +python-dev nosy_count: 3.0 -> 4.0 pull_requests: +22089 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23185 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 17:23:58 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 22:23:58 +0000 Subject: [issue8535] passing optimization flags to the linker required for builds with gcc -flto In-Reply-To: <1272279643.52.0.447435684789.issue8535@psf.upfronthosting.co.za> Message-ID: <1604701438.74.0.940857027774.issue8535@roundup.psfhosted.org> Irit Katriel added the comment: I think this was resolved by issue9189. ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 17:30:37 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 22:30:37 +0000 Subject: [issue11176] [doc] give more meaningful argument names in argparse documentation In-Reply-To: <1297352937.46.0.470038569364.issue11176@psf.upfronthosting.co.za> Message-ID: <1604701837.99.0.918549079259.issue11176@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: give more meaningful argument names in argparse documentation -> [doc] give more meaningful argument names in argparse documentation versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 17:34:49 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 22:34:49 +0000 Subject: [issue16784] Int tests enhancement and refactoring In-Reply-To: <1356518001.26.0.44673058371.issue16784@psf.upfronthosting.co.za> Message-ID: <1604702089.55.0.818680518611.issue16784@roundup.psfhosted.org> Irit Katriel added the comment: It seems that all dependencies are complete, so if nobody will object I will close this too. ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 17:40:08 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 22:40:08 +0000 Subject: [issue7057] tkinter doc: more 3.x updates In-Reply-To: <1254697168.63.0.205098696566.issue7057@psf.upfronthosting.co.za> Message-ID: <1604702408.36.0.177222458296.issue7057@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 17:43:18 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 22:43:18 +0000 Subject: [issue16834] ioctl mutate_flag behavior in regard to the buffer size limit In-Reply-To: <1357052189.92.0.352175087043.issue16834@psf.upfronthosting.co.za> Message-ID: <1604702598.14.0.495640243318.issue16834@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 17:49:20 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 22:49:20 +0000 Subject: [issue16878] argparse: positional args with nargs='*' defaults to [] In-Reply-To: <1357465299.57.0.35284685768.issue16878@psf.upfronthosting.co.za> Message-ID: <1604702960.37.0.212920602632.issue16878@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 17:51:34 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 22:51:34 +0000 Subject: [issue17404] ValueError: can't have unbuffered text I/O for io.open(1, 'wt', 0) In-Reply-To: <1363099360.99.0.903638972832.issue17404@psf.upfronthosting.co.za> Message-ID: <1604703094.48.0.0176302132099.issue17404@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 17:57:48 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 22:57:48 +0000 Subject: [issue17251] LWPCookieJar load() set domain_specifed wrong In-Reply-To: <1361342913.69.0.115494364841.issue17251@psf.upfronthosting.co.za> Message-ID: <1604703468.38.0.0618346600951.issue17251@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 18:00:06 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 06 Nov 2020 23:00:06 +0000 Subject: [issue14019] Unify tests for str.format and string.Formatter In-Reply-To: <1329293704.94.0.0580926341423.issue14019@psf.upfronthosting.co.za> Message-ID: <1604703606.14.0.227846810808.issue14019@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 18:04:29 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 06 Nov 2020 23:04:29 +0000 Subject: [issue8488] Docstrings of non-data descriptors "ignored" In-Reply-To: <1271874309.07.0.567011993617.issue8488@psf.upfronthosting.co.za> Message-ID: <1604703869.27.0.186982198009.issue8488@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 3.7 (2.7 looks almost the same): class Demo(builtins.object) | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) | | data | Doc of a data-descriptor. | | non_data | Doc of a non-data descriptor. | | prop | Doc of a property. Python 3.8: class Demo(builtins.object) | Readonly properties defined here: | | data | Doc of a data-descriptor. | | non_data | Doc of a non-data descriptor. | | prop | Doc of a property. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) Python 3.9: class Demo(builtins.object) | Readonly properties defined here: | | data | | non_data | | prop | Doc of a property. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) Seems the original bug was fixed, but a regression was introduced in 3.9. ---------- status: pending -> open versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 19:08:15 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 00:08:15 +0000 Subject: [issue8488] Docstrings of non-data descriptors "ignored" In-Reply-To: <1271874309.07.0.567011993617.issue8488@psf.upfronthosting.co.za> Message-ID: <1604707695.27.0.570256039671.issue8488@roundup.psfhosted.org> Irit Katriel added the comment: Ah yes. Bisect seems to be pointing at this commit: https://github.com/python/cpython/commit/fbf2786c4c89430e2067016603078cf3500cfe94 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 19:19:51 2020 From: report at bugs.python.org (Mustafa Quraish) Date: Sat, 07 Nov 2020 00:19:51 +0000 Subject: [issue42281] Inconsistent ProcessPoolExecutor behaviour on macOS between 3.7 and 3.8/9 Message-ID: <1604708391.55.0.212848791362.issue42281@roundup.psfhosted.org> New submission from Mustafa Quraish : The code attached produces weird behaviour on macOS (Catalina at least) on Python3.8 / Python3.9. Issue has been reproduced on at least one other mac belonging to a friend. Does not occur on Linux as far as I have tested. I have simplified the code as much as I can, so the example attached does not actually need to use parallelism. Code description: Read text from a file, change directory using `os.chdir`, spawn 5 processes and pass the `print` function as the handler along with the text. Expectation: File contents should be printed 5 times Result: Code tries to load (again) the file in each thread, but fails since the directory was changed. Precondition: Have `file.txt` in the same directory containing some text Output when run on Python3.7, I get the following (expected output): ``` Reading file... Text loaded was: 'file contents' file contents file contents file contents file contents file contents ``` When running on 3.8 / 3.9 (on a mac) I get the following: ``` Reading file... Text loaded was: 'file contents' Error: /Users/mustafa/dev/ptest/test_dir/file.txt does not exist. Error: /Users/mustafa/dev/ptest/test_dir/file.txt does not exist. Error: /Users/mustafa/dev/ptest/test_dir/file.txt does not exist. ``` It seems to me that even opened `file.txt` is loaded in the main thread and text is read from it, this value isn't passed into the spawned processes and they are calling `load()` again (which is where the error message is produced). ---------- components: macOS files: test.py messages: 380483 nosy: bquinlan, mustafaquraish, ned.deily, pitrou, ronaldoussoren priority: normal severity: normal status: open title: Inconsistent ProcessPoolExecutor behaviour on macOS between 3.7 and 3.8/9 type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49579/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 19:28:52 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 00:28:52 +0000 Subject: [issue15693] expose glossary link on hover In-Reply-To: <1345132108.78.0.567099034623.issue15693@psf.upfronthosting.co.za> Message-ID: <1604708932.67.0.173481004151.issue15693@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.1, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 19:37:17 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 00:37:17 +0000 Subject: [issue9849] Argparse needs better error handling for nargs In-Reply-To: <1284420312.86.0.187137843637.issue9849@psf.upfronthosting.co.za> Message-ID: <1604709437.21.0.544892051771.issue9849@roundup.psfhosted.org> Irit Katriel added the comment: This is fixed now: Python 3.10.0a2+ (heads/bpo-42184:f3cb814315, Nov 7 2020, 00:31:51) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import argparse >>> parser = argparse.ArgumentParser() >>> parser.add_argument('foo', nargs='1') Traceback (most recent call last): File "", line 1, in File "C:\Users\User\src\cpython\lib\argparse.py", line 1430, in add_argument self._get_formatter()._format_args(action, None) File "C:\Users\User\src\cpython\lib\argparse.py", line 611, in _format_args raise ValueError("invalid nargs value") from None ValueError: invalid nargs value ---------- nosy: +iritkatriel resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 19:46:58 2020 From: report at bugs.python.org (Brett Cannon) Date: Sat, 07 Nov 2020 00:46:58 +0000 Subject: [issue42131] [zipimport] Update zipimport to use specs In-Reply-To: <1603490733.54.0.490063164948.issue42131@roundup.psfhosted.org> Message-ID: <1604710018.03.0.704304140972.issue42131@roundup.psfhosted.org> Change by Brett Cannon : ---------- assignee: -> brett.cannon resolution: duplicate -> status: closed -> open superseder: zipimport is not PEP 3147 or PEP 488 compliant -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 19:55:20 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 00:55:20 +0000 Subject: [issue14367] try/except block in ismethoddescriptor() in inspect.py, so that pydoc works with pygame in Python 3.2 In-Reply-To: <1332132143.66.0.7093323157.issue14367@psf.upfronthosting.co.za> Message-ID: <1604710520.18.0.515293633346.issue14367@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> duplicate stage: test needed -> resolved status: open -> closed superseder: -> "inspect" gets broken by some descriptors _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 20:04:10 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 01:04:10 +0000 Subject: [issue6981] locale.getdefaultlocale() envvars default code and documentation mismatch In-Reply-To: <1253734503.58.0.404575668112.issue6981@psf.upfronthosting.co.za> Message-ID: <1604711050.71.0.537339911339.issue6981@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 20:08:17 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 01:08:17 +0000 Subject: [issue5248] Adding T_SIZET to structmember.h In-Reply-To: <1234539731.32.0.475254376781.issue5248@psf.upfronthosting.co.za> Message-ID: <1604711297.23.0.710671207208.issue5248@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.9 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 20:30:48 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 01:30:48 +0000 Subject: [issue2931] optparse: various problems with unicode and gettext In-Reply-To: <1211297479.44.0.970954846769.issue2931@psf.upfronthosting.co.za> Message-ID: <1604712648.45.0.996110557619.issue2931@roundup.psfhosted.org> Irit Katriel added the comment: The tests have not been merged yet. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 20:40:42 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 01:40:42 +0000 Subject: [issue1475692] replacing obj.__dict__ with a subclass of dict Message-ID: <1604713242.01.0.082049394652.issue1475692@roundup.psfhosted.org> Irit Katriel added the comment: Calling the overridden __getitem__ is rejected due to performance. Forbidding dict subclasses is rejected because subclasses like ordereddict and defaultdict can be useful. I think the only remaining possibilities are to do nothing or to raise an error when __dict__ is set to a dict subclass that overrides __getitem__ (that should be ok to do, because that __getitem__ is not going to be called). ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 20:52:35 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 01:52:35 +0000 Subject: [issue5430] imaplib: must not replace LF or CR by CRLF in literals In-Reply-To: <1236325877.36.0.637700625895.issue5430@psf.upfronthosting.co.za> Message-ID: <1604713955.86.0.331808391324.issue5430@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 20:59:41 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 07 Nov 2020 01:59:41 +0000 Subject: [issue41972] bytes.find consistently hangs in a particular scenario In-Reply-To: <1602113519.53.0.297229304628.issue41972@roundup.psfhosted.org> Message-ID: <1604714381.08.0.829503523834.issue41972@roundup.psfhosted.org> Dennis Sweeney added the comment: > Toward that end it would be fine to use "very high" cutoffs, and save tuning for later. This feels reasonable to me -- I changed the cutoff to the more cautious `if (m >= 100 && n - m >= 5000)`, where the averages are very consistently faster by my measurements, and it seems that Tal confirms that, at least for the `m >= 100` part. More tuning may be worth exploring later, but this seems pretty safe for now, and it should fix all of the truly catastrophic cases like in the original post. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 21:11:25 2020 From: report at bugs.python.org (hai shi) Date: Sat, 07 Nov 2020 02:11:25 +0000 Subject: [issue41832] PyType_FromSpec() should accept tp_doc=NULL In-Reply-To: <1600770571.99.0.249807543427.issue41832@roundup.psfhosted.org> Message-ID: <1604715085.81.0.357659332857.issue41832@roundup.psfhosted.org> hai shi added the comment: Thank you all:) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 21:31:55 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 02:31:55 +0000 Subject: [issue24397] Test asynchat makes wrong assumptions In-Reply-To: <1433611943.2.0.834798500483.issue24397@psf.upfronthosting.co.za> Message-ID: <1604716315.97.0.564367736044.issue24397@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 21:38:45 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 02:38:45 +0000 Subject: [issue16830] Add skip_host and skip_accept_encoding to HTTPConnection.request() In-Reply-To: <1356998273.75.0.911756727263.issue16830@psf.upfronthosting.co.za> Message-ID: <1604716725.38.0.430142866765.issue16830@roundup.psfhosted.org> Irit Katriel added the comment: Bryan, as there isn't unanimous agreement about the feature you suggested: if you are still interested in working on this, could you bring it up on python-ideas at python.org so that it can be discussed? ---------- nosy: +iritkatriel status: open -> pending versions: +Python 3.10, Python 3.9 -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 21:40:34 2020 From: report at bugs.python.org (Brett Cannon) Date: Sat, 07 Nov 2020 02:40:34 +0000 Subject: [issue42131] [zipimport] Update zipimport to use specs In-Reply-To: <1603490733.54.0.490063164948.issue42131@roundup.psfhosted.org> Message-ID: <1604716834.24.0.466552602527.issue42131@roundup.psfhosted.org> Change by Brett Cannon : ---------- keywords: +patch pull_requests: +22090 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/23187 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 21:41:55 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 02:41:55 +0000 Subject: [issue20543] ** operator does not overflow to inf In-Reply-To: <1391798675.64.0.456943405881.issue20543@psf.upfronthosting.co.za> Message-ID: <1604716915.28.0.829189485525.issue20543@roundup.psfhosted.org> Irit Katriel added the comment: If there are no objections, I will close this as a duplicate of issue3222. ---------- nosy: +iritkatriel resolution: -> duplicate status: open -> pending superseder: -> inf*inf gives inf, but inf**2 gives overflow error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 21:45:54 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 02:45:54 +0000 Subject: [issue1098749] Single-line option to pygettext.py Message-ID: <1604717154.65.0.0162725759068.issue1098749@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.9 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 21:46:03 2020 From: report at bugs.python.org (Brett Cannon) Date: Sat, 07 Nov 2020 02:46:03 +0000 Subject: [issue42133] Update the stdlib to fall back to __spec__.parent if __loader__ isn't defined In-Reply-To: <1603493200.29.0.0849833372282.issue42133@roundup.psfhosted.org> Message-ID: <1604717163.2.0.640625992604.issue42133@roundup.psfhosted.org> Brett Cannon added the comment: New changeset 825ac383327255d38b69a753e5e41710bb3ed010 by Brett Cannon in branch 'master': bpo-42133: update parts of the stdlib to fall back to `__spec__.loader` when `__loader__` is missing (#22929) https://github.com/python/cpython/commit/825ac383327255d38b69a753e5e41710bb3ed010 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 22:08:45 2020 From: report at bugs.python.org (mohamed koubaa) Date: Sat, 07 Nov 2020 03:08:45 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604718525.6.0.117970184022.issue1635741@roundup.psfhosted.org> Change by mohamed koubaa : ---------- pull_requests: +22091 pull_request: https://github.com/python/cpython/pull/23139 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 22:13:07 2020 From: report at bugs.python.org (mohamed koubaa) Date: Sat, 07 Nov 2020 03:13:07 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1604718787.26.0.375909534314.issue1635741@roundup.psfhosted.org> Change by mohamed koubaa : ---------- pull_requests: +22092 pull_request: https://github.com/python/cpython/pull/23188 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 6 23:19:06 2020 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 07 Nov 2020 04:19:06 +0000 Subject: [issue14791] setup.py only adds /prefix/lib, not /prefix/lib64 In-Reply-To: <1336840843.09.0.565460268003.issue14791@psf.upfronthosting.co.za> Message-ID: <1604722746.95.0.255217629872.issue14791@roundup.psfhosted.org> Arfrever Frehtes Taifersar Arahesis added the comment: No. setup.py still contains several hardcoded paths with "lib" (e.g. "/usr/local/lib", "/usr/lib/termcap"). There are also some places in setup.py which check both "lib64" and "lib", but such checks can possibly return incorrect results on multilib systems (when a library happens to be available for another ABI (32-bit vs 64-bit) but not ABI for which Python is being built). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 00:56:33 2020 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 07 Nov 2020 05:56:33 +0000 Subject: [issue40952] GCC overflow warnings (format-overflow, stringop-overflow) In-Reply-To: <1591946085.85.0.775000698536.issue40952@roundup.psfhosted.org> Message-ID: <1604728593.38.0.440148334036.issue40952@roundup.psfhosted.org> Nick Coghlan added the comment: I *think* the lnotab one is the compiler failing to detect that the pointer has been updated to point inside the body of a Python object, but I'm also not 100% sure that it's a false alarm. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 01:59:44 2020 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 07 Nov 2020 06:59:44 +0000 Subject: [issue42282] Constant folding is skipped in named expressions Message-ID: <1604732384.87.0.434481078008.issue42282@roundup.psfhosted.org> New submission from Nick Coghlan : While working on the PEP 642 reference implementation I removed the "default:" case from the switch statement in astfold_expr as part of making sure the new SkippedBinding node was being handled everywhere it needed to be. This change picked up that NamedExpr_kind wasn't being handled either, and a check with the dis module confirmed that using the walrus operator turns off constant folding: ``` [ncoghlan at thechalk cpython]$ ./python Python 3.10.0a2+ (heads/pep-642-constraint-patterns-dirty:4db2fbd609, Nov 7 2020, 16:42:19) [GCC 10.2.1 20201016 (Red Hat 10.2.1-6)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import dis >>> dis.dis("1 + 1") 1 0 LOAD_CONST 0 (2) 2 RETURN_VALUE >>> dis.dis("(x := 1 + 1)") 1 0 LOAD_CONST 0 (1) 2 LOAD_CONST 0 (1) 4 BINARY_ADD 6 DUP_TOP 8 STORE_NAME 0 (x) 10 RETURN_VALUE >>> ``` The missing switch statement entry is just: ``` case NamedExpr_kind: CALL(astfold_expr, expr_ty, node_->v.NamedExpr.value); break; ``` Which gives the expected result: ``` [ncoghlan at thechalk cpython]$ ./python -c "import dis; dis.dis('(x := 1 +1)')" 1 0 LOAD_CONST 0 (2) 2 DUP_TOP 4 STORE_NAME 0 (x) 6 RETURN_VALUE ``` ---------- messages: 380494 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: Constant folding is skipped in named expressions type: performance versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 04:28:38 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 07 Nov 2020 09:28:38 +0000 Subject: [issue42281] Inconsistent ProcessPoolExecutor behaviour on macOS between 3.7 and 3.8/9 In-Reply-To: <1604708391.55.0.212848791362.issue42281@roundup.psfhosted.org> Message-ID: <1604741318.31.0.030156690088.issue42281@roundup.psfhosted.org> Ronald Oussoren added the comment: In 3.8 the spawn method for multiprocessing changed from "fork" to "spawn" (see https://docs.python.org/3/whatsnew/3.8.html#multiprocessing). A side effect of this is that the module gets executed again in the child processes (the same as on Windows). The reason for this change is that multiple higher level APIs, some of which used by the Python implementation, are are not safe to use with the "fork" spawning strategy (as in: causing crashing when using the fork strategy). ---------- resolution: -> wont fix stage: -> resolved status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 04:48:27 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 07 Nov 2020 09:48:27 +0000 Subject: [issue42122] macOS complains about how fonts are accessed In-Reply-To: <1603409230.0.0.859933553088.issue42122@roundup.psfhosted.org> Message-ID: <1604742506.99.0.925226370034.issue42122@roundup.psfhosted.org> Ronald Oussoren added the comment: I'm getting a similar warning on a macOS 11 box: 0:06:29 load avg: 1.58 [184/424/1] test_idle 2020-11-07 10:43:37.878 Python[97785:3275468] CoreText note: Client requested name ".applesystemuifontmonospaced", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:]. 2020-11-07 10:43:37.878 Python[97785:3275468] CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug. 2020-11-07 10:43:37.881 Python[97785:3275468] CoreText note: Client requested name ".applesystemuifontmonospaced", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:]. I'm leaving this issue as closed because the font name is not used in CPython's source code. This is an issue with Tcl/Tk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 04:49:55 2020 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 07 Nov 2020 09:49:55 +0000 Subject: [issue42282] Constant folding is skipped in named expressions In-Reply-To: <1604732384.87.0.434481078008.issue42282@roundup.psfhosted.org> Message-ID: <1604742595.65.0.0803906109191.issue42282@roundup.psfhosted.org> Change by Nick Coghlan : ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 04:55:52 2020 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 07 Nov 2020 09:55:52 +0000 Subject: [issue20543] ** operator does not overflow to inf In-Reply-To: <1391798675.64.0.456943405881.issue20543@psf.upfronthosting.co.za> Message-ID: <1604742952.72.0.367330318656.issue20543@roundup.psfhosted.org> Mark Dickinson added the comment: Thanks, @iritkatriel. Sounds good to me. ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 05:00:59 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 Nov 2020 10:00:59 +0000 Subject: [issue42222] Modernize integer test/conversion in randrange() In-Reply-To: <1604165232.15.0.0916383458838.issue42222@roundup.psfhosted.org> Message-ID: <1604743259.19.0.621664424158.issue42222@roundup.psfhosted.org> Terry J. Reedy added the comment: To me, ValueError("non-integer arg 1 for randrange()") (ValueError('bad type') is a bit painful to read. We do sometime fix such bugs, when not documented, in future releases. Current the doc, "Return a randomly selected element from range(start, stop, step). This is equivalent to choice(range(start, stop, step))", implies that both accept the same values, which most would expect anyway from the names. Being selectively 'generous' in what is accepted is confusing. For the future: both range and math.factorial raise TypeError: 'float' object cannot be interpreted as an integer The consistency is nice. randrange should say the same after deprecation. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 05:02:02 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 10:02:02 +0000 Subject: [issue14791] setup.py only adds /prefix/lib, not /prefix/lib64 In-Reply-To: <1336840843.09.0.565460268003.issue14791@psf.upfronthosting.co.za> Message-ID: <1604743322.38.0.282925599001.issue14791@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 05:11:45 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 Nov 2020 10:11:45 +0000 Subject: [issue42222] Modernize integer test/conversion in randrange() In-Reply-To: <1604165232.15.0.0916383458838.issue42222@roundup.psfhosted.org> Message-ID: <1604743905.78.0.29602559983.issue42222@roundup.psfhosted.org> Terry J. Reedy added the comment: To put what I said another way: both items are mental paper cuts and I see benefit to both coredevs and users in getting rid of them. That is not to say 'no cost', but that there is a real benefit to be balanced against the real cost. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 05:32:39 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 Nov 2020 10:32:39 +0000 Subject: [issue42275] Jupyter Lab Terminals not available (error was No module named 'winpty.cywinpty') In-Reply-To: <1604655997.12.0.439112752086.issue42275@roundup.psfhosted.org> Message-ID: <1604745159.86.0.437824728807.issue42275@roundup.psfhosted.org> Terry J. Reedy added the comment: The 'culprit' is that many 3rd party packages have not yet released 'official' wheels. This is unfortunately typical this soon after a new version is released. We are hoping that predictable yearly releases will improve the situation. We will have to wait and see yet. ---------- nosy: +terry.reedy resolution: fixed -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 05:40:49 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 07 Nov 2020 10:40:49 +0000 Subject: [issue42283] test_idle is interactive Message-ID: <1604745649.01.0.730939254492.issue42283@roundup.psfhosted.org> New submission from Ronald Oussoren : I noticed this on a macOS 11.0.1 box: When I run "python -m test.regrtest -uall" the IDLE testsuite is run ('test_idle'), and those tests pop up windows and won't make progress until I close those windows. ---------- assignee: terry.reedy components: IDLE messages: 380501 nosy: ronaldoussoren, terry.reedy priority: normal severity: normal status: open title: test_idle is interactive versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 06:03:31 2020 From: report at bugs.python.org (Xinmeng Xia) Date: Sat, 07 Nov 2020 11:03:31 +0000 Subject: [issue42284] The grammar specification is inconsistent with the implementation of Python parser. Message-ID: <1604747011.11.0.528857391956.issue42284@roundup.psfhosted.org> New submission from Xinmeng Xia : In full grammar specification of Python 3.6 official documentation (Python 3.6 official documentation: https://docs.python.org/3.6/reference/grammar.html ), we can find a very clear definition on the grammar about the usage of 'break'. According to the definition, we can find the following derivation, which indicates the keyword 'break' can appear in the block of if statement without being nested into a loop block: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # Start symbols for the grammar: # single_input is a single interactive statement; single_input: NEWLINE | simple_stmt | compound_stmt NEWLINE compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | with_stmt | funcdef | classdef | decorated | async_stmt if_stmt: 'if' test ':' suite ('elif' test ':' suite)* ['else' ':' suite] suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT simple_stmt: small_stmt (';' small_stmt)* [';'] NEWLINE small_stmt: (expr_stmt | del_stmt | pass_stmt | flow_stmt | import_stmt | global_stmt | nonlocal_stmt | assert_stmt) flow_stmt: break_stmt | continue_stmt | return_stmt | raise_stmt | yield_stmt break_stmt: 'break' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% However, the implementation of the Python parser requires the 'break' can only be embedded into a loop statement. See the following example: Example A(without loop): >>> compile("if True:break",'','exec') Traceback (most recent call last): File "", line 1, in File "", line 1 SyntaxError: 'break' outside loop Example B(with a loop): >>> compile("while True:\n\tif True:break",'','exec') at 0x7f5f4de90b70, file "", line 1> Similar problems exist between if-statement and keywords: 'continue', 'yield', 'return', 'nonlocal' in Python 3.6 and later versions. ---------- assignee: docs at python components: Documentation messages: 380502 nosy: docs at python, xxm priority: normal severity: normal status: open title: The grammar specification is inconsistent with the implementation of Python parser. type: compile error versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 06:09:13 2020 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 07 Nov 2020 11:09:13 +0000 Subject: [issue42282] Constant folding is skipped in named expressions In-Reply-To: <1604732384.87.0.434481078008.issue42282@roundup.psfhosted.org> Message-ID: <1604747353.3.0.407236013694.issue42282@roundup.psfhosted.org> Change by Nick Coghlan : ---------- keywords: +patch pull_requests: +22093 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23190 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 06:29:02 2020 From: report at bugs.python.org (Julien Palard) Date: Sat, 07 Nov 2020 11:29:02 +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: <1604748542.89.0.331313478766.issue41028@roundup.psfhosted.org> Julien Palard added the comment: New changeset ee2549c2ba8bae00f2b2fea8a39c6dfbd1d06520 by Julien Palard in branch 'master': bpo-41028: Doc: Move switchers to docsbuild-scripts. (GH-20969) https://github.com/python/cpython/commit/ee2549c2ba8bae00f2b2fea8a39c6dfbd1d06520 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 06:34:41 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 07 Nov 2020 11:34:41 +0000 Subject: [issue42284] The grammar specification is inconsistent with the implementation of Python parser. In-Reply-To: <1604747011.11.0.528857391956.issue42284@roundup.psfhosted.org> Message-ID: <1604748881.78.0.776511324607.issue42284@roundup.psfhosted.org> Georg Brandl added the comment: This grammar specification doesn't contain a full specification of code that won't raise SyntaxError. There are several conditions that aren't checked by the generated parser, but at a later stage in the compilation process. While probably possible to express in general, this would make the grammar much more complex. For this example, it would require different definitions of `suite`, `stmt`, `simple_stmt`, `compound_stmt` and so on, to track where control-flow statements are allowed. Other definitions need to track `nonlocal` and you'd get a combinatorial explosion of productions. You could propose a PR to add a note somewhere on that page (but on the master branch, not 3.6 which is unmaintained). ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 06:38:01 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 07 Nov 2020 11:38:01 +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: <1604749081.94.0.340595127793.issue41126@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 07:35:36 2020 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 07 Nov 2020 12:35:36 +0000 Subject: [issue42282] Constant folding is skipped in named expressions In-Reply-To: <1604732384.87.0.434481078008.issue42282@roundup.psfhosted.org> Message-ID: <1604752536.21.0.837345004205.issue42282@roundup.psfhosted.org> Nick Coghlan added the comment: New changeset 8805a4dad201473599416b2c265802b8885f69b8 by Nick Coghlan in branch 'master': bpo-42282: Fold constants inside named expressions (GH-23190) https://github.com/python/cpython/commit/8805a4dad201473599416b2c265802b8885f69b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 07:36:21 2020 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 07 Nov 2020 12:36:21 +0000 Subject: [issue42282] Constant folding is skipped in named expressions In-Reply-To: <1604732384.87.0.434481078008.issue42282@roundup.psfhosted.org> Message-ID: <1604752581.75.0.288768320308.issue42282@roundup.psfhosted.org> Nick Coghlan added the comment: Since this was only a performance issue, I'm not planning to backport it to earlier releases. ---------- stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 07:36:30 2020 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 07 Nov 2020 12:36:30 +0000 Subject: [issue42282] Constant folding is skipped in named expressions In-Reply-To: <1604732384.87.0.434481078008.issue42282@roundup.psfhosted.org> Message-ID: <1604752590.61.0.215856553512.issue42282@roundup.psfhosted.org> Change by Nick Coghlan : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 09:06:05 2020 From: report at bugs.python.org (Ken Jin) Date: Sat, 07 Nov 2020 14:06:05 +0000 Subject: [issue42280] The list of standard generic collections is incomplete In-Reply-To: <1604688598.04.0.446732481114.issue42280@roundup.psfhosted.org> Message-ID: <1604757965.35.0.642924131158.issue42280@roundup.psfhosted.org> Ken Jin added the comment: Dear Jack, good catch! My only worry is that if we make the list exhaustive, it would be too lengthy, or that it might not be feasible to continuously update it every time a new generic type supports the feature. Maybe a line somewhere to mention that most container types in Python should support the feature, and that the list provided is non-exhaustive should suffice? I'm not sure, nosy-ing Guido and Ivan to the list for their thoughts on this. ---------- nosy: +gvanrossum, kj, levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 09:35:31 2020 From: report at bugs.python.org (Marc Culler) Date: Sat, 07 Nov 2020 14:35:31 +0000 Subject: [issue42068] For macOS, package the included Tcl and Tk frameworks in a rational way. In-Reply-To: <1603027259.23.0.956934315272.issue42068@roundup.psfhosted.org> Message-ID: <1604759731.66.0.122075722656.issue42068@roundup.psfhosted.org> Marc Culler added the comment: Ned - do you have any news on the topic of packaging Tcl/Tk within the Python bundle? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 09:36:44 2020 From: report at bugs.python.org (hai shi) Date: Sat, 07 Nov 2020 14:36:44 +0000 Subject: [issue42258] argparse: show choices once per argument Message-ID: <1604759804.47.0.479014020006.issue42258@roundup.psfhosted.org> New submission from hai shi : I like your improvement. But I suggest you should copy your first comment from your PR to here.(It's easy for discuss in here;) ---------- nosy: +paul.j3, rhettinger, shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 09:52:49 2020 From: report at bugs.python.org (hai shi) Date: Sat, 07 Nov 2020 14:52:49 +0000 Subject: [issue41618] [C API] How many slots of static types should be exposed in PyType_GetSlot() In-Reply-To: <1598172498.12.0.869607269568.issue41618@roundup.psfhosted.org> Message-ID: <1604760769.36.0.0815721441651.issue41618@roundup.psfhosted.org> hai shi added the comment: > Do you mean something like "only expose a slot if you have a reason for > exposing it"? That sounds like a tautology. > Where in the docs would this go? Add a friend Note in docs of `PyType_GetSlot` MAYBE? > You mean nb_reserved, right? Yes, thanks for your description. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 10:20:10 2020 From: report at bugs.python.org (Yash Shete) Date: Sat, 07 Nov 2020 15:20:10 +0000 Subject: [issue41712] REDoS in purge In-Reply-To: <1599212842.75.0.630288607393.issue41712@roundup.psfhosted.org> Message-ID: <1604762410.62.0.72263563417.issue41712@roundup.psfhosted.org> Change by Yash Shete : ---------- pull_requests: +22094 pull_request: https://github.com/python/cpython/pull/23191 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 10:50:46 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 Nov 2020 15:50:46 +0000 Subject: [issue42283] test_idle is interactive on macOS 11 In-Reply-To: <1604745649.01.0.730939254492.issue42283@roundup.psfhosted.org> Message-ID: <1604764246.66.0.911540084392.issue42283@roundup.psfhosted.org> Terry J. Reedy added the comment: Strange. test_idle runs fine on my Mohave, so I cannot investigate what you see. Tests of classes that create windows and call wait_window pass _utest_=True and wait_window calls are guarded by "if not _utest:". I believe this is always in __init__. You could grep idlelib for _utest, find a window that stays open, and add prints to see what tkinter call is causing the hang, and if it is in the not-_utest suite. When I run the entire suite rather than just test_idle, I instead get multiple "Python quit unexpectedly" boxes and failures in 5 other tests. ---------- assignee: terry.reedy -> title: test_idle is interactive -> test_idle is interactive on macOS 11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 11:46:16 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Nov 2020 16:46:16 +0000 Subject: [issue42233] GenericAlias does not support union type expressions In-Reply-To: <1604244730.48.0.778653484179.issue42233@roundup.psfhosted.org> Message-ID: <1604767576.05.0.727742459305.issue42233@roundup.psfhosted.org> miss-islington added the comment: New changeset e81e09bfc8a29a44a649a962870a26fe0c097cfa by Miss Islington (bot) in branch '3.9': bpo-42233: Correctly repr GenericAlias when used with typing module (GH-23081) https://github.com/python/cpython/commit/e81e09bfc8a29a44a649a962870a26fe0c097cfa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 12:15:15 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 17:15:15 +0000 Subject: [issue1250] Building external modules using Sun Studio 12 In-Reply-To: <1191964251.86.0.558465608726.issue1250@psf.upfronthosting.co.za> Message-ID: <1604769315.97.0.231492343217.issue1250@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 12:37:08 2020 From: report at bugs.python.org (E. Paine) Date: Sat, 07 Nov 2020 17:37:08 +0000 Subject: [issue42273] Using LazyLoader leads to AttributeError In-Reply-To: <1604614463.81.0.853919807892.issue42273@roundup.psfhosted.org> Message-ID: <1604770628.2.0.809861908972.issue42273@roundup.psfhosted.org> E. Paine added the comment: Just checking: is this not because the lazy import should be in `__init__.py`? (the code provided works fine with `a.b.my_function` on my system) ---------- components: +Interpreter Core -Library (Lib) nosy: +brett.cannon, epaine, eric.snow, ncoghlan type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 12:37:48 2020 From: report at bugs.python.org (E. Paine) Date: Sat, 07 Nov 2020 17:37:48 +0000 Subject: [issue42278] Remove usage of tempfile.mktemp in stdlib In-Reply-To: <1604674672.14.0.368213492276.issue42278@roundup.psfhosted.org> Message-ID: <1604770668.69.0.854947474102.issue42278@roundup.psfhosted.org> Change by E. Paine : ---------- components: +Distutils nosy: +dstufft, eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 13:38:50 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 18:38:50 +0000 Subject: [issue25821] Documentation for threading.enumerate / threading.Thread.is_alive is contradictory. In-Reply-To: <1449533020.35.0.749010589041.issue25821@psf.upfronthosting.co.za> Message-ID: <1604774330.1.0.543831769549.issue25821@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch nosy: +iritkatriel nosy_count: 3.0 -> 4.0 pull_requests: +22095 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23192 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 13:40:42 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 18:40:42 +0000 Subject: [issue25821] Documentation for threading.enumerate / threading.Thread.is_alive is contradictory. In-Reply-To: <1449533020.35.0.749010589041.issue25821@psf.upfronthosting.co.za> Message-ID: <1604774442.49.0.619394897626.issue25821@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Library (Lib) versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 14:01:51 2020 From: report at bugs.python.org (=?utf-8?q?Jakub_Moli=C5=84ski?=) Date: Sat, 07 Nov 2020 19:01:51 +0000 Subject: [issue42285] Missing spaces in list literals in Tutorial/Data Structures Message-ID: <1604775711.75.0.283349948173.issue42285@roundup.psfhosted.org> New submission from Jakub Moli?ski : In the Data Structures section of the Tutorial there are examples of nested list comprehensions that include list literals where elements are written without spaces after commas (`[1,2,3]` instead `[1, 2, 3]`). This is a trivial problem but since this is a tutorial for newcomers (and one of the previous parts of this tutorial explicitly says that the spaces should be present after commas, and in other parts of the tutorial they are consistently put there) I think this deserves to be fixed. ---------- assignee: docs at python components: Documentation messages: 380514 nosy: docs at python, jakub.molinski priority: normal severity: normal status: open title: Missing spaces in list literals in Tutorial/Data Structures type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 14:10:20 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 19:10:20 +0000 Subject: [issue14903] dictobject infinite loop in module set-up In-Reply-To: <1337890784.99.0.00556765207687.issue14903@psf.upfronthosting.co.za> Message-ID: <1604776220.4.0.187711936672.issue14903@roundup.psfhosted.org> Irit Katriel added the comment: Is this a python 2-only issue? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 14:14:35 2020 From: report at bugs.python.org (=?utf-8?q?Jakub_Moli=C5=84ski?=) Date: Sat, 07 Nov 2020 19:14:35 +0000 Subject: [issue42285] Missing spaces in list literals in Tutorial/Data Structures In-Reply-To: <1604775711.75.0.283349948173.issue42285@roundup.psfhosted.org> Message-ID: <1604776475.14.0.178107153725.issue42285@roundup.psfhosted.org> Change by Jakub Moli?ski : ---------- keywords: +patch pull_requests: +22096 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23193 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 14:18:44 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Nov 2020 19:18:44 +0000 Subject: [issue40077] Convert static types to heap types: use PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1604776724.26.0.219899891253.issue40077@roundup.psfhosted.org> miss-islington added the comment: New changeset 01c6aa43dc56b3b64d584c58a49c86f816c05a91 by Erlend Egeberg Aasland in branch 'master': bpo-40077: Convert _queuemodule to use heap types (GH-23136) https://github.com/python/cpython/commit/01c6aa43dc56b3b64d584c58a49c86f816c05a91 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 14:20:52 2020 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 07 Nov 2020 19:20:52 +0000 Subject: [issue40077] Convert static types to heap types: use PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1604776852.11.0.703965779159.issue40077@roundup.psfhosted.org> Antoine Pitrou added the comment: Oops, sorry, I hadn't noticed this was a catch-all issue. Reopening. ---------- resolution: fixed -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 14:20:16 2020 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 07 Nov 2020 19:20:16 +0000 Subject: [issue40077] Convert static types to heap types: use PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1604776816.74.0.497924808269.issue40077@roundup.psfhosted.org> Antoine Pitrou added the comment: Thank you @erlendaasland ! ---------- components: +Extension Modules -C API, Subinterpreters nosy: +pitrou resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 14:41:40 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 19:41:40 +0000 Subject: [issue16221] tokenize.untokenize() "compat" mode misses the encoding when using an iterator In-Reply-To: <1350192416.31.0.110132465833.issue16221@psf.upfronthosting.co.za> Message-ID: <1604778100.23.0.954643786597.issue16221@roundup.psfhosted.org> Irit Katriel added the comment: I think this is fixed now - the tests in the patch are passing. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 14:44:36 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 07 Nov 2020 19:44:36 +0000 Subject: [issue42285] Missing spaces in list literals in Tutorial/Data Structures In-Reply-To: <1604775711.75.0.283349948173.issue42285@roundup.psfhosted.org> Message-ID: <1604778276.41.0.0267985669244.issue42285@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for the suggestion, but I'm going to mark it as declined for the reasons listed in the PR. ---------- nosy: +rhettinger resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 14:53:05 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 19:53:05 +0000 Subject: [issue14003] __self__ on built-in functions is not as documented In-Reply-To: <1329159935.3.0.264942191971.issue14003@psf.upfronthosting.co.za> Message-ID: <1604778785.27.0.679743850518.issue14003@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 14:56:36 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 07 Nov 2020 19:56:36 +0000 Subject: [issue25259] readline macros can segfault Python In-Reply-To: <1443473589.61.0.823349470149.issue25259@psf.upfronthosting.co.za> Message-ID: <1604778996.24.0.514376945421.issue25259@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 14:57:28 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 07 Nov 2020 19:57:28 +0000 Subject: [issue14903] dictobject infinite loop in module set-up In-Reply-To: <1337890784.99.0.00556765207687.issue14903@psf.upfronthosting.co.za> Message-ID: <1604779048.12.0.449811066915.issue14903@roundup.psfhosted.org> Gregory P. Smith added the comment: I suspect so. If any modern supported python 3.x version runs into an issue like this I think opening a fresh bugreport is good. Closing as not reproducable / obsolete. ---------- resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 15:08:59 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 07 Nov 2020 20:08:59 +0000 Subject: [issue42284] The grammar specification is inconsistent with the implementation of Python parser. In-Reply-To: <1604747011.11.0.528857391956.issue42284@roundup.psfhosted.org> Message-ID: <1604779739.48.0.00174849605853.issue42284@roundup.psfhosted.org> Raymond Hettinger added the comment: I concur with Georg. In writing compilers, it is often convenient to allow the grammar to be permissive and save the enforcement of additional syntax restrictions for the downstream semantic analysis phase. For example, the C language grammar specifies the "break" statement in much the same way as Python does: http://www.quut.com/c/ANSI-C-grammar-y.html Thank you for the suggestion, but I'm going to mark this as declined. ---------- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 15:13:38 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 07 Nov 2020 20:13:38 +0000 Subject: [issue1475692] replacing obj.__dict__ with a subclass of dict Message-ID: <1604780018.12.0.512051337226.issue1475692@roundup.psfhosted.org> Raymond Hettinger added the comment: I'm going to mark this as rejected. After 14 years, no clean and performant solution has emerged, yet the world of Python seems to be fine with the status quo. This issue doesn't seem to be getting in the way of people doing their job. ---------- resolution: -> wont fix stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 15:23:43 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 07 Nov 2020 20:23:43 +0000 Subject: [issue10529] [doc] Write argparse i18n howto In-Reply-To: <1290688089.28.0.749623528369.issue10529@psf.upfronthosting.co.za> Message-ID: <1604780623.06.0.784137145916.issue10529@roundup.psfhosted.org> Raymond Hettinger added the comment: This is a great idea. I'm thinking that the Argparse Tutorial is the right place for this: https://docs.python.org/3/howto/argparse.html ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 16:56:36 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Nov 2020 21:56:36 +0000 Subject: [issue1475692] replacing obj.__dict__ with a subclass of dict Message-ID: <1604786196.41.0.241276839146.issue1475692@roundup.psfhosted.org> Serhiy Storchaka added the comment: There is no longer need to use OrderedDict as __dict__, but ctypes types have tp_dict which are instances of dict subclass (StgDict). Disabling setting it to anything that is not an exact dict would break ctypes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 17:17:37 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Nov 2020 22:17:37 +0000 Subject: [issue8488] Docstrings of non-data descriptors "ignored" In-Reply-To: <1271874309.07.0.567011993617.issue8488@psf.upfronthosting.co.za> Message-ID: <1604787457.33.0.12087696283.issue8488@roundup.psfhosted.org> Serhiy Storchaka added the comment: Actually there is no bug in not showing docstring for "data" and "non_data". "Doc of a data-descriptor." is the docstring of the type of the descriptor, not the descriptor itself. If it would be "Type of a data-descriptor." it would be more obvious. To output the docstring for descriptor you need to set the __doc__ attribute of the instance. The original bug is fixed. The non data descriptor is now shown in the correct section. If it would have own docstring it would be shown. But the data descriptor is shown in wrong section. It is not readonly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 17:19:53 2020 From: report at bugs.python.org (Cornelius Krupp) Date: Sat, 07 Nov 2020 22:19:53 +0000 Subject: [issue42286] f_trace gets call on different lines each loop Message-ID: <1604787592.98.0.058051292798.issue42286@roundup.psfhosted.org> New submission from Cornelius Krupp : When using a local trace function, sometimes the line event is issued at the wrong time. As can be seen from the example file `f_trace_wrong_line.py`, each loop iteration we get either 24 or 23, apparently in a fixed rhythm. While this might seem harmless, it appears that the line event for 23 (In this example) is issued at a time where the state of the stack is not valid to switch line. I noticed this because I wanted to implement a context manager that skips to a specific line, but this broken with mysterious error message `TypeError: 'NoneType' object is not callable` which I think is caused by the `with`-line not being fully executed and the stack still having the return value of `__enter__` on it. Here the intro line of the interpreter: Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32 ---------- components: Interpreter Core files: f_trace_wrong_line.py messages: 380527 nosy: trampchamp priority: normal severity: normal status: open title: f_trace gets call on different lines each loop type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file49580/f_trace_wrong_line.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 17:27:09 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Nov 2020 22:27:09 +0000 Subject: [issue8488] Docstrings of non-data descriptors "ignored" In-Reply-To: <1271874309.07.0.567011993617.issue8488@psf.upfronthosting.co.za> Message-ID: <1604788029.31.0.738580235258.issue8488@roundup.psfhosted.org> Serhiy Storchaka added the comment: Ah, all correct. In doc.py unlike to the inlined code Descriptor is a subclass of property. And since fset is None the instance is classified as a readonly property. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 18:50:36 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 Nov 2020 23:50:36 +0000 Subject: [issue42283] test_idle is interactive on macOS 11 In-Reply-To: <1604745649.01.0.730939254492.issue42283@roundup.psfhosted.org> Message-ID: <1604793036.34.0.0925585986092.issue42283@roundup.psfhosted.org> Terry J. Reedy added the comment: Ned, do you have any experience of tk acting so differently on different macOS versions? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 19:02:05 2020 From: report at bugs.python.org (Ned Deily) Date: Sun, 08 Nov 2020 00:02:05 +0000 Subject: [issue42283] test_idle is interactive on macOS 11 In-Reply-To: <1604745649.01.0.730939254492.issue42283@roundup.psfhosted.org> Message-ID: <1604793725.95.0.89569180751.issue42283@roundup.psfhosted.org> Ned Deily added the comment: This is the behavior seen with Tk 8.6.8 *built* on macOS 11.0 Big Sur; I'm assuming that's what Ronald was testing. We'll be updating the macOS installers to use a more recent Tk for installers built on 11.0 and this should go away. Note that Tk 8.6.8 *built* on, say, 10.9 as in the current python.org installers does not exhibit this behavior when *run* on 11.0. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 19:31:36 2020 From: report at bugs.python.org (Yonatan Goldschmidt) Date: Sun, 08 Nov 2020 00:31:36 +0000 Subject: [issue42287] Use Py_NewRef & Py_XNewRef where applicable Message-ID: <1604795496.29.0.677062594524.issue42287@roundup.psfhosted.org> New submission from Yonatan Goldschmidt : Following https://bugs.python.org/issue42262, I think it'd be nice to convert existing C code to use the more concise Py_NewRef() and Py_XNewRef() where possible. Increases readability and less bug prone. Opening this new issue to track the conversion. ---------- components: Interpreter Core messages: 380531 nosy: Yonatan Goldschmidt, vstinner priority: normal severity: normal status: open title: Use Py_NewRef & Py_XNewRef where applicable type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 7 23:51:22 2020 From: report at bugs.python.org (Komiya Takeshi) Date: Sun, 08 Nov 2020 04:51:22 +0000 Subject: [issue42288] typing.get_type_hints() returns Optional[Any] if the default value of the argument is None Message-ID: <1604811082.57.0.115992838782.issue42288@roundup.psfhosted.org> New submission from Komiya Takeshi : I noticed `typing.get_type_hints()` returns Optional[Any] as a type hints if the default value of the argument is None: ``` $ python Python 3.9.0 (default, Oct 24 2020, 15:41:29) [Clang 11.0.3 (clang-1103.0.32.59)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from typing import Any, get_type_hints >>> def hello(name: Any = None): ... pass ... >>> get_type_hints(hello) {'name': typing.Optional[typing.Any]} ``` I know typing.get_type_hints() wraps the user's type annotation with Optional when the default value of the argument is None. But it is needless to wrap Any with Optional because Any already contains None. It would be better not to wrap it with Optional when the user's annotation is Any. ---------- messages: 380532 nosy: i.tkomiya priority: normal severity: normal status: open title: typing.get_type_hints() returns Optional[Any] if the default value of the argument is None versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 00:27:08 2020 From: report at bugs.python.org (Krrish Dhaneja) Date: Sun, 08 Nov 2020 05:27:08 +0000 Subject: [issue42289] Found a secret/private key in code. Message-ID: <1604813228.45.0.0225910221233.issue42289@roundup.psfhosted.org> New submission from Krrish Dhaneja : Found a private key in commit 9ae9ad8 in https://github.com/python/cpython . ---------- messages: 380533 nosy: Krrishdhaneja priority: normal severity: normal status: open title: Found a secret/private key in code. type: security versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 00:51:50 2020 From: report at bugs.python.org (Xinmeng Xia) Date: Sun, 08 Nov 2020 05:51:50 +0000 Subject: [issue42290] Unicode inconsistent display after concencated Message-ID: <1604814710.97.0.934662336836.issue42290@roundup.psfhosted.org> New submission from Xinmeng Xia : When printing an assignment expression with unicode ? ( \U+072F) on the command line, we get an unexpected result. Example A: >>> print(chr(1839)+" = 1") ? = 1 Similar problems exist in plenty of characters of unicode. ---------- components: Unicode messages: 380534 nosy: ezio.melotti, vstinner, xxm priority: normal severity: normal status: open title: Unicode inconsistent display after concencated type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 02:01:44 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Nov 2020 07:01:44 +0000 Subject: [issue42288] typing.get_type_hints() returns Optional[Any] if the default value of the argument is None In-Reply-To: <1604811082.57.0.115992838782.issue42288@roundup.psfhosted.org> Message-ID: <1604818904.09.0.723792011029.issue42288@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- components: +Library (Lib) nosy: +gvanrossum, levkivskyi type: -> enhancement versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 02:23:33 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Nov 2020 07:23:33 +0000 Subject: [issue42278] Remove usage of tempfile.mktemp in stdlib In-Reply-To: <1604674672.14.0.368213492276.issue42278@roundup.psfhosted.org> Message-ID: <1604820213.8.0.893728852223.issue42278@roundup.psfhosted.org> Serhiy Storchaka added the comment: Most of them are in tests. There is no security issue there, also the code may be clearer and more reliable if use helper function test.support.temp_dir(). And most of the rest are in Windows specific code. Some Windows code may not work if you hold open file descriptor, so we should ensure that that code is tested. ---------- components: +Windows nosy: +paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 02:28:04 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 08 Nov 2020 07:28:04 +0000 Subject: [issue42290] Unicode inconsistent display after concencated In-Reply-To: <1604814710.97.0.934662336836.issue42290@roundup.psfhosted.org> Message-ID: <1604820484.13.0.235508765677.issue42290@roundup.psfhosted.org> Steven D'Aprano added the comment: Works for me: >>> chr(1839)+'1' '?1' You are mixing a right-to-left code point (DHALATH) with a left-to-right code point (digit 1). The result depends on the quality of your console or terminal. Try using a different terminal. On my system, the terminal displays the DHALATH on the left, and the digit 1 on the right; when pasted into my browser, it displays them in the reverse order. I don't know which is correct: bidirectional text is complex and I don't know the rules for mixing characters with different bidirection classes. But whichever display is correct, this has nothing to do with Python. It depends on the quality of the bidirectional text rendering of the browser and the terminal. If your terminal displays the wrong results, that's a bug in the terminal. What terminal are you using, in what OS? Try using a different terminal. You can check that Python is doing the right thing: >>> s = chr(1839)+'1' >>> s == '\N{SYRIAC LETTER PERSIAN DHALATH}1' True If your system reports True, then Python has made the string you asked for, and the result of printing depends on the capabilities of the terminal, and the available glyphs in the typeface used by the terminal. There's nothing Python can do about that. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 03:22:36 2020 From: report at bugs.python.org (Steve Dower) Date: Sun, 08 Nov 2020 08:22:36 +0000 Subject: [issue42278] Remove usage of tempfile.mktemp in stdlib In-Reply-To: <1604674672.14.0.368213492276.issue42278@roundup.psfhosted.org> Message-ID: <1604823756.78.0.299601319536.issue42278@roundup.psfhosted.org> Steve Dower added the comment: Yeah, once tests are excluded and the (deprecated or nearly deprecated) distutils and msilib are dropped, the problems are pydoc (which looks non-exploitable) and anywhere we need to generate a named pipe. Both cases where named pipes are being created are as safe as the OS allows, so it's really just pydoc that might deserve a fix. (For reference, it's in the variation of help() that writes the docstring to a file and triggers the equivalent of "type | more" or "cat | less", which is already only useful in an interactive shell.) So I'd suggest it's already as low as possible, but if someone wants to fix pydoc (and encourage the SC to approve PEP 594 and PEP 632 so we don't have to worry about msilib or distutils) then they can feel free. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 04:05:30 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 08 Nov 2020 09:05:30 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1604826330.97.0.852756670686.issue41100@roundup.psfhosted.org> Ronald Oussoren added the comment: New changeset 41761933c1c30bb6003b65eef1ba23a83db4eae4 by Ronald Oussoren in branch 'master': bpo-41100: Support macOS 11 and Apple Silicon (GH-22855) https://github.com/python/cpython/commit/41761933c1c30bb6003b65eef1ba23a83db4eae4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 04:27:05 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 08 Nov 2020 09:27:05 +0000 Subject: [issue34597] Python needs to check existence of functions at runtime for targeting older macOS platforms In-Reply-To: <1536245948.33.0.56676864532.issue34597@psf.upfronthosting.co.za> Message-ID: <1604827625.54.0.416951000189.issue34597@roundup.psfhosted.org> Ronald Oussoren added the comment: This is fixed in bpo-41100 ---------- dependencies: -Build failure on macOS 11 (beta) resolution: -> fixed stage: -> resolved status: open -> closed superseder: -> Build failure on macOS 11 (beta) type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 04:27:53 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 08 Nov 2020 09:27:53 +0000 Subject: [issue31359] `configure` script incorrectly detects symbols as available on Mac w/ Xcode 8+ In-Reply-To: <1504665226.84.0.383465332946.issue31359@psf.upfronthosting.co.za> Message-ID: <1604827673.56.0.318291235794.issue31359@roundup.psfhosted.org> Ronald Oussoren added the comment: This is fixed in bpo-41100 ---------- dependencies: -Build failure on macOS 11 (beta) resolution: -> fixed stage: -> resolved status: open -> closed superseder: -> Build failure on macOS 11 (beta) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 04:44:40 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 08 Nov 2020 09:44:40 +0000 Subject: [issue42283] test_idle is interactive on macOS 11 In-Reply-To: <1604745649.01.0.730939254492.issue42283@roundup.psfhosted.org> Message-ID: <1604828680.66.0.847628203679.issue42283@roundup.psfhosted.org> Ronald Oussoren added the comment: I was using a Tk 8.6.8 build on macOS 11. Looking at this more closely there are clearly other problems with that build: All windows that were created by the test were completely black except for the window chrome. @terry.reedy: I got those crash reporter pop-ups as well, they seem to be related to tests where the interpreter is made to crash as part of the test (for example in the concurrent.futures tests). I hope we can find a way to suppress those pop-ups. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 04:46:58 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 08 Nov 2020 09:46:58 +0000 Subject: [issue41754] Webbrowser Module Cannot Find xdg-settings on OSX In-Reply-To: <1599718531.77.0.777287973454.issue41754@roundup.psfhosted.org> Message-ID: <1604828818.35.0.441247541295.issue41754@roundup.psfhosted.org> Ronald Oussoren added the comment: New changeset 23831a7a90956e38b7d70304bb6afe30d37936de by Ronald Oussoren in branch 'master': bpo-41754: Ignore NotADirectoryError in invocation of xdg-settings (GH-23075) https://github.com/python/cpython/commit/23831a7a90956e38b7d70304bb6afe30d37936de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 04:47:22 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 08 Nov 2020 09:47:22 +0000 Subject: [issue41754] Webbrowser Module Cannot Find xdg-settings on OSX In-Reply-To: <1599718531.77.0.777287973454.issue41754@roundup.psfhosted.org> Message-ID: <1604828842.76.0.193975475246.issue41754@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +22097 pull_request: https://github.com/python/cpython/pull/23197 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 04:47:31 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 08 Nov 2020 09:47:31 +0000 Subject: [issue41754] Webbrowser Module Cannot Find xdg-settings on OSX In-Reply-To: <1599718531.77.0.777287973454.issue41754@roundup.psfhosted.org> Message-ID: <1604828851.05.0.929710061211.issue41754@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +22098 pull_request: https://github.com/python/cpython/pull/23198 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 05:07:55 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 08 Nov 2020 10:07:55 +0000 Subject: [issue41754] Webbrowser Module Cannot Find xdg-settings on OSX In-Reply-To: <1599718531.77.0.777287973454.issue41754@roundup.psfhosted.org> Message-ID: <1604830075.59.0.113806408507.issue41754@roundup.psfhosted.org> miss-islington added the comment: New changeset 371c33567a0b6afb93ffde2fb4564fe57a41945b by Miss Islington (bot) in branch '3.9': bpo-41754: Ignore NotADirectoryError in invocation of xdg-settings (GH-23075) https://github.com/python/cpython/commit/371c33567a0b6afb93ffde2fb4564fe57a41945b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 05:38:14 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Nov 2020 10:38:14 +0000 Subject: [issue42291] Incorrect signature of CodeType.replace() Message-ID: <1604831894.32.0.00722269509991.issue42291@roundup.psfhosted.org> New submission from Serhiy Storchaka : Currently the signature of types.CodeType.replace() is replace(self, /, *, co_argcount=-1, co_posonlyargcount=-1, co_kwonlyargcount=-1, co_nlocals=-1, co_stacksize=-1, co_flags=-1, co_firstlineno=-1, co_code=None, co_consts=None, co_names=None, co_varnames=None, co_freevars=None, co_cellvars=None, co_filename=None, co_name=None, co_lnotab=None) But -1 and None are incorrect values for many parameters, and even if they would be correct, they are not default values. By default, if you do not specify some argument, the value of the corresponding attribute would not be changed. Argument Clinic and the inspect module do not support this case. ---------- components: Argument Clinic, Library (Lib) messages: 380545 nosy: larry, serhiy.storchaka, vstinner, yselivanov priority: normal severity: normal status: open title: Incorrect signature of CodeType.replace() type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 05:39:32 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Nov 2020 10:39:32 +0000 Subject: [issue42291] Incorrect signature of CodeType.replace() In-Reply-To: <1604831894.32.0.00722269509991.issue42291@roundup.psfhosted.org> Message-ID: <1604831972.97.0.265668307422.issue42291@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +22099 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23199 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 06:23:53 2020 From: report at bugs.python.org (pmp-p) Date: Sun, 08 Nov 2020 11:23:53 +0000 Subject: [issue8041] No documentation for Py_TPFLAGS_HAVE_STACKLESS_EXTENSION or Py_TPFLAGS_HAVE_VERSION_TAG. In-Reply-To: <1267544098.65.0.440493208051.issue8041@psf.upfronthosting.co.za> Message-ID: <1604834633.04.0.164213698953.issue8041@roundup.psfhosted.org> Change by pmp-p : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 06:31:46 2020 From: report at bugs.python.org (pmp-p) Date: Sun, 08 Nov 2020 11:31:46 +0000 Subject: [issue32682] test_zlib improve version parsing In-Reply-To: <1516982124.56.0.467229070634.issue32682@psf.upfronthosting.co.za> Message-ID: <1604835106.61.0.953012200187.issue32682@roundup.psfhosted.org> Change by pmp-p : ---------- status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 07:03:40 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 08 Nov 2020 12:03:40 +0000 Subject: [issue37586] macOS: posix_spawn(..., setsid=True) In-Reply-To: <1563024457.33.0.250849204696.issue37586@roundup.psfhosted.org> Message-ID: <1604837020.94.0.140814905875.issue37586@roundup.psfhosted.org> Ronald Oussoren added the comment: Fixed in bpo-41100. ---------- dependencies: -Build failure on macOS 11 (beta) resolution: -> fixed stage: needs patch -> resolved superseder: -> Build failure on macOS 11 (beta) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 07:04:00 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 08 Nov 2020 12:04:00 +0000 Subject: [issue37586] macOS: posix_spawn(..., setsid=True) In-Reply-To: <1563024457.33.0.250849204696.issue37586@roundup.psfhosted.org> Message-ID: <1604837040.93.0.542397530611.issue37586@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 07:06:41 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 08 Nov 2020 12:06:41 +0000 Subject: [issue41754] Webbrowser Module Cannot Find xdg-settings on OSX In-Reply-To: <1599718531.77.0.777287973454.issue41754@roundup.psfhosted.org> Message-ID: <1604837201.18.0.0246593157437.issue41754@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 07:06:20 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 08 Nov 2020 12:06:20 +0000 Subject: [issue41754] Webbrowser Module Cannot Find xdg-settings on OSX In-Reply-To: <1599718531.77.0.777287973454.issue41754@roundup.psfhosted.org> Message-ID: <1604837180.15.0.98283434983.issue41754@roundup.psfhosted.org> Ronald Oussoren added the comment: New changeset db087f6d9ef9a7c873cd883ee120126fc0ca0c72 by Miss Islington (bot) in branch '3.8': bpo-41754: Ignore NotADirectoryError in invocation of xdg-settings (GH-23075) (GH-23198) https://github.com/python/cpython/commit/db087f6d9ef9a7c873cd883ee120126fc0ca0c72 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 07:07:24 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 08 Nov 2020 12:07:24 +0000 Subject: [issue28491] Remove bundled libffi for OSX In-Reply-To: <1476988827.6.0.878520006506.issue28491@psf.upfronthosting.co.za> Message-ID: <1604837244.42.0.240527366453.issue28491@roundup.psfhosted.org> Ronald Oussoren added the comment: This was implemented in bpo-41100 ---------- dependencies: -Build failure on macOS 11 (beta) resolution: -> fixed stage: test needed -> resolved status: open -> closed superseder: -> Build failure on macOS 11 (beta) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 08:03:10 2020 From: report at bugs.python.org (Ian Strawbridge) Date: Sun, 08 Nov 2020 13:03:10 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604840590.34.0.10281872231.issue42225@roundup.psfhosted.org> Ian Strawbridge added the comment: Further to the information I posted on Stack Overflow (referred to above) relating to reproducing emoticon characters from Idle under Ubuntu, I have done more testing. Based on some of the code/comments above, I tried modifications which I hoped might identify errors before Idle crashed. At a simple level I can generate some error information in a Ubuntu terminal from the following. usr/bin$ idle-python3.8 Entering chr(0x1f624) gives the following error message in terminal. X Error of failed request: BadLength (poly request too large or internal Xlib length error) Major opcode of failed request: 139 (RENDER) Minor opcode of failed request: 20 (RenderAddGlyphs) Serial number of failed request: 4484 Current serial number in output stream: 4484 Another test used this code. -------------- def FileSave(sav_file_name,outputstring): with open(sav_file_name, "a", encoding="utf8",newline='') as myfile: myfile.write(outputstring) def FileSave1(sav_file_name,eoutputstring): with open(sav_file_name, "a", encoding="utf8",newline='') as myfile: myfile.write(eoutputstring) tk = True if tk: from tkinter import Tk from tkinter.scrolledtext import ScrolledText root = Tk() text = ScrolledText(root, width=80, height=40) text.pack() def print1(txt): text.insert('insert', txt+'\n') errors = [] outputstring = "Characters:"+ "\n"+"\n" eoutputstring = "Errors:"+ "\n"+"\n" #for i in range(0x1f600, 0x1f660): #crashes at 0x1f624 for i in range(0x1f623, 0x1f624): # 1f624, 1f625 then try 1f652 chars = chr(i) decimal = str(int(hex(i)[2:],16)) try: outputstring = str(hex(i))+" "+decimal+" "+chars+ "\n" FileSave("Charsfile.txt", outputstring) print1(f"{hex(i)} {decimal} {chars}") print(f"{hex(i)} {decimal} {chars}") except Exception as e: print(str(hex(i))) eoutputstring = str(hex(i))+ "\n" FileSave1("Errorfile.txt", eoutputstring) errors.append(f"{hex(i)} {e}") print("ERRORS:") for line in errors: print(line) -------------- With the range starting at 0x1f623 and changing the end point, in Ubuntu, with end point 0x1f624, this prints ok, but if higher numbers are used the Idle windows all closed. However on some occasions, if I began with end point at 0x1f624 and run, then without closing the editor window I increased the end point to 0x1f625, save and run, the Text window would close, but the console window would remain open. I could then increase the upper range further and repeat and more characters would print to the console. I have attached screenshots of the console output with the fonts-noto-color-emoji fonts package installed(with font), then with this package uninstalled (no font) and finally the same when run under Windows 10. For the console output produced while the font package is installed, if I select in the character column where there is a blank space, "something" can be selected. If I save the console as a text file or select all the rows, copy and paste to a text file, the missing characters are revealed. When the font package is uninstalled, the missing characters are truely missing. It is the apparently missing characters (such as 0x1f624, 0x1f62c, 0x1f641, 0x1f642, 0x1f644-0x1f64f) which appear to be causing the Idle crashes. Presumably such as 0x1f650 and 0x1f651 are unallocated codes so show up as rectangular outlines. In none of the tests with the more complex code above did I manage to generate any error output. My set up is as follows. Ubuntu 20.04.1 LTS x86_64 GNOME version: 3.36.3 Python 3.8.6 (default, Sep 25 2020, 21:22:01) Tk version: 8.6.10 [GCC 7.5.0] on linux Hopefully, the above might give some pointers to handling these characters. ---------- nosy: +IanSt1 versions: +Python 3.8 -Python 3.10 Added file: https://bugs.python.org/file49581/Screenshots_128547-128593.pdf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 08:25:44 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 08 Nov 2020 13:25:44 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604841944.72.0.985110332615.issue42225@roundup.psfhosted.org> Ronald Oussoren added the comment: I've filed a Tk issue about this: https://core.tcl-lang.org/tk/tktview/f9fa926666d8e06972b5f0583b07a3c98eaac0a0 What versions of Tk are used? - On macOS I've tested with the Python.org installer, which uses Tk 8.6.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 08:51:58 2020 From: report at bugs.python.org (Ian Strawbridge) Date: Sun, 08 Nov 2020 13:51:58 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604843518.08.0.821092790428.issue42225@roundup.psfhosted.org> Ian Strawbridge added the comment: On Ubuntu, Tk version is showing as 8.6.10 On Windows 10, Tk version is showing as 8.6.9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 09:20:55 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 08 Nov 2020 14:20:55 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604845255.79.0.850735555372.issue42225@roundup.psfhosted.org> Ronald Oussoren added the comment: The crash I had on macOS with tk 8.6.8 appears to be gone when using tk 8.6.10. What I got back was a SyntaxError when pasting a smiley emoji in an IDLE shell window when trying to type execute print("?"). The SyntaxError message says: 'utf-8' codec can't encode characters in position 7-12: surrogates not allowed. That's likely to to how Tk represents this character in its text widget, and is something we could work around when converting Tcl/Tk strings to Python strings. Printing the emoji using 'print(chr(128516))' works fine. The scriptlet in msg380173 also works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 09:41:33 2020 From: report at bugs.python.org (E. Paine) Date: Sun, 08 Nov 2020 14:41:33 +0000 Subject: [issue42278] Remove usage of tempfile.mktemp in stdlib In-Reply-To: <1604674672.14.0.368213492276.issue42278@roundup.psfhosted.org> Message-ID: <1604846493.13.0.980174406537.issue42278@roundup.psfhosted.org> E. Paine added the comment: > Most of them are in tests. There is no security issue there TBH, I don't know enough about the exploit to comment, but it seems that the tempfile tests take this seriously (Lib/test/test_tempfile.py:782 "For safety, all use of mktemp must occur in a private directory.") > distutils and msilib are dropped Is this wise? As you noted, PEP 594 and PEP 632 have yet to be approved (in which case, should we not still be looking at these modules, particularly as PEP 594 has been around for a while). > if someone wants to fix pydoc I am currently drafting a PR which will replace it with `NamedTemporaryFile` (and while we're at it, replace the `os.system` call with `subprocess.run`) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 09:57:40 2020 From: report at bugs.python.org (E. Paine) Date: Sun, 08 Nov 2020 14:57:40 +0000 Subject: [issue42278] Remove usage of tempfile.mktemp in stdlib In-Reply-To: <1604674672.14.0.368213492276.issue42278@roundup.psfhosted.org> Message-ID: <1604847460.05.0.686538152755.issue42278@roundup.psfhosted.org> Change by E. Paine : ---------- keywords: +patch pull_requests: +22100 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23200 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 10:50:40 2020 From: report at bugs.python.org (Bryan Bishop) Date: Sun, 08 Nov 2020 15:50:40 +0000 Subject: [issue16830] Add skip_host and skip_accept_encoding to HTTPConnection.request() In-Reply-To: <1356998273.75.0.911756727263.issue16830@psf.upfronthosting.co.za> Message-ID: <1604850640.57.0.50037652572.issue16830@roundup.psfhosted.org> Bryan Bishop added the comment: I'll go ahead and close this. The putrequest/putheader/endheaders suggestion is probably sufficient. Although I do wonder if a docs update is warranted, explaining the default behavior.. ---------- resolution: -> wont fix stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 10:56:34 2020 From: report at bugs.python.org (E. Paine) Date: Sun, 08 Nov 2020 15:56:34 +0000 Subject: [issue42142] test_ttk timeout: FAIL tkinter ttk LabeledScale test_resize, and more In-Reply-To: <1603582160.73.0.386671878138.issue42142@roundup.psfhosted.org> Message-ID: <1604850994.16.0.441337013261.issue42142@roundup.psfhosted.org> E. Paine added the comment: This is starting to get *very* annoying. Today's failure was a new one (but still `wait_visibility`): test_variable_change (tkinter.test.test_ttk.test_extensions.LabeledScaleTest) ... Timeout (0:20:00)! Thread 0x00007f31dade1080 (most recent call first): File "/home/runner/work/cpython/cpython/Lib/tkinter/__init__.py", line 696 in wait_visibility File "/home/runner/work/cpython/cpython/Lib/tkinter/test/test_ttk/test_extensions.py", line 147 in test_variable_change Again, this was on the Github Ubuntu test (https://github.com/python/cpython/pull/23200/checks?check_run_id=1370499785#step:10:912). I will update my PR to skip *all* tests that use `wait_visbility` on Ubuntu and ask that this would be committed sooner rather than later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 12:17:53 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 08 Nov 2020 17:17:53 +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: <1604855873.87.0.260897441329.issue41116@roundup.psfhosted.org> Ronald Oussoren added the comment: So close... the problem we're running into is that "-isysroot" is only added for universal builds, not for regular builds. Furthermore unixccompiler doesn't know that is should always look in the SDK and not in the regular location (for system locations). I guess we should switch to: - Never add -isysroot to CFLAGS (change to configure) - Teach _osx_support about locating the default sdk root, both for Xcode and "command line tools" (_osx_support.default_sdk_root()) - Use that new function in setup.py and unixccompiler. The first item might affect older systems where Xcode shipped with 2 SDKs (current and previous OS version). Is that something we can back port to 3.8 and 3.9? A less clean, but smaller, change is to teach the configure script to always add -isysroot on macOS, not just when doing a universal build. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 13:00:10 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 08 Nov 2020 18:00:10 +0000 Subject: [issue6860] Inconsistent naming of custom command in setup.py help output In-Reply-To: <1252372114.27.0.565813299947.issue6860@psf.upfronthosting.co.za> Message-ID: <1604858410.97.0.38991937345.issue6860@roundup.psfhosted.org> Irit Katriel added the comment: As per Camilla's comment, this is no longer an issue. ---------- nosy: +iritkatriel resolution: accepted -> wont fix stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 13:12:48 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 08 Nov 2020 18:12:48 +0000 Subject: [issue25006] List pybind11 binding generator In-Reply-To: <1441409694.33.0.221981890825.issue25006@psf.upfronthosting.co.za> Message-ID: <1604859168.31.0.956850469432.issue25006@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 13:15:58 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 08 Nov 2020 18:15:58 +0000 Subject: [issue25858] Structure field size/ofs __str__ wrong with large size fields In-Reply-To: <1450061530.03.0.0248609360686.issue25858@psf.upfronthosting.co.za> Message-ID: <1604859358.5.0.873216055482.issue25858@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 13:17:42 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 08 Nov 2020 18:17:42 +0000 Subject: [issue13508] ctypes' find_library breaks with ARM ABIs In-Reply-To: <1322664873.68.0.763423976883.issue13508@psf.upfronthosting.co.za> Message-ID: <1604859462.22.0.508072398794.issue13508@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 13:21:38 2020 From: report at bugs.python.org (igo95862) Date: Sun, 08 Nov 2020 18:21:38 +0000 Subject: [issue42292] C API: Allocating Objects on the Heap. Misleading documentation. Message-ID: <1604859698.6.0.558793144076.issue42292@roundup.psfhosted.org> New submission from igo95862 : The issue is that the function names are too similar to other function that do completely different things. `PyObject_Init` this function does not use `__init__` at all. What it does is sets the already allocated object pointer to the specific type and increments its reference. `PyObject_New` this function has nothing to do with `__new__`. It mallocs the new object and when calls `PyObject_Init` to set its type and increment reference. Most importantly neither function actually calls `__init__`. You need to do it manually otherwise you might get garbage in your object data from residual memory. I think there should be a small example showing how to allocate objects on heap and initialize them. This is what I do (ignore the names): ``` SdBusMessageObject *message_object = PyObject_NEW(SdBusMessageObject, &SdBusMessageType); SdBusMessageType.tp_init((PyObject *)message_object, NULL, NULL); ``` ---------- assignee: docs at python components: Documentation messages: 380558 nosy: docs at python, igo95862 priority: normal severity: normal status: open title: C API: Allocating Objects on the Heap. Misleading documentation. versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 13:23:43 2020 From: report at bugs.python.org (igo95862) Date: Sun, 08 Nov 2020 18:23:43 +0000 Subject: [issue42292] C API: Allocating Objects on the Heap. Misleading documentation. In-Reply-To: <1604859698.6.0.558793144076.issue42292@roundup.psfhosted.org> Message-ID: <1604859823.35.0.201893174378.issue42292@roundup.psfhosted.org> Change by igo95862 : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 13:34:34 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 08 Nov 2020 18:34:34 +0000 Subject: [issue18148] Make of Python 3.2.2 fails on Solaris SPARC In-Reply-To: <1370522977.23.0.850120192524.issue18148@psf.upfronthosting.co.za> Message-ID: <1604860474.13.0.453999817823.issue18148@roundup.psfhosted.org> Irit Katriel added the comment: Python 3.2 is no longer maintained. If this issue existing in more recent versions please open a new issue for it. ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 13:45:21 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 08 Nov 2020 18:45:21 +0000 Subject: [issue1570255] redirected cookies Message-ID: <1604861121.3.0.802039873564.issue1570255@roundup.psfhosted.org> Irit Katriel added the comment: Paul's script (with urllib.request instead of urllib2) works for me. Is this issue still relevant? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 13:59:46 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 08 Nov 2020 18:59:46 +0000 Subject: [issue23276] hackcheck is broken in association with __setattr__ In-Reply-To: <1421706139.14.0.239687578391.issue23276@psf.upfronthosting.co.za> Message-ID: <1604861986.42.0.929667596609.issue23276@roundup.psfhosted.org> Irit Katriel added the comment: I tried to look up what pyqtWrapperType is and found that it has been removed from QtCore. Is this issue still relevant? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 14:24:01 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 08 Nov 2020 19:24:01 +0000 Subject: [issue9023] distutils relative path errors In-Reply-To: <1276850851.53.0.471987336824.issue9023@psf.upfronthosting.co.za> Message-ID: <1604863441.25.0.641519128596.issue9023@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 15:23:44 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 08 Nov 2020 20:23:44 +0000 Subject: [issue10548] document (lack of) interaction between @expectedException on a test_method and setUp In-Reply-To: <1290870998.37.0.268172055445.issue10548@psf.upfronthosting.co.za> Message-ID: <1604867024.35.0.319373814788.issue10548@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch nosy: +iritkatriel nosy_count: 5.0 -> 6.0 pull_requests: +22101 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23201 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 15:24:31 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 08 Nov 2020 20:24:31 +0000 Subject: [issue10548] document (lack of) interaction between @expectedFailure on a test_method and setUp In-Reply-To: <1290870998.37.0.268172055445.issue10548@psf.upfronthosting.co.za> Message-ID: <1604867071.53.0.327524598011.issue10548@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: document (lack of) interaction between @expectedException on a test_method and setUp -> document (lack of) interaction between @expectedFailure on a test_method and setUp versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 17:07:34 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 08 Nov 2020 22:07:34 +0000 Subject: [issue42288] typing.get_type_hints() returns Optional[Any] if the default value of the argument is None In-Reply-To: <1604811082.57.0.115992838782.issue42288@roundup.psfhosted.org> Message-ID: <1604873254.46.0.367789942688.issue42288@roundup.psfhosted.org> Guido van Rossum added the comment: There is actually a difference between Any and Optional[Any]. Try the following using e.g. mypy: def f(a: Optional[Any]): a+1 def g(a: Any): a+1 You'll get an error in f but not in g. So this behavior is not a bug. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 18:22:30 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 08 Nov 2020 23:22:30 +0000 Subject: [issue12488] multiprocessing.Connection does not communicate pipe closure between parent and child In-Reply-To: <1309779809.62.0.10199189289.issue12488@psf.upfronthosting.co.za> Message-ID: <1604877750.01.0.336741992127.issue12488@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6, Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 18:26:02 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 08 Nov 2020 23:26:02 +0000 Subject: [issue1397474] [doc] timeit execution enviroment Message-ID: <1604877962.1.0.645348528739.issue1397474@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: timeit execution enviroment -> [doc] timeit execution enviroment versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 18:29:02 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 08 Nov 2020 23:29:02 +0000 Subject: [issue39892] Enable DeprecationWarnings by default when not explicit in unittest.main() In-Reply-To: <1583628832.97.0.582883450111.issue39892@roundup.psfhosted.org> Message-ID: <1604878142.52.0.976330196236.issue39892@roundup.psfhosted.org> Gregory P. Smith added the comment: my bad :) ---------- resolution: -> not a bug stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 18:29:57 2020 From: report at bugs.python.org (giomach) Date: Sun, 08 Nov 2020 23:29:57 +0000 Subject: [issue42293] Installation of pyinstaller in Windows fails with utf8 error Message-ID: <1604878197.58.0.426662721479.issue42293@roundup.psfhosted.org> New submission from giomach : Python 3.9 freshly installed in Windows 10 to C:\Program Files\Python39, everything done as administrator, installed for all users, added to PATH. Installation of pyinstaller fails with message "SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xe1 in position 0: unexpected end of data (sitecustomize.py, line 21)" (attachment) This may be due to the character ? in my Windows username (0xe1 in ANSI, which is my default 8-bit codepage) being misinterpreted as being in utf8 instead of ANSI. There is no sitecustomize.py in my file system. ---------- components: Installation files: pyinstaller.txt messages: 380564 nosy: giomach priority: normal severity: normal status: open title: Installation of pyinstaller in Windows fails with utf8 error type: crash versions: Python 3.9 Added file: https://bugs.python.org/file49582/pyinstaller.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 18:46:53 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 08 Nov 2020 23:46:53 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604879213.36.0.237199125642.issue42225@roundup.psfhosted.org> Terry J. Reedy added the comment: Serhiy, does Ronald's report above re 8.6.10 on macOS suggest what might be needed to make print("?") work on Mac? As I remember, your year-old _tkinter patch to make print() work on Linux and Windows converts Python strings differently on the two systems. But you did not know for sure what to do for macOS because nothing would work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 18:57:35 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 08 Nov 2020 23:57:35 +0000 Subject: [issue15099] [doc] exec of function doesn't call __getitem__ or __missing__ on undefined global In-Reply-To: <1340017199.64.0.733628658868.issue15099@psf.upfronthosting.co.za> Message-ID: <1604879855.46.0.215063382102.issue15099@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: exec of function doesn't call __getitem__ or __missing__ on undefined global -> [doc] exec of function doesn't call __getitem__ or __missing__ on undefined global versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 18:59:37 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 08 Nov 2020 23:59:37 +0000 Subject: [issue16879] distutils.command.config uses fragile constant temporary file name In-Reply-To: <1357476277.46.0.0647034504115.issue16879@psf.upfronthosting.co.za> Message-ID: <1604879977.5.0.822732375762.issue16879@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6, Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 19:00:21 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 09 Nov 2020 00:00:21 +0000 Subject: [issue16879] distutils.command.config uses fragile constant temporary file name In-Reply-To: <1357476277.46.0.0647034504115.issue16879@psf.upfronthosting.co.za> Message-ID: <1604880021.07.0.497772221534.issue16879@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 19:00:57 2020 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 09 Nov 2020 00:00:57 +0000 Subject: [issue16879] distutils.command.config uses fragile constant temporary file name In-Reply-To: <1357476277.46.0.0647034504115.issue16879@psf.upfronthosting.co.za> Message-ID: <1604880057.29.0.482456753543.issue16879@roundup.psfhosted.org> Change by ?ric Araujo : ---------- assignee: eric.araujo -> stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 19:04:53 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 09 Nov 2020 00:04:53 +0000 Subject: [issue8730] Spurious test failure in distutils In-Reply-To: <1274012517.83.0.155461681494.issue8730@psf.upfronthosting.co.za> Message-ID: <1604880293.12.0.580991774885.issue8730@roundup.psfhosted.org> Irit Katriel added the comment: The skip has been added: @unittest.skipUnless(find_executable('compress'), 'The compress program is required') def test_compress_deprecated(self): https://github.com/python/cpython/blob/23831a7a90956e38b7d70304bb6afe30d37936de/Lib/distutils/tests/test_archive_util.py#L204 ---------- nosy: +iritkatriel resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 19:06:51 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 09 Nov 2020 00:06:51 +0000 Subject: [issue8508] 2to3 fixer for gettext's .ugettext In-Reply-To: <1272034086.61.0.0547716106043.issue8508@psf.upfronthosting.co.za> Message-ID: <1604880411.04.0.34300709632.issue8508@roundup.psfhosted.org> Irit Katriel added the comment: Should we close this as won't fix? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 19:14:12 2020 From: report at bugs.python.org (Eryk Sun) Date: Mon, 09 Nov 2020 00:14:12 +0000 Subject: [issue42293] Installation of pyinstaller in Windows fails with utf8 error In-Reply-To: <1604878197.58.0.426662721479.issue42293@roundup.psfhosted.org> Message-ID: <1604880852.13.0.51574187687.issue42293@roundup.psfhosted.org> Eryk Sun added the comment: This looks to be a bug in the constructor of pip's BuildEnvironment class: https://github.com/pypa/pip/blob/a4f4bfbf8ba7fd1e60884a439907e3f2a32e117a/src/pip/_internal/build_env.py#L82 Python 3 source files are UTF-8 by default, but text files default to the platform's preferred encoding, unless overridden by Python's UTF-8 mode. It is thus a mistake to create "sitecustomize.py" without explicitly specifying UTF-8 as the encoding. The preferred encoding in Windows is the process active code page, which is the system code page, unless, in Windows 10 only, it's overridden to use UTF-8 by the application manifest's "activeCodePage" setting. The system code page is usually a legacy code page, such as 1252, unless, in Windows 10 only, it's set to UTF-8 or the system language is Unicode only (e.g. Hindi). ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 20:12:02 2020 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Nov 2020 01:12:02 +0000 Subject: [issue42289] Found a secret/private key in code. In-Reply-To: <1604813228.45.0.0225910221233.issue42289@roundup.psfhosted.org> Message-ID: <1604884322.77.0.939186334955.issue42289@roundup.psfhosted.org> Zachary Ware added the comment: That commit does not appear to be part of any branch of the main repository, and also appears to contain non-changes to every file in the repository. There are known private keys somewhere in Lib/test for use in tests. If you're referring to something else, please point it out a bit more clearly, preferably with a link directly to the file :) If you're talking about accidentally committing your own private key to your personal fork of the repo, your best course is probably to delete your fork and re-fork, though I don't know if that will actually make that commit go away forever; you'd need to talk to GitHub about that. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 20:45:35 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 09 Nov 2020 01:45:35 +0000 Subject: [issue42179] Clarify chaining exceptions in tutorial/errors.rst In-Reply-To: <1603873891.9.0.500762071742.issue42179@roundup.psfhosted.org> Message-ID: <1604886335.61.0.953858618341.issue42179@roundup.psfhosted.org> Inada Naoki added the comment: >> 1. Such understanding of a tutorial is debatable. Tutorial is just a material for learning written with some system in mind, which is more interesting to read than dry reference material. A tutorial, generally dpeaking, may be both for beginners and for professionals. > > OK, I will send this topic to python-dev first. For the record, there is a long thread in python-dev about this issue: * main thread: https://mail.python.org/archives/list/python-dev at python.org/thread/MXMEFFYB6JXAKSS36SZ7DX4ASP6APWFP/ * another thread: https://mail.python.org/archives/list/python-dev at python.org/thread/WNHVZLEO3ZVDOFP2FHRBUQR4GY24RIJJ/ ## High level discussion: focus on new user vs write more and more details. More detail: * Abdur-Rahmaan Janhangeer Focus on new user: * Paul Moore * Brett Cannon * Guido van Rossum * Kyle Stanley * Carol Willing * Serhiy Storchaka ## About this specific case. (Adding __context__ and __suppress_context vs removing __cause__) Add __context__: (no one) Remove __cause__: * Kyle Stanley * ?ric Araujo (in GH-23160) Riccardo Polignieri asked that to be very careful about removing something, but he did not vote for adding __context__ and __supress_context__. -- I merged PR-23162 for keep focus on new users and consistent for now. But I have not closed this issue yet because documentation WG may revisit the issue. (see https://mail.python.org/archives/list/python-dev at python.org/message/IWW2YBLJK4T3OWSKDUDVDVXPWDGIFWTC/ ). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 21:50:51 2020 From: report at bugs.python.org (daniel hahler) Date: Mon, 09 Nov 2020 02:50:51 +0000 Subject: [issue36388] pdb: do_debug installs sys.settrace handler when used inside post_mortem In-Reply-To: <1553156880.66.0.415237926561.issue36388@roundup.psfhosted.org> Message-ID: <1604890251.94.0.567328402803.issue36388@roundup.psfhosted.org> Change by daniel hahler : ---------- pull_requests: +22102 pull_request: https://github.com/python/cpython/pull/23202 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 23:00:40 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 09 Nov 2020 04:00:40 +0000 Subject: [issue42233] GenericAlias does not support union type expressions In-Reply-To: <1604244730.48.0.778653484179.issue42233@roundup.psfhosted.org> Message-ID: <1604894440.45.0.313812524408.issue42233@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 4eb41d055e8307b8206f680287e492a6db068acd by kj in branch 'master': bpo-42233: Add union type expression support for GenericAlias and fix de-duplicating of GenericAlias (GH-23077) https://github.com/python/cpython/commit/4eb41d055e8307b8206f680287e492a6db068acd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 8 23:11:33 2020 From: report at bugs.python.org (Ken Jin) Date: Mon, 09 Nov 2020 04:11:33 +0000 Subject: [issue42233] GenericAlias does not support union type expressions In-Reply-To: <1604244730.48.0.778653484179.issue42233@roundup.psfhosted.org> Message-ID: <1604895093.99.0.598227194769.issue42233@roundup.psfhosted.org> Change by Ken Jin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 02:02:59 2020 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 09 Nov 2020 07:02:59 +0000 Subject: [issue40624] add support for != (not-equals) in ElementTree XPath In-Reply-To: <1589455502.16.0.216786525166.issue40624@roundup.psfhosted.org> Message-ID: <1604905379.92.0.26483261495.issue40624@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 97e8b1eaeaf3aa325c84ff2e13417c30414d0269 by Ammar Askar in branch 'master': bpo-40624: Add support for the XPath != operator in xml.etree (GH-22147) https://github.com/python/cpython/commit/97e8b1eaeaf3aa325c84ff2e13417c30414d0269 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 02:04:04 2020 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 09 Nov 2020 07:04:04 +0000 Subject: [issue40624] add support for != (not-equals) in ElementTree XPath In-Reply-To: <1589455502.16.0.216786525166.issue40624@roundup.psfhosted.org> Message-ID: <1604905444.72.0.357557732028.issue40624@roundup.psfhosted.org> Change by Stefan Behnel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 02:16:26 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 09 Nov 2020 07:16:26 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604906186.98.0.134176179268.issue42225@roundup.psfhosted.org> Ronald Oussoren added the comment: Note that the main installers for Python 3.8 and 3.9 will continue to use Tk 8.6.8 due to problems when building later Tk version on macOS 10.9. The current plan is to add an installer variant to (amongst others) uses Tk 8.6.10 (and .11 when that's released). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 02:25:06 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 09 Nov 2020 07:25:06 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604906706.04.0.679566892071.issue42225@roundup.psfhosted.org> Ronald Oussoren added the comment: W.r.t. the SyntaxError I got (msg380552): It looks like it will be possible to work around that problem in _tkinter.c:unicodeFromTclStringAndSize by merging surrogate pairs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 02:27:00 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Nov 2020 07:27:00 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604906820.41.0.761064258647.issue42225@roundup.psfhosted.org> Serhiy Storchaka added the comment: Please open a new issue for "surrogates not allowed". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 03:35:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 08:35:14 +0000 Subject: [issue42287] Use Py_NewRef & Py_XNewRef where applicable In-Reply-To: <1604795496.29.0.677062594524.issue42287@roundup.psfhosted.org> Message-ID: <1604910914.96.0.0298414657516.issue42287@roundup.psfhosted.org> STINNER Victor added the comment: > Following https://bugs.python.org/issue42262, I think it'd be nice to convert existing C code to use the more concise Py_NewRef() and Py_XNewRef() where possible. Increases readability and less bug prone. In general, we don't accept changes which are only coding style changes. I don't see how Py_NewRef() or Py_XNewRef() is less error prone. In my experience, any change is more likely to introduce new bugs than leaving the code unchanged. See https://github.com/python/cpython/pull/23170 for a concrete case of a PR which converts code to Py_NewRef() / Py_XNewRef(): the PR introduced bugs (in early versions of the PR). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 04:02:42 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 09 Nov 2020 09:02:42 +0000 Subject: [issue13829] exception error in _scproxy.so when called after fork In-Reply-To: <1326998522.6.0.790472668429.issue13829@psf.upfronthosting.co.za> Message-ID: <1604912562.38.0.707322647864.issue13829@roundup.psfhosted.org> Ronald Oussoren added the comment: I propose closing this as 3th-party or out-of-date: 1) The crash in _scproxy is due to limitations in Apple's libraries, in particular they don't work in child processes created with os.fork() without calling execv*() 2) The primary way to run into this is by the use of the multiprocessing library. The default spawn strategy for multiprocessing was changes to "spawn" instead of "fork" in 3.8 (for macOS) because of problems like this. ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 04:42:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 09:42:14 +0000 Subject: [issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef() Message-ID: <1604914934.45.0.492738703952.issue42294@roundup.psfhosted.org> New submission from STINNER Victor : The C API of Python uses and abuses borrowed references and stealing references for performance. When such function is used in some very specific code for best performances, problems arise when they are the only way to access objects. Reference counting in C is error prone, most people, even experimented core developers, get it wrong. Examples of issues: * Reference leaks: objects are never deleted causing memory leaks. For example, an error handling code which forgets to call Py_DECREF() on a newly create object. * Unsafe borrowed references: call arbitrary Python code can delete the referenced objects, and so the borrowed reference becomes a dangling pointer. Most developers are confident that a function call cannot run arbitrary Python code, whereas a single Py_DECREF() can trigger a GC collection which runs finalizers which can be arbitrary Python code. Many functions have been fixed manually by adding Py_INCREF() and Py_DECREF() around "unsafe" function calls. Borrowed references and stealing references make reference counting code special, even more complex to review. I propose to use new function to make refecence counting code more regular, simpler to review, and so less error prone. Examples: * Add PyTuple_GetItem(): similar to PyTuple_GetItem() but returns a strong reference (or NULL if the tuple item is not set) * Add PyTuple_SetItemRef(): similar to PyTuple_SetItem() but don't steal a reference to the new item The C API has a long list of functions using borrowed references, so I'm not sure where we should stop. I propose to start with the most common functions: PyDict, PyTuple, PyList, and see how it goes. -- PyTuple_GetItem() is a function call which checks arguments: raise an exception if arguments are invalid. For best performances, PyTuple_GET_ITEM() macro is providing to skip these checks. This macro also returns a borrowed reference. I'm not if a new PyTuple_GET_ITEM_REF() macro should be added: similar to PyTuple_GET_ITEM() but returns a strong reference. Same open question abut PyTuple_SET_ITEM(tuple, index, item) macro which is also special: * Don't call Py_XINCREF(item) * Don't call Py_XDECREF() on the old item If a new PyTuple_SET_ITEM_REF() macro is added, I would prefer to make the function more "regular" in term of reference counting, and so call Py_XDECREF() on the old item. When used on a newly created tuple, it would add an useless Py_XDECREF(NULL), compared to PyTuple_SET_ITEM(). Again, my idea here is to provide functions with a less surprising behavior and more regular reference counting. There are alternatives to build a new tuple without the useless Py_XDECREF(NULL), like Py_BuildValue(). Code which requires best performance could continue to use PyTuple_SET_ITEM() which is not deprecated, and handle reference counting manually. -- An alternative is to use abstract functions like: * PyTuple_GetItem() => PySequence_GetItem() * PyDict_GetItem() => PyObject_GetItem() * etc. I propose to keep specialized functions per type to avoid the overhead of indirection. For example, PySequence_GetItem(obj, index) calls Py_TYPE(obj)->tp_as_sequence->sq_item(obj, index) which implies multiple indirection: * Get the object type from PyObject.ob_type * Dereference *type to get PyTypeObject.tp_as_sequence * Dereference *PyTypeObject.tp_as_sequence to get PySequenceMethods.sq_item -- I don't plan to get rid of borrowed references. Sometimes, they are safe and replacing them with strong references would require explicit reference counting code which is again easy to get wrong. For example, Py_TYPE() returns a borrowed reference to an object type. The function is commonly used to access immediately to a type member, with no risk of calling arbitrary Python code between the Py_TYPE() call and the read of the type attribute. For example, the following code is perfectly safe: PyErr_Format(PyExc_TypeError, "exec() globals must be a dict, not %.100s", Py_TYPE(globals)->tp_name); -- See also bpo-42262 where I added Py_NewRef() and Py_XNewRef() functions. See https://pythoncapi.readthedocs.io/bad_api.html#borrowed-references for details about issues caused by borrowed references and a list of functions using borrowed references. ---------- components: C API messages: 380578 nosy: vstinner priority: normal severity: normal status: open title: [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef() versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 04:53:30 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 09 Nov 2020 09:53:30 +0000 Subject: [issue42289] Found a secret/private key in code. In-Reply-To: <1604813228.45.0.0225910221233.issue42289@roundup.psfhosted.org> Message-ID: <1604915610.13.0.419396372279.issue42289@roundup.psfhosted.org> Christian Heimes added the comment: As Zachary already pointed out, Python's source code contains multiple private keys for internal testing. The keys are only used for integration tests and are not a security problem. ---------- nosy: +christian.heimes resolution: -> not a bug stage: -> resolved status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 04:58:02 2020 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 09 Nov 2020 09:58:02 +0000 Subject: [issue41237] Access violation in python39.dll!meth_dealloc on exit In-Reply-To: <1594188565.24.0.738467793313.issue41237@roundup.psfhosted.org> Message-ID: <1604915882.82.0.189878305156.issue41237@roundup.psfhosted.org> Change by Petr Viktorin : ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 05:20:58 2020 From: report at bugs.python.org (Sergei Izmailov) Date: Mon, 09 Nov 2020 10:20:58 +0000 Subject: [issue41287] __doc__ attribute is not set in property-derived classes In-Reply-To: <1594586083.6.0.902653661287.issue41287@roundup.psfhosted.org> Message-ID: <1604917258.39.0.135946422504.issue41287@roundup.psfhosted.org> Change by Sergei Izmailov : ---------- keywords: +patch pull_requests: +22103 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23205 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 05:48:14 2020 From: report at bugs.python.org (John Zalewski) Date: Mon, 09 Nov 2020 10:48:14 +0000 Subject: [issue42295] Error should be flagged if Walrus operator is used for multiple assigment Message-ID: <1604918894.59.0.15180711596.issue42295@roundup.psfhosted.org> New submission from John Zalewski : #The 'Walrus' operator does not support multiple assignment but does not #flag an attempt to make a multiple assigment as an error #This results in unexpected behavior at execution time: a, b = 100, 200 print (a, b) #result is #100 200 if (a, b := 3, 4): #this should be flagged as an error but is not print ("found true") else: print ("found false") print (a, b) #result is #100 3 but if multiple assigment were allowed this would be '3, 4' ---------------------------------------------------------------------- Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information. >>> = RESTART: C:\Users\John PC 2017\AppData\Local\Programs\Python\Python38-32\walrustest.py 100 200 found true 100 3 >>> ---------- files: walrustest.py messages: 380580 nosy: JohnPie priority: normal severity: normal status: open title: Error should be flagged if Walrus operator is used for multiple assigment type: compile error versions: Python 3.9 Added file: https://bugs.python.org/file49583/walrustest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 05:54:43 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Mon, 09 Nov 2020 10:54:43 +0000 Subject: [issue42295] Error should be flagged if Walrus operator is used for multiple assigment In-Reply-To: <1604918894.59.0.15180711596.issue42295@roundup.psfhosted.org> Message-ID: <1604919283.5.0.801865657836.issue42295@roundup.psfhosted.org> Batuhan Taskaya added the comment: Due to the precedence of the walrus operator, it is not actually a multiple assignment but rather a tuple of 3 elements with one being the value of the assignment expression. $ python -m ast (a, b := 3, 4) Module( body=[ Expr( value=Tuple( elts=[ Name(id='a', ctx=Load()), NamedExpr( target=Name(id='b', ctx=Store()), value=Constant(value=3)), Constant(value=4)], ctx=Load()))], type_ignores=[]) In this case, it creates a tuple with loading the name `a` from the current scope, using the value of the 3 and also assigning 3 to the b, and loading constant 4. So basically (a, b := 3, 4) is actually (a, (b := 3), 4) ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 06:50:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 11:50:47 +0000 Subject: [issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef() In-Reply-To: <1604914934.45.0.492738703952.issue42294@roundup.psfhosted.org> Message-ID: <1604922647.38.0.537737501296.issue42294@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +22104 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23206 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 07:34:16 2020 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 09 Nov 2020 12:34:16 +0000 Subject: [issue41543] contextlib.nullcontext doesn't work with async context managers In-Reply-To: <1597352328.6.0.811344048873.issue41543@roundup.psfhosted.org> Message-ID: <1604925256.34.0.5701558146.issue41543@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset a117167d8dc8fa673a4646f509551c7950f824e5 by Tom Gringauz in branch 'master': bpo-41543: contextlib.nullcontext can fill in for an async context manager (GH-21870) https://github.com/python/cpython/commit/a117167d8dc8fa673a4646f509551c7950f824e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 07:40:56 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 12:40:56 +0000 Subject: [issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef() In-Reply-To: <1604914934.45.0.492738703952.issue42294@roundup.psfhosted.org> Message-ID: <1604925656.92.0.90447113402.issue42294@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 23c5f93b83f78f295313e137011edb18b24c37c2 by Victor Stinner in branch 'master': bpo-42294: Add borrowed/strong reference to doc glossary (GH-23206) https://github.com/python/cpython/commit/23c5f93b83f78f295313e137011edb18b24c37c2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 07:44:05 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Mon, 09 Nov 2020 12:44:05 +0000 Subject: [issue42295] Error should be flagged if Walrus operator is used for multiple assigment In-Reply-To: <1604918894.59.0.15180711596.issue42295@roundup.psfhosted.org> Message-ID: <1604925845.71.0.731909286129.issue42295@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 07:44:10 2020 From: report at bugs.python.org (Antony Lee) Date: Mon, 09 Nov 2020 12:44:10 +0000 Subject: [issue40624] add support for != (not-equals) in ElementTree XPath In-Reply-To: <1589455502.16.0.216786525166.issue40624@roundup.psfhosted.org> Message-ID: <1604925850.12.0.356444584018.issue40624@roundup.psfhosted.org> Change by Antony Lee : ---------- nosy: -Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 08:09:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 13:09:25 +0000 Subject: [issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef() In-Reply-To: <1604914934.45.0.492738703952.issue42294@roundup.psfhosted.org> Message-ID: <1604927365.39.0.380529312903.issue42294@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22105 pull_request: https://github.com/python/cpython/pull/23207 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 08:17:23 2020 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 09 Nov 2020 13:17:23 +0000 Subject: [issue19561] request to reopen Issue837046 - pyport.h redeclares gethostname() if SOLARIS is defined In-Reply-To: <1384267181.39.0.791538142123.issue19561@psf.upfronthosting.co.za> Message-ID: <1604927843.65.0.194853213092.issue19561@roundup.psfhosted.org> Jakub Kulik added the comment: I think this code should be removed. It was added in its current form more than 20 years ago with the intention to add function declarations missing from system include files: https://github.com/python/cpython/commit/1e0c2f4bee43728930bd5f4dc77283f09c4ba004 Today, every Solaris system should have gethostname() available in unistd.h. I am not sure when exactly was it added, but it was available in the OpenSolaris since the first commit (year 2005): https://github.com/illumos/illumos-gate/blame/master/usr/src/head/unistd.h#L344 Also, AFAIK, 'SOLARIS' macro is not predefined on Solaris systems in compiler preprocessors today *; hence, unless compiled with `-DSOLARIS`, this code has no effect. *) I tested this with several GCC [7|9|10] and Solaris studio and neither of those defined it. It seems like it might have worked many years ago, but it certainly isn't a way to #ifdef Solaris today. ---------- nosy: +kulikjak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 08:24:59 2020 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 09 Nov 2020 13:24:59 +0000 Subject: [issue41543] contextlib.nullcontext doesn't work with async context managers In-Reply-To: <1597352328.6.0.811344048873.issue41543@roundup.psfhosted.org> Message-ID: <1604928299.27.0.712277867104.issue41543@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 08:31:02 2020 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 09 Nov 2020 13:31:02 +0000 Subject: [issue19561] request to reopen Issue837046 - pyport.h redeclares gethostname() if SOLARIS is defined In-Reply-To: <1384267181.39.0.791538142123.issue19561@psf.upfronthosting.co.za> Message-ID: <1604928662.46.0.360621243084.issue19561@roundup.psfhosted.org> Jakub Kulik added the comment: And for the reference, Solaris distros are already removing this code: https://github.com/oracle/solaris-userland/blob/master/components/python/python37/patches/15-gethostname.patch https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/python/python37/patches/15-gethostname.patch https://github.com/omniosorg/omnios-build/blob/master/build/python37/patches/15-gethostname.patch ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 08:44:37 2020 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 09 Nov 2020 13:44:37 +0000 Subject: [issue19561] request to reopen Issue837046 - pyport.h redeclares gethostname() if SOLARIS is defined In-Reply-To: <1384267181.39.0.791538142123.issue19561@psf.upfronthosting.co.za> Message-ID: <1604929477.42.0.89645335975.issue19561@roundup.psfhosted.org> Change by Jakub Kulik : ---------- pull_requests: +22106 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23208 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 09:19:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 14:19:38 +0000 Subject: [issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef() In-Reply-To: <1604914934.45.0.492738703952.issue42294@roundup.psfhosted.org> Message-ID: <1604931578.37.0.0427170171463.issue42294@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22107 pull_request: https://github.com/python/cpython/pull/23209 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 09:26:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 14:26:02 +0000 Subject: [issue26200] SETREF adds unnecessary work in some cases In-Reply-To: <1453745024.51.0.674954872761.issue26200@psf.upfronthosting.co.za> Message-ID: <1604931962.31.0.44171346697.issue26200@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22108 pull_request: https://github.com/python/cpython/pull/23209 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 09:27:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 14:27:40 +0000 Subject: [issue26200] SETREF adds unnecessary work in some cases In-Reply-To: <1453745024.51.0.674954872761.issue26200@psf.upfronthosting.co.za> Message-ID: <1604932060.04.0.739130944249.issue26200@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 23209 to add Py_SetRef() and Py_XSetRef() functions to the limited C API and the stable ABI. Py_SETREF() and Py_XSETREF() macros are excluded from the limited C API and some extension modules cannot use them, like extension modules written in Rust. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 09:44:05 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 14:44:05 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1604933044.99.0.363718812582.issue42225@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 09:46:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 14:46:09 +0000 Subject: [issue42291] Incorrect signature of CodeType.replace() In-Reply-To: <1604831894.32.0.00722269509991.issue42291@roundup.psfhosted.org> Message-ID: <1604933169.43.0.717217393963.issue42291@roundup.psfhosted.org> STINNER Victor added the comment: > Argument Clinic and the inspect module do not support this case. That's why I used -1 and None. > But -1 and None are incorrect values for many parameters, and even if they would be correct, they are not default values. By default, if you do not specify some argument, the value of the corresponding attribute would not be changed. If you consider that this issue matters, you may hack the code to accept None as if no parameter was passed (pass NULL). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 09:46:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 14:46:59 +0000 Subject: [issue25259] readline macros can segfault Python In-Reply-To: <1443473589.61.0.823349470149.issue25259@psf.upfronthosting.co.za> Message-ID: <1604933219.62.0.884048109302.issue25259@roundup.psfhosted.org> STINNER Victor added the comment: No activity for 4 years, I close the issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 09:49:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 14:49:40 +0000 Subject: [issue12625] sporadic test_unittest failure In-Reply-To: <1311454495.5.0.801093056111.issue12625@psf.upfronthosting.co.za> Message-ID: <1604933380.09.0.506852376748.issue12625@roundup.psfhosted.org> STINNER Victor added the comment: > Is this test still failing? Or can this be closed? The OpenIndiana buildbot is gone for many years. See also bpo-42173. ---------- resolution: -> out of date stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 09:51:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 14:51:43 +0000 Subject: [issue14019] Unify tests for str.format and string.Formatter In-Reply-To: <1329293704.94.0.0580926341423.issue14019@psf.upfronthosting.co.za> Message-ID: <1604933503.97.0.252670635177.issue14019@roundup.psfhosted.org> STINNER Victor added the comment: @Irit Katriel: Please avoid changing the versions field of old inactive issues. It changes artificially the last activity date of an issue and it sends an email to all people in the nosy list. There is no need to update the Version field of the +7500 open bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 09:55:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 14:55:16 +0000 Subject: [issue2931] optparse: various problems with unicode and gettext In-Reply-To: <1211297479.44.0.970954846769.issue2931@psf.upfronthosting.co.za> Message-ID: <1604933716.59.0.879351485781.issue2931@roundup.psfhosted.org> STINNER Victor added the comment: This issue was reported in 2008 on Python 2.5. The latest comment is about Python 2. The latest Python version is now Python 3.9 and uses Unicode by default. I close the issue since there is no activity for 4 years. More tests are always welcomed, so someone can still add new tests. Note that the optparse module is deprecated since Python 3.2. ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 09:55:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 14:55:36 +0000 Subject: [issue41972] bytes.find consistently hangs in a particular scenario In-Reply-To: <1602113519.53.0.297229304628.issue41972@roundup.psfhosted.org> Message-ID: <1604933736.7.0.413060053225.issue41972@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 09:56:10 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 14:56:10 +0000 Subject: [issue42290] Unicode inconsistent display after concencated In-Reply-To: <1604814710.97.0.934662336836.issue42290@roundup.psfhosted.org> Message-ID: <1604933770.64.0.516926948271.issue42290@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 09:56:57 2020 From: report at bugs.python.org (Mark Shannon) Date: Mon, 09 Nov 2020 14:56:57 +0000 Subject: [issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef() In-Reply-To: <1604914934.45.0.492738703952.issue42294@roundup.psfhosted.org> Message-ID: <1604933817.2.0.297383620002.issue42294@roundup.psfhosted.org> Mark Shannon added the comment: I'm not convinced that this is worth the effort. The old functions aren't going away, so these additional functions provide no real safety. You can't stop C programmers trading away correctness for some perceived performance benefit :( If we were designing the API from scratch, then this would be a better set of functions. But because the old functions remain, it just means we are making the API larger. Please don't add macros, use inline functions. There seems to be some confusion about borrowed references and stolen references in https://pythoncapi.readthedocs.io/bad_api.html#borrowed-references "Stealing" a reference is perfectly safe. Returning a "borrowed" reference is not. So, don't bother with `PyTuple_SetItemRef()`, as `PyTupleSetItem()` is safe. ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 10:20:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 15:20:48 +0000 Subject: [issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef() In-Reply-To: <1604914934.45.0.492738703952.issue42294@roundup.psfhosted.org> Message-ID: <1604935248.93.0.800997856391.issue42294@roundup.psfhosted.org> STINNER Victor added the comment: Mark Shannon: > The old functions aren't going away, so these additional functions provide no real safety. You can't stop C programmers trading away correctness for some perceived performance benefit :( In my experience, newcomers tend to copy existing more. If slowly, the code base moves towards safer code less error-prone code like Py_NewRef() or Py_SETREF(), slowly, we will avoid a bunch of bugs. > If we were designing the API from scratch, then this would be a better set of functions. But because the old functions remain, it just means we are making the API larger. New API VS enhance the existing API. So far, no approach won. I wrote the PEP 620 to enhance the C API and towards a more opaque API, and there is the HPy project which is a new API written correctly from the start. But HPy is not usable yet, and migrating C extensions to HPy will take years. Also, enhancing the existing API and writing a new API are not exclusive option. What is the issue of making the C API larger? > Please don't add macros, use inline functions. For Py_NewRef(), I used all at once :-) static inline function + function + macro :-) It's exported as a regular function for the stable ABI, but overriden by a static inline function with a macro. The idea is to allow to use it for developers who cannot use static inline functions (ex: extension modules not written in C). I chose to redefine functions as static inline functions in the limited C API. If it's an issue, we can consider to only do that in Include/cpython/object.h. > There seems to be some confusion about borrowed references and stolen references in https://pythoncapi.readthedocs.io/bad_api.html#borrowed-references "Stealing" a reference is perfectly safe. Returning a "borrowed" reference is not. > > So, don't bother with `PyTuple_SetItemRef()`, as `PyTupleSetItem()` is safe. I'm really annoyed that almost all functions increase the refcount of their arugments, except a bunch of special cases. I would like to move towards a more regular API. PyTuple_SetItem() is annoying because it steals a reference to the item. Also, it doesn't clear the reference of the previous item, which is also likely to introduce a reference leak. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 10:31:06 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 09 Nov 2020 15:31:06 +0000 Subject: [issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef() In-Reply-To: <1604914934.45.0.492738703952.issue42294@roundup.psfhosted.org> Message-ID: <1604935866.55.0.414193228946.issue42294@roundup.psfhosted.org> Ronald Oussoren added the comment: PyTuple_SetItem() does clear the previous item, it uses Py_XSETREF. The macro version (PyTuple_SET_ITEM) does not clear the previous item. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 11:18:47 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 09 Nov 2020 16:18:47 +0000 Subject: [issue39931] Global variables are not accessible from child processes (multiprocessing.Pool) In-Reply-To: <1583918452.53.0.6597480705.issue39931@roundup.psfhosted.org> Message-ID: <1604938727.02.0.873907863189.issue39931@roundup.psfhosted.org> Ronald Oussoren added the comment: Can this issue be closed? Multiprocessing seems to work as designed. There is a behaviour change between 3.7 and 3.8, but that's documented in What's New. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 11:51:55 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Nov 2020 16:51:55 +0000 Subject: [issue35712] Make NotImplemented unusable in boolean context In-Reply-To: <1547157306.18.0.725390794489.issue35712@roundup.psfhosted.org> Message-ID: <1604940715.87.0.747282990455.issue35712@roundup.psfhosted.org> Raymond Hettinger added the comment: One of the idioms for removing None no longer works: >>> L = [0, 23, 234, 89, None, 0, 35, 9] >>> list(filter(None.__ne__, L)) Warning (from warnings module): File "", line 1 DeprecationWarning: NotImplemented should not be used in a boolean context [0, 23, 234, 89, 0, 35, 9] ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 11:55:18 2020 From: report at bugs.python.org (hai shi) Date: Mon, 09 Nov 2020 16:55:18 +0000 Subject: [issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef() In-Reply-To: <1604914934.45.0.492738703952.issue42294@roundup.psfhosted.org> Message-ID: <1604940918.24.0.053038391287.issue42294@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 12:25:49 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 09 Nov 2020 17:25:49 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 Message-ID: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> New submission from Guido van Rossum : This code cannot be interrupted with ^C on Windows (e.g. in the REPL) while True: pass This seems to be a regression, it works in earlier versions. ---------- messages: 380597 nosy: Mark.Shannon, gvanrossum, steve.dower priority: normal severity: normal status: open title: Infinite loop uninterruptable on Windows in 3.10 versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 12:25:59 2020 From: report at bugs.python.org (Jake Hunsaker) Date: Mon, 09 Nov 2020 17:25:59 +0000 Subject: [issue42297] [argparse] Bad error message formatting when using custom usage text Message-ID: <1604942759.08.0.272256214563.issue42297@roundup.psfhosted.org> New submission from Jake Hunsaker : In the sos project, we build a custom `usage` string for our argparser parser, and have noticed that doing so causes error messages from argparse to be badly formatted. For example if a bad option value is given, the error message is mangled into the last line of our usage string: ``` # python3 bin/sos report --all-logs=on usage: sos report [options] sos [options] [..snip...] collect, collector Collect an sos report from multiple nodes simultaneously report: error: argument --all-logs: ignored explicit argument 'on' ``` This is especially strange since we build the usage string with a trailing newline character: ``` for com in self._components: aliases = self._components[com][1] aliases.insert(0, com) _com = ', '.join(aliases) desc = self._components[com][0].desc _com_string += ( "\t{com:<30}{desc}\n".format(com=_com, desc=desc) ) usage_string = ("%(prog)s [options]\n\n" "Available components:\n") usage_string = usage_string + _com_string epilog = ("See `sos --help` for more information") self.parser = ArgumentParser(usage=usage_string, epilog=epilog) ``` So it appears the trailing newlines are being stripped (in our case, unintentionally?). As expected, removing the trailing newline when passing `usage_string` to our parse does not change this behavior. However, if we don't set the usage string at all when instantiating our parser, the error message is properly formatted beginning on a new line. Slightly interesting is that without the usage_string being passed, the error message is prefixed with "sos: report:" as expected for %(prog)s expansion, but when the error message is mangled `%(prog)s` is left out as well. A little more context is available here: https://github.com/sosreport/sos/issues/2285 ---------- components: Library (Lib) messages: 380598 nosy: TurboTurtle priority: normal severity: normal status: open title: [argparse] Bad error message formatting when using custom usage text type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 12:26:06 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 09 Nov 2020 17:26:06 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1604942766.81.0.5298810256.issue42296@roundup.psfhosted.org> Change by Guido van Rossum : ---------- components: +Windows nosy: +paul.moore, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 12:27:08 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 09 Nov 2020 17:27:08 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1604942828.18.0.584400204507.issue42296@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 12:28:06 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 09 Nov 2020 17:28:06 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1604942886.94.0.394380138855.issue42296@roundup.psfhosted.org> Change by Guido van Rossum : ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 12:29:05 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 09 Nov 2020 17:29:05 +0000 Subject: [issue42297] [argparse] Bad error message formatting when using custom usage text In-Reply-To: <1604942759.08.0.272256214563.issue42297@roundup.psfhosted.org> Message-ID: <1604942945.29.0.193025589419.issue42297@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +paul.j3, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 12:31:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 17:31:27 +0000 Subject: [issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef() In-Reply-To: <1604914934.45.0.492738703952.issue42294@roundup.psfhosted.org> Message-ID: <1604943087.4.0.957474061168.issue42294@roundup.psfhosted.org> STINNER Victor added the comment: > PyTuple_SetItem() does clear the previous item, it uses Py_XSETREF. The macro version (PyTuple_SET_ITEM) does not clear the previous item. Oh sorry, I was thinking at PyTuple_SET_ITEM(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 12:36:19 2020 From: report at bugs.python.org (pkerling) Date: Mon, 09 Nov 2020 17:36:19 +0000 Subject: [issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API In-Reply-To: <1600265269.2.0.881235166904.issue41798@roundup.psfhosted.org> Message-ID: <1604943379.15.0.307767502615.issue41798@roundup.psfhosted.org> Change by pkerling <9b6ab161 at casix.org>: ---------- nosy: +pkerling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 12:38:17 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Nov 2020 17:38:17 +0000 Subject: [issue41712] REDoS in purge In-Reply-To: <1599212842.75.0.630288607393.issue41712@roundup.psfhosted.org> Message-ID: <1604943497.16.0.484330676409.issue41712@roundup.psfhosted.org> Steve Dower added the comment: New changeset 1f73c320e2921605c4963e202f6bdac1ef18f2ce by Yash Shete in branch 'master': bpo-41712: Avoid runaway regex match in upload scripts (GH-23166) https://github.com/python/cpython/commit/1f73c320e2921605c4963e202f6bdac1ef18f2ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 12:38:07 2020 From: report at bugs.python.org (Eryk Sun) Date: Mon, 09 Nov 2020 17:38:07 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1604943487.09.0.301078929574.issue42296@roundup.psfhosted.org> Eryk Sun added the comment: It also cannot be interrupted in 3.9. But 3.8 and earlier work correctly. ---------- nosy: +eryksun type: -> behavior versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 12:51:42 2020 From: report at bugs.python.org (pkerling) Date: Mon, 09 Nov 2020 17:51:42 +0000 Subject: [issue42298] Documented interaction of single-stage init and sub-interpreters inaccurate Message-ID: <1604944302.05.0.57186129659.issue42298@roundup.psfhosted.org> New submission from pkerling <9b6ab161 at casix.org>: The C API documentation says this about single-phase initialization and sub-interpreters: "[T]he first time a particular extension is imported, it is initialized normally, and a (shallow) copy of its module?s dictionary is squirreled away. When the same extension is imported by another (sub-)interpreter, a new module is initialized and filled with the contents of this copy; the extension?s init function is not called." - from https://docs.python.org/3.10/c-api/init.html#c.Py_NewInterpreter I was investigating crashes relating to the _datetime module and sub-interpreters and from my observations, this does not seem to be true. I have tracked this functionality down to the m_base.m_copy dictionary of the PyModuleDef of an extension and the functions _PyImport_FixupExtensionObject and _PyImport_FindExtensionObject in Python/import.c. However, modules are only ever added to the `extensions` global when imported in the main interpreter, see https://github.com/python/cpython/blob/1f73c320e2921605c4963e202f6bdac1ef18f2ce/Python/import.c#L480 Furthermore, even if they were added and m_base.m_copy was set, it would be cleared again on sub-interpreter shutdown here: https://github.com/python/cpython/blob/1f73c320e2921605c4963e202f6bdac1ef18f2ce/Python/pystate.c#L796 - implying that the module will be loaded and initialized again next time due to this check: https://github.com/python/cpython/blob/1f73c320e2921605c4963e202f6bdac1ef18f2ce/Python/import.c#L556 These observations are supported by the fact that in my tests, if "import _datetime" is ran subsequently in two different sub-interpreters, PyInit__datetime is indeed called twice. Test code - set a breakpoint on PyInit__datetime to observe the behavior: #include #include int main() { Py_Initialize(); for (int i = 0; i < 100; ++i) { PyThreadState* ts = Py_NewInterpreter(); assert(ts); int result = PyRun_SimpleString("import _datetime"); assert(result == 0); Py_EndInterpreter(ts); } return 0; } In summary, it seems to me that the documented behavior is not accurate (any more?) - so either the docs or the implementation should change. ---------- assignee: docs at python components: Documentation messages: 380602 nosy: docs at python, pkerling priority: normal severity: normal status: open title: Documented interaction of single-stage init and sub-interpreters inaccurate versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 13:06:55 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 09 Nov 2020 18:06:55 +0000 Subject: [issue35712] Make NotImplemented unusable in boolean context In-Reply-To: <1547157306.18.0.725390794489.issue35712@roundup.psfhosted.org> Message-ID: <1604945215.12.0.589925942839.issue35712@roundup.psfhosted.org> Guido van Rossum added the comment: > list(filter(None.__ne__, L)) I assume you've been recommending this? To me it looks obfuscated. People should just use a comprehension, e.g. [x for x in L if x is not None] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 13:10:51 2020 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Mon, 09 Nov 2020 18:10:51 +0000 Subject: [issue35712] Make NotImplemented unusable in boolean context In-Reply-To: <1547157306.18.0.725390794489.issue35712@roundup.psfhosted.org> Message-ID: <1604945451.03.0.751277245455.issue35712@roundup.psfhosted.org> Vedran ?a?i? added the comment: ... as it probably should: look at https://bugs.python.org/msg349303 Yes, filtering comprehensions are a frequently used niche, and too long in the "official" parlance. I seem to recall that [x in mylist if x is not None] (instead of triple-x version) was rejected because it was too hard to parse. Maybe now we can really implement it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 13:16:17 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 09 Nov 2020 18:16:17 +0000 Subject: [issue35712] Make NotImplemented unusable in boolean context In-Reply-To: <1547157306.18.0.725390794489.issue35712@roundup.psfhosted.org> Message-ID: <1604945777.47.0.208740507296.issue35712@roundup.psfhosted.org> Guido van Rossum added the comment: That's off topic for this issue -- you can go to python-ideas to propose that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 13:18:15 2020 From: report at bugs.python.org (Eryk Sun) Date: Mon, 09 Nov 2020 18:18:15 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1604945895.75.0.955056298714.issue42296@roundup.psfhosted.org> Change by Eryk Sun : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 13:35:21 2020 From: report at bugs.python.org (Eryk Sun) Date: Mon, 09 Nov 2020 18:35:21 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1604946921.25.0.991430648083.issue42296@roundup.psfhosted.org> Eryk Sun added the comment: See bpo-40010. COMPUTE_EVAL_BREAKER() in Python/ceval.c -- or _Py_ThreadCanHandleSignals in Include/internal/pycore_pystate.h -- needs to take into account that SIGNAL_PENDING_SIGNALS() gets called on a completely new thread in Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 13:50:29 2020 From: report at bugs.python.org (Vladimir Ryabtsev) Date: Mon, 09 Nov 2020 18:50:29 +0000 Subject: [issue42179] Clarify chaining exceptions in tutorial/errors.rst In-Reply-To: <1603873891.9.0.500762071742.issue42179@roundup.psfhosted.org> Message-ID: <1604947829.01.0.866374472071.issue42179@roundup.psfhosted.org> Vladimir Ryabtsev added the comment: All right, you won. I hope beginner users will be happy :) I removed my proposal paragraph about __cause__ and __context__ and kept only changes about exception type (https://bugs.python.org/issue42179#msg380435). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 13:51:42 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 09 Nov 2020 18:51:42 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1604947902.81.0.0952919821628.issue42296@roundup.psfhosted.org> Guido van Rossum added the comment: So you're saying this war broken by https://github.com/python/cpython/pull/19087 ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 13:57:32 2020 From: report at bugs.python.org (Eryk Sun) Date: Mon, 09 Nov 2020 18:57:32 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1604948252.76.0.744210182014.issue42296@roundup.psfhosted.org> Eryk Sun added the comment: Yes, if I force the return value of _Py_ThreadCanHandleSignals to 1, the loop is broken by a KeyboardInterrupt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 14:14:23 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Nov 2020 19:14:23 +0000 Subject: [issue41712] REDoS in purge In-Reply-To: <1599212842.75.0.630288607393.issue41712@roundup.psfhosted.org> Message-ID: <1604949263.6.0.377030784163.issue41712@roundup.psfhosted.org> Steve Dower added the comment: Thanks Yash for the fix! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 14:45:37 2020 From: report at bugs.python.org (paul j3) Date: Mon, 09 Nov 2020 19:45:37 +0000 Subject: [issue42297] [argparse] Bad error message formatting when using custom usage text In-Reply-To: <1604942759.08.0.272256214563.issue42297@roundup.psfhosted.org> Message-ID: <1604951137.8.0.0177265217917.issue42297@roundup.psfhosted.org> paul j3 added the comment: Provide a minimal reproducible example. I can't reproduce that run on error message. Also test with arguments like '--all-logs on', which issues an 'unrecognizeable argument' error (with a different error reporting path). Stripping excess newlines is normal, both in the full help and error. That's done at the end of help formatting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 14:56:41 2020 From: report at bugs.python.org (Jake Hunsaker) Date: Mon, 09 Nov 2020 19:56:41 +0000 Subject: [issue42297] [argparse] Bad error message formatting when using custom usage text In-Reply-To: <1604942759.08.0.272256214563.issue42297@roundup.psfhosted.org> Message-ID: <1604951801.53.0.448384596.issue42297@roundup.psfhosted.org> Jake Hunsaker added the comment: I'll try and get a simple reproducer made shortly, however as a quick note I've found that using '--all-logs on' results in a properly formatted error message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 15:04:23 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Nov 2020 20:04:23 +0000 Subject: [issue35712] Make NotImplemented unusable in boolean context In-Reply-To: <1547157306.18.0.725390794489.issue35712@roundup.psfhosted.org> Message-ID: <1604952263.13.0.6948004846.issue35712@roundup.psfhosted.org> Raymond Hettinger added the comment: > I assume you've been recommending this? Not really, but it does come up and I've seen it in customer code more than once. I do show people this: >>> data = [10.5, 3.27, float('Nan'), 56.1] >>> list(filter(isfinite, data)) [10.5, 3.27, 56.1] >>> list(filterfalse(isnan, data)) [10.5, 3.27, 56.1] The question does arise about how to do this for None using functional programming. The answer is a bit awkward: >>> from operator import is_not >>> from functools import partial >>> data = [10.5, 3.27, None, 56.1] >>> list(filter(partial(is_not, None), data)) [10.5, 3.27, 56.1] >From a teaching point of view, the important part is to show that this code does not do what people typically expect: >>> data = [10.5, 0.0, float('NaN'), 3.27, None, 56.1] >>> list(filter(None, data)) [10.5, nan, 3.27, 56.1] FWIW, this issue isn't important to me. Just wanted to note that one of the idioms no longer works. There are of course other ways to do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 15:06:15 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Nov 2020 20:06:15 +0000 Subject: [issue35712] Make NotImplemented unusable in boolean context In-Reply-To: <1547157306.18.0.725390794489.issue35712@roundup.psfhosted.org> Message-ID: <1604952375.71.0.89805610544.issue35712@roundup.psfhosted.org> Serhiy Storchaka added the comment: I am sad that such code (as well as my former code in total_ordering) no longer works, but this is just a clever trick, and the code can be written in less clever but more explicit way. On other hand, the warning helps to catch common mistakes like not self.__lt__(other) self.__lt__(other) or self.__eq__(other) super().__eq__(other) and self.x == other.x Even non-beginners often make such kind of mistakes, and it is hard to catch them if you have not trained yourself specially. I suggest you to include lessons about writing complex comparison methods in your course for advanced users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 15:29:35 2020 From: report at bugs.python.org (Jake Hunsaker) Date: Mon, 09 Nov 2020 20:29:35 +0000 Subject: [issue42297] [argparse] Bad error message formatting when using custom usage text In-Reply-To: <1604942759.08.0.272256214563.issue42297@roundup.psfhosted.org> Message-ID: <1604953775.29.0.117805275814.issue42297@roundup.psfhosted.org> Jake Hunsaker added the comment: Ah, ok - so I neglected to mention we're using subparsers which appears to be relevant here. My apologies. Here's a minimal reproducer that shows the behavior when using './arg_test.py foo --bar=on' ``` #! /bin/python3 import argparse usage_string = 'test usage string ending in newlines\n\n' sub_cmd_usage = '' for i in range(0, 3): sub_cmd_usage += '\tfoo --bar\n' usage_string += sub_cmd_usage parser = argparse.ArgumentParser(usage=usage_string) subparser = parser.add_subparsers(dest='subcmd', metavar='subcmd') subcmd_parser = subparser.add_parser('foo') subcmd_parser.add_argument('--bar', action="store_true", default=False) if __name__ == '__main__': args = parser.parse_args() ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 16:18:14 2020 From: report at bugs.python.org (Brett Cannon) Date: Mon, 09 Nov 2020 21:18:14 +0000 Subject: [issue42133] Update the stdlib to fall back to __spec__.loader if __loader__ isn't defined In-Reply-To: <1603493200.29.0.0849833372282.issue42133@roundup.psfhosted.org> Message-ID: <1604956694.85.0.212119745468.issue42133@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: Update the stdlib to fall back to __spec__.parent if __loader__ isn't defined -> Update the stdlib to fall back to __spec__.loader if __loader__ isn't defined _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 16:26:16 2020 From: report at bugs.python.org (paul j3) Date: Mon, 09 Nov 2020 21:26:16 +0000 Subject: [issue42297] [argparse] Bad error message formatting when using custom usage text In-Reply-To: <1604942759.08.0.272256214563.issue42297@roundup.psfhosted.org> Message-ID: <1604957176.92.0.609654373055.issue42297@roundup.psfhosted.org> paul j3 added the comment: It's the subparser that's producing this error, specifically its 'prog' attribute. If I use a custom usage with a simple parser: 1129:~/mypy$ python3 issue42297.py --foo=on usage: issue42297.py one two three issue42297.py: error: argument --foo: ignored explicit argument 'on' Notice that the error line includes the 'prog'. With subparsers, the main usage is included in the subcommand prog: print(subcmd_parser.prog) produces: test usage string ending in newlines foo --bar foo --bar foo --bar foo That's the usage plus the subcommand name, 'foo'. Generating the explicit error in the subcommand: 1244:~/mypy$ python3 issue42297.py foo --bar=on test usage string ending in newlines foo --bar foo --bar foo --bar foo: error: argument --bar: ignored explicit argument 'on' 'issue42297.py: ' has been replaced by the usage+'foo', and no newline. We don't see this in the 'unrecognized' case because that error issued by the main parser. issue42297.py: error: unrecognized arguments: on If I explicitly set the prog of the subcommand: subcmd_parser = subparser.add_parser('foo', prog='myscript foo') The error becomes: 1256:~/mypy$ python3 issue42297.py foo --bar=on usage: myscript foo [-h] [--bar] myscript foo: error: argument --bar: ignored explicit argument 'on' I can also add 'usage=usage_string' to the add_parser. For the most part add_parser takes the same parameters as ArgumentParser. Alternatively we can specify prog in subparser = parser.add_subparsers(dest='subcmd', metavar='subcmd', prog='myscript') resulting in: myscript foo: error: argument --bar: ignored explicit argument 'on' I recently explored how 'prog' is set with subparsers in https://bugs.python.org/issue41980 I don't think anything needs to be corrected in argparse. There are enough options for setting prog and usage in subcommands to get around this issue. In the worse case, you might want to create an alternative _SubParsersAction Action subclass that defines the prog/usage differently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 16:31:45 2020 From: report at bugs.python.org (Kevin Keating) Date: Mon, 09 Nov 2020 21:31:45 +0000 Subject: [issue42273] Using LazyLoader leads to AttributeError In-Reply-To: <1604614463.81.0.853919807892.issue42273@roundup.psfhosted.org> Message-ID: <1604957505.31.0.377617625461.issue42273@roundup.psfhosted.org> Kevin Keating added the comment: An __init__.py shouldn't be necessary. If I comment out the 'b = lazy_import("foo.b")' line in a.py (i.e. disable the lazy import), then the print statement works correctly as written without any other changes. Also, I double checked with the colleague who originally ran into this issue, and it turns out he encountered the bug on Linux, not on Mac (still Python 3.8.3). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 16:53:20 2020 From: report at bugs.python.org (Kevin Keating) Date: Mon, 09 Nov 2020 21:53:20 +0000 Subject: [issue42273] Using LazyLoader leads to AttributeError In-Reply-To: <1604614463.81.0.853919807892.issue42273@roundup.psfhosted.org> Message-ID: <1604958800.13.0.331243572569.issue42273@roundup.psfhosted.org> Kevin Keating added the comment: My colleague just tested this on Mac and confirms that the bug also occurs there using Python 3.8.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 17:03:22 2020 From: report at bugs.python.org (Jake Hunsaker) Date: Mon, 09 Nov 2020 22:03:22 +0000 Subject: [issue42297] [argparse] Bad error message formatting when using custom usage text In-Reply-To: <1604942759.08.0.272256214563.issue42297@roundup.psfhosted.org> Message-ID: <1604959402.36.0.273842226701.issue42297@roundup.psfhosted.org> Jake Hunsaker added the comment: Ok, yeah there seem to be several paths to avoid this behavior then. We should be fine exploring those options. Thanks for the pointer! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 17:09:20 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Nov 2020 22:09:20 +0000 Subject: [issue26200] SETREF adds unnecessary work in some cases In-Reply-To: <1453745024.51.0.674954872761.issue26200@psf.upfronthosting.co.za> Message-ID: <1604959760.07.0.171514260942.issue26200@roundup.psfhosted.org> Serhiy Storchaka added the comment: Py_SETREF() is simple wrappers around Py_DECREF() and assignment. If there are macros in Rust it is better to implement Py_SETREF() as Rust macro. Py_SETREF() was not added to the limited API for reason. If arguments against Py_SETREF() are still valid, the same arguments are applicable to Py_SetRef(). And even if Py_SETREF() will be added to the limited C API I do not think that there is a need of adding Py_SetRef(). It is more cumbersome (additional &), slower and affects the optimization of surrounded code (pointer cannot be in register), and does not have any advantage in addition to the macro. This issue was closed 4 years ago. Please open a new issue for Py_SetRef(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 17:22:45 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Nov 2020 22:22:45 +0000 Subject: [issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef() In-Reply-To: <1604914934.45.0.492738703952.issue42294@roundup.psfhosted.org> Message-ID: <1604960565.22.0.414413175441.issue42294@roundup.psfhosted.org> Serhiy Storchaka added the comment: I concur with Mark. If you want to work only with non-borrowed references, use PySequence_GetItem() and PySequence_SetItem(). It has a cost: it is slower and needs checking errors. If you need more performant solution and binary compatibility across versions, use PyTuple_GetItem() and PyTuple_SetItem() (borrowed references is the part of optimization). If you don't need binary compatibility, but need speed, use macros. And no need to expand the C API. It is already large enough. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 17:43:19 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 09 Nov 2020 22:43:19 +0000 Subject: [issue35712] Make NotImplemented unusable in boolean context In-Reply-To: <1547157306.18.0.725390794489.issue35712@roundup.psfhosted.org> Message-ID: <1604961799.97.0.719126236523.issue35712@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 17:50:54 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Mon, 09 Nov 2020 22:50:54 +0000 Subject: [issue36310] pygettext3.7 Does Not Recognize gettext Calls Within fstrings In-Reply-To: <1552702047.72.0.770409871236.issue36310@roundup.psfhosted.org> Message-ID: <1604962254.93.0.91903587282.issue36310@roundup.psfhosted.org> Batuhan Taskaya added the comment: New changeset bfc6b63102d37ccb58a71711e2342143cd9f4d86 by jack1142 in branch 'master': bpo-36310: Allow pygettext.py to detect calls to gettext in f-strings. (GH-19875) https://github.com/python/cpython/commit/bfc6b63102d37ccb58a71711e2342143cd9f4d86 ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 17:55:09 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Mon, 09 Nov 2020 22:55:09 +0000 Subject: [issue36310] pygettext3.7 Does Not Recognize gettext Calls Within fstrings In-Reply-To: <1552702047.72.0.770409871236.issue36310@roundup.psfhosted.org> Message-ID: <1604962509.22.0.366775540312.issue36310@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 18:41:26 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 09 Nov 2020 23:41:26 +0000 Subject: [issue42299] Add test_formatter (or remove deprecated formatter module?) Message-ID: <1604965286.22.0.755561980419.issue42299@roundup.psfhosted.org> New submission from Terry J. Reedy : #14019 has a patch, unrelated to the issue, that adds test.test_formatter. There still is no such file, so I open this issue to move the patch here. It is the second version, responding to review by Ezio Melotti. But formatter has been deprecated since 3.4. It was originally scheduled to be removed in 3.6, but we decided to delay such removals until after 2.7 EOL. That is now past. Do we add tests for a deprecated module? If so, the patch, aDo we still want to remove formatter? If so, when? ---------- messages: 380623 nosy: terry.reedy priority: normal severity: normal stage: patch review status: open title: Add test_formatter (or remove deprecated formatter module?) type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 18:42:36 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 09 Nov 2020 23:42:36 +0000 Subject: [issue14019] Unify tests for str.format and string.Formatter In-Reply-To: <1329293704.94.0.0580926341423.issue14019@psf.upfronthosting.co.za> Message-ID: <1604965356.42.0.622217885642.issue14019@roundup.psfhosted.org> Change by Terry J. Reedy : Removed file: https://bugs.python.org/file31202/mywork.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 18:46:52 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 09 Nov 2020 23:46:52 +0000 Subject: [issue42299] Add test_formatter (or remove deprecated formatter module?) In-Reply-To: <1604965286.22.0.755561980419.issue42299@roundup.psfhosted.org> Message-ID: <1604965612.72.0.350760262297.issue42299@roundup.psfhosted.org> Terry J. Reedy added the comment: The patch is by Francisco Freire (francisco.freire) * (CLA signed). There is apparently no way to directly move a patch from one issue to another, so I download and upload. ---------- keywords: +patch Added file: https://bugs.python.org/file49584/mywork2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 18:55:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Nov 2020 23:55:54 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1604966154.62.0.488022270749.issue42260@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22109 pull_request: https://github.com/python/cpython/pull/23211 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 19:13:58 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 10 Nov 2020 00:13:58 +0000 Subject: [issue14019] Unify tests for str.format and string.Formatter In-Reply-To: <1329293704.94.0.0580926341423.issue14019@psf.upfronthosting.co.za> Message-ID: <1604967238.81.0.542867726787.issue14019@roundup.psfhosted.org> Change by Terry J. Reedy : Removed file: https://bugs.python.org/file31453/mywork2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 19:23:10 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 10 Nov 2020 00:23:10 +0000 Subject: [issue14019] Unify tests for str.format and string.Formatter In-Reply-To: <1329293704.94.0.0580926341423.issue14019@psf.upfronthosting.co.za> Message-ID: <1604967790.51.0.688155029633.issue14019@roundup.psfhosted.org> Terry J. Reedy added the comment: Victor: Irit is reviewing old issues to decide whether to close or not. She has to touch it somehow to mark it as reviewed. Irit: if you only change the version, others may think that you blindly updated the version. Better to say something that moves the issue forward. Also, only marking for the next version, now 3.10, would delay the possible future obsolescence of the version marking. In any case, any coredev who merges would decide about backports. This particular issue needs major surgery as it is two interleaved but unrelated discussions. Francisco should have moved his unrelated patch to a new issue as Eric Smith asked. I opened new issue 42299 and moved the revised patch there, with credit to Francisco and Ezio as reviewer. I unlinked both from here. To make the discussion of Nick's issue more readable, the unrelated messages about the unrelated patch should be unlinked. I believe each message unlink would generate a separate email, as did the file unlinks. ---------- versions: -Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 20:30:18 2020 From: report at bugs.python.org (Ronan Soares) Date: Tue, 10 Nov 2020 01:30:18 +0000 Subject: [issue42300] Typo in translation to portuguese Message-ID: <1604971818.8.0.290636952844.issue42300@roundup.psfhosted.org> New submission from Ronan Soares : Change "m?ltiplo menos comum" to "menor m?ltiplo comum" in the portuguese section of the what changed in python 3.9 ---------- assignee: docs at python components: Documentation messages: 380626 nosy: docs at python, ronan.soares priority: normal severity: normal status: open title: Typo in translation to portuguese type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 21:57:20 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 10 Nov 2020 02:57:20 +0000 Subject: [issue42300] Typo in translation to portuguese In-Reply-To: <1604971818.8.0.290636952844.issue42300@roundup.psfhosted.org> Message-ID: <1604977040.52.0.91570055917.issue42300@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: The Portuguese translation is maintained in GitHub and uses GitHub issues. Please report issues at https://github.com/python/python-docs-pt-br ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 22:36:08 2020 From: report at bugs.python.org (Sam Yan) Date: Tue, 10 Nov 2020 03:36:08 +0000 Subject: [issue42301] Lack function to track index of an element in heapq Message-ID: <1604979368.73.0.815196542676.issue42301@roundup.psfhosted.org> New submission from Sam Yan : Github PR #23204: For a given element in a heap, we can leverage the fact that we can search this element quicker thinking of the property of a heap. Therefore out of h.index(x) that a list linear search uses, I propose to use a special written index method to look for an index of a heap element.This issue has been proposed on Github (with my changes to heapq also put there). Open a discussion under suggestion of Karthikeyan Singaravelan (tirkarthi). ---------- components: Extension Modules hgrepos: 393 messages: 380628 nosy: SamUnimelb priority: normal pull_requests: 22110 severity: normal status: open title: Lack function to track index of an element in heapq 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 Mon Nov 9 23:12:55 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 10 Nov 2020 04:12:55 +0000 Subject: [issue42301] Lack function to track index of an element in heapq In-Reply-To: <1604979368.73.0.815196542676.issue42301@roundup.psfhosted.org> Message-ID: <1604981575.69.0.650989659507.issue42301@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger, stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 23:32:06 2020 From: report at bugs.python.org (mental) Date: Tue, 10 Nov 2020 04:32:06 +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: <1604982726.24.0.504834770343.issue41122@roundup.psfhosted.org> Change by mental : ---------- nosy: +mental nosy_count: 2.0 -> 3.0 pull_requests: +22111 pull_request: https://github.com/python/cpython/pull/23212 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 23:37:20 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 10 Nov 2020 04:37:20 +0000 Subject: [issue42301] Add function to exploit heapq structure to locate an index of element In-Reply-To: <1604979368.73.0.815196542676.issue42301@roundup.psfhosted.org> Message-ID: <1604983040.32.0.0855671722691.issue42301@roundup.psfhosted.org> Raymond Hettinger added the comment: What is the use case for this? This doesn't seem to be a typical heap operation. https://en.wikipedia.org/wiki/Heap_(data_structure)#Operations Have you seen the in other heap APIs? ---------- components: +Library (Lib) -Extension Modules title: Lack function to track index of an element in heapq -> Add function to exploit heapq structure to locate an index of element versions: -Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 9 23:42:54 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 10 Nov 2020 04:42:54 +0000 Subject: [issue42301] Add function to exploit heapq structure to locate an index of element In-Reply-To: <1604979368.73.0.815196542676.issue42301@roundup.psfhosted.org> Message-ID: <1604983374.08.0.885917857272.issue42301@roundup.psfhosted.org> Raymond Hettinger added the comment: See: https://stackoverflow.com/questions/2372994/search-an-element-in-a-heap ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 00:12:05 2020 From: report at bugs.python.org (mental) Date: Tue, 10 Nov 2020 05:12:05 +0000 Subject: [issue40988] singledispatchmethod significantly slower than singledispatch In-Reply-To: <1592252053.27.0.723113376898.issue40988@roundup.psfhosted.org> Message-ID: <1604985125.59.0.256285216211.issue40988@roundup.psfhosted.org> Change by mental : ---------- keywords: +patch nosy: +mental nosy_count: 1.0 -> 2.0 pull_requests: +22112 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23213 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 00:13:01 2020 From: report at bugs.python.org (Ravi Chityala) Date: Tue, 10 Nov 2020 05:13:01 +0000 Subject: [issue42302] [Turtle] Add clockwise and anticlockwise method as alias to right and left Message-ID: <1604985181.19.0.385851397848.issue42302@roundup.psfhosted.org> New submission from Ravi Chityala : The current implementation of turtle.py has right and left method for rotation. Another approach to view rotation is either clockwise or anticlockwise. These two methods can be an alias to right and left respectively. ---------- components: Library (Lib) messages: 380631 nosy: zenr priority: normal severity: normal status: open title: [Turtle] Add clockwise and anticlockwise method as alias to right and left type: enhancement versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 00:19:42 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 10 Nov 2020 05:19:42 +0000 Subject: [issue42302] [Turtle] Add clockwise and anticlockwise method as alias to right and left In-Reply-To: <1604985181.19.0.385851397848.issue42302@roundup.psfhosted.org> Message-ID: <1604985582.34.0.35433745893.issue42302@roundup.psfhosted.org> Raymond Hettinger added the comment: This doesn't seem useful to me. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 01:00:46 2020 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 10 Nov 2020 06:00:46 +0000 Subject: [issue21664] multiprocessing leaks temporary directories pymp-xxx In-Reply-To: <1401907144.02.0.926823813171.issue21664@psf.upfronthosting.co.za> Message-ID: <1604988046.63.0.429884237297.issue21664@roundup.psfhosted.org> Zackery Spytz added the comment: Python 2.7 is no longer supported, so I think this issue should be closed. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 01:08:22 2020 From: report at bugs.python.org (mental) Date: Tue, 10 Nov 2020 06:08:22 +0000 Subject: [issue41987] singledispatchmethod raises an error when relying on a forward declaration In-Reply-To: <1602274303.54.0.362260014367.issue41987@roundup.psfhosted.org> Message-ID: <1604988502.32.0.0468850306024.issue41987@roundup.psfhosted.org> Change by mental : ---------- keywords: +patch nosy: +mental nosy_count: 5.0 -> 6.0 pull_requests: +22113 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23216 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 01:28:14 2020 From: report at bugs.python.org (mental) Date: Tue, 10 Nov 2020 06:28:14 +0000 Subject: [issue39679] functools: singledispatchmethod doesn't work with classmethod In-Reply-To: <1582053375.25.0.178240077179.issue39679@roundup.psfhosted.org> Message-ID: <1604989694.5.0.0861498689302.issue39679@roundup.psfhosted.org> Change by mental : ---------- nosy: +mental _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 01:43:49 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Nov 2020 06:43:49 +0000 Subject: [issue42302] [Turtle] Add clockwise and anticlockwise method as alias to right and left In-Reply-To: <1604985181.19.0.385851397848.issue42302@roundup.psfhosted.org> Message-ID: <1604990629.38.0.233163839031.issue42302@roundup.psfhosted.org> Serhiy Storchaka added the comment: What other Turtle graphics implementations use commands clockwise and anticlockwise? Is it popular enough? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 01:50:45 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 10 Nov 2020 06:50:45 +0000 Subject: [issue42302] [Turtle] Add clockwise and anticlockwise method as alias to right and left In-Reply-To: <1604985181.19.0.385851397848.issue42302@roundup.psfhosted.org> Message-ID: <1604991045.52.0.0347254491883.issue42302@roundup.psfhosted.org> Steven D'Aprano added the comment: As a new feature, it can only go into 3.10. All other versions have reached feature-freeze and can accept no new features. We might argue that rotations should have always been written as "anticlockwise" and "clockwise", but they are long and verbose, and in English "left" and "right" are more common. I doubt many people will prefer "anticlockwise" over "left". ---------- nosy: +steven.daprano versions: -Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 02:11:02 2020 From: report at bugs.python.org (DongwonTTuna) Date: Tue, 10 Nov 2020 07:11:02 +0000 Subject: [issue42303] I found a bug while checking string with find() Message-ID: <1604992261.99.0.682298337507.issue42303@roundup.psfhosted.org> New submission from DongwonTTuna : USED THE PYTHON-BINANCE MODULE FOR THIS ------------------------------------------------ from binance.client import Client from binance.exceptions import * client = Client(api_key='Your_Public_Apikey', api_secret='Your_Secret_Apikey') def buy_limit_test(coin, amount): client.create_test_order( symbol=coin + 'USDT', side=Client.SIDE_BUY, type=Client.ORDER_TYPE_MARKET, quantity=amount) try: buy_limit_test(coin='HOT', amount=-19298.0) except BinanceAPIException as E: print(E.message.find("'quaaantity'; legal range is")) if E.message.find("'quantity'; legal range is"): print(E.message) else: print("yes") ------------------------------------------------ And the parameters. ------------------------------------------------ E.message.find("'quantity'; legal range is") = 38 E.message = "Illegal characters found in parameter 'quantity'; legal range is '^([0-9]{1,20})(\.[0-9]{1,20})?$'." ------------------------------------------------ If I run with this if E.message.find("'quaaaaaaaaaaaaaaaaaaaaaaaaanatity'; legal range is"): It should be run with print("yes"), but It shows print(E.message). But If I run with if E.message.find("'quaaaaaaaaaaaaaaaaaaaaaaaaanatity'; legal range is") == True: It's now run with print("yes") not the print(E.message). I think it's a bug ---------- files: ?????????? 2020-11-10 16.02.46.png messages: 380636 nosy: DongwonTTuna priority: normal severity: normal status: open title: I found a bug while checking string with find() type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file49585/?????????? 2020-11-10 16.02.46.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 02:15:19 2020 From: report at bugs.python.org (DongwonTTuna) Date: Tue, 10 Nov 2020 07:15:19 +0000 Subject: [issue42303] I found a bug while checking string with find() In-Reply-To: <1604992261.99.0.682298337507.issue42303@roundup.psfhosted.org> Message-ID: <1604992519.91.0.956228978888.issue42303@roundup.psfhosted.org> DongwonTTuna added the comment: That was a mistake. upload another picture file. ---------- resolution: -> wont fix Added file: https://bugs.python.org/file49586/?????????? 2020-11-10 16.14.28.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 02:33:15 2020 From: report at bugs.python.org (Ma Lin) Date: Tue, 10 Nov 2020 07:33:15 +0000 Subject: [issue42304] [easy C] long type performance waste in 64-bit Windows build Message-ID: <1604993594.99.0.772982766539.issue42304@roundup.psfhosted.org> New submission from Ma Lin : C type `long` is 4-byte integer in 64-bit Windows build (MSVC behavior). [1] In other compilers, `long` is 8-byte integer in 64-bit build. This leads to a bit unnecessary performance waste, issue38252 fixed this problem in a situation. Search `SIZEOF_LONG` in CPython code, there's still a few long type waste. Novices are welcome to try contribution. [1] https://stackoverflow.com/questions/384502 ---------- components: Windows messages: 380638 nosy: malin, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: [easy C] long type performance waste in 64-bit Windows build type: performance versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 02:51:05 2020 From: report at bugs.python.org (Mechtron 750) Date: Tue, 10 Nov 2020 07:51:05 +0000 Subject: [issue42305] Added Auto_Complete DropBox Suggestion For Tkinter Message-ID: <1604994665.25.0.506754536493.issue42305@roundup.psfhosted.org> New submission from Mechtron 750 : # This is auto complete drop box suggestion wiget for tkinter # Tkinter Autocomplete Text autocompletion provides relevant real-time results to users. Because tkinter does not provide a widget for adding autocompletion to GUIs out of the box, I decided to make one myself. This utility is compatible with and has been tested on Python 2.7.1 and Python 3.6.0. ### Structure ###### NOTE: The `Tkinter` library for Python 2 and `tkinter` library for Python 3 will from now on be referred to as `tk`. The `AutocompleteEntry` class (which can be found [here](https://github.com/RajvirSingh1313/Tkinter_Autocomplete_DropBox/blob/master/main.py)) derives from `tk.Frame` and is a container used to group a `tk.Entry` and `tk.Listbox` widget. Should you need to modify the widgets, they can be accessed as (respectively) `AutocompleteEntry` s `entry` and `listbox` attributes.
The entry widget acts like a normal textbox. When activated, it binds `` to a private method which will update the list of suggestions. The listbox widget contains the suggestions themselves. When activated, it binds `<>` to a private method which sets the entry widget to whatever value was selected.
Since an instance of `AutocompleteEntry` is a `tk.Frame` instance too, you can place it by calling its `pack` or `grid` methods with their respective arguments. ### Quickstart ###### NOTE: These examples will only run under Python 3. To make them Python 2-compatible, replace `tkinter` with `Tkinter`. To add a new autocompletion frame to our interface, first initialize one: ```python import tkinter as tk from tkinter import auto_complete root = tk.Tk() frame = tk.Frame(root) frame.pack() entry = auto_complete.AutocompleteEntry(frame) # You can pass additional parameters to further customize the window; # all parameters that you can pass to tk.Frame, are valid here too. ``` Now you need to configure the instance by passing it an iterable containing all autocompletion entries.
Do this by calling its `build` method: ```python ENTRIES = ( "Foo", "Bar" ) entry.build(ENTRIES) ``` You can pass additional arguments to `build`: * `max_entries` (integer):
The maximum number of entries to display at once. This value directly corresponds to the listbox widget's `height` attribute. Defaults to `5`. * `case_sensitive` (boolean):
If `True`, only autocomplete entries that enforce the same capitalization as the current entry will be displayed.
If `False`, all autocomplete entries that match with the current entry will be displayed.
Defaults to `False`. * `no_results_message` (string or `None`):
The message to display if no suggestions could be found for the current entry.
This argument may include a formatting identifier (`{}`) which, at runtime, gets formatted as the current entry. If `None` is specified, the listbox will instead be hidden until the next `` event. Let's play around with these arguments: ```python entry.build( entries=ENTRIES, no_results_message="< No results found for '{}' >" # Note that this is formatted at runtime ) ``` ###### NOTE: You may call the `build` method multiple times on an instance of `AutocompleteEntry`, to dynamically change the available suggestions. With that out of the way, you can display `entry`: ```python entry.pack() ``` Now, each time a user presses a key while the entry widget has focus, a list of suggestions will display below it. --- ### Additional options By default, the `tk.Listbox` widget has a width of `25` pixels and a height of `5` (items). The `tk.Entry` widget also has a default width of `25` pixels. These settings can be modified through the following class attributes: * `auto_complete.AutocompleteEntry.LISTBOX_HEIGHT`: The height to specify when creating the `tk.Listbox` widget. There's no need to modify this, since the maximum number of entries to be displayed can be passed as an argument to `build`. * `auto_complete.AutocompleteEntry.LISTBOX_WIDTH`: The width to specify when creating the `tk.Listbox` widget. Any positive integer is valid. * `auto_complete.AutocompleteEntry.ENTRY_WIDTH`: The width to specify when creating the `tk.Entry` widget. Any positive integer is valid. ###### NOTE: You almost always want to keep the 1:1 `LISTBOX_WIDTH`:`ENTRY_WIDTH` ratio. You can retrieve the current entry by accessing the instance's `text` attribute (which is a `tk.StringVar` instance): ```python text = entry.text.get() ``` To further customize the entry widget, you may set its font options, for example: ```python entry.entry["font"] = (, , ) ``` Or to change the background color for the listbox widget: ```python entry.listbox["background"] = "#cfeff9" # Light blue ``` ## This the demo ```python try: import tkinter as tk from tkinter import ttk from tkinter import auto_complete except ImportError: # Python 2 import Tkinter as tk import ttk from Tkinter import auto_complete COUNTRIES = ['Australia','Switzerland','India','Canada','Japan','Germany','United Kingdom','United States','Sweden','Netherlands','Norway'] class Application(tk.Frame, object): def __init__(self, *args, **kwargs): super(Application, self).__init__(*args, **kwargs) label = tk.Label(self, text="Select a country: ") label.pack() self.entry = auto_complete.AutocompleteEntry(self) self.build(case_sensitive=False, no_results_message=auto_complete.NO_RESULTS_MESSAGE) self.entry.pack(after=label) self.nr = tk.StringVar() tk.Label( self, text="\n\nAlternative message ( to set): " ).pack() nr = tk.Entry(self, textvariable=self.nr) nr.pack() nr.bind("", self._update) self.cs = tk.StringVar() cb = tk.Checkbutton( self, text="Case sensitive", variable=self.cs, state="normal", command=self._update ) cb.deselect() cb.pack() def _update(self, *args): case_sensitive = False if self.cs.get() == "1": case_sensitive = True no_results_message = self.nr.get() self.build( case_sensitive=case_sensitive, no_results_message=no_results_message ) def build(self, *args, **kwargs): self.entry.build( COUNTRIES, kwargs["case_sensitive"], kwargs["no_results_message"] ) if __name__ == "__main__": root = tk.Tk() root.title("DEMO") root.resizable(False, False) root.tk_setPalette("white") application = Application(root) application.pack() root.mainloop() ``` ### This the repo [here](https://github.com/RajvirSingh1313/Tkinter_Autocomplete_DropBox) ---------- components: Tkinter files: auto_complete.py messages: 380639 nosy: RajvirSingh1313 priority: normal pull_requests: 22114 severity: normal status: open title: Added Auto_Complete DropBox Suggestion For Tkinter type: enhancement versions: Python 3.7 Added file: https://bugs.python.org/file49587/auto_complete.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 02:57:19 2020 From: report at bugs.python.org (Joongi Kim) Date: Tue, 10 Nov 2020 07:57:19 +0000 Subject: [issue41229] Asynchronous generator memory leak In-Reply-To: <1594123688.2.0.0110904549514.issue41229@roundup.psfhosted.org> Message-ID: <1604995039.74.0.24063953911.issue41229@roundup.psfhosted.org> Change by Joongi Kim : ---------- pull_requests: +22115 pull_request: https://github.com/python/cpython/pull/23217 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 03:00:09 2020 From: report at bugs.python.org (Alex Alex) Date: Tue, 10 Nov 2020 08:00:09 +0000 Subject: [issue42306] wrong exception handling in case asyncio.shiled usage Message-ID: <1604995209.89.0.967807993148.issue42306@roundup.psfhosted.org> New submission from Alex Alex : There is not any message about exception from try block. See attach. ---------- components: asyncio files: scratch_31.py messages: 380640 nosy: Alex Alex, asvetlov, yselivanov priority: normal severity: normal status: open title: wrong exception handling in case asyncio.shiled usage type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file49588/scratch_31.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 04:08:06 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 10 Nov 2020 09:08:06 +0000 Subject: [issue42302] [Turtle] Add clockwise and anticlockwise method as alias to right and left In-Reply-To: <1604985181.19.0.385851397848.issue42302@roundup.psfhosted.org> Message-ID: <1604999286.81.0.0838229511787.issue42302@roundup.psfhosted.org> Eric V. Smith added the comment: I think having two ways to do the same thing in a module targeted toward beginners would be too confusing. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 04:41:51 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Nov 2020 09:41:51 +0000 Subject: [issue42304] [easy C] long type performance waste in 64-bit Windows build In-Reply-To: <1604993594.99.0.772982766539.issue42304@roundup.psfhosted.org> Message-ID: <1605001311.33.0.276204016942.issue42304@roundup.psfhosted.org> Serhiy Storchaka added the comment: What is the problem exactly? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 04:45:12 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Nov 2020 09:45:12 +0000 Subject: [issue42303] I found a bug while checking string with find() In-Reply-To: <1604992261.99.0.682298337507.issue42303@roundup.psfhosted.org> Message-ID: <1605001512.04.0.0514392200473.issue42303@roundup.psfhosted.org> Serhiy Storchaka added the comment: str.find() does not work like you think. Please read the documentation. In your case you likely need to use the "in" operator. ---------- nosy: +serhiy.storchaka resolution: wont fix -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 04:54:46 2020 From: report at bugs.python.org (Ma Lin) Date: Tue, 10 Nov 2020 09:54:46 +0000 Subject: [issue42304] [easy C] long type performance waste in 64-bit Windows build In-Reply-To: <1604993594.99.0.772982766539.issue42304@roundup.psfhosted.org> Message-ID: <1605002086.67.0.410675268742.issue42304@roundup.psfhosted.org> Ma Lin added the comment: > What is the problem exactly? There are several different problems, such as: https://github.com/python/cpython/blob/v3.10.0a2/Modules/mathmodule.c#L2033 In addition, `utf16_decode` also has this problem, I forgot this: https://github.com/python/cpython/blob/v3.10.0a2/Objects/stringlib/codecs.h#L465 Maybe these small problems are suitable for newcomer to familiarize the contribution process. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 04:55:40 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Nov 2020 09:55:40 +0000 Subject: [issue42302] [Turtle] Add clockwise and anticlockwise method as alias to right and left In-Reply-To: <1604985181.19.0.385851397848.issue42302@roundup.psfhosted.org> Message-ID: <1605002140.85.0.810778487628.issue42302@roundup.psfhosted.org> Serhiy Storchaka added the comment: Actually there are many aliases in the turtle module following the early Logo traditions. For example rt=right. If clockwise is a new standard for this command in modern Turtle implementation, we can add yet one alias. Otherwise I agree with Raymond. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 05:08:21 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Nov 2020 10:08:21 +0000 Subject: [issue42304] [easy C] long type performance waste in 64-bit Windows build In-Reply-To: <1604993594.99.0.772982766539.issue42304@roundup.psfhosted.org> Message-ID: <1605002901.51.0.149826553854.issue42304@roundup.psfhosted.org> Serhiy Storchaka added the comment: I do not think that this is suitable for newcomers because you need to have deep understanding why it was written in such form at first place and what will be changed if you change it. The code was written when unsigned long long was not standard and 64-bit integer type was not required in Python. PyLong_FromUnsignedLongLong could just not exist on the particular platform. Using long long optionally would complicate the code, and it was not always justified. And it could negatively affect performance, especially on 32-bit platforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 05:16:29 2020 From: report at bugs.python.org (E. Paine) Date: Tue, 10 Nov 2020 10:16:29 +0000 Subject: [issue42305] Added Auto_Complete DropBox Suggestion For Tkinter In-Reply-To: <1604994665.25.0.506754536493.issue42305@roundup.psfhosted.org> Message-ID: <1605003389.32.0.209327296923.issue42305@roundup.psfhosted.org> Change by E. Paine : ---------- nosy: +epaine, gpolo, serhiy.storchaka versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 05:19:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 10:19:21 +0000 Subject: [issue42304] [easy C] long type performance waste in 64-bit Windows build In-Reply-To: <1604993594.99.0.772982766539.issue42304@roundup.psfhosted.org> Message-ID: <1605003561.82.0.941385257773.issue42304@roundup.psfhosted.org> STINNER Victor added the comment: > There are several different problems, such as: > https://github.com/python/cpython/blob/v3.10.0a2/Modules/mathmodule.c#L2033 I don't think that it's worth it to optimize this one. > In addition, `utf16_decode` also has this problem, I forgot this: https://github.com/python/cpython/blob/v3.10.0a2/Objects/stringlib/codecs.h#L465 I suggest to fix in it bpo-38252. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 05:21:22 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 10 Nov 2020 10:21:22 +0000 Subject: [issue42302] [Turtle] Add clockwise and anticlockwise method as alias to right and left In-Reply-To: <1605002140.85.0.810778487628.issue42302@roundup.psfhosted.org> Message-ID: <20201110102042.GL15290@ando.pearwood.info> Steven D'Aprano added the comment: On Tue, Nov 10, 2020 at 09:55:40AM +0000, Serhiy Storchaka wrote: > If clockwise is a new > standard for this command in modern Turtle implementation, we can add > yet one alias. Otherwise I agree with Raymond. I had a very quick look at some Logo implementations: https://resources.terrapinlogo.com/weblogo/commands/ https://www.mit.edu/~hlb/MA562/commands.html https://reduce-algebra.sourceforge.io/manual/manualse170.html https://docs.racket-lang.org/logo/index.html and even 3D Logo: https://vrmath2.net/node/12 and I can see no sign of any other Logos allowing clockwise and anticlockwise as aliases. So I think it is up to Ravi Chityala to demonstrate that this alias is already in use in some other Logo or turtle graphics implementations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 05:33:09 2020 From: report at bugs.python.org (Ma Lin) Date: Tue, 10 Nov 2020 10:33:09 +0000 Subject: [issue42304] [easy C] long type performance waste in 64-bit Windows build In-Reply-To: <1604993594.99.0.772982766539.issue42304@roundup.psfhosted.org> Message-ID: <1605004389.88.0.175850249933.issue42304@roundup.psfhosted.org> Ma Lin added the comment: > I do not think that this is suitable for newcomers because you need to have deep understanding why it was written in such form at first place and what will be changed if you change it. I agree contributors need to understand code, rather than simply replace the type. Maybe two weeks is enough to understand the code. > And it could negatively affect performance, especially on 32-bit platforms. `long` type can be replaced by `ssize_t`. `unsigned long` type can be replaced by `size_t`. And use `PyLong_FromSize_t`/`PyLong_FromSize_t`, then there is no negative impact. > I don't think that it's worth it to optimize this one. Although the speedup is small, it's free. I don't see it as optimization, just no more waste. > I suggest to fix in it bpo-38252. I forgot it in that issue, I just searched "0x80808080" in the code, it was missed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 05:49:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 10:49:40 +0000 Subject: [issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/ Message-ID: <1605005380.13.0.93741295392.issue42307@roundup.psfhosted.org> New submission from STINNER Victor : Commands reproduce the issue: cd /path/to/python/source/ ./configure --prefix /opt/pymaster CFLAGS="-O0" make make install make install copies python.o: $ find /opt/pymaster/ -name "*.o" /opt/pymaster/lib/python3.10/config-3.10-x86_64-linux-gnu/python.o This file is useless and must not be installed by make install. The issue was first discovered in Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1894462 ---------- components: Build messages: 380650 nosy: vstinner priority: normal severity: normal status: open title: make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/ versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 06:09:01 2020 From: report at bugs.python.org (Mario Corchero) Date: Tue, 10 Nov 2020 11:09:01 +0000 Subject: [issue42308] Add threading.__excepthook__ similar to sys.__excepthook__ Message-ID: <1605006541.53.0.440753194072.issue42308@roundup.psfhosted.org> New submission from Mario Corchero : The sys module contains __excepthook__ to recover sys.excepthook if necessary. The same is not present in the threading module, even if threading.excepthook is exposed. ---------- components: Library (Lib) messages: 380651 nosy: mariocj89, vstinner priority: normal severity: normal status: open title: Add threading.__excepthook__ similar to sys.__excepthook__ versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 06:10:41 2020 From: report at bugs.python.org (Mario Corchero) Date: Tue, 10 Nov 2020 11:10:41 +0000 Subject: [issue42308] Add threading.__excepthook__ similar to sys.__excepthook__ In-Reply-To: <1605006541.53.0.440753194072.issue42308@roundup.psfhosted.org> Message-ID: <1605006641.59.0.286108483547.issue42308@roundup.psfhosted.org> Change by Mario Corchero : ---------- keywords: +patch pull_requests: +22116 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23218 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 06:13:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 11:13:08 +0000 Subject: [issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/ In-Reply-To: <1605005380.13.0.93741295392.issue42307@roundup.psfhosted.org> Message-ID: <1605006788.52.0.507427533714.issue42307@roundup.psfhosted.org> STINNER Victor added the comment: python.o is installed by "make libainstall". It is done since 2001 (commit 85515ad9795ffc3b676cbddeeea2b003818a2623). Git history: commit 49fd7fa4431da299196d74087df4a04f99f9c46f Author: Thomas Wouters Date: Fri Apr 21 10:40:58 2006 +0000 Merge p3yk branch with the trunk up to revision 45595. This breaks a fair number of tests, all because of the codecs/_multibytecodecs issue described here (it's not a Py3K issue, just something Py3K discovers): http://mail.python.org/pipermail/python-dev/2006-April/064051.html (...) - $(INSTALL_DATA) Modules/$(MAINOBJ) $(DESTDIR)$(LIBPL)/$(MAINOBJ) + $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o commit a1a84e7d4f7b493bb6fa5415ce55d3f722221470 Author: Fred Drake Date: Tue Mar 6 05:52:16 2001 +0000 Move all knowledge that $(MAINOBJ) is built in the Modules/ directory into Makefile.pre.in; the configure script will only determine the basename of the file. This fixes installation of a Python built using C++, reported by Greg Wilson. - $(INSTALL_DATA) Modules/python.o $(LIBPL)/python.o + $(INSTALL_DATA) Modules/$(MAINOBJ) $(LIBPL)/$(MAINOBJ) commit 85515ad9795ffc3b676cbddeeea2b003818a2623 Author: Neil Schemenauer Date: Wed Jan 24 17:11:43 2001 +0000 Flat makefile based on toplevel Makefile.in and makefiles in build subdirectories. Those other makefiles will go away eventually. + $(INSTALL_DATA) Modules/python.o $(LIBPL)/python.o ---------- nosy: +nascheme _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 06:27:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 11:27:46 +0000 Subject: [issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/ In-Reply-To: <1605005380.13.0.93741295392.issue42307@roundup.psfhosted.org> Message-ID: <1605007666.27.0.441789911721.issue42307@roundup.psfhosted.org> STINNER Victor added the comment: At commit 85515ad9795ffc3b676cbddeeea2b003818a2623, "make install" installs the following files in the config/ directory: $ find /opt/pyold/lib/python2.1/config/ /opt/pyold/lib/python2.1/config/ /opt/pyold/lib/python2.1/config/libpython2.1.a /opt/pyold/lib/python2.1/config/config.c /opt/pyold/lib/python2.1/config/python.o /opt/pyold/lib/python2.1/config/config.c.in /opt/pyold/lib/python2.1/config/Makefile /opt/pyold/lib/python2.1/config/Setup /opt/pyold/lib/python2.1/config/Setup.local /opt/pyold/lib/python2.1/config/Setup.config /opt/pyold/lib/python2.1/config/makesetup /opt/pyold/lib/python2.1/config/install-sh /opt/pyold/lib/python2.1/config/Makefile.pre.in ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 06:44:55 2020 From: report at bugs.python.org (Michael Felt) Date: Tue, 10 Nov 2020 11:44:55 +0000 Subject: [issue42309] BUILD: AIX-64-bit segmentation fault Message-ID: <1605008695.96.0.78391537773.issue42309@roundup.psfhosted.org> New submission from Michael Felt : Successfully built and packaged the Python-3.9.0 distribution tar archive without modification - as 32-bit. Repeating the same process with the following environment change: # export OBJECT_MODE=64 fails with a segmentation fault by the "first-phase" python executable: ``` ../src/py39-3.9.0/Modules/makexp_aix Modules/python.exp "." libpython3.9.a xlc_r -Wl,-bE:Modules/python.exp -lld -o python Programs/python.o libpython3.9.a -lintl -ldl -lm -lm ./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 /bin/sh: 6291700 Segmentation fault(coredump) make: 1254-004 The error code from the last command is 139. Stop. root at x066:[/data/prj/python/py39-3.9.0]./python -E -S -m sysconfig --generate-posix-vars Segmentation fault(coredump) root at x066:[/data/prj/python/py39-3.9.0]./python Segmentation fault(coredump) ``` Will try to duplicate in a second environment. ---------- components: Build messages: 380654 nosy: Michael.Felt priority: normal severity: normal status: open title: BUILD: AIX-64-bit segmentation fault type: crash versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 06:44:07 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 11:44:07 +0000 Subject: [issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/ In-Reply-To: <1605005380.13.0.93741295392.issue42307@roundup.psfhosted.org> Message-ID: <1605008647.91.0.438275525189.issue42307@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +22117 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23219 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 06:47:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 11:47:54 +0000 Subject: [issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/ In-Reply-To: <1605005380.13.0.93741295392.issue42307@roundup.psfhosted.org> Message-ID: <1605008874.25.0.258464025841.issue42307@roundup.psfhosted.org> STINNER Victor added the comment: python.o is the object file build by the C compiler from Programs/python.c. I don't see why anyone would need such object file. Programs/python.c: --- /* Minimal main program -- everything is loaded from the library */ #include "Python.h" #ifdef MS_WINDOWS int wmain(int argc, wchar_t **argv) { return Py_Main(argc, argv); } #else int main(int argc, char **argv) { return Py_BytesMain(argc, argv); } #endif --- $ objdump -d /opt/pymaster/lib/python3.10/config-3.10-x86_64-linux-gnu/python.o (...) Disassembly of section .text: 0000000000000000
: 0: 55 push %rbp 1: 48 89 e5 mov %rsp,%rbp 4: 48 83 ec 10 sub $0x10,%rsp 8: 89 7d fc mov %edi,-0x4(%rbp) b: 48 89 75 f0 mov %rsi,-0x10(%rbp) f: 48 8b 55 f0 mov -0x10(%rbp),%rdx 13: 8b 45 fc mov -0x4(%rbp),%eax 16: 48 89 d6 mov %rdx,%rsi 19: 89 c7 mov %eax,%edi 1b: e8 00 00 00 00 callq 20 20: c9 leaveq 21: c3 retq $ objdump -t /opt/pymaster/lib/python3.10/config-3.10-x86_64-linux-gnu/python.o (...) 0000000000000000 *UND* 0000000000000000 Py_BytesMain ---------- nosy: +ned.deily, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 06:48:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 11:48:47 +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: <1605008927.75.0.867654366785.issue40943@roundup.psfhosted.org> STINNER Victor added the comment: libxml2 is hit by this issue: * https://gitlab.gnome.org/GNOME/libxml2/-/issues/203 * https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/87 (my proposed fix) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 07:22:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 12:22:06 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1605010926.12.0.454854370293.issue42260@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 9e1b828265e6bfb58f1e0299bd78d8ff6347a2ba by Victor Stinner in branch 'master': bpo-42260: Compute the path config in the main init (GH-23211) https://github.com/python/cpython/commit/9e1b828265e6bfb58f1e0299bd78d8ff6347a2ba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 07:43:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 12:43:52 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1605012232.32.0.24610166667.issue42260@roundup.psfhosted.org> STINNER Victor added the comment: If we remove Modules/getpath.c, it will no longer be possible to automatically computes the path configuration when one of the following getter function will be called: * Py_GetPath() * Py_GetPrefix() * Py_GetExecPrefix() * Py_GetProgramFullPath() * Py_GetPythonHome() * Py_GetProgramName() It means that these functions would not return NULL if called before Python is initialiazed, but return the expected string once Python is initialized. Moreover, Py_SetPath() would no longer automatically computes the "program full path" (sys.executable). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 07:48:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 12:48:45 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1605012525.98.0.048403527519.issue42260@roundup.psfhosted.org> STINNER Victor added the comment: > If we remove Modules/getpath.c, it will no longer be possible to automatically computes the path configuration when one of the following getter function will be called: (...) It is not really an incompatible change according to the documentation: "Note: The following functions should not be called before Py_Initialize(): Py_EncodeLocale(), Py_GetPath(), Py_GetPrefix(), Py_GetExecPrefix(), Py_GetProgramFullPath(), Py_GetPythonHome(), Py_GetProgramName() and PyEval_InitThreads().". https://docs.python.org/dev/c-api/init.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 08:27:37 2020 From: report at bugs.python.org (Komiya Takeshi) Date: Tue, 10 Nov 2020 13:27:37 +0000 Subject: [issue42288] typing.get_type_hints() returns Optional[Any] if the default value of the argument is None In-Reply-To: <1604811082.57.0.115992838782.issue42288@roundup.psfhosted.org> Message-ID: <1605014857.74.0.371308884489.issue42288@roundup.psfhosted.org> Komiya Takeshi added the comment: Wow, I don't know that behavior. Thank you for your wisdom! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 08:28:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 13:28:31 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1605014911.63.0.410789594625.issue42260@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22118 pull_request: https://github.com/python/cpython/pull/23220 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 08:39:42 2020 From: report at bugs.python.org (Sandro Barnabishvili) Date: Tue, 10 Nov 2020 13:39:42 +0000 Subject: [issue42310] for loop creates element in defaultdict Message-ID: <1605015582.35.0.628227429995.issue42310@roundup.psfhosted.org> New submission from Sandro Barnabishvili : from collections import defaultdict d = defaultdict(list) for _ in d['a']: pass print(d.keys()) For loop creates element with key 'a'. Is it expected behavior? ---------- components: Argument Clinic messages: 380661 nosy: larry, sandrobarna priority: normal severity: normal status: open title: for loop creates element in defaultdict type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 08:43:09 2020 From: report at bugs.python.org (Larry Hastings) Date: Tue, 10 Nov 2020 13:43:09 +0000 Subject: [issue42310] for loop creates element in defaultdict In-Reply-To: <1605015582.35.0.628227429995.issue42310@roundup.psfhosted.org> Message-ID: <1605015789.03.0.681540063296.issue42310@roundup.psfhosted.org> Larry Hastings added the comment: Yes. Read the documentation for "defaultdict". In the future, please read the documentation before filing bugs. ---------- components: -Argument Clinic resolution: -> not a bug stage: -> resolved status: open -> closed type: behavior -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 08:45:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 13:45:06 +0000 Subject: [issue42308] Add threading.__excepthook__ similar to sys.__excepthook__ In-Reply-To: <1605006541.53.0.440753194072.issue42308@roundup.psfhosted.org> Message-ID: <1605015906.51.0.572061456488.issue42308@roundup.psfhosted.org> STINNER Victor added the comment: Can't you do that in your own hook? For example: orig_hook = threading.excepthook threading.excepthook = myhook def myhook(args): try: ... except: print("too bad!") orig_hook(args) I found one interesting usage of sys.__excepthook__ in code.InteractiveInterpreter: if sys.excepthook is sys.__excepthook__: lines = traceback.format_exception_only(type, value) self.write(''.join(lines)) else: # If someone has set sys.excepthook, we let that take precedence # over self.write sys.excepthook(type, value, tb) So it seems like sys.__excepthook__ is useful ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 08:47:40 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Nov 2020 13:47:40 +0000 Subject: [issue42171] Add PEP 573 to the stable ABI In-Reply-To: <1603810249.77.0.333997046365.issue42171@roundup.psfhosted.org> Message-ID: <1605016060.52.0.945568450433.issue42171@roundup.psfhosted.org> miss-islington added the comment: New changeset 0b9c4c6fcf2b0673fa45ddfa092934a9d5479b8c by Petr Viktorin in branch 'master': bpo-42171: Add PEP573-related items to the limited API (GH-23009) https://github.com/python/cpython/commit/0b9c4c6fcf2b0673fa45ddfa092934a9d5479b8c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 08:53:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 13:53:04 +0000 Subject: [issue14019] Unify tests for str.format and string.Formatter In-Reply-To: <1329293704.94.0.0580926341423.issue14019@psf.upfronthosting.co.za> Message-ID: <1605016384.29.0.740134959094.issue14019@roundup.psfhosted.org> STINNER Victor added the comment: Since nobody implemented this idea in 8 years, maybe it's time to give up and close this issue as out of date. It seeems like Nick was busy with other stuff, and nobody took this task in the meanwhile. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 08:53:39 2020 From: report at bugs.python.org (Mario Corchero) Date: Tue, 10 Nov 2020 13:53:39 +0000 Subject: [issue42308] Add threading.__excepthook__ similar to sys.__excepthook__ In-Reply-To: <1605006541.53.0.440753194072.issue42308@roundup.psfhosted.org> Message-ID: <1605016419.66.0.785897048397.issue42308@roundup.psfhosted.org> Mario Corchero added the comment: > I found one interesting usage of sys.__excepthook__ in code.InteractiveInterpreter: That is exactly what I wished this was there for hehe. We are installing a custom version of excepthook and wanted to check if the user had changed it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 08:58:35 2020 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 10 Nov 2020 13:58:35 +0000 Subject: [issue42183] Stack overflow error with asyncio.all_tasks and wait_for In-Reply-To: <1603904364.33.0.601096284613.issue42183@roundup.psfhosted.org> Message-ID: <1605016715.75.0.73391454516.issue42183@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 42d873c63aa9d160c132be4a34599531574db12c by Andrew Svetlov in branch 'master': bpo-42183: Fix a stack overflow error for asyncio Task or Future repr() (GH-23020) https://github.com/python/cpython/commit/42d873c63aa9d160c132be4a34599531574db12c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 08:58:54 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Nov 2020 13:58:54 +0000 Subject: [issue42183] Stack overflow error with asyncio.all_tasks and wait_for In-Reply-To: <1603904364.33.0.601096284613.issue42183@roundup.psfhosted.org> Message-ID: <1605016734.86.0.129408944361.issue42183@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +22120 pull_request: https://github.com/python/cpython/pull/23222 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 08:58:47 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Nov 2020 13:58:47 +0000 Subject: [issue42183] Stack overflow error with asyncio.all_tasks and wait_for In-Reply-To: <1603904364.33.0.601096284613.issue42183@roundup.psfhosted.org> Message-ID: <1605016727.77.0.760768204705.issue42183@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +22119 pull_request: https://github.com/python/cpython/pull/23221 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 08:59:02 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Nov 2020 13:59:02 +0000 Subject: [issue42183] Stack overflow error with asyncio.all_tasks and wait_for In-Reply-To: <1603904364.33.0.601096284613.issue42183@roundup.psfhosted.org> Message-ID: <1605016742.86.0.415492702995.issue42183@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +22121 pull_request: https://github.com/python/cpython/pull/23223 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 09:01:42 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 10 Nov 2020 14:01:42 +0000 Subject: [issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented In-Reply-To: <1585753703.83.0.0762180613721.issue40137@roundup.psfhosted.org> Message-ID: <1605016902.93.0.870022776359.issue40137@roundup.psfhosted.org> Petr Viktorin added the comment: It should be possible to get them back using _PyType_GetModuleByDef. ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 09:02:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 14:02:29 +0000 Subject: [issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented In-Reply-To: <1585753703.83.0.0762180613721.issue40137@roundup.psfhosted.org> Message-ID: <1605016949.84.0.809276975888.issue40137@roundup.psfhosted.org> STINNER Victor added the comment: Oh nice, in this case, I reopen my issue :-) ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 09:06:06 2020 From: report at bugs.python.org (Larry Hastings) Date: Tue, 10 Nov 2020 14:06:06 +0000 Subject: [issue42310] for loop creates element in defaultdict In-Reply-To: <1605015582.35.0.628227429995.issue42310@roundup.psfhosted.org> Message-ID: <1605017166.12.0.490047684629.issue42310@roundup.psfhosted.org> Change by Larry Hastings : ---------- nosy: -larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 09:04:59 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 10 Nov 2020 14:04:59 +0000 Subject: [issue42310] for loop creates element in defaultdict In-Reply-To: <1605015582.35.0.628227429995.issue42310@roundup.psfhosted.org> Message-ID: <1605017099.93.0.590441819507.issue42310@roundup.psfhosted.org> Steven D'Aprano added the comment: As Larry said, yes, this is expected behaviour, and has nothing to do with the for loop. The purpose of defaultdict is that dict lookups create the entry if it doesn't exist: >>> from collections import defaultdict >>> d = defaultdict(list) >>> x = d['any key'] >>> d defaultdict(, {'any key': []}) So even though your code loops zero times, you have created a key 'a' with value []. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 09:16:56 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 10 Nov 2020 14:16:56 +0000 Subject: [issue14935] PEP 384 Refactoring applied to _csv module In-Reply-To: <1338222171.68.0.797250497291.issue14935@psf.upfronthosting.co.za> Message-ID: <1605017816.46.0.238620635959.issue14935@roundup.psfhosted.org> Change by Petr Viktorin : ---------- nosy: +petr.viktorin nosy_count: 2.0 -> 3.0 pull_requests: +22122 pull_request: https://github.com/python/cpython/pull/23224 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 09:17:03 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 10 Nov 2020 14:17:03 +0000 Subject: [issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/ In-Reply-To: <1605005380.13.0.93741295392.issue42307@roundup.psfhosted.org> Message-ID: <1605017823.76.0.868194555502.issue42307@roundup.psfhosted.org> Ned Deily added the comment: I don't know for sure why python.o is included but perhaps the intent was to allow a user to rebuild a static interpreter with an user-supplied extension as is hinted at in https://docs.python.org/dev/extending/extending.html#compilation-and-linkage ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 09:20:55 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Nov 2020 14:20:55 +0000 Subject: [issue42183] Stack overflow error with asyncio.all_tasks and wait_for In-Reply-To: <1603904364.33.0.601096284613.issue42183@roundup.psfhosted.org> Message-ID: <1605018055.51.0.760833329585.issue42183@roundup.psfhosted.org> miss-islington added the comment: New changeset 90115a2cf7033c990a54d1ecb90ebd850b5f13cf by Miss Islington (bot) in branch '3.9': bpo-42183: Fix a stack overflow error for asyncio Task or Future repr() (GH-23020) https://github.com/python/cpython/commit/90115a2cf7033c990a54d1ecb90ebd850b5f13cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 09:21:56 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Nov 2020 14:21:56 +0000 Subject: [issue42183] Stack overflow error with asyncio.all_tasks and wait_for In-Reply-To: <1603904364.33.0.601096284613.issue42183@roundup.psfhosted.org> Message-ID: <1605018116.89.0.303306854661.issue42183@roundup.psfhosted.org> miss-islington added the comment: New changeset 109c17315af124b25853c248f4a9bf00f03036f6 by Miss Islington (bot) in branch '3.8': bpo-42183: Fix a stack overflow error for asyncio Task or Future repr() (GH-23020) https://github.com/python/cpython/commit/109c17315af124b25853c248f4a9bf00f03036f6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 09:30:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 14:30:03 +0000 Subject: [issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/ In-Reply-To: <1605005380.13.0.93741295392.issue42307@roundup.psfhosted.org> Message-ID: <1605018603.84.0.157716936833.issue42307@roundup.psfhosted.org> STINNER Victor added the comment: Oh! I managed to build a static Python with the following commands: cd /opt/pymaster/lib/python3.10/config-3.10-x86_64-linux-gnu gcc -static -o ~/python-static python.o -L. $(./python-config.py --libs --embed) I get a static binary: $ ldd ~/python-static not a dynamic executable And it works as expected: $ ~/python-static Python 3.10.0a2+ (heads/master:1f73c320e2, Nov 10 2020, 11:47:55) [GCC 10.2.1 20201016 (Red Hat 10.2.1-6)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> But... does any user really build Python manually after Python is installed? The Python build system couldn't handle that as part of the regular build? Maybe using a new configure --enable-static flag? I'm not a fan of static binaries. For example, the linker emits many warnings about static linking: /usr/bin/ld: ./libpython3.10.a(dynload_shlib.o): in function `_PyImport_FindSharedFuncptr': /home/vstinner/python/master/./Python/dynload_shlib.c:100: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/bin/ld: ./libpython3.10.a(posixmodule.o): in function `os_getgrouplist_impl': /home/vstinner/python/master/./Modules/posixmodule.c:7411: warning: Using 'getgrouplist' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/bin/ld: ./libpython3.10.a(posixmodule.o): in function `os_initgroups_impl': /home/vstinner/python/master/./Modules/posixmodule.c:7610: warning: Using 'initgroups' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/bin/ld: ./libpython3.10.a(pwdmodule.o): in function `pwd_getpwall_impl': /home/vstinner/python/master/./Modules/pwdmodule.c:302: warning: Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/bin/ld: /home/vstinner/python/master/./Modules/pwdmodule.c:301: warning: Using 'setpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/bin/ld: /home/vstinner/python/master/./Modules/pwdmodule.c:307: warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/bin/ld: ./libpython3.10.a(pwdmodule.o): in function `pwd_getpwnam_impl': /home/vstinner/python/master/./Modules/pwdmodule.c:249: warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/bin/ld: ./libpython3.10.a(pwdmodule.o): in function `pwd_getpwuid': /home/vstinner/python/master/./Modules/pwdmodule.c:166: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 09:31:52 2020 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 10 Nov 2020 14:31:52 +0000 Subject: [issue42183] Stack overflow error with asyncio.all_tasks and wait_for In-Reply-To: <1603904364.33.0.601096284613.issue42183@roundup.psfhosted.org> Message-ID: <1605018712.66.0.918211884195.issue42183@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 10:16:08 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 10 Nov 2020 15:16:08 +0000 Subject: [issue42171] Add PEP 573 to the stable ABI In-Reply-To: <1603810249.77.0.333997046365.issue42171@roundup.psfhosted.org> Message-ID: <1605021368.9.0.684917034113.issue42171@roundup.psfhosted.org> Petr Viktorin added the comment: Added. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 10:17:16 2020 From: report at bugs.python.org (Taekab Park) Date: Tue, 10 Nov 2020 15:17:16 +0000 Subject: [issue42311] It seems like ctypes code makes truncated pointer values in x64(access violations) Message-ID: <1605021436.76.0.434693997514.issue42311@roundup.psfhosted.org> New submission from Taekab Park : It seems like ctypes code makes truncated pointer values in x64(access violations) windows10 x64 options : __cdecl(/Gd) tested : python(x64) 3.2, 3.4, 3.6, 3.9 dll build with vc++2015 The test code is simple. Simply loaded TestDll and called function and checked return void* value. result actual void* : 0x00007FFDA4322018 <-> python void* : 0xFFFFFFFFA4322018 == C code == void* GetPointer(); SetPointer(void* value); INT64 GetPointer1(); void SetPointer1(INT64 obj); == python == import ctypes print(ctypes.sizeof(ctypes.c_void_p)) _testdll = ctypes.CDLL(r"TestDll.dll") def tohex(val, nbits): return hex((val + (1 << nbits)) % (1 << nbits)) result = _testdll.GetPointer() print(tohex(result, 64)) _testdll.SetPointer(result) result = _testdll.GetPointer1() print(tohex(result, 64)) _testdll.SetPointer1(result) ---------- components: ctypes files: example.zip messages: 380676 nosy: sh4dow priority: normal severity: normal status: open title: It seems like ctypes code makes truncated pointer values in x64(access violations) type: crash versions: Python 3.6, Python 3.9 Added file: https://bugs.python.org/file49589/example.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 10:20:27 2020 From: report at bugs.python.org (Michael Ferguson) Date: Tue, 10 Nov 2020 15:20:27 +0000 Subject: [issue42312] sys.prefix is set incorrectly on Mac OS X Message-ID: <1605021627.33.0.143648905308.issue42312@roundup.psfhosted.org> New submission from Michael Ferguson : I have been trying to create a wrapper script for `python3` in a venv that behaves similarly to a symbolic link. I am able to use `exec -a` in bash to run `python3` with `argv[0]` set to the wrapper script. This allows it to function similarly to the symbolic link in a venv. However, this approach does not work on Mac OS X with a homebrew installation. I think this is a bug. Here are the simple steps to reproduce (assuming bash shell): ``` cd /tmp python3 -m venv test-venv (exec -a test-venv/python3 python3 -c 'import sys; print(sys.executable); print (sys.prefix);') ``` ### Good output (Ubuntu 20.04) /tmp/test-venv/python-wrapper /tmp ### Bad output (Homebrew on Mac OS X) /usr/local/opt/python at 3.9/bin/python3.9 /usr/local/Cellar/python at 3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9 Here are some things that might be related: * the Mac OS X framework launcher and how it uses `realpath` (and issue22490) * `site.py` code in `def venv` and the conditional on `__PYVENV_LAUNCHER__`. The `if` branch is not being run in this configuration. * setting the environment variable `PYTHONEXECUTABLE` (e.g. `export PYTHONEXECUTABLE=test-venv/python3` before the other commands) causes the `if` branch in the conditional on `__PYVENV_LAUNCHER__` in `site.py` `def venv` to be run. This allows `sys.executable` to be set as expected but `sys.prefix` is still wrong. If you are interested in something closer to the use case, the below explains how to get a more user-facing reproducer: $ python3 -m venv test-venv -- put this into test-venv/python-wrapper -- #!/usr/bin/env bash # remove path component to prevent infinite loop export PATH=${PATH//test-venv/missing} # Now run the real python3 interpreter but tell it that it # is being launched at the current path, so it can # correctly find dependencies in the venv exec -a "$0" python3 "$@" $ chmod a+x test-venv/python-wrapper $ ./test-venv/python-wrapper -c 'import sys; print(sys.executable); print (sys.prefix);' (and with this script the problematic behavior is exactly the same as the exec commands above) ---------- components: macOS messages: 380677 nosy: mppf, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: sys.prefix is set incorrectly on Mac OS X type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 10:31:08 2020 From: report at bugs.python.org (Athul R) Date: Tue, 10 Nov 2020 15:31:08 +0000 Subject: [issue42313] rstrip removes the trailing `e`s. Message-ID: <1605022268.82.0.95951478559.issue42313@roundup.psfhosted.org> New submission from Athul R : rstrip removes the trailing `e`s. i = "external_eeeeeeeee_object" i = i.rstrip('_object') print(i) """ It should have printed `external_eeeeeeeee` but it prints only `external_`. """ It happens only when I user rstrip("_object") not for other strings. # ======================================================= # it works fine in the below case. i = "external_eeeeeeeee_trail" i = i.rstrip('_trail') print(i) """ It should have prints `external_eeeeeeeee` """ ---------- components: Library (Lib) files: python-bug.py messages: 380678 nosy: Athul-R priority: normal severity: normal status: open title: rstrip removes the trailing `e`s. type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49590/python-bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 10:35:50 2020 From: report at bugs.python.org (Michael Ferguson) Date: Tue, 10 Nov 2020 15:35:50 +0000 Subject: [issue42312] sys.prefix is set incorrectly on Mac OS X In-Reply-To: <1605021627.33.0.143648905308.issue42312@roundup.psfhosted.org> Message-ID: <1605022550.1.0.463138482539.issue42312@roundup.psfhosted.org> Michael Ferguson added the comment: In the above I meant to include the `bin` path in the examples, but it does not matter for the behavior (exec -a test-venv/bin/python3 python3 -c 'import sys; print(sys.executable); print (sys.prefix);') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 10:47:14 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 10 Nov 2020 15:47:14 +0000 Subject: [issue42111] Make the xxlimited module an example of best extension module practices In-Reply-To: <1603310336.9.0.27411366123.issue42111@roundup.psfhosted.org> Message-ID: <1605023234.83.0.336150787418.issue42111@roundup.psfhosted.org> Change by Petr Viktorin : ---------- keywords: +patch pull_requests: +22123 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23226 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 10:47:46 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 10 Nov 2020 15:47:46 +0000 Subject: [issue42312] sys.prefix is set incorrectly on Mac OS X In-Reply-To: <1605021627.33.0.143648905308.issue42312@roundup.psfhosted.org> Message-ID: <1605023266.34.0.122476964419.issue42312@roundup.psfhosted.org> Ned Deily added the comment: I'm not sure I understand exactly what you are trying to accomplish but one potential issue strikes me: you may need to ensure you are execing the right python binary by including a more complete path: $ (exec -a test-venv/bin/python3 test-venv/bin/python3 -c 'import sys; print(sys.executable); print (sys.prefix);') /private/tmp/test-venv/bin/python3 /private/tmp/test-venv ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 10:48:57 2020 From: report at bugs.python.org (Zachary Ware) Date: Tue, 10 Nov 2020 15:48:57 +0000 Subject: [issue42313] rstrip removes the trailing `e`s. In-Reply-To: <1605022268.82.0.95951478559.issue42313@roundup.psfhosted.org> Message-ID: <1605023337.32.0.920584424424.issue42313@roundup.psfhosted.org> Zachary Ware added the comment: See https://docs.python.org/3/library/stdtypes.html#str.rstrip The `{l,r,}strip` methods remove all characters contained in the passed-in string; `"aabbccddeeffgg".rstrip("gfe") == "aabbccdd"` ---------- nosy: +zach.ware resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 11:03:10 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 10 Nov 2020 16:03:10 +0000 Subject: [issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/ In-Reply-To: <1605005380.13.0.93741295392.issue42307@roundup.psfhosted.org> Message-ID: <1605024190.45.0.539145591959.issue42307@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > But... does any user really build Python manually after Python is installed? The Python build system couldn't handle that as part of the regular build? Maybe using a new configure --enable-static flag? Embedding? But they should use the .a not any of the .o. Object files should not be packaged IMHO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 11:06:10 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Nov 2020 16:06:10 +0000 Subject: [issue42014] shutil.rmtree calls onerror with different function than failed In-Reply-To: <1602507255.43.0.726203818853.issue42014@roundup.psfhosted.org> Message-ID: <1605024370.97.0.964209502014.issue42014@roundup.psfhosted.org> miss-islington added the comment: New changeset e59b2deffde61e5641cabd65034fa11b4db898ba by Michal ?iha? in branch 'master': bpo-42014: shutil.rmtree: call onerror with correct function (GH-22585) https://github.com/python/cpython/commit/e59b2deffde61e5641cabd65034fa11b4db898ba ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 11:06:25 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Nov 2020 16:06:25 +0000 Subject: [issue42014] shutil.rmtree calls onerror with different function than failed In-Reply-To: <1602507255.43.0.726203818853.issue42014@roundup.psfhosted.org> Message-ID: <1605024385.84.0.204705067119.issue42014@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +22125 pull_request: https://github.com/python/cpython/pull/23229 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 11:06:25 2020 From: report at bugs.python.org (Adrien) Date: Tue, 10 Nov 2020 16:06:25 +0000 Subject: [issue42314] Incorrect documentation entry for venv Message-ID: <1605024385.28.0.0225045754789.issue42314@roundup.psfhosted.org> New submission from Adrien : Hello, I am reading the venv official documentation available here: https://docs.python.org/3/library/venv.html If I pick English - 3.9.0, it's stated: "Changed in version 3.8: Add --upgrade-deps option to upgrade pip + setuptools to the latest on PyPI" When I run this my laptop: $ python3 --version Python 3.8.5 $ python3 -m venv venv-myproject --clear --upgrade-deps usage: venv [-h] [--system-site-packages] [--symlinks | --copies] [--clear] [--upgrade] [--without-pip] [--prompt PROMPT] ENV_DIR [ENV_DIR ...] venv: error: unrecognized arguments: --upgrade-deps If I pick English - 3.8(.6), I (correctly) don't see the option in the documentation. Please fix the documentation of 3.9 to indicates that this option was changed (added) in 3.9 and not 3.8 Thanks! Adrien ---------- assignee: docs at python components: Documentation messages: 380684 nosy: ari75, docs at python priority: normal severity: normal status: open title: Incorrect documentation entry for venv type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 11:06:18 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Nov 2020 16:06:18 +0000 Subject: [issue42014] shutil.rmtree calls onerror with different function than failed In-Reply-To: <1602507255.43.0.726203818853.issue42014@roundup.psfhosted.org> Message-ID: <1605024378.49.0.370873835786.issue42014@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch pull_requests: +22124 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23228 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 11:08:10 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 10 Nov 2020 16:08:10 +0000 Subject: [issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/ In-Reply-To: <1605005380.13.0.93741295392.issue42307@roundup.psfhosted.org> Message-ID: <1605024490.63.0.673994974096.issue42307@roundup.psfhosted.org> Ned Deily added the comment: > Embedding? The example I cited from the docs was for extending Python by building a new interpreter using an installed Python, not embedding. Dunno how often that is done, though. Perhaps on Windows where it was more difficult to build an interpreter from source? Perhaps Nick might have some ideas since he was involved in that section of the docs. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 11:11:06 2020 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 10 Nov 2020 16:11:06 +0000 Subject: [issue42014] shutil.rmtree calls onerror with different function than failed In-Reply-To: <1602507255.43.0.726203818853.issue42014@roundup.psfhosted.org> Message-ID: <1605024666.96.0.778298562552.issue42014@roundup.psfhosted.org> Change by Giampaolo Rodola' : ---------- nosy: -giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 11:26:03 2020 From: report at bugs.python.org (William Schwartz) Date: Tue, 10 Nov 2020 16:26:03 +0000 Subject: [issue26388] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True) In-Reply-To: <1455835021.39.0.133039555561.issue26388@psf.upfronthosting.co.za> Message-ID: <1605025563.06.0.149506254388.issue26388@roundup.psfhosted.org> Change by William Schwartz : ---------- nosy: +William.Schwartz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 11:27:11 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Nov 2020 16:27:11 +0000 Subject: [issue42014] shutil.rmtree calls onerror with different function than failed In-Reply-To: <1602507255.43.0.726203818853.issue42014@roundup.psfhosted.org> Message-ID: <1605025631.16.0.428393685234.issue42014@roundup.psfhosted.org> miss-islington added the comment: New changeset c745b36ee3786fabc9231a43c085218df27dcd47 by Miss Islington (bot) in branch '3.8': bpo-42014: shutil.rmtree: call onerror with correct function (GH-22585) https://github.com/python/cpython/commit/c745b36ee3786fabc9231a43c085218df27dcd47 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 11:29:44 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Nov 2020 16:29:44 +0000 Subject: [issue42014] shutil.rmtree calls onerror with different function than failed In-Reply-To: <1602507255.43.0.726203818853.issue42014@roundup.psfhosted.org> Message-ID: <1605025784.72.0.580399830306.issue42014@roundup.psfhosted.org> miss-islington added the comment: New changeset 14a343a9af27725faeab8b330a6d66ff573704d3 by Miss Islington (bot) in branch '3.9': bpo-42014: shutil.rmtree: call onerror with correct function (GH-22585) https://github.com/python/cpython/commit/14a343a9af27725faeab8b330a6d66ff573704d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 11:46:38 2020 From: report at bugs.python.org (Eryk Sun) Date: Tue, 10 Nov 2020 16:46:38 +0000 Subject: [issue42311] It seems like ctypes code makes truncated pointer values in x64(access violations) In-Reply-To: <1605021436.76.0.434693997514.issue42311@roundup.psfhosted.org> Message-ID: <1605026798.76.0.706741221085.issue42311@roundup.psfhosted.org> Eryk Sun added the comment: A function that returns a pointer needs an explicit `restype` set. A function parameter that's a pointer generally requires `argtypes` to be set. For example: _testdll.GetPointer.restype = ctypes.c_void_p _testdll.SetPointer.argtypes = (ctypes.c_void_p,) Unfortunately the ctypes documentation starts with a tutorial that promotes bad practices and misuses WinAPI GetModuleHandle multiple times, which gives people the wrong idea about pointer return values. However, the tutorial does mention that Python integers are passed as C int values by default and that C int is the default return type. It also shows how to use the `argtypes` and `restype` attributes. ---------- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 11:51:49 2020 From: report at bugs.python.org (hai shi) Date: Tue, 10 Nov 2020 16:51:49 +0000 Subject: [issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented In-Reply-To: <1585753703.83.0.0762180613721.issue40137@roundup.psfhosted.org> Message-ID: <1605027109.79.0.178667815513.issue40137@roundup.psfhosted.org> Change by hai shi : ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 11:52:44 2020 From: report at bugs.python.org (William Schwartz) Date: Tue, 10 Nov 2020 16:52:44 +0000 Subject: [issue42315] `python -m` semantics conflict with `__file__`'s being optional Message-ID: <1605027164.09.0.889081991316.issue42315@roundup.psfhosted.org> New submission from William Schwartz : `python -m mod` sets `sys.argv[0]` to the `mod.__file__` according to https://docs.python.org/3.9/using/cmdline.html#cmdoption-m > If ["-m"] is given, the first element of sys.argv will be the full path to the module file (while the module file is being located, the first element will be set to "-m"). But `__file__` may not exist according to https://docs.python.org/3.9/reference/import.html#__file__ > __file__ is optional. If set, this attribute?s value must be a string. The import system may opt to leave __file__ unset if it has no semantic meaning (e.g. a module loaded from a database). More technically, `__spec__.origin` is the source of `__file__`, and the former may be `None`, according to https://docs.python.org/3.9/library/importlib.html#importlib.machinery.ModuleSpec.origin > (__file__) > > Name of the place from which the module is loaded, e.g. ?builtin? for built-in modules and the filename for modules loaded from source. Normally ?origin? should be set, but it may be None (the default) which indicates it is unspecified (e.g. for namespace packages). `python -m mod` sets sys.argv[0] to `mod.__spec__.origin` at 3.9/Lib/runpy.py:196 It seems clear to me that the code is doing the right thing relative to the documentation for `-m`. But as #26388 and https://github.com/indygreg/PyOxidizer/issues/307 show, embedded Python runs into the semantic conflict with the documented behavior of `__spec__.origin` and `__file__`. My proposed resolution of this contradiction is to set `sys.argv[0] = sys.orig_argv[0]` or, even better, `sys.argv[0] = sys.executable` when `PyConfig.run_module` is set but the named module's `__spec__.origin` is `None`. ---------- components: Interpreter Core, Library (Lib) messages: 380689 nosy: William.Schwartz, brett.cannon, eric.snow, ncoghlan priority: normal severity: normal status: open title: `python -m` semantics conflict with `__file__`'s being optional type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 12:16:30 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 10 Nov 2020 17:16:30 +0000 Subject: [issue42313] rstrip removes the trailing `e`s. In-Reply-To: <1605022268.82.0.95951478559.issue42313@roundup.psfhosted.org> Message-ID: <1605028590.72.0.854149815536.issue42313@roundup.psfhosted.org> Batuhan Taskaya added the comment: For 3.9+, you could do exactly what you want with .removesuffix (/.removeprefix) methods; >>> test = "external_eeeeeeeee_object" >>> test.removesuffix("_object") 'external_eeeeeeeee' ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 12:28:35 2020 From: report at bugs.python.org (Brandon) Date: Tue, 10 Nov 2020 17:28:35 +0000 Subject: [issue42316] Walrus Operator in list index Message-ID: <1605029315.25.0.963262062958.issue42316@roundup.psfhosted.org> New submission from Brandon : Reading the PEP 572 document I don't see anything stating that Walrus operator in list indexes must be enclosed in parenthesis. Minimal Example: ''' In [1]: a = list(range(10)) In [2]: idx = -1 In [3]: a[idx := idx +1] File "", line 1 a[idx := idx +1] ^ SyntaxError: invalid syntax ''' If you enclose in parenthesis it works as expected: ''' In [4]: a[(idx := idx +1)] Out[4]: 0 In [5]: a[(idx := idx +1)] Out[5]: 1 In [6]: a[(idx := idx +1)] Out[6]: 2 ''' Is this a bug or am I misreading the PEP 572 document somewhere? It's not a top-level assignment nor is it a list comprehension so I would expect it to work in the first example. ---------- components: asyncio messages: 380691 nosy: Brando753, asvetlov, yselivanov priority: normal severity: normal status: open title: Walrus Operator in list index versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 12:41:32 2020 From: report at bugs.python.org (Dylan Van Assche) Date: Tue, 10 Nov 2020 17:41:32 +0000 Subject: [issue42158] http.server doesn't guess n-quads, n-triples, notation3 and TriG MIME types In-Reply-To: <1603735016.36.0.247111341461.issue42158@roundup.psfhosted.org> Message-ID: <1605030092.52.0.124790603026.issue42158@roundup.psfhosted.org> Change by Dylan Van Assche : ---------- keywords: +patch pull_requests: +22126 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23230 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 12:56:41 2020 From: report at bugs.python.org (Xtrem532) Date: Tue, 10 Nov 2020 17:56:41 +0000 Subject: [issue34365] datetime's documentation refers to "comparison [...] falling back to the default scheme of comparing object addresses" In-Reply-To: <1533791029.87.0.56676864532.issue34365@psf.upfronthosting.co.za> Message-ID: <1605031001.46.0.104625073297.issue34365@roundup.psfhosted.org> Change by Xtrem532 : ---------- nosy: +Xtrem532 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 13:13:05 2020 From: report at bugs.python.org (Michael Ferguson) Date: Tue, 10 Nov 2020 18:13:05 +0000 Subject: [issue42312] sys.prefix is set incorrectly on Mac OS X In-Reply-To: <1605021627.33.0.143648905308.issue42312@roundup.psfhosted.org> Message-ID: <1605031985.88.0.766533115903.issue42312@roundup.psfhosted.org> Michael Ferguson added the comment: > I'm not sure I understand exactly what you are trying to accomplish but one potential issue strikes me: you may need to ensure you are execing the right python binary by including a more complete path: That does not help with the original problem I was trying to solve, because I was trying to create a wrapper script that used whichever `python3` is available according to the `PATH` variable (other than potentially the one for this venv). Whether or not you think that is a reasonable thing to do, the examples I showed have a difference in behavior between Mac OS X and linux that is probably undesirable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 13:14:25 2020 From: report at bugs.python.org (Michael Felt) Date: Tue, 10 Nov 2020 18:14:25 +0000 Subject: [issue42309] BUILD: AIX-64-bit segmentation fault In-Reply-To: <1605008695.96.0.78391537773.issue42309@roundup.psfhosted.org> Message-ID: <1605032065.01.0.778012869571.issue42309@roundup.psfhosted.org> Michael Felt added the comment: On a different server, different compiler (xlc-v13, mine is xlc-v11) it gets past this point. So, perhaps it is a compiler issue. As the second system is missing many 64-bit libraries - still cannot build 64-bit Python-3.9. Low priority - imho. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 13:18:35 2020 From: report at bugs.python.org (Irit Katriel) Date: Tue, 10 Nov 2020 18:18:35 +0000 Subject: [issue11728] mbox parser incorrect behaviour In-Reply-To: <1301573066.6.0.277247050127.issue11728@psf.upfronthosting.co.za> Message-ID: <1605032315.14.0.852562099661.issue11728@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 13:25:58 2020 From: report at bugs.python.org (Irit Katriel) Date: Tue, 10 Nov 2020 18:25:58 +0000 Subject: [issue16926] setup.py register does not always respect --repository In-Reply-To: <1357878241.89.0.365738814483.issue16926@psf.upfronthosting.co.za> Message-ID: <1605032758.24.0.766865066935.issue16926@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 13:37:46 2020 From: report at bugs.python.org (Irit Katriel) Date: Tue, 10 Nov 2020 18:37:46 +0000 Subject: [issue6899] Base.replace breaks tree In-Reply-To: <1252831841.16.0.893335369907.issue6899@psf.upfronthosting.co.za> Message-ID: <1605033466.56.0.770604537304.issue6899@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 13:58:00 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Nov 2020 18:58:00 +0000 Subject: [issue35560] format(float(123), "00") causes segfault in debug builds In-Reply-To: <1545474042.87.0.98272194251.issue35560@roundup.psfhosted.org> Message-ID: <1605034680.2.0.899996721246.issue35560@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +22127 pull_request: https://github.com/python/cpython/pull/23231 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 14:02:03 2020 From: report at bugs.python.org (E. Paine) Date: Tue, 10 Nov 2020 19:02:03 +0000 Subject: [issue42273] Using LazyLoader leads to AttributeError In-Reply-To: <1604614463.81.0.853919807892.issue42273@roundup.psfhosted.org> Message-ID: <1605034923.56.0.0971596755176.issue42273@roundup.psfhosted.org> E. Paine added the comment: In short, the module isn't being added to the package's namespace because we are directly modifying sys.modules (hence why the behaviour would be the same if we imported using `import foo.b` as `from foo import b`). I personally prefer to use the metapath instead of modifying sys.modules but I agree that the given example should work when the lazy import is not in `__init__.py`. The other solution is to modify the `LazyLoader` class to explicitly add the lazy module to the package's namespace (opinions?). ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 14:03:43 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 10 Nov 2020 19:03:43 +0000 Subject: [issue42312] sys.prefix is set incorrectly on Mac OS X In-Reply-To: <1605021627.33.0.143648905308.issue42312@roundup.psfhosted.org> Message-ID: <1605035023.51.0.162205497123.issue42312@roundup.psfhosted.org> Ned Deily added the comment: Sorry, I didn't intend to criticize what you are trying to do, I just not sure I understand it so I could give a more helpful response. It seems to me that an explanation for the difference in behavior you are seeing between your Ubuntu and macOS setups is in exactly what the value of PATH is when the exec is performed on each and exactly which python3 is found first. For example, when I run the test exec on my macOS system, it is clear that the python3 being invoked is not the venv one but a different python3 altogether that shows up earlier on PATH. Could such differences explain what you are seeing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 14:03:57 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 10 Nov 2020 19:03:57 +0000 Subject: [issue35560] format(float(123), "00") causes segfault in debug builds In-Reply-To: <1545474042.87.0.98272194251.issue35560@roundup.psfhosted.org> Message-ID: <1605035037.37.0.310450271244.issue35560@roundup.psfhosted.org> Gregory P. Smith added the comment: This bug was introduced into the Python 3.6.8 "bugfix" release. https://github.com/python/cpython/pull/23231 will fix it if anyone needs that on modern 3.6. ---------- nosy: +gregory.p.smith versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 14:08:16 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 10 Nov 2020 19:08:16 +0000 Subject: [issue42312] sys.prefix is set incorrectly on Mac OS X In-Reply-To: <1605021627.33.0.143648905308.issue42312@roundup.psfhosted.org> Message-ID: <1605035296.68.0.965763546839.issue42312@roundup.psfhosted.org> Ronald Oussoren added the comment: The difference in behaviour is because the executable does not look at argv[0] to find its location on macOS. Your trick therefore doesn't work. I prefer the current behaviour. What I don't understand is *why* you want to do this. If I read your report correctly you're trying to run an Python 3 executable outside of the virtual environment as if it is in the virtual environment. Why not just use the binary inside the virtual environment? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 14:21:04 2020 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 10 Nov 2020 19:21:04 +0000 Subject: [issue42314] Incorrect documentation entry for venv In-Reply-To: <1605024385.28.0.0225045754789.issue42314@roundup.psfhosted.org> Message-ID: <1605036064.7.0.297876849205.issue42314@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 2.0 -> 3.0 pull_requests: +22128 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23232 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 14:30:47 2020 From: report at bugs.python.org (JackSkellington) Date: Tue, 10 Nov 2020 19:30:47 +0000 Subject: [issue42267] Python 3.9 broken installer In-Reply-To: <1604531829.54.0.433305713685.issue42267@roundup.psfhosted.org> Message-ID: <1605036647.53.0.409694952.issue42267@roundup.psfhosted.org> JackSkellington added the comment: Thank you for everything. ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 14:35:37 2020 From: report at bugs.python.org (Dominik V.) Date: Tue, 10 Nov 2020 19:35:37 +0000 Subject: [issue42317] Docs of `typing.get_args`: Mention that due to caching of typing generics the order of arguments for Unions can be different from the one of the returned tuple Message-ID: <1605036937.3.0.364895182043.issue42317@roundup.psfhosted.org> New submission from Dominik V. : Due to caching of `__getitem__` for generic types, the order of arguments as returned by `get_args` might be different for Union: ```python >>> from typing import List, Union, get_args >>> get_args(get_args(List[Union[int, str]])[0]) (, ) >>> get_args(get_args(List[Union[str, int]])[0]) (, ) ``` This is because `List[Union[int, str]] is List[Union[str, int]]`. I understand that caching is useful to reduce the memory footprint of type hints, so I suggest to update the documentation of `get_args`. At the moment it reads: > For a typing object of the form X[Y, Z, ...] these functions return X and (Y, Z, ...). This seems to imply that the returned objects are identical to the ones in the form `X[Y, Z, ...]`. However that's not the case: ```python >>> U1 = Union[int, str] >>> U2 = Union[str, int] >>> get_args(List[U1])[0] is U1 True >>> get_args(List[U2])[0] is U2 False ``` I'm not so much concerned about the identity, but the fact that a subsequent call to `get_args` on the Union returns a different type seems to be relevant. So I propose to add the following sentence to the `get_args` docs: > [...], it gets normalized to the original class. > If `X` is a `Union`, the order of `(Y, Z, ...)` can be different from the one of the original arguments `[Y, Z, ...]`. Or alternatively: > [...], it gets normalized to the original class. > If `X` is a `Union`, the order of `(Y, Z, ...)` is arbitrary. The second version is shorter but it's not completely accurate (since the order is actually not arbitrary). ---------- assignee: docs at python components: Documentation messages: 380699 nosy: Dominik V., docs at python priority: normal severity: normal status: open title: Docs of `typing.get_args`: Mention that due to caching of typing generics the order of arguments for Unions can be different from the one of the returned tuple type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 14:40:11 2020 From: report at bugs.python.org (Ravi Chityala) Date: Tue, 10 Nov 2020 19:40:11 +0000 Subject: [issue42302] [Turtle] Add clockwise and anticlockwise method as alias to right and left In-Reply-To: <20201110102042.GL15290@ando.pearwood.info> Message-ID: Ravi Chityala added the comment: Hello All In math and physics we typically use terms clockwise and anti-clockwise and not right and left for rotation. This change will make it easy for kids to learn the terms that they will eventually use in math and physics anyway. The change I am proposing is to alias right rotation with two more names: clockwise or cw and left rotation with two more names: anticlockwise or acw. Programmers who are currently using left or right can continue to do so. Based on the documentation supplied by Steven, I agree that everyone programming is using right and left but it might be in the right direction to program using clockwise and anticlockwise. Thanks, Ravi On Tue, Nov 10, 2020 at 2:21 AM Steven D'Aprano wrote: > > > Steven D'Aprano added the comment: > > On Tue, Nov 10, 2020 at 09:55:40AM +0000, Serhiy Storchaka wrote: > > > If clockwise is a new > > standard for this command in modern Turtle implementation, we can add > > yet one alias. Otherwise I agree with Raymond. > > I had a very quick look at some Logo implementations: > > https://resources.terrapinlogo.com/weblogo/commands/ > > https://www.mit.edu/~hlb/MA562/commands.html > > https://reduce-algebra.sourceforge.io/manual/manualse170.html > > https://docs.racket-lang.org/logo/index.html > > and even 3D Logo: > > https://vrmath2.net/node/12 > > and I can see no sign of any other Logos allowing clockwise and > anticlockwise as aliases. So I think it is up to Ravi Chityala to > demonstrate that this alias is already in use in some other Logo or > turtle graphics implementations. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 14:44:18 2020 From: report at bugs.python.org (paul j3) Date: Tue, 10 Nov 2020 19:44:18 +0000 Subject: [issue42297] [argparse] Bad error message formatting when using custom usage text In-Reply-To: <1604942759.08.0.272256214563.issue42297@roundup.psfhosted.org> Message-ID: <1605037458.89.0.327519378282.issue42297@roundup.psfhosted.org> paul j3 added the comment: We could look into using a different more compact 'prog' for these error messages. Currently the subparser 'prog' uses the main prog plus positionals plus the subparser name. The goal is to construct a subparser usage that reflects required input. This is fine for the usage line, but could be too verbose for some errors. In an error, the 'prog' just helps identify which argument has problems, and doesn't need the extra usage information. Most of the time that isn't an issue, since we don't use positional much in the main parser (and when used can't have variable nargs). But I don't have immediate ideas as to what can be conveniently (and safely) changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 14:50:22 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 10 Nov 2020 19:50:22 +0000 Subject: [issue42312] sys.prefix is set incorrectly on Mac OS X In-Reply-To: <1605021627.33.0.143648905308.issue42312@roundup.psfhosted.org> Message-ID: <1605037822.87.0.944264965246.issue42312@roundup.psfhosted.org> Ronald Oussoren added the comment: Note that the same is true for python3 outside of a venv, it does not use argv[0] to locate says.prefix (for framework builds). That?s intentional. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 14:54:25 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 10 Nov 2020 19:54:25 +0000 Subject: [issue42103] [security] DoS (MemError via CPU and RAM exhaustion) when processing malformed Apple Property List files in binary format In-Reply-To: <1603239911.48.0.657036824442.issue42103@roundup.psfhosted.org> Message-ID: <1605038065.1.0.948292153046.issue42103@roundup.psfhosted.org> Ned Deily added the comment: New changeset 225e3659556616ad70186e7efc02baeebfeb5ec4 by Serhiy Storchaka in branch '3.7': [3.7] bpo-42103: Improve validation of Plist files. (GH-22882) (#23117) https://github.com/python/cpython/commit/225e3659556616ad70186e7efc02baeebfeb5ec4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 14:57:41 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 10 Nov 2020 19:57:41 +0000 Subject: [issue42103] [security] DoS (MemError via CPU and RAM exhaustion) when processing malformed Apple Property List files in binary format In-Reply-To: <1603239911.48.0.657036824442.issue42103@roundup.psfhosted.org> Message-ID: <1605038261.32.0.748778756758.issue42103@roundup.psfhosted.org> Ned Deily added the comment: New changeset a63234c49b2fbfb6f0aca32525e525ce3d43b2b4 by Serhiy Storchaka in branch '3.6': [3.6] bpo-42103: Improve validation of Plist files. (GH-22882) (GH-23118) https://github.com/python/cpython/commit/a63234c49b2fbfb6f0aca32525e525ce3d43b2b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 14:58:35 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 10 Nov 2020 19:58:35 +0000 Subject: [issue35560] format(float(123), "00") causes segfault in debug builds In-Reply-To: <1545474042.87.0.98272194251.issue35560@roundup.psfhosted.org> Message-ID: <1605038315.74.0.218843029207.issue35560@roundup.psfhosted.org> Ned Deily added the comment: New changeset dae5d728bc3f1d4039b64e4ec3a9036fd5d19587 by Miss Islington (bot) in branch '3.6': bpo-35560: Remove assertion from format(float, "n") (GH-11288) (GH-23231) https://github.com/python/cpython/commit/dae5d728bc3f1d4039b64e4ec3a9036fd5d19587 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 14:59:30 2020 From: report at bugs.python.org (Irit Katriel) Date: Tue, 10 Nov 2020 19:59:30 +0000 Subject: [issue1598083] Top-level exception handler writes to stdout unsafely Message-ID: <1605038370.29.0.444941623271.issue1598083@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 15:10:03 2020 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 10 Nov 2020 20:10:03 +0000 Subject: [issue42085] Add dedicated slot for sending values In-Reply-To: <1603136296.98.0.312180912341.issue42085@roundup.psfhosted.org> Message-ID: <1605039003.59.0.378217996376.issue42085@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset 1e996c3a3b51e9c6f1f4cea8a6dbcf3bcb865060 by Vladimir Matveev in branch 'master': bpo-42085: Introduce dedicated entry in PyAsyncMethods for sending values (#22780) https://github.com/python/cpython/commit/1e996c3a3b51e9c6f1f4cea8a6dbcf3bcb865060 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 15:10:52 2020 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 10 Nov 2020 20:10:52 +0000 Subject: [issue42085] Add dedicated slot for sending values In-Reply-To: <1603136296.98.0.312180912341.issue42085@roundup.psfhosted.org> Message-ID: <1605039052.74.0.701617319215.issue42085@roundup.psfhosted.org> Yury Selivanov added the comment: Vladimir, please do a follow up PR documenting Py_TPFLAGS_HAVE_AM_SEND. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 15:10:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 20:10:31 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1605039031.29.0.958241423017.issue42260@roundup.psfhosted.org> STINNER Victor added the comment: New changeset ace3f9a0ce7b9fe8ae757fdd614f1e7a171f92b0 by Victor Stinner in branch 'master': bpo-42260: Fix _PyConfig_Read() if compute_path_config=0 (GH-23220) https://github.com/python/cpython/commit/ace3f9a0ce7b9fe8ae757fdd614f1e7a171f92b0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 15:17:26 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Nov 2020 20:17:26 +0000 Subject: [issue42103] [security] DoS (MemError via CPU and RAM exhaustion) when processing malformed Apple Property List files in binary format In-Reply-To: <1603239911.48.0.657036824442.issue42103@roundup.psfhosted.org> Message-ID: <1605039446.61.0.0639781052456.issue42103@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 Nov 10 15:20:47 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 10 Nov 2020 20:20:47 +0000 Subject: [issue41832] PyType_FromSpec() should accept tp_doc=NULL In-Reply-To: <1600770571.99.0.249807543427.issue41832@roundup.psfhosted.org> Message-ID: <1605039647.11.0.379152622113.issue41832@roundup.psfhosted.org> Petr Viktorin added the comment: The PR entirely removed the note that a slot's value "May not be NULL". In fact, only tp_doc may be NULL. AFAIK, the restriction is still there for other slots. Can that note be added back? ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 15:21:28 2020 From: report at bugs.python.org (Michael Ferguson) Date: Tue, 10 Nov 2020 20:21:28 +0000 Subject: [issue42312] sys.prefix is set incorrectly on Mac OS X In-Reply-To: <1605021627.33.0.143648905308.issue42312@roundup.psfhosted.org> Message-ID: <1605039688.09.0.751674424421.issue42312@roundup.psfhosted.org> Michael Ferguson added the comment: > For example, when I run the test exec on my macOS system, it is clear that the python3 being invoked is not the venv one but a different python3 altogether that shows up earlier on PATH. In the test case I am interested in, PATH is not set to the venv at all. You're supposed to be able to run a script in a venv without activating. In my case, I am trying to write a wrapper script that behaves similarly to the symbolic link in test-venv/bin/python3 but that works if the path to the python3 interpreter changes in the future. (For example, one might install and then uninstall pyenv). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 15:42:52 2020 From: report at bugs.python.org (Neil Schemenauer) Date: Tue, 10 Nov 2020 20:42:52 +0000 Subject: [issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/ In-Reply-To: <1605005380.13.0.93741295392.issue42307@roundup.psfhosted.org> Message-ID: <1605040972.98.0.874504307665.issue42307@roundup.psfhosted.org> Neil Schemenauer added the comment: I think the comments are correct in that it is used to create a new statically linked interpreter that includes a user provided extension module. We could include python.o inside the libpythonXX.a file but then I think it breaks if you are embedding (e.g. linking .a to your own .o that has a main function). It seems probable that no one uses python.o anymore but my preference would be to not remove it unless we are going to completely remove support for statically linking. Nothing is really hurt by having that .o file in the install and the feature still works as originally intended. It would be good to add a comment in the makefile, describing the possible use for that file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 15:46:55 2020 From: report at bugs.python.org (Irit Katriel) Date: Tue, 10 Nov 2020 20:46:55 +0000 Subject: [issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1605041215.95.0.281128114334.issue16781@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6, Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 15:53:54 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Nov 2020 20:53:54 +0000 Subject: [issue41073] [C API] PyType_GetSlot() should accept static types In-Reply-To: <1592815094.33.0.264745776024.issue41073@roundup.psfhosted.org> Message-ID: <1605041634.25.0.0332188605675.issue41073@roundup.psfhosted.org> miss-islington added the comment: New changeset a13b26cac1519dad7bbc8651de7b826df7389d75 by Hai Shi in branch 'master': bpo-41073: PyType_GetSlot() can now accept static types. (GH-21931) https://github.com/python/cpython/commit/a13b26cac1519dad7bbc8651de7b826df7389d75 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 15:54:53 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 10 Nov 2020 20:54:53 +0000 Subject: [issue41073] [C API] PyType_GetSlot() should accept static types In-Reply-To: <1592815094.33.0.264745776024.issue41073@roundup.psfhosted.org> Message-ID: <1605041693.53.0.350605500754.issue41073@roundup.psfhosted.org> Change by Petr Viktorin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 15:55:09 2020 From: report at bugs.python.org (Irit Katriel) Date: Tue, 10 Nov 2020 20:55:09 +0000 Subject: [issue4655] during Python installation, setup.py should not use .pydistutils.cfg In-Reply-To: <1229218265.16.0.0523897864618.issue4655@psf.upfronthosting.co.za> Message-ID: <1605041709.12.0.313373053134.issue4655@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 15:58:21 2020 From: report at bugs.python.org (Irit Katriel) Date: Tue, 10 Nov 2020 20:58:21 +0000 Subject: [issue15034] Document best practices for exceptions In-Reply-To: <1339118524.85.0.923317590244.issue15034@psf.upfronthosting.co.za> Message-ID: <1605041901.06.0.974813369917.issue15034@roundup.psfhosted.org> Irit Katriel added the comment: There are examples in the tutorial where super().__init__ is not called, like here: https://docs.python.org/3/tutorial/errors.html#user-defined-exceptions ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 16:15:53 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 10 Nov 2020 21:15:53 +0000 Subject: [issue42312] sys.prefix is set incorrectly on Mac OS X In-Reply-To: <1605021627.33.0.143648905308.issue42312@roundup.psfhosted.org> Message-ID: <1605042953.95.0.46999036236.issue42312@roundup.psfhosted.org> Ronald Oussoren added the comment: The way sys.prefix is calculated on macOS ensures that the correct sys.prefix is calculated even if you copy the binary to a different location. That's functionality I don't want to drop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 16:22:18 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 10 Nov 2020 21:22:18 +0000 Subject: [issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget Message-ID: <1605043338.18.0.398355808071.issue42318@roundup.psfhosted.org> New submission from Ronald Oussoren : As mentioned in msg380552: I get an SyntaxError with message "utf-8' codec can't encode characters in position 7-12: surrogates not allowed." when I paste a smiley emoji in an IDLE interactive shell and try to execute that line, for example using: >>> print("?") The error is likely due to a surrogate pair being present in the UTF-8 representation of a Tcl/Tk string. It should be possible to work around this in _tkinter.c:unicodeFromTclStringAndSize by merging surrogate pairs. This is with: - Python 3.10 - macOS 11 (arm64) - Tk 8.6.10 With Tk 8.6.8 (as included in the macOS installers on python.org) printing won't work at all, as mentioned in bpo-42225. ---------- components: Tkinter, macOS messages: 380715 nosy: ned.deily, ronaldoussoren priority: normal severity: normal stage: needs patch status: open title: [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 16:23:08 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 10 Nov 2020 21:23:08 +0000 Subject: [issue42225] Tkinter hangs or crashes when displaying astral chars In-Reply-To: <1604200632.47.0.347759375724.issue42225@roundup.psfhosted.org> Message-ID: <1605043388.13.0.85189053505.issue42225@roundup.psfhosted.org> Ronald Oussoren added the comment: I've filed Issue42318 about the surrogate pairs error I mention in msg380552. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 16:37:24 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 10 Nov 2020 21:37:24 +0000 Subject: [issue42232] mmap module add Darwin specific madvise options Message-ID: <1605044244.87.0.0921884289953.issue42232@roundup.psfhosted.org> New submission from Ronald Oussoren : Thanks for the PR. The reason I haven't reviewed the PR yet is that I need to check the SDK headers to see if the patch is complete. ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 16:55:49 2020 From: report at bugs.python.org (Brett Cannon) Date: Tue, 10 Nov 2020 21:55:49 +0000 Subject: [issue42315] `python -m` semantics conflict with `__file__`'s being optional In-Reply-To: <1605027164.09.0.889081991316.issue42315@roundup.psfhosted.org> Message-ID: <1605045349.71.0.577730846966.issue42315@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 16:57:48 2020 From: report at bugs.python.org (Brett Cannon) Date: Tue, 10 Nov 2020 21:57:48 +0000 Subject: [issue42273] Using LazyLoader leads to AttributeError In-Reply-To: <1604614463.81.0.853919807892.issue42273@roundup.psfhosted.org> Message-ID: <1605045468.62.0.880684777237.issue42273@roundup.psfhosted.org> Brett Cannon added the comment: The way import works, ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 17:00:01 2020 From: report at bugs.python.org (Brett Cannon) Date: Tue, 10 Nov 2020 22:00:01 +0000 Subject: [issue42273] Using LazyLoader leads to AttributeError In-Reply-To: <1604614463.81.0.853919807892.issue42273@roundup.psfhosted.org> Message-ID: <1605045601.24.0.875101983896.issue42273@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon resolution: not a bug -> status: closed -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 17:06:51 2020 From: report at bugs.python.org (Kevin Keating) Date: Tue, 10 Nov 2020 22:06:51 +0000 Subject: [issue42273] Using LazyLoader leads to AttributeError In-Reply-To: <1604614463.81.0.853919807892.issue42273@roundup.psfhosted.org> Message-ID: <1605046011.33.0.138586015845.issue42273@roundup.psfhosted.org> Kevin Keating added the comment: Brett, what do you mean by "the way import works"? Is the difference between using LazyLoader and using a normal import intentional? ---------- status: -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 17:09:01 2020 From: report at bugs.python.org (Kevin Keating) Date: Tue, 10 Nov 2020 22:09:01 +0000 Subject: [issue42273] Using LazyLoader leads to AttributeError In-Reply-To: <1604614463.81.0.853919807892.issue42273@roundup.psfhosted.org> Message-ID: <1605046141.01.0.339384000247.issue42273@roundup.psfhosted.org> Kevin Keating added the comment: One possible solution here would be to update the documentation at https://github.com/python/cpython/blob/master/Doc/library/importlib.rst#implementing-lazy-imports to either note the limitation or to modify the lazy_import function so that it adds the module to the package's namespace. That's basically the workaround that we've been using. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 17:13:01 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Nov 2020 22:13:01 +0000 Subject: [issue42140] asyncio.wait function creates futures set two times In-Reply-To: <1603522282.48.0.50359686965.issue42140@roundup.psfhosted.org> Message-ID: <1605046381.59.0.93676875636.issue42140@roundup.psfhosted.org> miss-islington added the comment: New changeset 7e5ef0a5713f968f6e942566c78bf57ffbef01de by Diogo Dutra in branch 'master': bpo-42140: Improve asyncio.wait function (GH-22938) https://github.com/python/cpython/commit/7e5ef0a5713f968f6e942566c78bf57ffbef01de ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 17:13:22 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Nov 2020 22:13:22 +0000 Subject: [issue42140] asyncio.wait function creates futures set two times In-Reply-To: <1603522282.48.0.50359686965.issue42140@roundup.psfhosted.org> Message-ID: <1605046402.49.0.826906506441.issue42140@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch pull_requests: +22129 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23233 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 17:30:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 22:30:20 +0000 Subject: [issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/ In-Reply-To: <1605005380.13.0.93741295392.issue42307@roundup.psfhosted.org> Message-ID: <1605047420.38.0.71333247635.issue42307@roundup.psfhosted.org> STINNER Victor added the comment: The Fedora package of Python doesn't build the static libpython for 10 years (patch added at 2010-01-18): https://src.fedoraproject.org/rpms/python3.9/blob/master/f/00111-no-static-lib.patch libpython3.10.a (static) is around 15 MB and libpython3.10.so (dynamic) is around 3 MB. Fedora only installs libpython3.10.so (dynamic). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 17:32:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 22:32:37 +0000 Subject: [issue41073] [C API] PyType_GetSlot() should accept static types In-Reply-To: <1592815094.33.0.264745776024.issue41073@roundup.psfhosted.org> Message-ID: <1605047557.69.0.0316427229067.issue41073@roundup.psfhosted.org> STINNER Victor added the comment: > bpo-41073: PyType_GetSlot() can now accept static types. (GH-21931) Nice! It will be simpler to use PyType_GetSlot() in an extension with the limited C API, without having to care if the type is a static type or a heap type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 17:35:05 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 10 Nov 2020 22:35:05 +0000 Subject: [issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/ In-Reply-To: <1605005380.13.0.93741295392.issue42307@roundup.psfhosted.org> Message-ID: <1605047705.41.0.607957887411.issue42307@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Hummm, I think the gains of having the .o over the .a are very very small as you can almost recreate anything you want with the .o using the .a and a small initialization function unless I am missing something. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 18:06:38 2020 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 10 Nov 2020 23:06:38 +0000 Subject: [issue42314] Incorrect documentation entry for venv In-Reply-To: <1605024385.28.0.0225045754789.issue42314@roundup.psfhosted.org> Message-ID: <1605049598.11.0.0709240176668.issue42314@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset f8bea0a44d718296a249bdb766b8dbc92f38e8df by Zackery Spytz in branch '3.9': [3.9] bpo-4bpo-42314: Fix the documentation for venv --upgrade-deps (GH-22113) (GH-23232) https://github.com/python/cpython/commit/f8bea0a44d718296a249bdb766b8dbc92f38e8df ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 18:11:04 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Nov 2020 23:11:04 +0000 Subject: [issue42140] asyncio.wait function creates futures set two times In-Reply-To: <1603522282.48.0.50359686965.issue42140@roundup.psfhosted.org> Message-ID: <1605049864.84.0.522009253318.issue42140@roundup.psfhosted.org> miss-islington added the comment: New changeset 33922cb0aa0c81ebff91ab4e938a58dfec2acf19 by Miss Islington (bot) in branch '3.9': bpo-42140: Improve asyncio.wait function (GH-22938) https://github.com/python/cpython/commit/33922cb0aa0c81ebff91ab4e938a58dfec2acf19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 18:12:32 2020 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 10 Nov 2020 23:12:32 +0000 Subject: [issue42140] asyncio.wait function creates futures set two times In-Reply-To: <1603522282.48.0.50359686965.issue42140@roundup.psfhosted.org> Message-ID: <1605049952.28.0.719679122421.issue42140@roundup.psfhosted.org> Yury Selivanov added the comment: Thanks for the change and for the discussion to everybody involved. The PR makes sense and I've already merged it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 18:15:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 23:15:27 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1605050127.99.0.541249481081.issue42260@roundup.psfhosted.org> STINNER Victor added the comment: The main drawback of rewriting Modules/getpath.c as Lib/_getpath.py (and removing getpath.c) is that PyConfig_Read() could no longer compute the Python Path Configuration. It would return an "empty" path configuration. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 18:56:22 2020 From: report at bugs.python.org (Ken Jin) Date: Tue, 10 Nov 2020 23:56:22 +0000 Subject: [issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef() In-Reply-To: <1604914934.45.0.492738703952.issue42294@roundup.psfhosted.org> Message-ID: <1605052582.45.0.15418530087.issue42294@roundup.psfhosted.org> Change by Ken Jin : ---------- nosy: +kj nosy_count: 5.0 -> 6.0 pull_requests: +22130 pull_request: https://github.com/python/cpython/pull/23227 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 18:57:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Nov 2020 23:57:03 +0000 Subject: [issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef() In-Reply-To: <1604914934.45.0.492738703952.issue42294@roundup.psfhosted.org> Message-ID: <1605052623.89.0.248742060988.issue42294@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 78ba7c69ada2f7eefd4e3ea375337d78dc2ce721 by kj in branch 'master': bpo-42294: Grammar fixes in doc glossary strong/weak refs (GH-23227) https://github.com/python/cpython/commit/78ba7c69ada2f7eefd4e3ea375337d78dc2ce721 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 19:32:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Nov 2020 00:32:44 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1605054763.99.0.406042750502.issue1635741@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22131 pull_request: https://github.com/python/cpython/pull/23234 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 19:34:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Nov 2020 00:34:03 +0000 Subject: [issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef() In-Reply-To: <1604914934.45.0.492738703952.issue42294@roundup.psfhosted.org> Message-ID: <1605054843.36.0.238911554089.issue42294@roundup.psfhosted.org> STINNER Victor added the comment: In bpo-1635741, I added PyModule_AddObjectRef() (commit 8021875bbcf7385e651def51bc597472a569042c): https://docs.python.org/dev/c-api/module.html#c.PyModule_AddObjectRef "Similar to PyModule_AddObject() but don't steal a reference to the value on success." I was tired of bugs caused by misusage of the surprising PyModule_AddObject() API. PyModule_AddObject() *is* useful in some cases, but it is confusing in most cases... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 19:34:48 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 00:34:48 +0000 Subject: [issue6103] Static library (libpythonX.Y.a) installed in incorrect location In-Reply-To: <1243229174.04.0.856181043806.issue6103@psf.upfronthosting.co.za> Message-ID: <1605054888.01.0.576658154975.issue6103@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 19:36:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Nov 2020 00:36:09 +0000 Subject: [issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef() In-Reply-To: <1604914934.45.0.492738703952.issue42294@roundup.psfhosted.org> Message-ID: <1605054969.21.0.907660733767.issue42294@roundup.psfhosted.org> STINNER Victor added the comment: > If you want to work only with non-borrowed references, (...) This is not my goal here. My goal is to reduce the risk of memory leaks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 19:37:09 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 00:37:09 +0000 Subject: [issue1479255] Fix building with SWIG's -c++ option set in setup.py Message-ID: <1605055029.72.0.738270266027.issue1479255@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -3rd party, Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 19:41:13 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 00:41:13 +0000 Subject: [issue3461] smtplib does not fully support IPv6 in EHLO In-Reply-To: <1217282925.26.0.916204427354.issue3461@psf.upfronthosting.co.za> Message-ID: <1605055273.92.0.308928735586.issue3461@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 19:49:17 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 00:49:17 +0000 Subject: [issue1487481] Could BIND_FIRST be removed on HP-UX? Message-ID: <1605055757.67.0.886261591401.issue1487481@roundup.psfhosted.org> Irit Katriel added the comment: Should we close this as out of date or is there anything that can still be done on it? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 19:52:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Nov 2020 00:52:35 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1605055955.46.0.221564331419.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 95ce7cd0a64e7f4739af2d1c158ef69b6980f12a by Victor Stinner in branch 'master': bpo-1635741: Fix typo in PyModule_AddObjectRef() doc (GH-23234) https://github.com/python/cpython/commit/95ce7cd0a64e7f4739af2d1c158ef69b6980f12a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 10 23:36:58 2020 From: report at bugs.python.org (hai shi) Date: Wed, 11 Nov 2020 04:36:58 +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: <1605069418.02.0.217698935697.issue40170@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +22132 pull_request: https://github.com/python/cpython/pull/23235 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 01:27:20 2020 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 11 Nov 2020 06:27:20 +0000 Subject: [issue39931] Global variables are not accessible from child processes (multiprocessing.Pool) In-Reply-To: <1583918452.53.0.6597480705.issue39931@roundup.psfhosted.org> Message-ID: <1605076040.21.0.992932499725.issue39931@roundup.psfhosted.org> Change by Josh Rosenberg : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 01:31:16 2020 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 11 Nov 2020 06:31:16 +0000 Subject: [issue42269] Add ability to set __slots__ in dataclasses In-Reply-To: <1604590694.08.0.0173517280171.issue42269@roundup.psfhosted.org> Message-ID: <1605076276.08.0.673065901593.issue42269@roundup.psfhosted.org> Change by Josh Rosenberg : ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 01:32:38 2020 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 11 Nov 2020 06:32:38 +0000 Subject: [issue42269] Add ability to set __slots__ in dataclasses In-Reply-To: <1604590694.08.0.0173517280171.issue42269@roundup.psfhosted.org> Message-ID: <1605076358.06.0.766955802805.issue42269@roundup.psfhosted.org> Josh Rosenberg added the comment: Is the plan to allow an argument to auto-generate __slots__, or would this require repeating the names once in __slots__, and once for annotations and the like? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 01:47:15 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Nov 2020 06:47:15 +0000 Subject: [issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef() In-Reply-To: <1604914934.45.0.492738703952.issue42294@roundup.psfhosted.org> Message-ID: <1605077235.95.0.449462533384.issue42294@roundup.psfhosted.org> Serhiy Storchaka added the comment: PyModule_AddObject() has unique weird design, it is easy to misuse, and most code misuse it, but fixing it would break the code which uses it correctly. I did not see any problems with PyTuple_GetItem(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 02:11:08 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Nov 2020 07:11:08 +0000 Subject: [issue42301] Add function to exploit heapq structure to locate an index of element In-Reply-To: <1604979368.73.0.815196542676.issue42301@roundup.psfhosted.org> Message-ID: <1605078668.2.0.537591912169.issue42301@roundup.psfhosted.org> Raymond Hettinger added the comment: Marking this as declined for the reasons listed in the PR comments. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 02:14:24 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 11 Nov 2020 07:14:24 +0000 Subject: [issue39411] pyclbr rewrite using AST In-Reply-To: <1579613369.33.0.216761296366.issue39411@roundup.psfhosted.org> Message-ID: <1605078864.51.0.388275604288.issue39411@roundup.psfhosted.org> Batuhan Taskaya added the comment: New changeset fa476fe13255d0360f18528e864540d927560f66 by Batuhan Taskaya in branch 'master': bpo-39411: pyclbr rewrite on AST (#18103) https://github.com/python/cpython/commit/fa476fe13255d0360f18528e864540d927560f66 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 02:30:06 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Nov 2020 07:30:06 +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: <1605079806.05.0.159582529747.issue40932@roundup.psfhosted.org> miss-islington added the comment: New changeset f9a8386e44a695551a1e54e709969e90e9b96bc4 by Ammar Askar in branch 'master': bpo-40932: Note security caveat of shlex.quote on Windows (GH-21502) https://github.com/python/cpython/commit/f9a8386e44a695551a1e54e709969e90e9b96bc4 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 02:31:11 2020 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Wed, 11 Nov 2020 07:31:11 +0000 Subject: [issue15034] Document best practices for exceptions In-Reply-To: <1339118524.85.0.923317590244.issue15034@psf.upfronthosting.co.za> Message-ID: <1605079871.44.0.186636892376.issue15034@roundup.psfhosted.org> Vedran ?a?i? added the comment: Terry: of course, if a method is not overridden, there's no need to call super()'s method, since the only thing it would do is call the same thing that would be called without overriding. But of course, if Exception's __init__ does anything, then super() should be called from the overrridden method. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 02:47:56 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 11 Nov 2020 07:47:56 +0000 Subject: [issue42269] Add ability to set __slots__ in dataclasses In-Reply-To: <1604590694.08.0.0173517280171.issue42269@roundup.psfhosted.org> Message-ID: <1605080876.93.0.573265375591.issue42269@roundup.psfhosted.org> Eric V. Smith added the comment: It would figure it out automatically. See https://github.com/ericvsmith/dataclasses/blob/master/dataclass_tools.py for a decorator that already does this. I'll have a PR ready soon, I hope. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 02:59:55 2020 From: report at bugs.python.org (hongweipeng) Date: Wed, 11 Nov 2020 07:59:55 +0000 Subject: [issue42319] The `functools.singledispatchmethod` example in the document cannot run Message-ID: <1605081595.15.0.657429202369.issue42319@roundup.psfhosted.org> New submission from hongweipeng : https://docs.python.org/zh-cn/3.8/library/functools.html#functools.singledispatchmethod as the code: ``` from functools import singledispatchmethod class Negator: @singledispatchmethod @classmethod def neg(cls, arg): raise NotImplementedError("Cannot negate a") @neg.register @classmethod def _(cls, arg: int): return -arg @neg.register @classmethod def _(cls, arg: bool): return not arg ``` File "/root/.pyenv/versions/3.8.5/lib/python3.8/functools.py", line 907, in register return self.dispatcher.register(cls, func=method) File "/root/.pyenv/versions/3.8.5/lib/python3.8/functools.py", line 849, in register raise TypeError( TypeError: Invalid first argument to `register()`: . Use either `@register(some_class)` or plain `@register` on an annotated function. ---------- assignee: docs at python components: Documentation messages: 380741 nosy: docs at python, hongweipeng priority: normal severity: normal status: open title: The `functools.singledispatchmethod` example in the document cannot run versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 03:54:28 2020 From: report at bugs.python.org (Pierre van de Laar) Date: Wed, 11 Nov 2020 08:54:28 +0000 Subject: [issue42320] unexpected difference between map and list Message-ID: <1605084868.75.0.599724554356.issue42320@roundup.psfhosted.org> New submission from Pierre van de Laar : On windows, with python 3.9, with unittests, My test case fails when I use the following lines of code ``` result = map(lambda x: self.substitute_in_expression(x), sequence.sequence) ``` It works fine with ``` result = list() for x in sequence.sequence: result.append(self.substitute_in_expression(x)) ``` Note that result is used as input for an inherited class instantiation: ``` sequence_type = type(sequence) return sequence_type(result) ``` The classes are constructed using the dataclass decorator! I have unfortunately not have time to make a small reproducer. So I just send the whole project. ---------- files: bug.zip messages: 380742 nosy: Pierre van de Laar priority: normal severity: normal status: open title: unexpected difference between map and list type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file49591/bug.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 04:03:00 2020 From: report at bugs.python.org (Pierre van de Laar) Date: Wed, 11 Nov 2020 09:03:00 +0000 Subject: [issue42320] unexpected difference between map and list In-Reply-To: <1605084868.75.0.599724554356.issue42320@roundup.psfhosted.org> Message-ID: <1605085380.8.0.374189336865.issue42320@roundup.psfhosted.org> Pierre van de Laar added the comment: Zip didn't contain the test cases from the tests directory (sorry for that) ---------- Added file: https://bugs.python.org/file49592/tests.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 04:18:27 2020 From: report at bugs.python.org (igo95862) Date: Wed, 11 Nov 2020 09:18:27 +0000 Subject: [issue42292] C API: Allocating Objects on the Heap. Misleading documentation. In-Reply-To: <1604859698.6.0.558793144076.issue42292@roundup.psfhosted.org> Message-ID: <1605086307.25.0.19368119917.issue42292@roundup.psfhosted.org> igo95862 added the comment: I found out that you can call the type as an object in order to create new object. Example: SdBusMessageObject *new_message_object = (SdBusMessageObject *)PyObject_Call((PyObject *)&SdBusMessageType, dummy_tuple, dummy_dict); This is somewhat not documented. Is this the recommended way to allocate object on heap? I also found out that if you create a custom .tp_free function for the type it must call PyObject_Free(self); otherwise you leak memory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 05:23:30 2020 From: report at bugs.python.org (Pierre van de Laar) Date: Wed, 11 Nov 2020 10:23:30 +0000 Subject: [issue42320] unexpected difference between map and list In-Reply-To: <1605084868.75.0.599724554356.issue42320@roundup.psfhosted.org> Message-ID: <1605090210.35.0.717470440679.issue42320@roundup.psfhosted.org> Pierre van de Laar added the comment: Not a bug: tuple is an iterator but an iterator is not a tuple. Yet iterators are often accepted during initialization... ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 05:59:12 2020 From: report at bugs.python.org (conchylicultor) Date: Wed, 11 Nov 2020 10:59:12 +0000 Subject: [issue33129] Add kwarg-only option to dataclass In-Reply-To: <1521847997.9.0.467229070634.issue33129@psf.upfronthosting.co.za> Message-ID: <1605092352.11.0.792686807112.issue33129@roundup.psfhosted.org> conchylicultor added the comment: Solving this would significantly improve @dataclass inheritance (https://bugs.python.org/issue39300). Any idea when this will land ? Currently, it is not possible to add required argument to a child dataclass (unless hacks like duplicating attributes): ``` import dataclasses @dataclasses.dataclass class A: x: int = 1 @dataclasses.dataclass class B(A): y: int # ERROR: non-default argument follows default argument ``` Keywords-only would solve this issue: ``` @dataclasses.dataclass class B(A): y: int = dataclasses.field(kw_only=True) B(123, y=456) ``` Note: Attrs already support this: https://www.attrs.org/en/stable/examples.html#keyword-only-attributes For the behavior, I think there are two options: ``` class A: a0: int a1: int = field(kw_only=True) a2: int class B(A): b0: int b1: int = field(kw_only=True) b2: int ``` Option 1: All attributes following `kw_only` are `kw_only` (kw_only indicates where to place '*') A(a0, *, a1, a2) B(a0, b0, *, a1, a2, b1, b2) Option 2: `kw_only` are individually moved to the end A(a0, a2, *, a1) B(a0, a2, b0, b2, *, a1, b1) I personally prefer Option 1, as it makes it easier to place the `*` with less boilerplate. ``` class Request: url: str timeout: int = field(default=-1, kw_only=True) verify: bool = False params: Optional[Dict[str, str]] = None cookies: Optional[Dict[str, str]] = None Request(url, *, timeout=-1, verify=False, params=None, cookies=None) ``` Which looks better than: ``` class Request: url: str timeout: int = field(default=-1, kw_only=True) verify: bool = field(default=False, kw_only=True) params: Optional[Dict[str, str]] = field(default=None, kw_only=True) cookies: Optional[Dict[str, str]] = field(default=None, kw_only=True) ``` ---------- nosy: +conchylicultor _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 06:09:05 2020 From: report at bugs.python.org (Maarten) Date: Wed, 11 Nov 2020 11:09:05 +0000 Subject: [issue42321] Limitations of building a static python library on Windows (MSVC) Message-ID: <1605092944.99.0.846170667375.issue42321@roundup.psfhosted.org> New submission from Maarten : `PCbuild/readme.txt` contains a little paragraph about how to build a static python library. The resulting static `python.lib` library contains all python C API functions. Windows DLL's don't allow missing symbols, so C extensions modules must link with a library containing the python C API symbols. When a C extension links to the static python library, it will contain a copy of all python symbols. This means that python C symbols are used twice: once by a static python.exe executable, and once for each C extension (_extension.pyw). Is there a way to use C extensions with a static Windows python.exe wuch that the python symbols are used only once? Does a statically built Windows python.exe support C extension modules at all? Thanks I'm currently working on a conan build recipe for cpython at https://github.com/conan-io/conan-center-index/pull/1510 Fow now, I'm disabling extensions on a static MSVC build. ---------- components: Windows messages: 380747 nosy: maarten, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Limitations of building a static python library on Windows (MSVC) 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 Nov 11 06:19:11 2020 From: report at bugs.python.org (Amir Naseredini) Date: Wed, 11 Nov 2020 11:19:11 +0000 Subject: [issue42322] Spectre mitigations in CPython interpreter Message-ID: <1605093551.24.0.524478744349.issue42322@roundup.psfhosted.org> New submission from Amir Naseredini : I was looking up everywhere and could not find any mitigations for Spectre attack by a Python interpreter(CPython)! I don't know if my question is correct or how feasible it is, but does anyone know if there are any mitigations for different variants of Spectre attacks Specter v1 (Spectre-PHT), v2 (Spectre-BTB), v4 (Spectre-STL) and v5 (Spectre-RSB) at the interpreter level for Python? Looking forward to hearing from you guys :) ---------- components: Interpreter Core messages: 380748 nosy: sahnaseredini priority: normal severity: normal status: open title: Spectre mitigations in CPython interpreter type: security versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 06:20:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Nov 2020 11:20:06 +0000 Subject: [issue42322] Spectre mitigations in CPython interpreter In-Reply-To: <1605093551.24.0.524478744349.issue42322@roundup.psfhosted.org> Message-ID: <1605093606.54.0.487998569705.issue42322@roundup.psfhosted.org> STINNER Victor added the comment: You can try to use a C compiler which implements workarounds, but I don't think that anything should be done directly in CPython. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 06:22:15 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Nov 2020 11:22:15 +0000 Subject: [issue42085] Add dedicated slot for sending values In-Reply-To: <1603136296.98.0.312180912341.issue42085@roundup.psfhosted.org> Message-ID: <1605093735.58.0.267350487919.issue42085@roundup.psfhosted.org> STINNER Victor added the comment: > New changeset 1e996c3a3b51e9c6f1f4cea8a6dbcf3bcb865060 by Vladimir Matveev in branch 'master': This change introduced big reference leaks: 4 tests failed: test_asyncgen test_asyncio test_coroutines test_unittest Example: $ ./python -m test test_asyncgen -R 3:3 -m test.test_asyncgen.AsyncGenAsyncioTest.test_async_gen_asyncio_03 (...) test_asyncgen leaked [63, 63, 63] references, sum=189 (...) Please fix the leak, or revert if nobody is avaible to fix it: https://pythondev.readthedocs.io/ci.html#revert-on-fail ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 06:34:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Nov 2020 11:34:58 +0000 Subject: [issue42323] [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX Message-ID: <1605094498.01.0.809514320528.issue42323@roundup.psfhosted.org> New submission from STINNER Victor : https://buildbot.python.org/all/#/builders/302/builds/338 FAIL: test_nextafter (test.test_math.MathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/aixtools/buildarea/3.9.aixtools-aix-power6/build/Lib/test/test_math.py", line 1968, in test_nextafter self.assertIsNaN(math.nextafter(NAN, 1.0)) File "/home/aixtools/buildarea/3.9.aixtools-aix-power6/build/Lib/test/test_math.py", line 2015, in assertIsNaN self.fail("Expected a NaN, got {!r}.".format(value)) AssertionError: Expected a NaN, got 1.0. The test: # NaN self.assertIsNaN(math.nextafter(NAN, 1.0)) # <=== HERE self.assertIsNaN(math.nextafter(1.0, NAN)) self.assertIsNaN(math.nextafter(NAN, NAN)) The Linux manual page says: "If x or y is a NaN, a NaN is returned." https://man7.org/linux/man-pages/man3/nextafter.3.html But it seems like the AIX libc doesn't implement this rule. Should we implement this rule in Python on AIX? The strange thing is that it worked previously. test.python of build 338: platform.platform: AIX-2-00F9C1964C00-powerpc-32bit sysconfig[HOST_GNU_TYPE]: powerpc-ibm-aix7.2.4.0 platform.architecture: 32bit The latest green build is built 347. test.pythoninfo of build 347: platform.architecture: 32bit platform.platform: AIX-2-00F9C1964C00-powerpc-32bit sysconfig[HOST_GNU_TYPE]: powerpc-ibm-aix7.2.0.0 Was the machine updated two days ago (2020-11-09), between build 338 and build 347? ---------- components: Tests messages: 380751 nosy: lemburg, mark.dickinson, rhettinger, stutzbach, vstinner priority: normal severity: normal status: open title: [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 06:57:50 2020 From: report at bugs.python.org (Konrad Schwarz) Date: Wed, 11 Nov 2020 11:57:50 +0000 Subject: [issue42324] Doctest: directives Message-ID: <1605095870.49.0.104658534517.issue42324@roundup.psfhosted.org> New submission from Konrad Schwarz : In both PDF and HTML, the examples for Doctest directives don't actually show the directives themselves, perhaps because they syntactically start with a #. ---------- assignee: docs at python components: Documentation messages: 380752 nosy: docs at python, konrad.schwarz priority: normal severity: normal status: open title: Doctest: directives type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 07:06:00 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Nov 2020 12:06:00 +0000 Subject: [issue42324] Doctest: directives In-Reply-To: <1605095870.49.0.104658534517.issue42324@roundup.psfhosted.org> Message-ID: <1605096360.37.0.876926157463.issue42324@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Is this similar to https://bugs.python.org/issue36675 ? ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 07:07:02 2020 From: report at bugs.python.org (Dirkjan Ochtman) Date: Wed, 11 Nov 2020 12:07:02 +0000 Subject: [issue6103] Static library (libpythonX.Y.a) installed in incorrect location In-Reply-To: <1243229174.04.0.856181043806.issue6103@psf.upfronthosting.co.za> Message-ID: <1605096422.39.0.879227170997.issue6103@roundup.psfhosted.org> Change by Dirkjan Ochtman : ---------- nosy: -djc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 07:07:01 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Nov 2020 12:07:01 +0000 Subject: [issue42323] [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX In-Reply-To: <1605094498.01.0.809514320528.issue42323@roundup.psfhosted.org> Message-ID: <1605096421.94.0.529746479455.issue42323@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +Michael.Felt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 07:27:04 2020 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 11 Nov 2020 12:27:04 +0000 Subject: [issue42314] Incorrect documentation entry for venv In-Reply-To: <1605024385.28.0.0225045754789.issue42314@roundup.psfhosted.org> Message-ID: <1605097624.72.0.622332055231.issue42314@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 07:39:26 2020 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 11 Nov 2020 12:39:26 +0000 Subject: [issue42323] [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX In-Reply-To: <1605094498.01.0.809514320528.issue42323@roundup.psfhosted.org> Message-ID: <1605098366.89.0.422652708685.issue42323@roundup.psfhosted.org> Mark Dickinson added the comment: If AIX were one of our officially supported platforms, then yes, I'd say that we should add a workaround to handle special cases ourselves, similarly to what we already do for a number of math module functions (like math.pow, for example). But given that it's only a "best effort" platform, I'm not convinced that it's worth the effort or the extra complication in the codebase. -0 from me, I guess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 07:41:05 2020 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 11 Nov 2020 12:41:05 +0000 Subject: [issue42323] [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX In-Reply-To: <1605094498.01.0.809514320528.issue42323@roundup.psfhosted.org> Message-ID: <1605098465.22.0.454358599517.issue42323@roundup.psfhosted.org> Mark Dickinson added the comment: Is there any reasonable channel for reporting the issue upstream? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 07:41:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Nov 2020 12:41:32 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1605098492.31.0.787745402202.issue1635741@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22134 pull_request: https://github.com/python/cpython/pull/23236 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 07:41:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Nov 2020 12:41:32 +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: <1605098492.19.0.521785178748.issue40170@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22133 pull_request: https://github.com/python/cpython/pull/23236 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 08:26:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Nov 2020 13:26:31 +0000 Subject: [issue42323] [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX In-Reply-To: <1605094498.01.0.809514320528.issue42323@roundup.psfhosted.org> Message-ID: <1605101191.42.0.884912059597.issue42323@roundup.psfhosted.org> STINNER Victor added the comment: My worry is that I'm getting emails about AIX buildbot failures. I see different options: * Skip the test on AIX * Fix nextafter() on AIX * Turn off AIX buildbot email notifications * Remove thE AIX buildbot ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 08:28:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Nov 2020 13:28:00 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1605101280.42.0.309542225027.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset ba2958ed40d284228836735cbed4a155190e0998 by Victor Stinner in branch 'master': bpo-40170: Fix PyType_Ready() refleak on static type (GH-23236) https://github.com/python/cpython/commit/ba2958ed40d284228836735cbed4a155190e0998 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 08:28:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Nov 2020 13:28:00 +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: <1605101280.33.0.912132437176.issue40170@roundup.psfhosted.org> STINNER Victor added the comment: New changeset ba2958ed40d284228836735cbed4a155190e0998 by Victor Stinner in branch 'master': bpo-40170: Fix PyType_Ready() refleak on static type (GH-23236) https://github.com/python/cpython/commit/ba2958ed40d284228836735cbed4a155190e0998 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 08:28:36 2020 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 11 Nov 2020 13:28:36 +0000 Subject: [issue42140] asyncio.wait function creates futures set two times In-Reply-To: <1603522282.48.0.50359686965.issue42140@roundup.psfhosted.org> Message-ID: <1605101316.58.0.912017515821.issue42140@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 08:49:40 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Wed, 11 Nov 2020 13:49:40 +0000 Subject: [issue42269] Add ability to set __slots__ in dataclasses In-Reply-To: <1604590694.08.0.0173517280171.issue42269@roundup.psfhosted.org> Message-ID: <1605102580.49.0.88437309193.issue42269@roundup.psfhosted.org> Jakub Stasiak added the comment: As a moderately-heavy dataclass user I support this. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 08:55:13 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Nov 2020 13:55:13 +0000 Subject: [issue42322] Spectre mitigations in CPython interpreter In-Reply-To: <1605093551.24.0.524478744349.issue42322@roundup.psfhosted.org> Message-ID: <1605102913.91.0.299237908346.issue42322@roundup.psfhosted.org> Serhiy Storchaka added the comment: AFAIK Spectre attacks rely on precise time measures. But Python is very far from bare hardware. Pure Python code is 10-100 times slower than compiled C or jitted JavaScript, and the variance is high, so it is hard to get stable results in benchmarks. Simple a=b+c can causes execution of hundreds or thousands of microprocessor instructions, numerous memory read and write operations, calling many subroutines, memory allocations and deallocations. I have doubts that it is practical to use Spectre attacks on pure Python. Of course, if you use high-performance extensions to work with sensitive data, they can be vulnerable to attack if the attacker code is in the other extension. You can counteract this by building that extensions with a C compiler which implements workarounds. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 08:57:47 2020 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 11 Nov 2020 13:57:47 +0000 Subject: [issue42325] UnicodeDecodeError executing ./setup.py during build Message-ID: <1605103067.76.0.762518596297.issue42325@roundup.psfhosted.org> New submission from Skip Montanaro : I recently replaced Ubuntu 20.04 with Manjaro 20.2. In the process my Python builds broke in the sharedmods target of the Makefile. The tail end of the traceback is: ? File "/home/skip/src/python/cpython/./setup.py", line 246, in grep_headers_for ? ? if function in f.read(): ? File "/home/skip/src/python/cpython/Lib/codecs.py", line 322, in decode ? ? (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb4 in position 1600: invalid start byte The grep_headers_for() function in setup.py appeared to be the culprit, so I added a print statement to its loop: def grep_headers_for(function, headers): ? ? for header in headers: ? ? ? ? print("***", header, file=sys.stderr) ? ? ? ? with open(header, 'r') as f: ? ? ? ? ? ? if function in f.read(): ? ? ? ? ? ? ? ? return True ? ? return False which printed these lines: *** /usr/include/umfpack_report_perm.h *** /usr/include/dbstl_dbc.h *** /usr/include/itclTclIntStubsFcn.h *** /usr/include/dbstl_vector.h *** /usr/include/cholmod_blas.h *** /usr/include/amd.h *** /usr/include/m17n-X.h Sure enough, that m17n-X.h file (attached) doesn't contain utf-8 (my environment's encoding). According to the Emacs coding cookie at the end, the file is euc-japan encoded. Would simply catching the exception in grep_headers_for() be the correct way to deal with this? ---------- components: Build files: m17n-X.h messages: 380761 nosy: skip.montanaro priority: normal severity: normal status: open title: UnicodeDecodeError executing ./setup.py during build versions: Python 3.10 Added file: https://bugs.python.org/file49593/m17n-X.h _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 09:01:02 2020 From: report at bugs.python.org (Ken Jin) Date: Wed, 11 Nov 2020 14:01:02 +0000 Subject: [issue42317] Docs of `typing.get_args`: Mention that due to caching of typing generics the order of arguments for Unions can be different from the one of the returned tuple In-Reply-To: <1605036937.3.0.364895182043.issue42317@roundup.psfhosted.org> Message-ID: <1605103262.2.0.921451024464.issue42317@roundup.psfhosted.org> Ken Jin added the comment: You're right, currently this happens for 2 reasons: 1. _SpecialGenericAlias (used by List), caches its __getitem__. (As you already pointed out :) ) 2. _UnionGenericAlias (Union)'s __hash__ is `hash(frozenset(self.__args__))`. i.e. Unions with different args orders but same unique args produce the same hash result. Causing the same cache hit. I find it mildly sad however that: >>> get_args(Union[int, str]) [int, str] >>> get_args(Union[str, int]) [str, int] Which is slightly inconsistent with its behavior when nested in List. I don't think there's an easy way to fix this without breaking the cache (and also it makes sense that Unions' args aren't order dependent). So I'm all for updating the docs with your addition (slightly edited): > If `X` is a `Union`, the order of `(Y, Z, ...)` may be different from the order of the original arguments `[Y, Z, ...]`. ---------- nosy: +gvanrossum, kj, levkivskyi versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 09:07:59 2020 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 11 Nov 2020 14:07:59 +0000 Subject: [issue42085] Add dedicated slot for sending values In-Reply-To: <1603136296.98.0.312180912341.issue42085@roundup.psfhosted.org> Message-ID: <1605103679.44.0.839216500971.issue42085@roundup.psfhosted.org> Andrew Svetlov added the comment: Investigating. The test leaks a future instance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 09:15:03 2020 From: report at bugs.python.org (Hynek Schlawack) Date: Wed, 11 Nov 2020 14:15:03 +0000 Subject: [issue42014] shutil.rmtree calls onerror with different function than failed In-Reply-To: <1602507255.43.0.726203818853.issue42014@roundup.psfhosted.org> Message-ID: <1605104103.6.0.180848797464.issue42014@roundup.psfhosted.org> Change by Hynek Schlawack : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 09:59:08 2020 From: report at bugs.python.org (DanilZ) Date: Wed, 11 Nov 2020 14:59:08 +0000 Subject: [issue42245] concurrent.futures.ProcessPoolExecutor freezes depending on complexity In-Reply-To: <1604332990.12.0.126899957704.issue42245@roundup.psfhosted.org> Message-ID: <8CEAF38D-1BAE-42A6-9BFF-00A4E3BFD197@me.com> DanilZ added the comment: I have managed to solve the problem by inserting in the beginning of my program: import multiprocessing multiprocessing.set_start_method('forkserver') as this is explained here: https://scikit-learn.org/stable/faq.html#why-do-i-sometime-get-a-crash-freeze-with-n-jobs-1-under-osx-or-linux It works, but the shell looses some level of interactivity as the results intermediate results don't get printed as the program is executed. > On 2 Nov 2020, at 19:03, Ken Jin wrote: > > > Ken Jin added the comment: > > Hmm apologies I'm stumped then. The only things I managed to surmise from xgboost's and scikit-learn's GitHub issues is that this is a recurring issue specifically when using GridSearchCV : > > Threads with discussions on workarounds: > https://github.com/scikit-learn/scikit-learn/issues/6627 > https://github.com/scikit-learn/scikit-learn/issues/5115 > > Issues reported: > https://github.com/dmlc/xgboost/issues/2163 > https://github.com/scikit-learn/scikit-learn/issues/10533 > https://github.com/scikit-learn/scikit-learn/issues/10538 (this looks quite similar to your issue) > > Some quick workarounds I saw were: > 1. Remove n_jobs argument from GridSearchCV > 2. Use parallel_backend from sklearn.externals.joblib rather than concurrent.futures so that the pools from both libraries don't have weird interactions. > > I recommend opening an issue on scikit-learn/XGBoost's GitHub. This seems like a common problem that they face. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 10:02:07 2020 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 11 Nov 2020 15:02:07 +0000 Subject: [issue42085] Add dedicated slot for sending values In-Reply-To: <1603136296.98.0.312180912341.issue42085@roundup.psfhosted.org> Message-ID: <1605106927.95.0.45854797615.issue42085@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +22135 pull_request: https://github.com/python/cpython/pull/23237 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 10:07:38 2020 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 11 Nov 2020 15:07:38 +0000 Subject: [issue42085] Add dedicated slot for sending values In-Reply-To: <1603136296.98.0.312180912341.issue42085@roundup.psfhosted.org> Message-ID: <1605107258.06.0.0214653872213.issue42085@roundup.psfhosted.org> Andrew Svetlov added the comment: PR for the fix is created: https://github.com/python/cpython/pull/23237 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 10:12:14 2020 From: report at bugs.python.org (Ken Jin) Date: Wed, 11 Nov 2020 15:12:14 +0000 Subject: [issue42245] concurrent.futures.ProcessPoolExecutor freezes depending on complexity In-Reply-To: <1604324035.95.0.0561998847241.issue42245@roundup.psfhosted.org> Message-ID: <1605107534.92.0.110251054032.issue42245@roundup.psfhosted.org> Ken Jin added the comment: Danil, thanks for finding the cause behind this. Could you check if the new behavior in Python 3.8 and higher has the same problem on your machine (without your fix)? multiprocessing on MacOS started using spawn in 3.8, and I was wondering if it that fixed it. What's new entry for 3.8 : https://docs.python.org/3/whatsnew/3.8.html#multiprocessing The bug tracked: https://bugs.python.org/issue33725 The PR for that https://github.com/python/cpython/pull/13603/files ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 10:13:21 2020 From: report at bugs.python.org (hai shi) Date: Wed, 11 Nov 2020 15:13:21 +0000 Subject: [issue41832] PyType_FromSpec() should accept tp_doc=NULL In-Reply-To: <1600770571.99.0.249807543427.issue41832@roundup.psfhosted.org> Message-ID: <1605107601.25.0.403838994737.issue41832@roundup.psfhosted.org> hai shi added the comment: > The PR entirely removed the note that a slot's value "May not be NULL". > In fact, only tp_doc may be NULL. AFAIK, the restriction is still there > for other slots. > Can that note be added back? `May not be NULL` means everthing is possible, so I decided removed it:( Before, I updated an old commit in PR23123 to describe this fact in https://github.com/python/cpython/pull/23123/commits/cca7bc7edf11a7d212ae70dcff6f10cf96fab470. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 10:23:24 2020 From: report at bugs.python.org (DanilZ) Date: Wed, 11 Nov 2020 15:23:24 +0000 Subject: [issue42245] concurrent.futures.ProcessPoolExecutor freezes depending on complexity In-Reply-To: <1605107534.92.0.110251054032.issue42245@roundup.psfhosted.org> Message-ID: <0A25EED3-EBC2-4C8F-8828-8C12A2742AEF@me.com> DanilZ added the comment: Hi Ken, Thanks for your comment. Unfortunately at the time I can not upgrade to 3.8 to run this test. My whole system depends on 3.7 and some peculiarities of 3.8 need to be dealt with. It would be great if someone with OSX and 3.8 could test this out, otherwise I will dig into this later creating a new environment. > On 11 Nov 2020, at 18:12, Ken Jin wrote: > > > Ken Jin added the comment: > > Danil, thanks for finding the cause behind this. Could you check if the new behavior in Python 3.8 and higher has the same problem on your machine (without your fix)? multiprocessing on MacOS started using spawn in 3.8, and I was wondering if it that fixed it. > > What's new entry for 3.8 : > https://docs.python.org/3/whatsnew/3.8.html#multiprocessing > > The bug tracked: > https://bugs.python.org/issue33725 > > The PR for that > https://github.com/python/cpython/pull/13603/files > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 11:10:50 2020 From: report at bugs.python.org (Xtrem532) Date: Wed, 11 Nov 2020 16:10:50 +0000 Subject: [issue42269] Add ability to set __slots__ in dataclasses In-Reply-To: <1604590694.08.0.0173517280171.issue42269@roundup.psfhosted.org> Message-ID: <1605111050.43.0.99004912143.issue42269@roundup.psfhosted.org> Change by Xtrem532 : ---------- nosy: +Xtrem532 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 11:31:16 2020 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 11 Nov 2020 16:31:16 +0000 Subject: [issue42323] [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX In-Reply-To: <1605094498.01.0.809514320528.issue42323@roundup.psfhosted.org> Message-ID: <1605112276.45.0.87659071897.issue42323@roundup.psfhosted.org> Mark Dickinson added the comment: > My worry is that I'm getting emails about AIX buildbot failures. That sounds more like a process problem than a CPython codebase one. The ideal would be that the machinery sending those notifications can be configured to ignore known failures when deciding whether to send email. Is that remotely feasible? (I have zero familiarity with the buildbot machinery.) Skipping the test on AIX sounds like a reasonable option, but I kinda *want* IBM developers running the Python test suite on AIX to see those failures, in the hope that they might then be motivated to push for a fix to the relevant AIX bug. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 11:50:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Nov 2020 16:50:35 +0000 Subject: [issue42085] Add dedicated slot for sending values In-Reply-To: <1603136296.98.0.312180912341.issue42085@roundup.psfhosted.org> Message-ID: <1605113435.79.0.32209759609.issue42085@roundup.psfhosted.org> STINNER Victor added the comment: Thanks! The change fixed the leak: $ ./python -m test -j0 -R 3:3 test_asyncgen test_coroutines test_unittest # test_asyncio (...) Tests result: SUCCESS I didn't run test_asyncio because the test is too slow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 11:46:56 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Nov 2020 16:46:56 +0000 Subject: [issue42085] Add dedicated slot for sending values In-Reply-To: <1603136296.98.0.312180912341.issue42085@roundup.psfhosted.org> Message-ID: <1605113216.99.0.769928293842.issue42085@roundup.psfhosted.org> STINNER Victor added the comment: commit cda99b4022daa08ac74b0420e9903cce883d91c6 (HEAD -> master, upstream/master) Author: Andrew Svetlov Date: Wed Nov 11 17:48:53 2020 +0200 Fix memory leak introduced by GH-22780 (GH-23237) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 12:07:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Nov 2020 17:07:22 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1605114442.38.0.418461192478.issue42260@roundup.psfhosted.org> STINNER Victor added the comment: > I would like to request that this ability to dynamically load Python DLLs remains even with any new initialization mechanism. I don't plan to remove any feature :-) > As another note, the main issues we run into are configuring the Python path to properly find packages and DLLs. Do you mean sys.path? If yes, that's one of the goal of this issue. Allow you to write your own Python code to configure sys.path, rather than having to write C code, before the first (external) import. How do you configure sys.path currently? Do you parse a configuration file? Do you use a registry key on Windows? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 12:08:24 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 17:08:24 +0000 Subject: [issue7611] shlex not posix compliant when parsing "foo#bar" In-Reply-To: <1262248963.08.0.673944744724.issue7611@psf.upfronthosting.co.za> Message-ID: <1605114504.8.0.296126385437.issue7611@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.9 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 11:50:00 2020 From: report at bugs.python.org (mendelmaleh) Date: Wed, 11 Nov 2020 16:50:00 +0000 Subject: [issue42258] argparse: show choices once per argument In-Reply-To: <1604759804.47.0.479014020006.issue42258@roundup.psfhosted.org> Message-ID: <1605113400.04.0.159609119509.issue42258@roundup.psfhosted.org> mendelmaleh added the comment: When using more than one flag for an argument, it is redundant to have the choices more than once, since they are the same argument and have the same choices. Showing it once means cleaner output, and often means that the other option lines are shorter, like in the test case. ### sample code ```py import argparse ap = argparse.ArgumentParser(allow_abbrev=False) ap.add_argument('-c', '--choices', choices=['a', 'b', 'c']) ap.parse_args() ``` ### previous output ``` usage: main.py [-h] [-c {a,b,c}] optional arguments: -h, --help show this help message and exit -c {a,b,c}, --choices {a,b,c} ``` ### new output ``` usage: main.py [-h] [-c {a,b,c}] optional arguments: -h, --help show this help message and exit -c, --choices {a,b,c} ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 11:52:25 2020 From: report at bugs.python.org (Chris Meyer) Date: Wed, 11 Nov 2020 16:52:25 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1605113545.69.0.554903444981.issue42260@roundup.psfhosted.org> Chris Meyer added the comment: Responding to your request for feedback on Python-Dev: We embed Python dynamically by finding the libPython DLL, loading it, and looking up the required symbols. We make appropriate define's so that the Python headers (and NumPy headers) point to our functions which in turn point to the looked up symbols. Our launcher works on Linux, macOS, and Windows and works with many environments including standard Python and conda and brew. It also supports virtual environments in most cases. Also, a single executable [per platform] is able to work with Python versions 3.7 - 3.9 (3.6 was recently dropped, but only for external reasons). So my comment is not directly addressing the usefulness of configuring Python initialization - but I would like to request that this ability to dynamically load Python DLLs remains even with any new initialization mechanism. As another note, the main issues we run into are configuring the Python path to properly find packages and DLLs. A goal of ours is to be able to provide the base application as a drag-and-drop style installer with its own full embedded Python distribution (but still loaded dynamically) and then be able to supply additional plug-in packages (Python packages) by drag and drop. This is somewhat similar to conda packaging but without support for command line tools. ---------- nosy: +cmeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 11:54:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Nov 2020 16:54:11 +0000 Subject: [issue42323] [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX In-Reply-To: <1605094498.01.0.809514320528.issue42323@roundup.psfhosted.org> Message-ID: <1605113651.68.0.599075550602.issue42323@roundup.psfhosted.org> STINNER Victor added the comment: > That sounds more like a process problem than a CPython codebase one. The ideal would be that the machinery sending those notifications can be configured to ignore known failures when deciding whether to send email. Is that remotely feasible? (I have zero familiarity with the buildbot machinery.) If a test fails all the time and not randomly, a single email is sent at the first failure. I'm annoyed by test_threading which crash randomly on AIX: https://bugs.python.org/issue40068 It's a known issue, I already fixed 3/4 of the issue, but I didn't fix the remaining part. In the past, I already disabled AIX email notifications simply because there was nobody to fix issues, and so emails were just spam. > but I kinda *want* IBM developers running the Python test suite on AIX to see those failures, in the hope that they might then be motivated to push for a fix to the relevant AIX bug. :-) Well, that would be great. I'm not sure if Michael Felt is still working on supporting AIX in Python. David Edelsohn might help. ---------- nosy: +David.Edelsohn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 12:17:51 2020 From: report at bugs.python.org (MineRobber___T) Date: Wed, 11 Nov 2020 17:17:51 +0000 Subject: [issue42326] Add verify_callback hook capability to the SSL lib Message-ID: <1605115071.16.0.0518797822596.issue42326@roundup.psfhosted.org> New submission from MineRobber___T : The SSL library currently lacks the ability to accept a client certificate without attempting to verify it. To alleviate this issue, I was thinking that an attribute could be added to the ssl.SSLContext class along the lines of `verify_callback` (similar to how the SNI callback is handled) which would allow the implementation of custom cert verification. I'd be willing to help work on this, if I knew where to even begin. ---------- assignee: christian.heimes components: SSL messages: 380776 nosy: MineRobber9000, alex, christian.heimes, dstufft, janssen priority: normal severity: normal status: open title: Add verify_callback hook capability to the SSL lib type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 12:38:11 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 17:38:11 +0000 Subject: [issue979658] Improve HTML documentation of a directory Message-ID: <1605116291.07.0.5424092969.issue979658@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.9 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 12:46:43 2020 From: report at bugs.python.org (Chris Meyer) Date: Wed, 11 Nov 2020 17:46:43 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1605116803.53.0.805529342911.issue42260@roundup.psfhosted.org> Chris Meyer added the comment: > How do you configure sys.path currently? Do you parse a configuration file? Do you use a registry key on Windows? We have several launch scenarios - but for the currently most common one, which is to launch using a separate, existing Python environment, we call Py_SetPythonHome and Py_SetPath with the home directory of the environment. Then, presumably, the more complete path gets set in either Py_Initialize or when we call PyImport_ImportModule(?sys?). I might have tracked the details down once, but I don't recall them. By the time our Python code starts running, sys.path is reasonably populated. However, in another scenario, we launch with an embedded Python environment, essentially a virtual environment. In that case, we have a config file to explicitly add lib, DLLs, and site packages. But something goes wrong [cannot find/load the unicode DLL IIRC] unless we call site.addsitedir for each directory already in sys.path near the start of our Python portion of code. My notes point to two issues to explain this: https://bugs.python.org/issue22213 and https://bugs.python.org/issue35706. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 12:20:30 2020 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 11 Nov 2020 17:20:30 +0000 Subject: [issue42085] Add dedicated slot for sending values In-Reply-To: <1603136296.98.0.312180912341.issue42085@roundup.psfhosted.org> Message-ID: <1605115230.97.0.962907866.issue42085@roundup.psfhosted.org> Andrew Svetlov added the comment: Thank you Victor for the report! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 12:54:03 2020 From: report at bugs.python.org (Chris Meyer) Date: Wed, 11 Nov 2020 17:54:03 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1605117243.43.0.90669635792.issue42260@roundup.psfhosted.org> Chris Meyer added the comment: >> I would like to request that this ability to dynamically load Python DLLs remains even with any new initialization mechanism. > I don't plan to remove any feature :-) I am glad to hear that. I'm somewhat nervous about it nevertheless. In particular, the implementation of Py_DECREF changed from 3.7 to 3.8 to 3.9. 3.7 worked entirely in a header; but 3.8 had a quirky definition of _Py_Dealloc which used _Py_Dealloc_inline but was defined out of order (used before defined). This was somewhat addressed in https://github.com/python/cpython/pull/18361/files; however 3.9 now has another mechanism that defines _Py_Dealloc in Objects/object.c. This isn't a major problem because it has the same implementation as before, but changes like this have the potential to make the launcher binary be version specific. Again, not a deal breaker, but it still makes me nervous. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 12:57:04 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 17:57:04 +0000 Subject: [issue6225] Fixing several minor bugs in Tkinter.Canvas and one in Misc._configure In-Reply-To: <1244325396.24.0.788727463424.issue6225@psf.upfronthosting.co.za> Message-ID: <1605117424.21.0.314356942264.issue6225@roundup.psfhosted.org> Irit Katriel added the comment: Since the code looks so different from the patch now, shall we close this as out of date? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 12:30:59 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 17:30:59 +0000 Subject: [issue2449] Improved serialization error logging in xmlrpclib In-Reply-To: <1206131988.04.0.901893858067.issue2449@psf.upfronthosting.co.za> Message-ID: <1605115859.42.0.778684918954.issue2449@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 12:33:47 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 17:33:47 +0000 Subject: [issue9420] gdbm with /usr/include/ndbm.h In-Reply-To: <1280424380.77.0.379026276123.issue9420@psf.upfronthosting.co.za> Message-ID: <1605116027.26.0.744379450057.issue9420@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 12:37:17 2020 From: report at bugs.python.org (David Edelsohn) Date: Wed, 11 Nov 2020 17:37:17 +0000 Subject: [issue42323] [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX In-Reply-To: <1605094498.01.0.809514320528.issue42323@roundup.psfhosted.org> Message-ID: <1605116237.14.0.752941829713.issue42323@roundup.psfhosted.org> David Edelsohn added the comment: nextafter is a known problem on AIX. I believe that it is being addressed in newer releases of AIX. Michael and I are helping the IBM AIX Open Source team to increase their attention on Python, but things only move so fast. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 13:10:05 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 11 Nov 2020 18:10:05 +0000 Subject: [issue42317] Docs of `typing.get_args`: Mention that due to caching of typing generics the order of arguments for Unions can be different from the one of the returned tuple In-Reply-To: <1605036937.3.0.364895182043.issue42317@roundup.psfhosted.org> Message-ID: <1605118205.31.0.640864053494.issue42317@roundup.psfhosted.org> Guido van Rossum added the comment: Agreed it's mildly sad, and I wish the cache could preserve the order in List[Union[int, str]], but for that to work we'd have to change how the cache works, which feels complex, or we'd have to chance things so that Union[int, str] != Union[str, int], which seems wrong as well (and we've had them equal for many releases so this would break code). Fixing the cache would require adding a new comparison method to all generic type objects, and that just doesn't seem worth the effort (but I'd be open to this solution in the future). So for now, let's document that get_args() may swap Union arguments. ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 12:43:58 2020 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 11 Nov 2020 17:43:58 +0000 Subject: [issue41832] PyType_FromSpec() should accept tp_doc=NULL In-Reply-To: <1600770571.99.0.249807543427.issue41832@roundup.psfhosted.org> Message-ID: <1605116638.98.0.596222942731.issue41832@roundup.psfhosted.org> Petr Viktorin added the comment: > `May not be NULL` means everthing is possible No, it does not. It only means a slot's value may not be NULL, which is an important difference between slots and entries in the PyTypeObject structure. It's OK that it's mentioned elsewhere, but can we please put it back in the docs of PyType_Slot? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 13:27:16 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 18:27:16 +0000 Subject: [issue10709] Misc/AIX-NOTES needs updating In-Reply-To: <1292428256.05.0.89055748757.issue10709@psf.upfronthosting.co.za> Message-ID: <1605119236.41.0.374677753183.issue10709@roundup.psfhosted.org> Irit Katriel added the comment: The version in the patch was added as Misc/README.AIX, and the backporting 2.7 and 3.1 is no longer relevant. ---------- nosy: +iritkatriel stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 13:27:35 2020 From: report at bugs.python.org (=?utf-8?q?G=C3=B6ran_Uddeborg?=) Date: Wed, 11 Nov 2020 18:27:35 +0000 Subject: [issue1487481] Could BIND_FIRST be removed on HP-UX? Message-ID: <1605119255.33.0.16345988931.issue1487481@roundup.psfhosted.org> G?ran Uddeborg added the comment: >From my view as reporter, it would be fine to close it. We no longer have any HP-UX systems. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 13:08:47 2020 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 11 Nov 2020 18:08:47 +0000 Subject: [issue6225] Fixing several minor bugs in Tkinter.Canvas and one in Misc._configure In-Reply-To: <1244325396.24.0.788727463424.issue6225@psf.upfronthosting.co.za> Message-ID: <1605118127.4.0.411763668581.issue6225@roundup.psfhosted.org> Andrew Svetlov added the comment: I believe, yes ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 13:22:23 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 18:22:23 +0000 Subject: [issue12508] Codecs Anomaly In-Reply-To: <1309992349.71.0.826004213615.issue12508@psf.upfronthosting.co.za> Message-ID: <1605118943.7.0.479670523752.issue12508@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 13:32:51 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 18:32:51 +0000 Subject: [issue6225] Fixing several minor bugs in Tkinter.Canvas and one in Misc._configure In-Reply-To: <1244325396.24.0.788727463424.issue6225@psf.upfronthosting.co.za> Message-ID: <1605119571.01.0.304140097975.issue6225@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 13:42:59 2020 From: report at bugs.python.org (Konrad Schwarz) Date: Wed, 11 Nov 2020 18:42:59 +0000 Subject: [issue42324] Doctest: directives In-Reply-To: <1605096360.37.0.876926157463.issue42324@roundup.psfhosted.org> Message-ID: Konrad Schwarz added the comment: Yes it is. On Wed, Nov 11, 2020 at 1:06 PM Karthikeyan Singaravelan < report at bugs.python.org> wrote: > > Karthikeyan Singaravelan added the comment: > > Is this similar to https://bugs.python.org/issue36675 ? > > ---------- > nosy: +xtreak > > _______________________________________ > Python tracker > > _______________________________________ > -- Mit freundlichen Gr??en Konrad Schwarz ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 13:36:00 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 18:36:00 +0000 Subject: [issue1487481] Could BIND_FIRST be removed on HP-UX? Message-ID: <1605119760.24.0.955504256885.issue1487481@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 13:44:30 2020 From: report at bugs.python.org (Roundup Robot) Date: Wed, 11 Nov 2020 18:44:30 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1605120270.08.0.89835573991.issue41100@roundup.psfhosted.org> Change by Roundup Robot : ---------- nosy: +python-dev nosy_count: 12.0 -> 13.0 pull_requests: +22136 pull_request: https://github.com/python/cpython/pull/23239 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 13:52:01 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 18:52:01 +0000 Subject: [issue10615] Trivial mingw compile fixes In-Reply-To: <1291380362.46.0.195053370852.issue10615@psf.upfronthosting.co.za> Message-ID: <1605120721.9.0.494377254677.issue10615@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 13:58:16 2020 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 11 Nov 2020 18:58:16 +0000 Subject: [issue42326] Add verify_callback hook capability to the SSL lib In-Reply-To: <1605115071.16.0.0518797822596.issue42326@roundup.psfhosted.org> Message-ID: <1605121096.48.0.706908159115.issue42326@roundup.psfhosted.org> Zackery Spytz added the comment: Unfortunately, this seems like a duplicate of bpo-31242. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 14:00:13 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 19:00:13 +0000 Subject: [issue6672] Add Mingw recognition to pyport.h to allow building extensions In-Reply-To: <1249820690.51.0.767085753138.issue6672@psf.upfronthosting.co.za> Message-ID: <1605121213.47.0.576746693211.issue6672@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 14:22:04 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 19:22:04 +0000 Subject: [issue25460] Misc/.gdbinit uses preprocessor macro In-Reply-To: <1445526835.22.0.109540938613.issue25460@psf.upfronthosting.co.za> Message-ID: <1605122524.02.0.867605993177.issue25460@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Some gdb macros are broken in 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 14:26:15 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Nov 2020 19:26:15 +0000 Subject: [issue12508] codecs.StreamReader doesn't pass final=1 to the UTF-8 codec In-Reply-To: <1309992349.71.0.826004213615.issue12508@psf.upfronthosting.co.za> Message-ID: <1605122775.94.0.686042285174.issue12508@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Codecs Anomaly -> codecs.StreamReader doesn't pass final=1 to the UTF-8 codec _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 14:29:01 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 11 Nov 2020 19:29:01 +0000 Subject: [issue42326] Add verify_callback hook capability to the SSL lib In-Reply-To: <1605115071.16.0.0518797822596.issue42326@roundup.psfhosted.org> Message-ID: <1605122941.54.0.905098161695.issue42326@roundup.psfhosted.org> Christian Heimes added the comment: Yes, it's a duplicate. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add SSLContext.set_verify_callback() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 14:34:53 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 11 Nov 2020 19:34:53 +0000 Subject: [issue42312] sys.prefix is set incorrectly on Mac OS X In-Reply-To: <1605021627.33.0.143648905308.issue42312@roundup.psfhosted.org> Message-ID: <1605123293.08.0.186781804737.issue42312@roundup.psfhosted.org> Ronald Oussoren added the comment: I've thought about this some more and haven't changed my opinion: the current behaviour is intentional and won't change. I'm therefore closing this issue. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 14:44:14 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 19:44:14 +0000 Subject: [issue24743] Make _PyTraceback_Add public In-Reply-To: <1438084954.97.0.508949242804.issue24743@psf.upfronthosting.co.za> Message-ID: <1605123854.73.0.102636837729.issue24743@roundup.psfhosted.org> Irit Katriel added the comment: The information about the location in c++ where the error occurred can be included in the exception message. I don't think adding fake frames to the traceback is a pattern that we should support through a public API. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 14:54:00 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 11 Nov 2020 19:54:00 +0000 Subject: [issue42245] concurrent.futures.ProcessPoolExecutor freezes depending on complexity In-Reply-To: <1604324035.95.0.0561998847241.issue42245@roundup.psfhosted.org> Message-ID: <1605124440.54.0.492164459143.issue42245@roundup.psfhosted.org> Ronald Oussoren added the comment: The script as-is doesn't work with 3.8 because it uses the "spawn" strategy. I haven't tried to tweak the script to get it to work on 3.8 because the scripts works fine for me with 3.7. The smaller script in msg380225 works for me on both python 3.7.4 and 3.8.3 Pip list says: Package Version --------------- ------- joblib 0.17.0 numpy 1.19.4 pandas 1.1.4 pip 19.0.3 python-dateutil 2.8.1 pytz 2020.4 scikit-learn 0.23.2 scipy 1.5.4 setuptools 40.8.0 six 1.15.0 sklearn 0.0 threadpoolctl 2.1.0 xgboost 1.2.1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 15:35:14 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Nov 2020 20:35:14 +0000 Subject: [issue42327] Add PyModule_Add() Message-ID: <1605126914.46.0.774673816158.issue42327@roundup.psfhosted.org> New submission from Serhiy Storchaka : There is a design flaw in PyModule_AddObject(). It steals reference of its value only if the result is success. To avoid leaks it should be used in the following form: PyObject *tmp = ; if (PyModule_AddObject(name, name, tmp) < 0) { Py_XDECREF(tmp); goto error; } It is inconvenient and many code forgot to use a temporary variable and call Py_XDECREF(). It was not intention, but it is too late to change this behavior now, because some code calls Py_XDECREF() if PyModule_AddObject() fails. Fixing PyModule_AddObject() now will break hard such code. There was an idea to make the change gradual, controlled by a special macro (see issue26871). But it still has significant risk. I propose to add new function PyModule_Add() which always steals reference to its argument. It is more convenient and allows to get rid of temporary variable: if (PyModule_Add(name, name, ) < 0) { goto error; } I choose name PyModule_Add because it is short, and allow to write the call in one line with moderately long expression (like PyFloat_FromDouble(...) or PyLong_FromUnsignedLong(...)). ---------- components: C API messages: 380794 nosy: serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Add PyModule_Add() type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 15:38:44 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Nov 2020 20:38:44 +0000 Subject: [issue42327] Add PyModule_Add() In-Reply-To: <1605126914.46.0.774673816158.issue42327@roundup.psfhosted.org> Message-ID: <1605127124.48.0.961967083569.issue42327@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +22137 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23240 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 17:08:54 2020 From: report at bugs.python.org (Brandt Bucher) Date: Wed, 11 Nov 2020 22:08:54 +0000 Subject: [issue42327] Add PyModule_Add() In-Reply-To: <1605126914.46.0.774673816158.issue42327@roundup.psfhosted.org> Message-ID: <1605132534.74.0.348308568518.issue42327@roundup.psfhosted.org> Brandt Bucher added the comment: See also: https://bugs.python.org/issue38823 https://github.com/python/cpython/pull/17298 ---------- nosy: +brandtbucher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 17:15:58 2020 From: report at bugs.python.org (MineRobber___T) Date: Wed, 11 Nov 2020 22:15:58 +0000 Subject: [issue31242] Add SSLContext.set_verify_callback() In-Reply-To: <1503265756.53.0.967490588927.issue31242@psf.upfronthosting.co.za> Message-ID: <1605132958.22.0.34391094063.issue31242@roundup.psfhosted.org> Change by MineRobber___T : ---------- nosy: +MineRobber9000 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 18:21:05 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 23:21:05 +0000 Subject: [issue22442] Deprecate PIPE with subprocess.check_call() and call() In-Reply-To: <1411134999.3.0.739689982343.issue22442@psf.upfronthosting.co.za> Message-ID: <1605136865.61.0.199959193692.issue22442@roundup.psfhosted.org> Irit Katriel added the comment: Any objections to closing this? If the old API is going to be deprecated I think that's a topic for another issue. ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 18:30:15 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 11 Nov 2020 23:30:15 +0000 Subject: [issue38823] Improve stdlib module initialization error handling. In-Reply-To: <1573930465.91.0.871939917002.issue38823@roundup.psfhosted.org> Message-ID: <1605137415.18.0.278757083575.issue38823@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 18:32:52 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 11 Nov 2020 23:32:52 +0000 Subject: [issue24831] Load average in test suite too high In-Reply-To: <1439048328.2.0.659609134841.issue24831@psf.upfronthosting.co.za> Message-ID: <1605137572.48.0.882916620068.issue24831@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 18:50:40 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 11 Nov 2020 23:50:40 +0000 Subject: [issue41987] singledispatchmethod raises an error when relying on a forward declaration In-Reply-To: <1602274303.54.0.362260014367.issue41987@roundup.psfhosted.org> Message-ID: <1605138640.56.0.529985579301.issue41987@roundup.psfhosted.org> Guido van Rossum added the comment: I spent some time debugging this looking for the root cause. I think it looks like the recursion check in ForwardRef._evaluate() fails to trigger. At some point recursive_guard is a frozen set containing "'Integer'" (i.e. a string whose first and last character are single quotes, while self.__forward_arg__ is 'Integer' (i.e. a string that does not contain quotes). I'm running out of time for the rest of the investigation, so feel free to confirm this and go down the rabbit hole from there... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 19:27:54 2020 From: report at bugs.python.org (Pat Thoyts) Date: Thu, 12 Nov 2020 00:27:54 +0000 Subject: [issue42328] ttk style.map function incorrectly handles the default state for element options. Message-ID: <1605140874.05.0.0614253934034.issue42328@roundup.psfhosted.org> New submission from Pat Thoyts : When cloning a ttk style it is useful to copy an existing style and make changes. We can copy the configuration and layout using: style.layout('Custom.TEntry', **style.layout('TEntry')) style.configure('Custom.TEntry', **style.configure('TEntry)) However, doing this with style.map can result in an exception. An example of this occurs for any style that has a defined default state in the map eg the TNotebook.Tab in the clam theme: >>> style.map('TNotebook.Tab','background') [('selected', '#dcdad5'), ('#bab5ab',)] However, calling Tk directly: >>> style.tk.call(style._name,"map","TNotebook.Tab","-background") (, '#dcdad5', , '#bab5ab') The second pair is defining the default state ('') to use color #bab5ab but this is being mangled by the code that converts this into pythons response. The culprit is ttk._list_from_statespec which treats the statespec with the empty string as None and drops it and then returns the value in place of the state and then puts in an empty value. ---------- components: Tkinter messages: 380798 nosy: patthoyts priority: normal severity: normal status: open title: ttk style.map function incorrectly handles the default state for element options. type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 19:46:13 2020 From: report at bugs.python.org (Pat Thoyts) Date: Thu, 12 Nov 2020 00:46:13 +0000 Subject: [issue42328] ttk style.map function incorrectly handles the default state for element options. In-Reply-To: <1605140874.05.0.0614253934034.issue42328@roundup.psfhosted.org> Message-ID: <1605141973.53.0.500980142927.issue42328@roundup.psfhosted.org> Change by Pat Thoyts : ---------- keywords: +patch nosy: +Pat Thoyts nosy_count: 1.0 -> 2.0 pull_requests: +22138 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23241 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 20:10:27 2020 From: report at bugs.python.org (mental) Date: Thu, 12 Nov 2020 01:10:27 +0000 Subject: [issue41987] singledispatchmethod raises an error when relying on a forward declaration In-Reply-To: <1602274303.54.0.362260014367.issue41987@roundup.psfhosted.org> Message-ID: <1605143427.56.0.427463988912.issue41987@roundup.psfhosted.org> mental added the comment: Interesting! thanks for the hint guido I'll try to investigate further. This sounds like a regression (to me at least), in that case should a separate issue & patch PR be opened on the bpo or should this issue be used instead? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 20:30:53 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 12 Nov 2020 01:30:53 +0000 Subject: [issue41987] singledispatchmethod raises an error when relying on a forward declaration In-Reply-To: <1602274303.54.0.362260014367.issue41987@roundup.psfhosted.org> Message-ID: <1605144653.66.0.547085257062.issue41987@roundup.psfhosted.org> Guido van Rossum added the comment: Keep this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 21:23:04 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Nov 2020 02:23:04 +0000 Subject: [issue42329] typing classes do not have __name__ attributes in 3.7+ Message-ID: <1605147783.95.0.972217346071.issue42329@roundup.psfhosted.org> New submission from Gregory P. Smith : Python 3.7-3.10a1: ``` >>> List.__name__ Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.8/typing.py", line 760, in __getattr__ raise AttributeError(attr) AttributeError: __name__ >>> type(List) >>> type(List[int]) ``` Python 3.6: ``` >>> from typing import List >>> List.__name__ 'List' >>> type(List) >>> type(List[int]) ``` Is this lack of common meta attributes intentional? It makes the typing types unusual. We just saw it trip up some code that was expecting everything to have a `__name__` attribute while moving beyond 3.6. Judging by that `__getattr__` implementation it should happen on other common `__` attributes as mentioned in https://docs.python.org/3/library/stdtypes.html?highlight=__name__#special-attributes as well. ---------- components: Library (Lib) messages: 380801 nosy: gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: typing classes do not have __name__ attributes in 3.7+ type: behavior versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 21:39:42 2020 From: report at bugs.python.org (hongweipeng) Date: Thu, 12 Nov 2020 02:39:42 +0000 Subject: [issue42319] The `functools.singledispatchmethod` example in the document cannot run In-Reply-To: <1605081595.15.0.657429202369.issue42319@roundup.psfhosted.org> Message-ID: <1605148782.6.0.0539263677822.issue42319@roundup.psfhosted.org> Change by hongweipeng : ---------- keywords: +patch pull_requests: +22139 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23242 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 21:46:32 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Nov 2020 02:46:32 +0000 Subject: [issue42329] typing classes do not have __name__ attributes in 3.7+ In-Reply-To: <1605147783.95.0.972217346071.issue42329@roundup.psfhosted.org> Message-ID: <1605149192.94.0.82517065453.issue42329@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +gvanrossum, levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 22:57:14 2020 From: report at bugs.python.org (Saiansh Singh) Date: Thu, 12 Nov 2020 03:57:14 +0000 Subject: [issue42330] Add browsh in the webbrowser module Message-ID: <1605153434.0.0.062281491373.issue42330@roundup.psfhosted.org> New submission from Saiansh Singh : The webbrowser module is a module used to create a new tab or window inside browsers. It is currently built into python. It supports multiple terminal-based browsers but yet doesn't support browsh. Here is the documentation for browsh for more information: brow.sh. The repository is at: github.com/browsh-org/browsh. It runs firefox on headless and displays the websites inside the terminal. Happy to make a PR! ? ---------- components: Library (Lib) messages: 380802 nosy: saiansh2525 priority: normal severity: normal status: open title: Add browsh in the webbrowser module type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 23:15:28 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 12 Nov 2020 04:15:28 +0000 Subject: [issue41987] singledispatchmethod raises an error when relying on a forward declaration In-Reply-To: <1602274303.54.0.362260014367.issue41987@roundup.psfhosted.org> Message-ID: <1605154528.14.0.198852137408.issue41987@roundup.psfhosted.org> Guido van Rossum added the comment: FWIW here's a minimal demo: from __future__ import annotations from typing import get_type_hints class C: def func(self, a: "C"): pass print(get_type_hints(func)) In 3.8 this prints {'a': ForwardRef('C')} while in 3.9 it raises NameError: Traceback (most recent call last): File "C:\Users\gvanrossum\cpython\t.py", line 4, in class C: File "C:\Users\gvanrossum\cpython\t.py", line 8, in C print(get_type_hints(func)) File "C:\Python39\lib\typing.py", line 1386, in get_type_hints value = _eval_type(value, globalns, localns) File "C:\Python39\lib\typing.py", line 254, in _eval_type return t._evaluate(globalns, localns, recursive_guard) File "C:\Python39\lib\typing.py", line 497, in _evaluate self.__forward_value__ = _eval_type( File "C:\Python39\lib\typing.py", line 254, in _eval_type return t._evaluate(globalns, localns, recursive_guard) File "C:\Python39\lib\typing.py", line 493, in _evaluate eval(self.__forward_code__, globalns, localns), File "", line 1, in NameError: name 'C' is not defined ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 23:39:39 2020 From: report at bugs.python.org (hai shi) Date: Thu, 12 Nov 2020 04:39:39 +0000 Subject: [issue41832] PyType_FromSpec() should accept tp_doc=NULL In-Reply-To: <1600770571.99.0.249807543427.issue41832@roundup.psfhosted.org> Message-ID: <1605155979.53.0.427683029642.issue41832@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +22140 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/23243 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 11 23:47:01 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 12 Nov 2020 04:47:01 +0000 Subject: [issue42329] typing classes do not have __name__ attributes in 3.7+ In-Reply-To: <1605147783.95.0.972217346071.issue42329@roundup.psfhosted.org> Message-ID: <1605156421.93.0.150228347072.issue42329@roundup.psfhosted.org> Guido van Rossum added the comment: Between 3.6 and 3.7 they stopped being types. IIRC this enabled optimizations. (Serhiy?) I don't think this is important, but I suppose you have some code that this breaks? The name is passed to the constructor of _SpecialGenericAlias, so I'm fine with fixing this, though the backports may get tricky when you get down to 3.7. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 02:08:49 2020 From: report at bugs.python.org (michalis aggela) Date: Thu, 12 Nov 2020 07:08:49 +0000 Subject: [issue42331] 'base64' has no attribute 'decodestring' Message-ID: <1605164929.5.0.192767282489.issue42331@roundup.psfhosted.org> New submission from michalis aggela : File "/Users/michaelmouchametai/Downloads/google-cloud-sdk/platform/gsutil/gslib/utils/encryption_helper.py", line 152, in Base64Sha256FromBase64EncryptionKey decoded_bytes = base64.decodestring(csek_encryption_key) AttributeError: module 'base64' has no attribute 'decodestring' ---------- components: Build messages: 380805 nosy: michalisaggela priority: normal severity: normal status: open title: 'base64' has no attribute 'decodestring' type: crash versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 03:27:27 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Nov 2020 08:27:27 +0000 Subject: [issue42331] 'base64' has no attribute 'decodestring' In-Reply-To: <1605164929.5.0.192767282489.issue42331@roundup.psfhosted.org> Message-ID: <1605169647.19.0.641917200982.issue42331@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: The tracker is for issues related to CPython. This seems to be an issue with gsutil on Python 3.9 compatibility. This seems to have been fixed as below : https://github.com/GoogleCloudPlatform/gsutil/issues/1118 ---------- nosy: +xtreak resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 03:36:28 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Nov 2020 08:36:28 +0000 Subject: [issue42329] typing classes do not have __name__ attributes in 3.7+ In-Reply-To: <1605156421.93.0.150228347072.issue42329@roundup.psfhosted.org> Message-ID: Gregory P. Smith added the comment: Not a big deal if we don't, I just found it odd so I figured I'd pose the question. That it's been in three releases and only just now come up is pretty telling that isn't critical. The code in question was trying to identify public functions in a module by inspecting names and I think they've got a more pedantic way to do that than their existing code that wouldn't be tripped up by a mere callable without a __name__. On Wed, Nov 11, 2020, 8:47 PM Guido van Rossum wrote: > > Guido van Rossum added the comment: > > Between 3.6 and 3.7 they stopped being types. > > IIRC this enabled optimizations. (Serhiy?) > > I don't think this is important, but I suppose you have some code that > this breaks? > > The name is passed to the constructor of _SpecialGenericAlias, so I'm fine > with fixing this, though the backports may get tricky when you get down to > 3.7. > > ---------- > nosy: +serhiy.storchaka > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 04:39:18 2020 From: report at bugs.python.org (Amir Mohamadi) Date: Thu, 12 Nov 2020 09:39:18 +0000 Subject: [issue16879] distutils.command.config uses fragile constant temporary file name In-Reply-To: <1357476277.46.0.0647034504115.issue16879@psf.upfronthosting.co.za> Message-ID: <1605173958.05.0.149941875397.issue16879@roundup.psfhosted.org> Amir Mohamadi added the comment: Can I open a PR for it? ---------- nosy: +Amir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 04:43:56 2020 From: report at bugs.python.org (Mark Shannon) Date: Thu, 12 Nov 2020 09:43:56 +0000 Subject: [issue42246] Implement PEP 626 In-Reply-To: <1604331162.26.0.596873070589.issue42246@roundup.psfhosted.org> Message-ID: <1605174236.83.0.419732490219.issue42246@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 877df851c3ecdb55306840e247596e7b7805a60a by Mark Shannon in branch 'master': bpo-42246: Partial implementation of PEP 626. (GH-23113) https://github.com/python/cpython/commit/877df851c3ecdb55306840e247596e7b7805a60a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 04:49:35 2020 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 12 Nov 2020 09:49:35 +0000 Subject: [issue42237] test_socket.SendfileUsingSendfileTest fails on illumos In-Reply-To: <1604261267.98.0.369045235153.issue42237@roundup.psfhosted.org> Message-ID: <1605174575.04.0.789132840427.issue42237@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset fd4ed57674c675e05bd5d577dd5047a333c76c78 by Jakub Stasiak in branch 'master': bpo-42237: Fix os.sendfile() on illumos (GH-23154) https://github.com/python/cpython/commit/fd4ed57674c675e05bd5d577dd5047a333c76c78 ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 04:50:04 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Nov 2020 09:50:04 +0000 Subject: [issue42237] test_socket.SendfileUsingSendfileTest fails on illumos In-Reply-To: <1604261267.98.0.369045235153.issue42237@roundup.psfhosted.org> Message-ID: <1605174604.1.0.433896334033.issue42237@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +22141 pull_request: https://github.com/python/cpython/pull/23244 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 04:57:44 2020 From: report at bugs.python.org (Sijmen J. Mulder) Date: Thu, 12 Nov 2020 09:57:44 +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: <1605175064.85.0.309173276732.issue41116@roundup.psfhosted.org> Sijmen J. Mulder added the comment: With './configure; make' of master on macOS 11 on Apple Silicon I get the library detection failure. The quick and easy fix was to amend inc_dirs and lib_dirs in setup.py: if MACOS: + sysroot = macosx_sdk_root() + self.inc_dirs.append(sysroot + '/usr/include') + self.lib_dirs.append(sysroot + '/usr/lib') Interestingly the lzma library is found, but the module fails because it cannot find lzma.h, which does indeed appear to be missing in the SDK. ---------- nosy: +sjmulder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 05:10:09 2020 From: report at bugs.python.org (Mark Shannon) Date: Thu, 12 Nov 2020 10:10:09 +0000 Subject: [issue42246] Implement PEP 626 In-Reply-To: <1604331162.26.0.596873070589.issue42246@roundup.psfhosted.org> Message-ID: <1605175809.03.0.651002180141.issue42246@roundup.psfhosted.org> Change by Mark Shannon : ---------- pull_requests: +22142 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23245 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 05:14:19 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Nov 2020 10:14:19 +0000 Subject: [issue42237] test_socket.SendfileUsingSendfileTest fails on illumos In-Reply-To: <1604261267.98.0.369045235153.issue42237@roundup.psfhosted.org> Message-ID: <1605176059.28.0.828752376398.issue42237@roundup.psfhosted.org> miss-islington added the comment: New changeset 7ae19ef5cf5d4f464588133bd48f81d80ea54aee by Miss Islington (bot) in branch '3.9': bpo-42237: Fix os.sendfile() on illumos (GH-23154) https://github.com/python/cpython/commit/7ae19ef5cf5d4f464588133bd48f81d80ea54aee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 06:04:44 2020 From: report at bugs.python.org (Pat Thoyts) Date: Thu, 12 Nov 2020 11:04:44 +0000 Subject: [issue32426] Tkinter.ttk Widget does not define wich option exists to set the cursor In-Reply-To: <1514241431.48.0.213398074469.issue32426@psf.upfronthosting.co.za> Message-ID: <1605179084.89.0.002334153235.issue32426@roundup.psfhosted.org> Pat Thoyts added the comment: The Tk documentation for the acceptable cursor names is the cursors manual page. https://www.tcl.tk/man/tcl/TkCmd/cursors.htm Tk does not provide a way to get all these names in script. This should probably be closed. ---------- nosy: +patthoyts _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 06:09:09 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Thu, 12 Nov 2020 11:09:09 +0000 Subject: [issue42237] test_socket.SendfileUsingSendfileTest fails on illumos In-Reply-To: <1604261267.98.0.369045235153.issue42237@roundup.psfhosted.org> Message-ID: <1605179349.29.0.90914973915.issue42237@roundup.psfhosted.org> Change by Jakub Stasiak : ---------- pull_requests: +22143 pull_request: https://github.com/python/cpython/pull/23246 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 06:27:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Nov 2020 11:27:43 +0000 Subject: [issue24831] Load average in test suite too high In-Reply-To: <1439048328.2.0.659609134841.issue24831@psf.upfronthosting.co.za> Message-ID: <1605180463.22.0.488472387952.issue24831@roundup.psfhosted.org> STINNER Victor added the comment: No activity for 5 years, so far this issue is more an open discussion than a list of concrete changes, so I close the issue as out of date. If some tests are too CPU or I/O intensive, you can skip them using the -x option. Use --ignorefile to only skip specific test methods. About the temporary directory, regrtest now has a --tempdir option. ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 06:31:33 2020 From: report at bugs.python.org (Alessandro Piccione) Date: Thu, 12 Nov 2020 11:31:33 +0000 Subject: [issue32426] Tkinter.ttk Widget does not define wich option exists to set the cursor In-Reply-To: <1514241431.48.0.213398074469.issue32426@psf.upfronthosting.co.za> Message-ID: <1605180693.94.0.263171255744.issue32426@roundup.psfhosted.org> Alessandro Piccione added the comment: As suggested the documentation for "cursor" is here: https://www.tcl.tk/man/tcl/TkCmd/cursors.htm Close [SOLVED] ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 07:04:09 2020 From: report at bugs.python.org (=?utf-8?q?Tin_Tvrtkovi=C4=87?=) Date: Thu, 12 Nov 2020 12:04:09 +0000 Subject: [issue42332] add __weakref__ to types.GenericAlias Message-ID: <1605182649.58.0.535979406085.issue42332@roundup.psfhosted.org> New submission from Tin Tvrtkovi? : For example, dict[int, int] cannot be used with singledispatch because types.GenericAlias doesn't support weak references. I'm an author of a third party library (https://github.com/Tinche/cattrs) for which this functionality would be useful. Here's a similar issue in typing (note that this issue is for *types*.GenericAlias) that was fixed: https://github.com/python/typing/issues/345 ---------- messages: 380816 nosy: gvanrossum, tinchester priority: normal severity: normal status: open title: add __weakref__ to types.GenericAlias type: enhancement versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 07:24:00 2020 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 12 Nov 2020 12:24:00 +0000 Subject: [issue42237] test_socket.SendfileUsingSendfileTest fails on illumos In-Reply-To: <1604261267.98.0.369045235153.issue42237@roundup.psfhosted.org> Message-ID: <1605183840.16.0.366954881995.issue42237@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset f37628eb7117f222de24a6931aa7639e668cb7b0 by Jakub Stasiak in branch '3.8': [3.8] bpo-42237: Fix os.sendfile() on illumos (GH-23154). (GH-23246) https://github.com/python/cpython/commit/f37628eb7117f222de24a6931aa7639e668cb7b0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 07:39:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Nov 2020 12:39:52 +0000 Subject: [issue38823] Improve stdlib module initialization error handling. In-Reply-To: <1573930465.91.0.871939917002.issue38823@roundup.psfhosted.org> Message-ID: <1605184792.04.0.376268345593.issue38823@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22144 pull_request: https://github.com/python/cpython/pull/23247 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 07:46:46 2020 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 12 Nov 2020 12:46:46 +0000 Subject: [issue42237] test_socket.SendfileUsingSendfileTest fails on illumos In-Reply-To: <1604261267.98.0.369045235153.issue42237@roundup.psfhosted.org> Message-ID: <1605185206.57.0.377796568231.issue42237@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 07:57:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Nov 2020 12:57:32 +0000 Subject: [issue42327] Add PyModule_Add() In-Reply-To: <1605126914.46.0.774673816158.issue42327@roundup.psfhosted.org> Message-ID: <1605185852.75.0.307692104347.issue42327@roundup.psfhosted.org> STINNER Victor added the comment: Oh, I just rejected PR 17298. Copy of my message: --- I added PyModule_AddObjectRef() which uses strong references, rather than only stealing a reference on success. I also enhanced the documentation to show concrete examples: https://docs.python.org/dev/c-api/module.html#c.PyModule_AddObjectRef I modified a few extension to use PyModule_AddObjectRef(). Sometimes, PyModule_AddObject() is more appropriate. Sometimes, PyModule_AddObjectRef() is more appropriate. Both functions are relevant, and I don't see a clear winner. I agree than fixing existing code is painful, but I hope that new code using mostly PyModule_AddObjectRef() would be simpler to review. I'm not sure that it's simpler to write new code using PyModule_AddObjectRef(), since you might need more Py_DECREF() calls. My intent is to have more "regular" code about reference counting. See also: https://bugs.python.org/issue42294 Since you wrote that this API is a band aid on a broken API, I consider that you are fine with rejecting it and move on to the new PyModule_AddObjectRef(). Anyway, thanks for you attempt to make the C API less broken :-) --- I added PyModule_AddObjectRef() in bpo-163574. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 07:58:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Nov 2020 12:58:37 +0000 Subject: [issue42327] Add PyModule_Add() In-Reply-To: <1605126914.46.0.774673816158.issue42327@roundup.psfhosted.org> Message-ID: <1605185917.46.0.234947242157.issue42327@roundup.psfhosted.org> STINNER Victor added the comment: I'm using more and more often such macro: #define MOD_ADD(name, expr) \ do { \ PyObject *obj = (expr); \ if (obj == NULL) { \ return -1; \ } \ if (PyModule_AddObjectRef(mod, name, obj) < 0) { \ Py_DECREF(obj); \ return -1; \ } \ Py_DECREF(obj); \ } while (0) Would PyModule_Add() replace such macro? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 07:59:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Nov 2020 12:59:36 +0000 Subject: [issue42327] Add PyModule_Add() In-Reply-To: <1605126914.46.0.774673816158.issue42327@roundup.psfhosted.org> Message-ID: <1605185976.15.0.710047259509.issue42327@roundup.psfhosted.org> STINNER Victor added the comment: If PyModule_Add() is added, I would suggest to rename PyModule_AddObjectRef() to PyModule_AddRef() for consistency. IMHO PyModule_AddObjectRef() remains useful even if PyModule_Add() is added. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 08:00:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Nov 2020 13:00:47 +0000 Subject: [issue42327] Add PyModule_Add() In-Reply-To: <1605126914.46.0.774673816158.issue42327@roundup.psfhosted.org> Message-ID: <1605186047.3.0.760746922027.issue42327@roundup.psfhosted.org> STINNER Victor added the comment: In practice, PyModule_AddRef(mod, obj) behaves as PyModule_Add(mod, Py_NewRef(obj)) if I understood correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 08:10:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Nov 2020 13:10:13 +0000 Subject: [issue38823] Improve stdlib module initialization error handling. In-Reply-To: <1573930465.91.0.871939917002.issue38823@roundup.psfhosted.org> Message-ID: <1605186613.39.0.825865090922.issue38823@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d19fa7a337d829e3dab3e9f919f5dcf09cf6f6ba by Victor Stinner in branch 'master': bpo-38823: Fix refleaks in _ctypes extension init (GH-23247) https://github.com/python/cpython/commit/d19fa7a337d829e3dab3e9f919f5dcf09cf6f6ba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 08:11:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Nov 2020 13:11:42 +0000 Subject: [issue38823] Improve stdlib module initialization error handling. In-Reply-To: <1573930465.91.0.871939917002.issue38823@roundup.psfhosted.org> Message-ID: <1605186702.16.0.0201922757988.issue38823@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22145 pull_request: https://github.com/python/cpython/pull/23248 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 08:54:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Nov 2020 13:54:47 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1605189287.75.0.296134863778.issue42260@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22146 pull_request: https://github.com/python/cpython/pull/23249 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 09:14:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Nov 2020 14:14:16 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1605190456.83.0.31750633378.issue42260@roundup.psfhosted.org> STINNER Victor added the comment: New changeset ef75a625cdf8377d687a04948b4db9bc1917bf19 by Victor Stinner in branch 'master': bpo-42260: Initialize time and warnings earlier at startup (GH-23249) https://github.com/python/cpython/commit/ef75a625cdf8377d687a04948b4db9bc1917bf19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 09:38:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Nov 2020 14:38:21 +0000 Subject: [issue38823] Improve stdlib module initialization error handling. In-Reply-To: <1573930465.91.0.871939917002.issue38823@roundup.psfhosted.org> Message-ID: <1605191901.08.0.763824395002.issue38823@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b5cc05bbe681dbe06d5ec6d34318815d1c1ad6c5 by Victor Stinner in branch 'master': bpo-38823: Always build _ctypes with wchar_t (GH-23248) https://github.com/python/cpython/commit/b5cc05bbe681dbe06d5ec6d34318815d1c1ad6c5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 09:53:54 2020 From: report at bugs.python.org (Michael Ferguson) Date: Thu, 12 Nov 2020 14:53:54 +0000 Subject: [issue42312] sys.prefix is set incorrectly on Mac OS X In-Reply-To: <1605021627.33.0.143648905308.issue42312@roundup.psfhosted.org> Message-ID: <1605192834.65.0.736396441379.issue42312@roundup.psfhosted.org> Michael Ferguson added the comment: > The way sys.prefix is calculated on macOS ensures that the correct sys.prefix is calculated even if you copy the binary to a different location. That's functionality I don't want to drop. I agree with you that it's important for the Python interpreter to find the libraries it is installed with even if the framework launcher is copied to a different location. However I think it's possible to support finding the installation while fixing the issue I am bringing up. Finding the installation amounts to getting the correct `sys.base_prefix` (no matter where the launcher is copied). It seems to me that if the launcher is copied to a different directory, `sys.prefix` should change in some cases. That already happens when making a `venv` with copies instead of links. Could the framework launcher consider `argv[0]` without causing problems in this use case? I think this is a bug and not a feature tradeoff because a platform-specific wrapper should be as transparent as possible and as a result should keep the `argv[0]` behavior that occurs without the wrapper. In any case, do you think that there is a way to get the behavior I am looking for (basically, invoke a Python interpreter that has sys.prefix set to the venv but without a symbolic link)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 10:13:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Nov 2020 15:13:02 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1605193982.9.0.794329442077.issue40939@roundup.psfhosted.org> STINNER Victor added the comment: I reopen the issue. Would you mind to explicitly list function removed from the C API in What's New in Python 3.10? https://docs.python.org/dev/whatsnew/3.10.html#id4 I'm talking about the commit 1ed83adb0e95305af858bd41af531e487f54fee7. For example, the unbound project no longer builds with Python 3.10 because PyParser_SimpleParseFile() has been removed: https://bugzilla.redhat.com/show_bug.cgi?id=1889726 There is no mention of PyParser_SimpleParseFile() removal in What's New in Python 3.10. There is only a mention that it's being deprecated in What's New in Python 3.9. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 10:15:01 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 12 Nov 2020 15:15:01 +0000 Subject: [issue42312] sys.prefix is set incorrectly on Mac OS X In-Reply-To: <1605021627.33.0.143648905308.issue42312@roundup.psfhosted.org> Message-ID: <1605194101.61.0.569535076087.issue42312@roundup.psfhosted.org> Ronald Oussoren added the comment: > In any case, do you think that there is a way to get the behavior I am looking for (basically, invoke a Python interpreter that has sys.prefix set to the venv but without a symbolic link)? Not that I know. Using the python binary in the virtual environment is part of the design of this feature. That you can "fake" this on a lot of unix platforms by using a different interpreter with argv[0] set to a different path is a happy coincidence. I'm also not convinced that your trick actually accomplishes what you hope, the virtual environment still has a dependency on the Python installation in the original location. That location is mentioned in pyvenv.cfg at the root of the environment, and AFAIK that configuration is used to set up sys.path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 10:18:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Nov 2020 15:18:32 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1605194312.94.0.425827252426.issue40939@roundup.psfhosted.org> STINNER Victor added the comment: > There is no mention of PyParser_SimpleParseFile() removal in What's New in Python 3.10. By the way, is there a replacement for this function? The unbound project uses it to display a SyntaxError when PyRun_SimpleFile() fails. Petr Men??k asked: "Could we instead modify PyRun_SimpleFile call to produce just one exception, then print it to stderr once and once into the log? (...) But it seems PyRun_SimpleFile does not throw Exception. Can you recommend variant or flags, which would make it raise an Exception, which log_py_err() would then to log file? After commenting out PyParser_SimpleParseFile it reports None, so it did not already raise an exception." https://bugzilla.redhat.com/show_bug.cgi?id=1889726#c3 unbound used the removed function PyParser_SimpleParseFile() in pythonmod/pythonmod.c. Extract of unbound-1.12.0.tar.gz: if (PyRun_SimpleFile(script_py, pe->fname) < 0) { log_err("pythonmod: can't parse Python script %s", pe->fname); /* print the error to logs too, run it again */ fseek(script_py, 0, SEEK_SET); /* we don't run the file, like this, because then side-effects * s = PyRun_File(script_py, pe->fname, Py_file_input, * PyModule_GetDict(PyImport_AddModule("__main__")), pe->dict); * could happen (again). Instead we parse the file again to get * the error string in the logs, for when the daemon has stderr * removed. SimpleFile run already printed to stderr, for then * this is called from unbound-checkconf or unbound -dd the user * has a nice formatted error. */ /* ignore the NULL return of _node, it is NULL due to the parse failure * that we are expecting */ (void)PyParser_SimpleParseFile(script_py, pe->fname, Py_file_input); log_py_err(); PyGILState_Release(gil); fclose(script_py); return 0; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 10:25:33 2020 From: report at bugs.python.org (Ken Jin) Date: Thu, 12 Nov 2020 15:25:33 +0000 Subject: [issue42332] add __weakref__ to types.GenericAlias In-Reply-To: <1605182649.58.0.535979406085.issue42332@roundup.psfhosted.org> Message-ID: <1605194733.69.0.715164426043.issue42332@roundup.psfhosted.org> Change by Ken Jin : ---------- keywords: +patch nosy: +kj nosy_count: 2.0 -> 3.0 pull_requests: +22147 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23250 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 10:26:20 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 12 Nov 2020 15:26:20 +0000 Subject: [issue42327] Add PyModule_Add() In-Reply-To: <1605126914.46.0.774673816158.issue42327@roundup.psfhosted.org> Message-ID: <1605194780.92.0.106870522482.issue42327@roundup.psfhosted.org> Serhiy Storchaka added the comment: PyModule_Add() allows to make such macro much simpler: #define MOD_ADD(name, expr) \ do { \ if (PyModule_Add(mod, name, expr) < 0) { \ return -1; \ } \ } while (0) PyModule_AddObjectRef() is just Py_XINCREF() followed by PyModule_Add(). But since most values added to the module are new references, Py_XINCREF() is usually not needed. The PyModule_Add* API is a convenient API. It is not necessary, you can use PyModule_GetDict() + PyDict_SetItemString(), but with this API it is easier. And PyModule_Add() is a correct PyModule_AddObject() (which was broken a long time ago and cannot be fixed now) and is more convenient than PyModule_AddObjectRef(). PyModule_AddIntConstant() and PyModule_AddStringConstant() can be easily expressed in terms of PyModule_Add(): PyModule_Add(m, name, PyLong_FromLong(value)) PyModule_Add(m, name, PyUnicode_FromString(value)) And it is easy to combine it with other functions: PyLong_FromLongLong(), PyLong_FromUnsignedLong(), PyLong_FromVoidPtr(), PyFloat_FromDouble(), PyCapsule_New(), PyType_FromSpec(), etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 10:31:14 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 12 Nov 2020 15:31:14 +0000 Subject: [issue42329] typing classes do not have __name__ attributes in 3.7+ In-Reply-To: <1605147783.95.0.972217346071.issue42329@roundup.psfhosted.org> Message-ID: <1605195074.64.0.165271048752.issue42329@roundup.psfhosted.org> Guido van Rossum added the comment: So shall we just close this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 10:48:05 2020 From: report at bugs.python.org (Ken Jin) Date: Thu, 12 Nov 2020 15:48:05 +0000 Subject: [issue42317] Docs of `typing.get_args`: Mention that due to caching of typing generics the order of arguments for Unions can be different from the one of the returned tuple In-Reply-To: <1605036937.3.0.364895182043.issue42317@roundup.psfhosted.org> Message-ID: <1605196085.96.0.738809950931.issue42317@roundup.psfhosted.org> Ken Jin added the comment: Dominik, would you like to submit a PR for this :) ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 10:57:50 2020 From: report at bugs.python.org (Mark Shannon) Date: Thu, 12 Nov 2020 15:57:50 +0000 Subject: [issue42246] Implement PEP 626 In-Reply-To: <1604331162.26.0.596873070589.issue42246@roundup.psfhosted.org> Message-ID: <1605196670.86.0.611337726467.issue42246@roundup.psfhosted.org> Change by Mark Shannon : ---------- pull_requests: +22148 pull_request: https://github.com/python/cpython/pull/23251 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 11:01:53 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 12 Nov 2020 16:01:53 +0000 Subject: [issue41987] singledispatchmethod raises an error when relying on a forward declaration In-Reply-To: <1602274303.54.0.362260014367.issue41987@roundup.psfhosted.org> Message-ID: <1605196913.19.0.625776161443.issue41987@roundup.psfhosted.org> Guido van Rossum added the comment: So the biggest difference I see is that ForwardRef._evaluate() has grown a recursive_guard argument in 3.9. This makes me think that in 3.8, only one level of evaluation was happening, and in 3.8, we keep evaluating until we don't see a string or ForwardRef. The specific examples all happen at a point where the forward ref "C" cannot be resolved at all yet (since they're happening *in the class body*). Possibly the best way out is to treat unresolved references differently, and just return the ForwardRef to the caller -- after all this is what the example does in 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 11:35:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Nov 2020 16:35:43 +0000 Subject: [issue42327] Add PyModule_Add() In-Reply-To: <1605126914.46.0.774673816158.issue42327@roundup.psfhosted.org> Message-ID: <1605198943.45.0.818324639377.issue42327@roundup.psfhosted.org> STINNER Victor added the comment: > PyModule_AddObjectRef() is just Py_XINCREF() followed by PyModule_Add(). But since most values added to the module are new references, Py_XINCREF() is usually not needed. There is no general rule. I saw two main cases. (A) Create an object only to add it into the module. PyModule_Add() and PyModule_AddObject() are good for that case. Example in the array module: PyObject *typecodes = PyUnicode_DecodeASCII(buffer, p - buffer, NULL); if (PyModule_AddObject(m, "typecodes", typecodes) < 0) { Py_XDECREF(typecodes); return -1; } This code can be rewritten with PyModule_Add(): PyObject *typecodes = PyUnicode_DecodeASCII(buffer, p - buffer, NULL); if (PyModule_Add(m, "typecodes", typecodes) < 0) { return -1; } Py_XDECREF(typecodes) is no longer needed using PyModule_Add(). (B) Add an existing object into the module, but the objet is already stored elsewhere. PyModule_AddObjectRef() is good for that case. It became common to have this case when an object is also stored in the module state. Example in _ast: state->AST_type = PyType_FromSpec(&AST_type_spec); if (!state->AST_type) { return 0; } (...) if (PyModule_AddObjectRef(m, "AST", state->AST_type) < 0) { return -1; } state->AST_type and module attribute both hold a strong reference to the type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 11:48:53 2020 From: report at bugs.python.org (=?utf-8?q?Tin_Tvrtkovi=C4=87?=) Date: Thu, 12 Nov 2020 16:48:53 +0000 Subject: [issue42332] add __weakref__ to types.GenericAlias In-Reply-To: <1605182649.58.0.535979406085.issue42332@roundup.psfhosted.org> Message-ID: <1605199733.36.0.39516669489.issue42332@roundup.psfhosted.org> Tin Tvrtkovi? added the comment: It would be great if we could get this into 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 12:07:32 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 12 Nov 2020 17:07:32 +0000 Subject: [issue42321] Limitations of building a static python library on Windows (MSVC) In-Reply-To: <1605092944.99.0.846170667375.issue42321@roundup.psfhosted.org> Message-ID: <1605200852.81.0.550090581247.issue42321@roundup.psfhosted.org> Steve Dower added the comment: > Does a statically built Windows python.exe support C extension modules at all? I've given this some thought in the past, and I suspect the answer is "no" unless you were to also statically link the extension modules into the same executable (which will likely require code modifications). That may answer the rest of your queries, but perhaps not. I'll have to give those some more thought. > For now, I'm disabling extensions on a static MSVC build. This seems like the best option. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 12:09:41 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 12 Nov 2020 17:09:41 +0000 Subject: [issue42332] add __weakref__ to types.GenericAlias In-Reply-To: <1605182649.58.0.535979406085.issue42332@roundup.psfhosted.org> Message-ID: <1605200981.06.0.110388479153.issue42332@roundup.psfhosted.org> Guido van Rossum added the comment: I think it's reasonable to consider this a bug to be fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 12:19:18 2020 From: report at bugs.python.org (Christian Heimes) Date: Thu, 12 Nov 2020 17:19:18 +0000 Subject: [issue42333] Port ssl module to heap types and module state (PEP 573) Message-ID: <1605201558.44.0.0361525548575.issue42333@roundup.psfhosted.org> New submission from Christian Heimes : Move all objects to module state. Convert all types and extensions to heap types. ---------- messages: 380837 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: Port ssl module to heap types and module state (PEP 573) type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 12:22:18 2020 From: report at bugs.python.org (Christian Heimes) Date: Thu, 12 Nov 2020 17:22:18 +0000 Subject: [issue42333] Port ssl module to heap types and module state (PEP 573) In-Reply-To: <1605201558.44.0.0361525548575.issue42333@roundup.psfhosted.org> Message-ID: <1605201738.49.0.145756775762.issue42333@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +22149 pull_request: https://github.com/python/cpython/pull/23253 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 12:27:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Nov 2020 17:27:51 +0000 Subject: [issue42308] Add threading.__excepthook__ similar to sys.__excepthook__ In-Reply-To: <1605006541.53.0.440753194072.issue42308@roundup.psfhosted.org> Message-ID: <1605202071.98.0.756703228178.issue42308@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 750c5abf43b7b1627ab59ead237bef4c2314d29e by Mario Corchero in branch 'master': bpo-42308: Add threading.__excepthook__ (GH-23218) https://github.com/python/cpython/commit/750c5abf43b7b1627ab59ead237bef4c2314d29e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 12:28:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Nov 2020 17:28:17 +0000 Subject: [issue42308] Add threading.__excepthook__ similar to sys.__excepthook__ In-Reply-To: <1605006541.53.0.440753194072.issue42308@roundup.psfhosted.org> Message-ID: <1605202097.67.0.785017816083.issue42308@roundup.psfhosted.org> STINNER Victor added the comment: PR merged, thanks Mario. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 13:19:35 2020 From: report at bugs.python.org (hai shi) Date: Thu, 12 Nov 2020 18:19:35 +0000 Subject: [issue42333] Port ssl module to heap types and module state (PEP 573) In-Reply-To: <1605201558.44.0.0361525548575.issue42333@roundup.psfhosted.org> Message-ID: <1605205175.0.0.802636008759.issue42333@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 13:23:57 2020 From: report at bugs.python.org (autospamfighter) Date: Thu, 12 Nov 2020 18:23:57 +0000 Subject: [issue42334] Subclassing int and complex with keyword arguments weird Message-ID: <1605205437.83.0.0876606558976.issue42334@roundup.psfhosted.org> New submission from autospamfighter : I was trying to make a custom complex class that looked something like this and it failed. I replaced complex with int and it also failed, but I tried float and it worked. ---fail class A(complex): def __init__(self, test): super().__init__() A(test=5) ---fail class A(int): def __init__(self, test): super().__init__() A(test=5) ---work class A(float): def __init__(self, test): super().__init__() A(test=5) ---------- components: Library (Lib) messages: 380840 nosy: autospamfighter priority: normal severity: normal status: open title: Subclassing int and complex with keyword arguments weird versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 13:48:18 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Nov 2020 18:48:18 +0000 Subject: [issue42329] typing classes do not have __name__ attributes in 3.7+ In-Reply-To: <1605147783.95.0.972217346071.issue42329@roundup.psfhosted.org> Message-ID: <1605206898.25.0.517999776655.issue42329@roundup.psfhosted.org> Gregory P. Smith added the comment: working as intended, they aren't classes. ---------- resolution: -> rejected stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 13:50:33 2020 From: report at bugs.python.org (autospamfighter) Date: Thu, 12 Nov 2020 18:50:33 +0000 Subject: [issue42334] Subclassing int and complex with keyword arguments weird In-Reply-To: <1605205437.83.0.0876606558976.issue42334@roundup.psfhosted.org> Message-ID: <1605207033.93.0.366720190238.issue42334@roundup.psfhosted.org> autospamfighter added the comment: I tried some more classes and str is weird, but dict and set work fine. very weird ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 14:12:30 2020 From: report at bugs.python.org (Ryan Sobol) Date: Thu, 12 Nov 2020 19:12:30 +0000 Subject: [issue41987] singledispatchmethod raises an error when relying on a forward declaration In-Reply-To: <1602274303.54.0.362260014367.issue41987@roundup.psfhosted.org> Message-ID: <1605208350.37.0.3839742015.issue41987@roundup.psfhosted.org> Ryan Sobol added the comment: Does anyone know why the treatment of unresolved references was changed in 3.9? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 14:23:37 2020 From: report at bugs.python.org (E. Paine) Date: Thu, 12 Nov 2020 19:23:37 +0000 Subject: [issue42273] Using LazyLoader leads to AttributeError In-Reply-To: <1604614463.81.0.853919807892.issue42273@roundup.psfhosted.org> Message-ID: <1605209017.49.0.0104598345756.issue42273@roundup.psfhosted.org> E. Paine added the comment: Sorry Brett to readd you to the nosy for this, but we only got half a sentence in msg380718 (which is surely not what you intended?). While I agree with you that this is not a bug, I do feel at least a note in the docs would be helpful to explain the implications of *adding* to sys.modules (the existing docs only mention replacing the dictionary or removing items from it). Again, sorry to readd you to the nosy but Kevin's msg380719 was specifically for you. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 14:29:50 2020 From: report at bugs.python.org (Ryan Sobol) Date: Thu, 12 Nov 2020 19:29:50 +0000 Subject: [issue41987] singledispatchmethod raises an error when relying on a forward declaration In-Reply-To: <1602274303.54.0.362260014367.issue41987@roundup.psfhosted.org> Message-ID: <1605209390.81.0.450017333666.issue41987@roundup.psfhosted.org> Ryan Sobol added the comment: Also, I'm a bit puzzled about something from the previously mentioned Integer class and its use of __future__.annotations. Why is?it possible to declare an Integer return type for the add() method, but only possible to declare an "Integer" forward reference for the _() method? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 14:49:41 2020 From: report at bugs.python.org (Mark Shannon) Date: Thu, 12 Nov 2020 19:49:41 +0000 Subject: [issue42246] Implement PEP 626 In-Reply-To: <1604331162.26.0.596873070589.issue42246@roundup.psfhosted.org> Message-ID: <1605210581.31.0.294137380895.issue42246@roundup.psfhosted.org> Mark Shannon added the comment: New changeset cc75ab791dd5ae2cb9f6e0c3c5f734a6ae1eb2a9 by Mark Shannon in branch 'master': bpo-42246: Eliminate jumps to exit blocks by copying those blocks. (#23251) https://github.com/python/cpython/commit/cc75ab791dd5ae2cb9f6e0c3c5f734a6ae1eb2a9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 14:56:42 2020 From: report at bugs.python.org (Charles Staton) Date: Thu, 12 Nov 2020 19:56:42 +0000 Subject: [issue42335] Python Crashes Exception code 0xc0000374 ntdll.dll Message-ID: <1605211002.39.0.559634487384.issue42335@roundup.psfhosted.org> New submission from Charles Staton : Hello, I am experiencing crashes of Python 3.8.5 (32 bit) on multiple identical Windows 10 x64 (Enterprise 2016 LTSB) machines. The Crashes are of the sort with the Windows popup "Python has stopped working" and there is no traceback. The crashes occur sporadically. My program might run several days or just an hour, but invariably Python will crash if you wait long enough. I have attached a zip file containing all of the information provided by Windows in Application Logs, as well as some AppVerifier logs. I do not believe the AppVerifier logs are relevant however, as running my program with AppVerifier turned on causes Python to crash immediately upon startup and the information provided by Windows in Application Logs seems to indicate that it's AppVerifier crashing, not Python. My program is quite large and is importing several libraries. It has a PyQt5 GUI, and I'm using PyQt5's QThreadpool() to run several threads concurrently which do various things like: communicate with a web API (rauth, requests), communicate with a PLC (pyModbusTCP), communicate with another PLC (python-Snap7), communicate with an RS485 printer (pySerial), write CSV logs to a network drive, et. al. I'm running this program in a venv setup by PyCharm. The full information is in the attached zip file but here's an excerpt: Faulting application name: python.exe, version: 3.8.5150.1013, time stamp: 0x5f15bc04 Faulting module name: ntdll.dll, version: 10.0.14393.206, time stamp: 0x57dacde1 Exception code: 0xc0000374 Fault offset: 0x000d9841 Faulting process id: 0x1550 Faulting application start time: 0x01d6b839c684e37d Faulting application path: C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\python.exe Faulting module path: C:\Windows\SYSTEM32\ntdll.dll Report Id: 24636ab4-7c06-4cd6-b8f8-4e20bfc59dce Googling various clues has given me a vague clue that this is caused by Python attempting to access memory that it shouldn't. I have no idea how that happens or why. I'm clueless as to how I should go about troubleshooting this. If anyone can help I will be very grateful. ---------- components: Interpreter Core, Library (Lib), ctypes files: Python Crash Data.zip messages: 380847 nosy: strantor priority: normal severity: normal status: open title: Python Crashes Exception code 0xc0000374 ntdll.dll versions: Python 3.8 Added file: https://bugs.python.org/file49594/Python Crash Data.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 15:38:13 2020 From: report at bugs.python.org (Dominik V.) Date: Thu, 12 Nov 2020 20:38:13 +0000 Subject: [issue42317] Docs of `typing.get_args`: Mention that due to caching of typing generics the order of arguments for Unions can be different from the one of the returned tuple In-Reply-To: <1605036937.3.0.364895182043.issue42317@roundup.psfhosted.org> Message-ID: <1605213493.74.0.256928948468.issue42317@roundup.psfhosted.org> Change by Dominik V. : ---------- keywords: +patch pull_requests: +22150 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23254 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 15:41:19 2020 From: report at bugs.python.org (Brett Cannon) Date: Thu, 12 Nov 2020 20:41:19 +0000 Subject: [issue42273] Using LazyLoader leads to AttributeError In-Reply-To: <1604614463.81.0.853919807892.issue42273@roundup.psfhosted.org> Message-ID: <1605213679.12.0.610352437518.issue42273@roundup.psfhosted.org> Brett Cannon added the comment: You can ignore the half sentence. I was contemplating closing this issue when I decided to leave it open in case someone wanted to propose something and another core dev wanted to take it on. But everything is working as I expect it to and you may want to do your own implementation on PyPI if you want fancier as it's already a delicate thing as it is and so adding complexity for this specific case is a tough sell. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 15:41:25 2020 From: report at bugs.python.org (Brett Cannon) Date: Thu, 12 Nov 2020 20:41:25 +0000 Subject: [issue42273] Using LazyLoader leads to AttributeError In-Reply-To: <1604614463.81.0.853919807892.issue42273@roundup.psfhosted.org> Message-ID: <1605213685.6.0.888020529342.issue42273@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 16:14:46 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 12 Nov 2020 21:14:46 +0000 Subject: [issue32426] Tkinter: reference document of possible cursor names In-Reply-To: <1514241431.48.0.213398074469.issue32426@psf.upfronthosting.co.za> Message-ID: <1605215686.06.0.277474769888.issue32426@roundup.psfhosted.org> Terry J. Reedy added the comment: A link here is not a patch. The current tkinter doc for the cursor option in https://docs.python.org/3/library/tkinter.html#tk-option-data-types badly needs updating. """ The standard X cursor names from cursorfont.h can be used, without the XC_ prefix. For example to get a hand cursor (XC_hand2), use the string "hand2". You can also specify a bitmap and mask file of your own. See page 179 of Ousterhout?s book. """ The ttk doc https://docs.python.org/3/library/tkinter.ttk.html#standard-options is, as noted, incomplete. "Specifies the mouse cursor to be used for the widget. If set to the empty string (the default), the cursor is inherited for the parent widget." I propose to replace the tkinter entry with a combined and updated entry. """ The name of the cursor to use when the mouse point is over the widget. An empty string, the default, means to inherit the cursor from the parent widget or the system. "none" means no cursor. Other names recognized by tk are listed at https://www.tcl.tk/man/tcl/TkCmd/cursors.htm. Possible forms of the cross-platform cursors are illustrated at https://tkdocs.com/shipman/cursors.html. The cursor hot spot, the point reported for mouse clicks, depends on the cursor. """ I may try to reference this, rather than copy it, in the ttk doc. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python resolution: fixed -> stage: resolved -> needs patch status: closed -> open title: Tkinter.ttk Widget does not define wich option exists to set the cursor -> Tkinter: reference document of possible cursor names type: resource usage -> versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 16:25:08 2020 From: report at bugs.python.org (Dominik V.) Date: Thu, 12 Nov 2020 21:25:08 +0000 Subject: [issue42317] Docs of `typing.get_args`: Mention that due to caching of typing generics the order of arguments for Unions can be different from the one of the returned tuple In-Reply-To: <1605036937.3.0.364895182043.issue42317@roundup.psfhosted.org> Message-ID: <1605216308.12.0.983455697419.issue42317@roundup.psfhosted.org> Dominik V. added the comment: Thinking more about it, I came to realize that it's not the Union that sits at the root of this behavior, but rather the caching performed by generic types in general. So if we consider ``` L1 = List[Union[int, str]] L2 = List[Union[str, int]] ``` then `get_args(L1)[0] is get_args(L2)[0]` and so `get_args` has no influence on the order of arguments of the Union objects (they are already the same for L1 and L2). So I think it would be more accurate to add the following sentence instead: > If `X` is a generic type, the returned objects `(Y, Z, ...)` might not be identical to the ones used in the form `X[Y, Z, ...]` due to type caching. Everything else follows from there (including flattening of nested Unions). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 16:28:21 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 12 Nov 2020 21:28:21 +0000 Subject: [issue42317] Docs of `typing.get_args`: Mention that due to caching of typing generics the order of arguments for Unions can be different from the one of the returned tuple In-Reply-To: <1605036937.3.0.364895182043.issue42317@roundup.psfhosted.org> Message-ID: <1605216501.83.0.653002981711.issue42317@roundup.psfhosted.org> Guido van Rossum added the comment: Exactly! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 16:39:57 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 12 Nov 2020 21:39:57 +0000 Subject: [issue41987] singledispatchmethod raises an error when relying on a forward declaration In-Reply-To: <1602274303.54.0.362260014367.issue41987@roundup.psfhosted.org> Message-ID: <1605217197.96.0.278899160201.issue41987@roundup.psfhosted.org> Guido van Rossum added the comment: > Does anyone know why the treatment of unresolved references was changed in 3.9? Probably to prepare for 3.10, where `from _future__ import annotations` is the default. > Also, I'm a bit puzzled about something from the previously mentioned Integer class and its use of __future__.annotations. > > Why is it possible to declare an Integer return type for the add() method, but only possible to declare an "Integer" forward reference for the _() method? I don't know -- you might want to look through the source code of singledispatch. Maybe the flow through the initial decorator is different than the flow through register(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 16:41:25 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 12 Nov 2020 21:41:25 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1605217285.75.0.611241855471.issue42296@roundup.psfhosted.org> Guido van Rossum added the comment: Can you think of a fix? (Presumably restore some code that was deleted from 3.9?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 17:05:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Nov 2020 22:05:33 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1605218733.15.0.119821421881.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: See bpo-27400 for the _datetime module: strptime_module variable is not cleared by Py_Finalize(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 17:10:44 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 12 Nov 2020 22:10:44 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1605219044.71.0.101657982142.issue40939@roundup.psfhosted.org> Guido van Rossum added the comment: Honestly that code seems poorly thought out. If running it returns -1, an exception was presumably reported, but not necessarily SyntaxError -- so parsing it may not produce an error at all. The functionality needed is in PyRun_InteractiveOneObjectEx(), but that is not public. :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 17:39:53 2020 From: report at bugs.python.org (Christian Heimes) Date: Thu, 12 Nov 2020 22:39:53 +0000 Subject: [issue42333] Port ssl module to heap types and module state (PEP 573) In-Reply-To: <1605201558.44.0.0361525548575.issue42333@roundup.psfhosted.org> Message-ID: <1605220793.16.0.961545523443.issue42333@roundup.psfhosted.org> Christian Heimes added the comment: I underestimated the effort but it's done: +567 ?446 1,013 lines changed I even got rid of PyState_FindModule(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 17:45:52 2020 From: report at bugs.python.org (Christian Heimes) Date: Thu, 12 Nov 2020 22:45:52 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1605221152.65.0.845251625195.issue1635741@roundup.psfhosted.org> Christian Heimes added the comment: See bpo-42333 for _ssl module. The PR introduces module state and ports the _ssl extension to multiphase initialization. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 17:50:50 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 12 Nov 2020 22:50:50 +0000 Subject: [issue42336] Make PCbuild/build.bat build x64 by default Message-ID: <1605221450.36.0.206300145887.issue42336@roundup.psfhosted.org> New submission from Steve Dower : Now that the 64-bit download is the default on python.org, we should make the build command default to 64-bit as well. This should only affect contributors, so should be non-controversial. But we should add a "-x86" option to the batch file as well. ---------- components: Build, Windows messages: 380858 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Make PCbuild/build.bat build x64 by default versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 17:56:01 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 12 Nov 2020 22:56:01 +0000 Subject: [issue42337] Skip building web installers on Windows Message-ID: <1605221761.11.0.317239545027.issue42337@roundup.psfhosted.org> New submission from Steve Dower : In future releases, we won't be advertising the web-based installers anymore. They never got much use, and the shorter list of downloads will be more beneficial to users than saving 10-20MB worth of bandwidth. The web site change has already been made, and depending on when RMs pick up the newer script might impact any future release. For 3.10, at least, we can stop producing and uploading the web-based installer. It won't hurt to keep doing it, and the *_pdb.msi and *_d.msi files will remain (as those are always download on demand), but it can eventually stop being produced (should just be in Tools/msi/buildrelease.bat, IIRC). ---------- assignee: steve.dower components: Build, Windows messages: 380859 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: low severity: normal status: open title: Skip building web installers on Windows versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 18:01:33 2020 From: report at bugs.python.org (Tim Peters) Date: Thu, 12 Nov 2020 23:01:33 +0000 Subject: [issue42336] Make PCbuild/build.bat build x64 by default In-Reply-To: <1605221450.36.0.206300145887.issue42336@roundup.psfhosted.org> Message-ID: <1605222093.36.0.146613330195.issue42336@roundup.psfhosted.org> Tim Peters added the comment: +1. If you're feeling more ambitious, it would also be good to change build.bat and rt.bat to use the same "which platform?" spellings and with the same defaults. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 18:06:15 2020 From: report at bugs.python.org (Jeff Moguillansky) Date: Thu, 12 Nov 2020 23:06:15 +0000 Subject: [issue42338] Enable Debug Build For Python Native Modules in Windows, with Visual Studio Toolchain Message-ID: <1605222375.66.0.305564714258.issue42338@roundup.psfhosted.org> New submission from Jeff Moguillansky : Hi, We developed a Python module that interfaces with native code via Cython. We currently build on Windows with Visual Studio Toolchain. We encounter the following issues when trying to build a debug version: 1) 3rd party modules installed via PIP are Release mode, but Visual Studio toolchain doesn't allow to mix Debug and Release libs. To workaround this issue, we build our module in "Release" mode, with debug symbols enabled, and with compiled optimization disabled (essentially a hack). 2) To build our module we currently use the following hack: step 1: run python.exe setup.py build --compiler=msvc step 2: extract the output step 3: change /Ox to /Od (disable compiler optimization) add /Zi flag to compiler flags (enable debug symbols) add /DEBUG flag to linker flags Please advise what is the best solution? ---------- components: Build messages: 380861 nosy: jmoguill2 priority: normal severity: normal status: open title: Enable Debug Build For Python Native Modules in Windows, with Visual Studio Toolchain type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 18:17:30 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Thu, 12 Nov 2020 23:17:30 +0000 Subject: [issue42319] The `functools.singledispatchmethod` example in the document cannot run In-Reply-To: <1605081595.15.0.657429202369.issue42319@roundup.psfhosted.org> Message-ID: <1605223050.73.0.927972905921.issue42319@roundup.psfhosted.org> Jakub Stasiak added the comment: There's an earlier issue created that relates to this (https://bugs.python.org/issue39679) and there are some possible solutions to get singledispatchmethod and classmethod work there. ---------- nosy: +jstasiak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 18:35:38 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 12 Nov 2020 23:35:38 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1605224138.28.0.840505104462.issue40939@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > By the way, is there a replacement for this function? The unbound project uses it to display a SyntaxError when PyRun_SimpleFile() fails. There is no replacement for the function because that function returned CST nodes and those not exist anymore. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 18:46:45 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Thu, 12 Nov 2020 23:46:45 +0000 Subject: [issue17852] Built-in module _io can lose data from buffered files in reference cycles In-Reply-To: <1367048010.96.0.3580561262.issue17852@psf.upfronthosting.co.za> Message-ID: <1605224805.48.0.0178156093933.issue17852@roundup.psfhosted.org> Change by Jakub Stasiak : ---------- nosy: +jstasiak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 19:50:10 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 13 Nov 2020 00:50:10 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1605228610.62.0.228937325386.issue42296@roundup.psfhosted.org> Steve Dower added the comment: This looks like the smallest change I can make to fix it: diff --git a/Include/internal/pycore_pystate.h b/Include/internal/pycore_pystate.h index 0cd5550cfd..9ff740b87b 100644 --- a/Include/internal/pycore_pystate.h +++ b/Include/internal/pycore_pystate.h @@ -34,7 +34,11 @@ _Py_IsMainInterpreter(PyThreadState* tstate) static inline int _Py_ThreadCanHandleSignals(PyInterpreterState *interp) { +#ifndef MS_WINDOWS return (_Py_IsMainThread() && interp == _PyRuntime.interpreters.main); +#else + return (interp == _PyRuntime.interpreters.main); +#endif } I'll need Victor(?) to confirm whether checking for the main interpreter is sufficient. We're calling this from a new thread that AFAICT never holds the GIL, and we pass the main interpreter in explicitly (from trip_signal) so this check always succeeds (here, but not necessarily in other places where it is called). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 19:52:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 00:52:47 +0000 Subject: [issue42246] Implement PEP 626 In-Reply-To: <1604331162.26.0.596873070589.issue42246@roundup.psfhosted.org> Message-ID: <1605228767.1.0.693017505418.issue42246@roundup.psfhosted.org> STINNER Victor added the comment: > New changeset 877df851c3ecdb55306840e247596e7b7805a60a by Mark Shannon in branch 'master': > bpo-42246: Partial implementation of PEP 626. (GH-23113) This change introduced reference leaks: https://buildbot.python.org/all/#builders/384/builds/100 5 tests failed: test_asyncgen test_builtin test_coroutines test_exceptions test_syntax For example: $ ./python -m test test_syntax -R 3:3 -m test.test_syntax.SyntaxTestCase.test_no_indent 0:00:00 load avg: 1.59 Run tests sequentially 0:00:00 load avg: 1.59 [1/1] test_syntax beginning 6 repetitions 123456 ...... test_syntax leaked [27, 27, 27] references, sum=81 test_syntax leaked [20, 20, 20] memory blocks, sum=60 test_syntax failed == Tests result: FAILURE == 1 test failed: test_syntax Total duration: 955 ms Tests result: FAILURE ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 21:01:48 2020 From: report at bugs.python.org (hongweipeng) Date: Fri, 13 Nov 2020 02:01:48 +0000 Subject: [issue42319] The `functools.singledispatchmethod` example in the document cannot run In-Reply-To: <1605081595.15.0.657429202369.issue42319@roundup.psfhosted.org> Message-ID: <1605232908.58.0.594322204851.issue42319@roundup.psfhosted.org> hongweipeng added the comment: Thanks,so close this one due to duplicate issue. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 21:19:41 2020 From: report at bugs.python.org (Jelle Geerts) Date: Fri, 13 Nov 2020 02:19:41 +0000 Subject: [issue42339] official embedded Python fails to import certain modules Message-ID: <1605233981.71.0.0380654118097.issue42339@roundup.psfhosted.org> New submission from Jelle Geerts : This problem happened with 'python-3.8.6-embed-amd64.zip' when trying to import certain modules. Note that this problem does NOT happen with Python from 'python-3.7.9-embed-amd64.zip' (its output is also attached below). It happened with 'import socket', 'import ctypes', and so on (see below). Platform: Windows 7 SP1 64-bit (also KB2999226 was installed) Python 3.8.6 (tags/v3.8.6:db45529, Sep 23 2020, 15:52:53) [MSC v.1927 64 bit (AM D64)] on win32 >>> import lzma Traceback (most recent call last): File "", line 1, in File "", line 259, in load_module File "lzma.py", line 27, in ImportError: DLL load failed while importing _lzma: De parameter is onjuist. >>> import socket Traceback (most recent call last): File "", line 1, in File "", line 259, in load_module File "socket.py", line 49, in ImportError: DLL load failed while importing _socket: De parameter is onjuist. >>> import ctypes Traceback (most recent call last): File "", line 1, in File "", line 259, in load_module File "ctypes\__init__.py", line 7, in ImportError: DLL load failed while importing _ctypes: De parameter is onjuist. >>> import bz2 Traceback (most recent call last): File "", line 1, in File "", line 259, in load_module File "bz2.py", line 19, in ImportError: DLL load failed while importing _bz2: De parameter is onjuist. >>> For comparison, with Python from 'python-3.7.9-embed-amd64.zip' it does work: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] on win32 >>> import lzma >>> import socket >>> import ctypes >>> import bz2 >>> ---------- components: Installation messages: 380867 nosy: bughunter2 priority: normal severity: normal status: open title: official embedded Python fails to import certain modules type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 21:20:27 2020 From: report at bugs.python.org (Benjamin Fogle) Date: Fri, 13 Nov 2020 02:20:27 +0000 Subject: [issue42340] KeyboardInterrupt should come with a warning In-Reply-To: <1605234005.33.0.891581452406.issue42340@roundup.psfhosted.org> Message-ID: <1605234027.74.0.870328463237.issue42340@roundup.psfhosted.org> Change by Benjamin Fogle : Added file: https://bugs.python.org/file49595/sigint_condition_1.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 21:20:05 2020 From: report at bugs.python.org (Benjamin Fogle) Date: Fri, 13 Nov 2020 02:20:05 +0000 Subject: [issue42340] KeyboardInterrupt should come with a warning Message-ID: <1605234005.33.0.891581452406.issue42340@roundup.psfhosted.org> New submission from Benjamin Fogle : This is related to bpo-29988, and I'm happy to move this to there. I made this a separate issue because this is a workaround, not a fix as was being discussed there. Also unlike bpo-29988, this is not restricted to context managers or finally blocks. TL;DR: Raising exceptions from interrupt handlers (most notably KeyboardInterrupt) can wreak havoc in ways that are impossible to fix. This should be noted in the documentation, with a workaround. I've attached a few example scripts that cause various strange behavior on Linux when a KeyboardInterrupt is raised at just the right time. There are likely many, many more possible examples: - sigint_condition_1.py: Cause a deadlock with threading.Condition - sigint_condition_2.py: Cause a double-release and/or notify on unacquired threading.Condition - sigint_tempfile.py: Cause NamedTemporaryFiles to not be deleted - sigint_zipfile.py: Cause ZipExtFile to corrupt its state When a user presses Ctrl+C, a KeyboardInterrupt will be raised on the main thread at some later time. This exception may be raised after any bytecode, and most Python code, including the standard library, is not designed to handle exceptions that spring up from nowhere. As a simple example, consider threading.Condition: def __enter__(self): return self._lock.__enter__() The KeyboardInterrupt could be raised just prior to return. In this case, __exit__ will never be called, and the underlying lock will remain acquired. A similar problem occurs if KeyboardInterrupt occurs at the start of __exit__. This can be mitigated by attempting to catch a KeyboardInterrupt *absolutely everywhere*, but even then, it can't be fixed completely. def __enter__(self): try: # it could happen here, in which case we should not unlock ret = self._lock.__enter__() # it could happen here, in which case we must unlock except KeyboardInterrupt: # it could, in theory, happen again right here ... raise return ret # it could happen here, which is the same problem we had before This is not restricted to context handlers or try/finally blocks. The zipfile module is a good example of code that is almost certain to enter an inconsistent state if a KeyboardInterrupt is raised while it's doing work: class ZipExtFile: ... def read1(self, n): ... self._readbuffer = b'' # what happens if KeyboardInterrupt happens here? self._offset = 0 ... Due to how widespread this is, it's not worth "fixing". (And honestly, it seems to be a rare problem in practice.) I believe that it would be better to clearly document that KeyboardInterrupt (or any exception propagated from a signal handler) may leave the system in an inconsistent state. Complex or high reliability applications should avoid catching KeyboardInterrupt as a way of gracefully shutting down, and should prefer registering their own SIGINT handler. They should also avoid raising exceptions from signal handlers at all. ---------- assignee: docs at python components: Documentation messages: 380868 nosy: benfogle, docs at python priority: normal severity: normal status: open title: KeyboardInterrupt should come with a warning type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 21:20:36 2020 From: report at bugs.python.org (Benjamin Fogle) Date: Fri, 13 Nov 2020 02:20:36 +0000 Subject: [issue42340] KeyboardInterrupt should come with a warning In-Reply-To: <1605234005.33.0.891581452406.issue42340@roundup.psfhosted.org> Message-ID: <1605234036.1.0.0389109853464.issue42340@roundup.psfhosted.org> Change by Benjamin Fogle : Added file: https://bugs.python.org/file49596/sigint_condition_2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 21:20:48 2020 From: report at bugs.python.org (Benjamin Fogle) Date: Fri, 13 Nov 2020 02:20:48 +0000 Subject: [issue42340] KeyboardInterrupt should come with a warning In-Reply-To: <1605234005.33.0.891581452406.issue42340@roundup.psfhosted.org> Message-ID: <1605234048.84.0.245021955867.issue42340@roundup.psfhosted.org> Change by Benjamin Fogle : Added file: https://bugs.python.org/file49598/sigint_zipfile.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 21:20:43 2020 From: report at bugs.python.org (Benjamin Fogle) Date: Fri, 13 Nov 2020 02:20:43 +0000 Subject: [issue42340] KeyboardInterrupt should come with a warning In-Reply-To: <1605234005.33.0.891581452406.issue42340@roundup.psfhosted.org> Message-ID: <1605234043.62.0.618494763376.issue42340@roundup.psfhosted.org> Change by Benjamin Fogle : Added file: https://bugs.python.org/file49597/sigint_tempfile.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 21:28:38 2020 From: report at bugs.python.org (Benjamin Fogle) Date: Fri, 13 Nov 2020 02:28:38 +0000 Subject: [issue42340] KeyboardInterrupt should come with a warning In-Reply-To: <1605234005.33.0.891581452406.issue42340@roundup.psfhosted.org> Message-ID: <1605234518.26.0.782860534823.issue42340@roundup.psfhosted.org> Change by Benjamin Fogle : ---------- keywords: +patch pull_requests: +22151 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23255 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 22:45:30 2020 From: report at bugs.python.org (Eryk Sun) Date: Fri, 13 Nov 2020 03:45:30 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1605239130.4.0.309819899922.issue42296@roundup.psfhosted.org> Eryk Sun added the comment: Note that this issue only applies to a process that has a single Python thread. With multiple Python threads, the signal handler gets called when the main thread acquires the GIL. As far as Windows console-driven SIGINT and SIGBREAK are concerned, C signal_handler() is called on a new thread that the interpreter has never seen before and will never see again. But there's also signal.raise_signal(signal.SIGINT) to consider, executing on a Python thread. Another path to trip_signal() is via _thread.interrupt_main(), i.e. PyErr_SetInterrupt(). _Py_ThreadCanHandleSignals() checks whether the current thread is the main thread in the main interpreter. It gets called to guarantee this condition in multiple places, such as handle_signals() in Python/ceval.c. So the _Py_IsMainThread() call is required. In Windows, maybe the main-thread check could be bypassed in SIGNAL_PENDING_SIGNALS() for a non-Python thread (i.e. no tstate), by directly setting ceval2->eval_breaker instead of calling COMPUTE_EVAL_BREAKER() in this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 12 22:59:37 2020 From: report at bugs.python.org (Inada Naoki) Date: Fri, 13 Nov 2020 03:59:37 +0000 Subject: [issue42141] Speedup various dict inits In-Reply-To: <1603574269.77.0.908879318121.issue42141@roundup.psfhosted.org> Message-ID: <1605239977.28.0.662262148898.issue42141@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 00:36:10 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Fri, 13 Nov 2020 05:36:10 +0000 Subject: [issue42334] Subclassing int and complex with keyword arguments weird In-Reply-To: <1605205437.83.0.0876606558976.issue42334@roundup.psfhosted.org> Message-ID: <1605245770.68.0.810728354716.issue42334@roundup.psfhosted.org> Dennis Sweeney added the comment: This is because int, str, and complex are immutable. If I have class MyInt(int): def __init__(self, stuff): pass then when I call MyInt("19"), the string "19" is passed to the constructor int.__new__ before the overridden initializer MyInt.__init__. You can only override that by implementing a MyInt.__new__ to override the int constructor. This is not a bug. ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 00:41:37 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Fri, 13 Nov 2020 05:41:37 +0000 Subject: [issue42334] Subclassing int and complex with keyword arguments weird In-Reply-To: <1605205437.83.0.0876606558976.issue42334@roundup.psfhosted.org> Message-ID: <1605246097.28.0.630686273726.issue42334@roundup.psfhosted.org> Dennis Sweeney added the comment: Here's an example: class A(complex): def __init__(self, *args, test): self.test = test def __new__(cls, *args, test): return super().__new__(cls, *args) >>> a = A(1, test="TEST") >>> a (1+0j) >>> a.test 'TEST' >>> b = A(1, 1, test="TEST2") >>> b (1+1j) >>> b.test 'TEST2' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 01:11:46 2020 From: report at bugs.python.org (Mike Frysinger) Date: Fri, 13 Nov 2020 06:11:46 +0000 Subject: [issue42253] xml.dom.minidom.rst missing standalone documentation In-Reply-To: <1604412182.71.0.862314326589.issue42253@roundup.psfhosted.org> Message-ID: <1605247906.38.0.656164157267.issue42253@roundup.psfhosted.org> Change by Mike Frysinger : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python title: xml.dom.minidom.rst missed informations -> xml.dom.minidom.rst missing standalone documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 01:13:51 2020 From: report at bugs.python.org (Mike Frysinger) Date: Fri, 13 Nov 2020 06:13:51 +0000 Subject: [issue23436] xml.dom.minidom.Element.ownerDocument is hidden In-Reply-To: <1423596643.73.0.960398071264.issue23436@psf.upfronthosting.co.za> Message-ID: <1605248031.34.0.960271805477.issue23436@roundup.psfhosted.org> Change by Mike Frysinger : ---------- title: xml.dom.minidom.Element.ownerDocument is hiden -> xml.dom.minidom.Element.ownerDocument is hidden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 01:22:54 2020 From: report at bugs.python.org (Mike Frysinger) Date: Fri, 13 Nov 2020 06:22:54 +0000 Subject: [issue42341] xml.dom.minidom parsing omits Text nodes in top level Message-ID: <1605248574.32.0.904298964211.issue42341@roundup.psfhosted.org> New submission from Mike Frysinger : $ python3 Python 3.8.5 (default, Aug 2 2020, 15:09:07) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from xml.dom import minidom # Lets parse a simple XML file with comment & text nodes in the top level. >>> dom = minidom.parseString('\n\n\n
\n\n\n
\n') # Where did those newlines get to outside of
? >>> dom.toxml() '
\n\n\n
' # No Text nodes in the root list :(. >>> dom.childNodes [, , ] # But they all exist fine under
. >>> dom.childNodes[2].childNodes [, , , , ] ---------- components: XML messages: 380872 nosy: vapier priority: normal severity: normal status: open title: xml.dom.minidom parsing omits Text nodes in top level versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 02:49:14 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 13 Nov 2020 07:49:14 +0000 Subject: [issue42339] official embedded Python fails to import certain modules In-Reply-To: <1605233981.71.0.0380654118097.issue42339@roundup.psfhosted.org> Message-ID: <1605253754.56.0.328390883126.issue42339@roundup.psfhosted.org> Change by Christian Heimes : ---------- assignee: -> steve.dower components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 04:05:44 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Nov 2020 09:05:44 +0000 Subject: [issue42086] AST: Document / re-design? the simple constructor nodes from sums In-Reply-To: <1603137502.35.0.449039325711.issue42086@roundup.psfhosted.org> Message-ID: <1605258344.58.0.0853309039601.issue42086@roundup.psfhosted.org> miss-islington added the comment: New changeset bc777047833256bc6b10b2c7b46cce9e9e6f956c by Miss Islington (bot) in branch '3.9': [3.9] bpo-42086: Document AST operator nodes acts as a singleton (GH-22896) (GH-22897) https://github.com/python/cpython/commit/bc777047833256bc6b10b2c7b46cce9e9e6f956c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 04:59:27 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 13 Nov 2020 09:59:27 +0000 Subject: [issue42086] AST: Document / re-design? the simple constructor nodes from sums In-Reply-To: <1603137502.35.0.449039325711.issue42086@roundup.psfhosted.org> Message-ID: <1605261567.05.0.199585724665.issue42086@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 05:23:37 2020 From: report at bugs.python.org (Ed Catmur) Date: Fri, 13 Nov 2020 10:23:37 +0000 Subject: [issue42342] asyncio.open_connection(local_addr=('localhost', port)) fails with TypeError: AF_INET address must be a pair (host, port) Message-ID: <1605263017.45.0.821115077968.issue42342@roundup.psfhosted.org> New submission from Ed Catmur : Context: CentOS 7.8.2003, Python 3.8 from SCL. localhost has IPv4 and IPv6 bindings, IPv6 first: $ python -c "import socket;print(socket.getaddrinfo('localhost',0,type=socket.SOCK_STREAM))" [(, , 6, '', ('::1', 0, 0, 0)), (, , 6, '', ('127.0.0.1', 0))] import asyncio async def main(): await asyncio.open_connection('localhost', 9990, local_addr=('localhost', 9991)) asyncio.run(main()) Traceback (most recent call last): File "async.py", line 4, in asyncio.run(main()) File "/opt/rh/rh-python38/root/usr/lib64/python3.8/asyncio/runners.py", line 43, in run return loop.run_until_complete(main) File "/opt/rh/rh-python38/root/usr/lib64/python3.8/asyncio/base_events.py", line 608, in run_until_complete return future.result() File "async.py", line 3, in main await asyncio.open_connection('10.10.10.10', 9990, local_addr=('localhost', 9991)) File "/opt/rh/rh-python38/root/usr/lib64/python3.8/asyncio/streams.py", line 52, in open_connection transport, _ = await loop.create_connection( File "/opt/rh/rh-python38/root/usr/lib64/python3.8/asyncio/base_events.py", line 1002, in create_connection sock = await self._connect_sock( File "/opt/rh/rh-python38/root/usr/lib64/python3.8/asyncio/base_events.py", line 904, in _connect_sock sock.bind(laddr) TypeError: AF_INET address must be a pair (host, port) It looks like this has a similar root cause to issue 35302 - we should be filtering local addrinfos by family for valid combinations. ---------- components: asyncio messages: 380874 nosy: asvetlov, ecatmur2, yselivanov priority: normal severity: normal status: open title: asyncio.open_connection(local_addr=('localhost', port)) fails with TypeError: AF_INET address must be a pair (host, port) type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 06:17:53 2020 From: report at bugs.python.org (Antti Haapala) Date: Fri, 13 Nov 2020 11:17:53 +0000 Subject: [issue42343] threading.local documentation should be on the net... Message-ID: <1605266273.51.0.273989729799.issue42343@roundup.psfhosted.org> New submission from Antti Haapala : The current documentation of `thread.local` is ---- Thread-Local Data Thread-local data is data whose values are thread specific. To manage thread-local data, just create an instance of local (or a subclass) and store attributes on it: mydata = threading.local() mydata.x = 1 The instance?s values will be different for separate threads. class threading.local A class that represents thread-local data. For more details and extensive examples, see the documentation string of the _threading_local module. ---- There is no link to the `_threading_local` module docs in the documentation and none of the content from the modules docstrings appear anywhere on docs.python.org website. This is rather annoying because the docstring contains completely non-trivial information including that threading.local can be subclassed and that the __init__ will be run once for each thread for each instance where attributes are accessed. ---------- assignee: docs at python components: Documentation messages: 380875 nosy: docs at python, ztane priority: normal severity: normal status: open title: threading.local documentation should be on the net... type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 06:43:05 2020 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Nov 2020 11:43:05 +0000 Subject: [issue42334] Subclassing int and complex with keyword arguments weird In-Reply-To: <1605205437.83.0.0876606558976.issue42334@roundup.psfhosted.org> Message-ID: <1605267785.96.0.293988859358.issue42334@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 06:43:19 2020 From: report at bugs.python.org (undefined blinded) Date: Fri, 13 Nov 2020 11:43:19 +0000 Subject: [issue41918] exec fails to take locals into account when running list comprehensions or functions In-Reply-To: <1601716004.0.0.802801393199.issue41918@roundup.psfhosted.org> Message-ID: <1605267799.23.0.629607174617.issue41918@roundup.psfhosted.org> undefined blinded added the comment: This seems to happen only when both arguments to exec are used: ``` Python 3.7.7 (default, Mar 10 2020, 15:43:27) [Clang 10.0.0 (clang-1000.11.45.5)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> exec('text = ["hallo"]\ntext.append("Welt")\nprint(" ".join([text[i] for i in range(0, 2)]))') hallo Welt >>> exec('text = ["hallo"]\ntext.append("Welt")\nprint(" ".join([text[i] for i in range(0, 2)]))', {}) hallo Welt >>> exec('text = ["hallo"]\ntext.append("Welt")\nprint(" ".join(text))', {}, {}) hallo Welt >>> exec('text = ["hallo"]\ntext.append("Welt")\nprint(" ".join([text[i] for i in range(0, 2)]))', {}, {}) Traceback (most recent call last): File "", line 1, in File "", line 3, in File "", line 3, in NameError: name 'text' is not defined ``` ---------- nosy: +alex0kamp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 06:50:17 2020 From: report at bugs.python.org (Nikolas Havrikov) Date: Fri, 13 Nov 2020 11:50:17 +0000 Subject: [issue41918] exec fails to take locals into account when running list comprehensions or functions In-Reply-To: <1601716004.0.0.802801393199.issue41918@roundup.psfhosted.org> Message-ID: <1605268217.06.0.292717368557.issue41918@roundup.psfhosted.org> Nikolas Havrikov added the comment: This issue also occurs in Python 3.8.6 ---------- nosy: +havrikov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 06:53:50 2020 From: report at bugs.python.org (Mark Shannon) Date: Fri, 13 Nov 2020 11:53:50 +0000 Subject: [issue42246] Implement PEP 626 In-Reply-To: <1604331162.26.0.596873070589.issue42246@roundup.psfhosted.org> Message-ID: <1605268430.72.0.878154996744.issue42246@roundup.psfhosted.org> Change by Mark Shannon : ---------- pull_requests: +22153 pull_request: https://github.com/python/cpython/pull/23256 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 07:20:42 2020 From: report at bugs.python.org (nieder) Date: Fri, 13 Nov 2020 12:20:42 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1605270042.74.0.913100329557.issue41100@roundup.psfhosted.org> Change by nieder : ---------- nosy: +nieder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 07:38:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 12:38:41 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1605271121.08.0.70778422522.issue42296@roundup.psfhosted.org> STINNER Victor added the comment: This issue reminds me bpo-40082 where I wrote: "The problem on Windows is that each CTRL+c is executed in a different thread." I fixed the issue with: New changeset b54a99d6432de93de85be2b42a63774f8b4581a0 by Victor Stinner in branch 'master': bpo-40082: trip_signal() uses the main interpreter (GH-19441) https://github.com/python/cpython/commit/b54a99d6432de93de85be2b42a63774f8b4581a0 "Fix the signal handler: it now always uses the main interpreter, rather than trying to get the current Python thread state." Here we have to be careful. If _Py_ThreadCanHandleSignals() always return true, we may reintroduce bpo-40010 issue: ceval bytecode evaluation loop may be interrupted at every single instruction and call eval_frame_handle_pending() which does nothing. COMPUTE_EVAL_BREAKER() decides if the loop must be interrupted. Rather than modifying _Py_ThreadCanHandleSignals(), I would prefer to modify SIGNAL_PENDING_CALLS(). For example, rather than using COMPUTE_EVAL_BREAKER() complex logic to decide if the current Python thread must check if there is a pending signal, always interrupt and let the thread decide if it has something to do. The second problem is to reset eval_breaker to 0. If there is no pending signal and no pending call, eval_frame_handle_pending() leaves eval_breaker unchanged. eval_frame_handle_pending() should also be updated to reset eval_breaker in this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 07:51:33 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Nov 2020 12:51:33 +0000 Subject: [issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget In-Reply-To: <1605043338.18.0.398355808071.issue42318@roundup.psfhosted.org> Message-ID: <1605271893.82.0.331736359747.issue42318@roundup.psfhosted.org> Serhiy Storchaka added the comment: Just to be sure, what is the result of pasting and executing the following code on Tk 8.6.8 and 8.6.10? print(ascii("?")) ---------- nosy: +serhiy.storchaka versions: +Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 07:54:22 2020 From: report at bugs.python.org (Mark Shannon) Date: Fri, 13 Nov 2020 12:54:22 +0000 Subject: [issue42246] Implement PEP 626 In-Reply-To: <1604331162.26.0.596873070589.issue42246@roundup.psfhosted.org> Message-ID: <1605272062.22.0.656992161909.issue42246@roundup.psfhosted.org> Mark Shannon added the comment: New changeset fd009e606a48e803e7187983bf9a5682e938fddb by Mark Shannon in branch 'master': bpo-42246: Fix memory leak in compiler (GH-23256) https://github.com/python/cpython/commit/fd009e606a48e803e7187983bf9a5682e938fddb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 07:56:40 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Nov 2020 12:56:40 +0000 Subject: [issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget In-Reply-To: <1605043338.18.0.398355808071.issue42318@roundup.psfhosted.org> Message-ID: <1605272200.63.0.468425662622.issue42318@roundup.psfhosted.org> Serhiy Storchaka added the comment: Well, it is likely the same syntax error. Then what will print print(ascii(input())) when you paste ? and press Enter? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 08:17:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 13:17:42 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1605273462.4.0.334111699115.issue42296@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +22154 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23257 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 08:25:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 13:25:11 +0000 Subject: [issue38823] Improve stdlib module initialization error handling. In-Reply-To: <1573930465.91.0.871939917002.issue38823@roundup.psfhosted.org> Message-ID: <1605273911.32.0.354374813853.issue38823@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22155 pull_request: https://github.com/python/cpython/pull/23258 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 08:42:06 2020 From: report at bugs.python.org (=?utf-8?q?J=C3=BCrgen_Gmach?=) Date: Fri, 13 Nov 2020 13:42:06 +0000 Subject: [issue42344] SimpleNamespace: update documentation regarding comparison Message-ID: <1605274926.75.0.147847269171.issue42344@roundup.psfhosted.org> New submission from J?rgen Gmach : When tinkering around with `SimpleNamespace` I tried to figure out the reasons for using it over just the `class NS: pass` alternative. One reason is the comparison, which is not a plain `id` comparison, but an attribute comparison. When looking at the documentation of the imaginary python implementation, where only dicts are compared, the reader (me) could think you can compare it to classes. https://docs.python.org/3/library/types.html?highlight=simplenamespace#types.SimpleNamespace ``` >>> from types import SimpleNamespace >>> simple_ns = SimpleNamespace(a=1, b="two") >>> class NS: pass >>> class_ns = NS() >>> class_ns.a = 1 >>> class_ns.b = "two" >>> simple_ns == class_ns >>> False ``` Actually, the C implementation compares the types, too. https://github.com/python/cpython/blob/bc777047833256bc6b10b2c7b46cce9e9e6f956c/Objects/namespaceobject.c#L163-L171 While the documentation says the Python impl is "roughly equivalent", I's still suggest to update the documentation. If there is some agreement, I'd create a pull request. ---------- messages: 380882 nosy: jugmac00 priority: normal severity: normal status: open title: SimpleNamespace: update documentation regarding comparison _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 08:44:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 13:44:17 +0000 Subject: [issue38823] Improve stdlib module initialization error handling. In-Reply-To: <1573930465.91.0.871939917002.issue38823@roundup.psfhosted.org> Message-ID: <1605275057.13.0.882887538303.issue38823@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0cec97eb6a3e31493c29ef9398fcf39a5ec445a6 by Victor Stinner in branch 'master': bpo-38823: Fix compiler warning in _ctypes on Windows (GH-23258) https://github.com/python/cpython/commit/0cec97eb6a3e31493c29ef9398fcf39a5ec445a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 08:44:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 13:44:46 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1605275086.13.0.243685985576.issue42296@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d96a7a83133250377219227b5cfab4dbdddc5d3a by Victor Stinner in branch 'master': bpo-42296: On Windows, fix CTRL+C regression (GH-23257) https://github.com/python/cpython/commit/d96a7a83133250377219227b5cfab4dbdddc5d3a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 08:49:52 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Nov 2020 13:49:52 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1605275392.64.0.821076499852.issue42296@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +22156 pull_request: https://github.com/python/cpython/pull/23259 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 08:55:12 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 13 Nov 2020 13:55:12 +0000 Subject: [issue42344] SimpleNamespace: update documentation regarding comparison In-Reply-To: <1605274926.75.0.147847269171.issue42344@roundup.psfhosted.org> Message-ID: <1605275712.31.0.396229669437.issue42344@roundup.psfhosted.org> Eric V. Smith added the comment: If the implementation compares the classes, then I think the "roughly equivalent" version should, too. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 09:08:17 2020 From: report at bugs.python.org (Eryk Sun) Date: Fri, 13 Nov 2020 14:08:17 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1605276497.04.0.935978033731.issue42296@roundup.psfhosted.org> Eryk Sun added the comment: > always interrupt and let the thread decide if it has something to do. SIGNAL_PENDING_CALLS() is called on a Python thread via signal.raise_signal() or _thread.interrupt_main() / PyErr_SetInterrupt(). If you'd rather keep the COMPUTE_EVAL_BREAKER() call in that case, the console control-event case can be distinguished via PyGILState_GetThisThreadState(). It returns NULL if there's no thread state, i.e. WINAPI TlsGetValue returns NULL. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 09:11:41 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Nov 2020 14:11:41 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1605276701.88.0.455382055385.issue42296@roundup.psfhosted.org> miss-islington added the comment: New changeset e5729aef6ff67ae7ed05dffc0855477823826191 by Miss Islington (bot) in branch '3.9': bpo-42296: On Windows, fix CTRL+C regression (GH-23257) https://github.com/python/cpython/commit/e5729aef6ff67ae7ed05dffc0855477823826191 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 09:12:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 14:12:06 +0000 Subject: [issue41617] __builtin_bswap16 is used without checking it is supported In-Reply-To: <1598144567.0.0.176317601198.issue41617@roundup.psfhosted.org> Message-ID: <1605276726.74.0.112968665206.issue41617@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22157 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/23260 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 09:11:55 2020 From: report at bugs.python.org (Dominik V.) Date: Fri, 13 Nov 2020 14:11:55 +0000 Subject: [issue42345] Equality of typing.Literal depends on the order of arguments Message-ID: <1605276715.65.0.853257843244.issue42345@roundup.psfhosted.org> New submission from Dominik V. : [PEP 586](https://www.python.org/dev/peps/pep-0586/#shortening-unions-of-literals) specifies that Literal[v1, v2, v3] is equivalent to Union[Literal[v1], Literal[v2], Literal[v3]] Since the equality of Unions doesn't take into account the order of arguments, Literals parametrized with multiple arguments should not be order dependent either. However they seem to: >>> Literal[1, 2] == Literal[2, 1] False Compare with the equivalent form: >>> Union[Literal[1], Literal[2]] == Union[Literal[2], Literal[1]] True In addition to that, the PEP specifies that nested Literals should be equivalent to the flattened version (https://www.python.org/dev/peps/pep-0586/#legal-parameters-for-literal-at-type-check-time). This section is titled "Legal parameters for Literal at type check time" but since the PEP doesn't specify runtime behavior differently, I think it makes sense to assume it is the same. It seems to be different though: >>> Literal[Literal[1, 2], 3] typing.Literal[typing.Literal[1, 2], 3] >>> Literal[Literal[1, 2], 3] == Literal[1, 2, 3] False Also the flattening follows from the above definition `Literal[v1, v2, v3] == Union[Literal[v1], Literal[v2], Literal[v3]]` and the fact that Unions are flattened. ---------- messages: 380888 nosy: Dominik V. priority: normal severity: normal status: open title: Equality of typing.Literal depends on the order of arguments type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 09:13:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 14:13:31 +0000 Subject: [issue41617] __builtin_bswap16 is used without checking it is supported In-Reply-To: <1598144567.0.0.176317601198.issue41617@roundup.psfhosted.org> Message-ID: <1605276811.29.0.701870057246.issue41617@roundup.psfhosted.org> STINNER Victor added the comment: > Unfortunately the patch ultimately committed did not fix the build there. Clang reports its version as "Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)". __clang_major__ is 4 and __clang_minor__ is 2. Oh... I wrote PR 23260 which is based on your original PR 21942. I added a new _Py__has_builtin() macro rather than defining a __has_builtin() which always returns 0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 09:15:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 14:15:36 +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: <1605276936.46.0.648586645293.issue40989@roundup.psfhosted.org> STINNER Victor added the comment: See also "Removal of _Py_ForgetReference from public header in 3.9 issue" thread on python-dev list: https://mail.python.org/archives/list/python-dev at python.org/thread/CQYVR7TZZITURBZKVWIEOBGF343GI52W/#CQYVR7TZZITURBZKVWIEOBGF343GI52W And "Re: [Python-Dev] Removal of _Py_ForgetReference from public header in 3.9 issue" thread on capi-sig list: https://mail.python.org/archives/list/capi-sig at python.org/thread/4EOCN7P4HI56GQ74FY3TMIKDBIPGKL2G/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 09:23:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 14:23:09 +0000 Subject: [issue42346] [subinterpreters] Deny os.fork() in subinterpreters? Message-ID: <1605277389.1.0.366726177524.issue42346@roundup.psfhosted.org> New submission from STINNER Victor : _PyInterpreterState_DeleteExceptMain() contains the following check: PyThreadState *tstate = _PyThreadState_Swap(gilstate, NULL); if (tstate != NULL && tstate->interp != runtime->interpreters->main) { return _PyStatus_ERR("not main interpreter"); } os.fork() is allow in subinterpreters and PyOS_AfterFork_Child() doesn't seem to update runtime->interpreters->main. Either we should update runtime->interpreters->main after fork in the child process, or os.fork() should be denied in subinterpreters. In bpo-37266, I denied the creation of daemon threads in subinterpreters. But I had to revert this change: see bpo-40234. ---------- components: Subinterpreters messages: 380891 nosy: vstinner priority: normal severity: normal status: open title: [subinterpreters] Deny os.fork() in subinterpreters? versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 09:26:46 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Nov 2020 14:26:46 +0000 Subject: [issue42345] Equality of typing.Literal depends on the order of arguments In-Reply-To: <1605276715.65.0.853257843244.issue42345@roundup.psfhosted.org> Message-ID: <1605277606.39.0.877277631915.issue42345@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +gvanrossum, levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 09:30:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 14:30:47 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1605277847.47.0.293468626368.issue42296@roundup.psfhosted.org> STINNER Victor added the comment: > SIGNAL_PENDING_CALLS() is called on a Python thread via signal.raise_signal() or _thread.interrupt_main() / PyErr_SetInterrupt(). If you'd rather keep the COMPUTE_EVAL_BREAKER() call in that case, the console control-event case can be distinguished via PyGILState_GetThisThreadState(). It returns NULL if there's no thread state, i.e. WINAPI TlsGetValue returns NULL. That sounds like a micro-optimization which is not worth it. The code is already quite complicated. I don't think that it's a big deal to call eval_frame_handle_pending() *once* when a signal is received whereas the "current" Python thread cannot handle it. This function is quite simple: when there is no nothing to do, it only reads 3 atomic variable and one tstate attribute. It's cheap. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 09:35:57 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 14:35:57 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1605278157.16.0.455285546277.issue42296@roundup.psfhosted.org> STINNER Victor added the comment: > This code cannot be interrupted with ^C on Windows (e.g. in the REPL) I tested manually: it's now fixed in 3.9 and master branches. Thanks for the bug report Guido. Signal handling is hard. Threads + signals is worse! :-) I modified _PyEval_SignalReceived() to always set eval_breaker to 1. See comments of my commit for the long rationale ;-) If someone knows how to write an automated test for that on Windows, please create a PR and open a new issue ;-) ---------- priority: release blocker -> resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 09:36:05 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 14:36:05 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1605278165.38.0.775177049635.issue42296@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +3.9regression -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 09:38:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 14:38:25 +0000 Subject: [issue41617] __builtin_bswap16 is used without checking it is supported In-Reply-To: <1598144567.0.0.176317601198.issue41617@roundup.psfhosted.org> Message-ID: <1605278305.15.0.830628381689.issue41617@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b3b98082c5431e77c64cab2c85525a804436b505 by Victor Stinner in branch 'master': bpo-41617: Add _Py__has_builtin() macro (GH-23260) https://github.com/python/cpython/commit/b3b98082c5431e77c64cab2c85525a804436b505 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 09:54:33 2020 From: report at bugs.python.org (Ash Holland) Date: Fri, 13 Nov 2020 14:54:33 +0000 Subject: [issue42347] loop.call_exception_handler documentation is lacking Message-ID: <1605279273.64.0.105745281435.issue42347@roundup.psfhosted.org> New submission from Ash Holland : The call_exception_handler documentation lists seven permissible context keys, but the docstring lists nine, and there are two keys referred to in the default_exception_handler implementation that aren't listed in either. The docstring (but not the documentation) mentions "task" ("Task instance") and "asyncgen" ("Asynchronous generator that caused the exception."), though at least "asyncgen" doesn't appear to be used in any exception handler in stdlib as far as I can tell. No documentation mentions "source_traceback" or "handle_traceback", but they're used by the default exception handler and are also provided by e.g. aiohttp: https://github.com/aio-libs/aiohttp/blob/a8d9ec3f1667463e80545b1cacc7833d1ff305e9/aiohttp/client_reqrep.py#L750 ---------- assignee: docs at python components: Documentation, asyncio messages: 380895 nosy: asvetlov, docs at python, sorrel, yselivanov priority: normal severity: normal status: open title: loop.call_exception_handler documentation is lacking type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 10:08:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 15:08:55 +0000 Subject: [issue41617] __builtin_bswap16 is used without checking it is supported In-Reply-To: <1598144567.0.0.176317601198.issue41617@roundup.psfhosted.org> Message-ID: <1605280135.62.0.490204088346.issue41617@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22158 pull_request: https://github.com/python/cpython/pull/23262 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 10:15:33 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Nov 2020 15:15:33 +0000 Subject: [issue42042] sphinx3 renders diffrently docs.python.org for 3.10 In-Reply-To: <1602763041.43.0.432643801896.issue42042@roundup.psfhosted.org> Message-ID: <1605280533.25.0.682565037944.issue42042@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +22159 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23263 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 10:15:20 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 13 Nov 2020 15:15:20 +0000 Subject: [issue42042] sphinx3 renders diffrently docs.python.org for 3.10 In-Reply-To: <1602763041.43.0.432643801896.issue42042@roundup.psfhosted.org> Message-ID: <1605280520.94.0.360252463628.issue42042@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 09490a109faaee9cc393b52742a8575c116c56ba by Dong-hee Na in branch 'master': bpo-42042: Use ids attribute instead of names attribute (GH-22739) https://github.com/python/cpython/commit/09490a109faaee9cc393b52742a8575c116c56ba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 10:20:35 2020 From: report at bugs.python.org (=?utf-8?q?J=C3=BCrgen_Gmach?=) Date: Fri, 13 Nov 2020 15:20:35 +0000 Subject: [issue38914] Clarify wording for warning message when checking a package In-Reply-To: <1574761271.03.0.166396347338.issue38914@roundup.psfhosted.org> Message-ID: <1605280835.74.0.765332834064.issue38914@roundup.psfhosted.org> Change by J?rgen Gmach : ---------- pull_requests: +22160 pull_request: https://github.com/python/cpython/pull/23264 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 10:21:57 2020 From: report at bugs.python.org (=?utf-8?q?J=C3=BCrgen_Gmach?=) Date: Fri, 13 Nov 2020 15:21:57 +0000 Subject: [issue42344] SimpleNamespace: update documentation regarding comparison In-Reply-To: <1605274926.75.0.147847269171.issue42344@roundup.psfhosted.org> Message-ID: <1605280917.23.0.428739798426.issue42344@roundup.psfhosted.org> J?rgen Gmach added the comment: Thanks for your feedback. I created a PR on github. ---------- keywords: +patch message_count: 2.0 -> 3.0 pull_requests: +22161 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23264 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 10:23:11 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 13 Nov 2020 15:23:11 +0000 Subject: [issue42042] sphinx3 renders diffrently docs.python.org for 3.10 In-Reply-To: <1602763041.43.0.432643801896.issue42042@roundup.psfhosted.org> Message-ID: <1605280991.67.0.397863696564.issue42042@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +22162 pull_request: https://github.com/python/cpython/pull/23265 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 10:24:19 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 13 Nov 2020 15:24:19 +0000 Subject: [issue42042] sphinx3 renders diffrently docs.python.org for 3.10 In-Reply-To: <1602763041.43.0.432643801896.issue42042@roundup.psfhosted.org> Message-ID: <1605281059.54.0.884570844284.issue42042@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +lukasz.langa versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 10:30:18 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Nov 2020 15:30:18 +0000 Subject: [issue42042] sphinx3 renders diffrently docs.python.org for 3.10 In-Reply-To: <1602763041.43.0.432643801896.issue42042@roundup.psfhosted.org> Message-ID: <1605281418.3.0.220374164301.issue42042@roundup.psfhosted.org> miss-islington added the comment: New changeset 5ad468d4a8cfeb8a320659016964c23735c12a07 by Miss Islington (bot) in branch '3.8': bpo-42042: Use ids attribute instead of names attribute (GH-22739) https://github.com/python/cpython/commit/5ad468d4a8cfeb8a320659016964c23735c12a07 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 10:38:00 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 13 Nov 2020 15:38:00 +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: <1605281880.54.0.743650673686.issue40968@roundup.psfhosted.org> Christian Heimes added the comment: New changeset f97406be4c0a02c1501c7ab8bc8ef3850eddb962 by Christian Heimes in branch 'master': bpo-40968: Send http/1.1 ALPN extension (#20959) https://github.com/python/cpython/commit/f97406be4c0a02c1501c7ab8bc8ef3850eddb962 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 10:38:16 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 13 Nov 2020 15:38:16 +0000 Subject: [issue42348] Language Reference: Set items Message-ID: <1605281896.65.0.701198414223.issue42348@roundup.psfhosted.org> New submission from Batuhan Taskaya : The data types section of the language reference (https://docs.python.org/3.10/reference/datamodel.html#the-standard-type-hierarchy) has this description directly under the Set type (which has 2 childs, set and frozenset). > These represent unordered, finite sets of unique, immutable objects. I feel like this wording is a bit confusing, considering the items doesn't have to be immutable at all. Can we replace this with hashable? ---------- messages: 380901 nosy: BTaskaya priority: normal severity: normal status: open title: Language Reference: Set items _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 10:38:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 15:38:09 +0000 Subject: [issue41617] __builtin_bswap16 is used without checking it is supported In-Reply-To: <1598144567.0.0.176317601198.issue41617@roundup.psfhosted.org> Message-ID: <1605281889.82.0.975745872302.issue41617@roundup.psfhosted.org> STINNER Victor added the comment: New changeset ec306a2fd91d8b961b2a80c080dd2262bb17d862 by Victor Stinner in branch '3.9': bpo-41617: Add _Py__has_builtin() macro (GH-23260) (GH-23262) https://github.com/python/cpython/commit/ec306a2fd91d8b961b2a80c080dd2262bb17d862 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 10:38:36 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 13 Nov 2020 15:38:36 +0000 Subject: [issue42348] Language Reference: Set items In-Reply-To: <1605281896.65.0.701198414223.issue42348@roundup.psfhosted.org> Message-ID: <1605281916.18.0.489403122581.issue42348@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 10:38:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 15:38:39 +0000 Subject: [issue41617] __builtin_bswap16 is used without checking it is supported In-Reply-To: <1598144567.0.0.176317601198.issue41617@roundup.psfhosted.org> Message-ID: <1605281919.16.0.631971588311.issue41617@roundup.psfhosted.org> STINNER Victor added the comment: Ok, I hope that this issue it's really fixed ;-) Thanks again Joshua Root. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 10:45:09 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 13 Nov 2020 15:45:09 +0000 Subject: [issue42042] sphinx3 renders diffrently docs.python.org for 3.10 In-Reply-To: <1602763041.43.0.432643801896.issue42042@roundup.psfhosted.org> Message-ID: <1605282309.62.0.00629572528193.issue42042@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 0f4dd87a31130b245ec4c6ded9fd6f247e700c0d by Dong-hee Na in branch '3.9': [3.9] bpo-42042: Use ids attribute instead of names attribute (GH-22739) (GH-23265) https://github.com/python/cpython/commit/0f4dd87a31130b245ec4c6ded9fd6f247e700c0d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 10:46:53 2020 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 13 Nov 2020 15:46:53 +0000 Subject: [issue42345] Equality of typing.Literal depends on the order of arguments In-Reply-To: <1605276715.65.0.853257843244.issue42345@roundup.psfhosted.org> Message-ID: <1605282413.25.0.887363917429.issue42345@roundup.psfhosted.org> Guido van Rossum added the comment: Probably the implementation focused on static typing, not runtime checking. Can you come up with a PR for a fix? ---------- stage: -> needs patch versions: +Python 3.10, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 10:51:20 2020 From: report at bugs.python.org (Yash Shete) Date: Fri, 13 Nov 2020 15:51:20 +0000 Subject: [issue42348] Language Reference: Set items In-Reply-To: <1605281896.65.0.701198414223.issue42348@roundup.psfhosted.org> Message-ID: <1605282680.82.0.561126501365.issue42348@roundup.psfhosted.org> Yash Shete added the comment: Should it be "These represents hashable objects" ---------- nosy: +Pixmew _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 11:09:58 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 13 Nov 2020 16:09:58 +0000 Subject: [issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget In-Reply-To: <1605043338.18.0.398355808071.issue42318@roundup.psfhosted.org> Message-ID: <1605283798.17.0.472423531994.issue42318@roundup.psfhosted.org> Ronald Oussoren added the comment: With 8.6.8 both "hang", in that the Shell window no longer accepts input. I've checked that ``print(input())`` works when I don't use an emoji. Interestingly enough, pasting ``print(ascii("?"))`` into an edit window does work, I can continue editing, but the display is messed up. It looks like: print(ascii("?"))print(ascii(" But with the first two identifiers coloured and the two other identifiers black. Saving the file results in the expected file contents. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 11:28:24 2020 From: report at bugs.python.org (Yash Shete) Date: Fri, 13 Nov 2020 16:28:24 +0000 Subject: [issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget In-Reply-To: <1605043338.18.0.398355808071.issue42318@roundup.psfhosted.org> Message-ID: <1605284904.99.0.706300069427.issue42318@roundup.psfhosted.org> Yash Shete added the comment: Well for me in Python 3.9.0 print("?") prints ? and print(ascii("?")) prints '\U0001f600' It does not Raises error "utf-8' codec can't encode characters in position 7-12: surrogates not allowed." as you are suggesting ---------- nosy: +Pixmew _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 11:35:31 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 13 Nov 2020 16:35:31 +0000 Subject: [issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget In-Reply-To: <1605043338.18.0.398355808071.issue42318@roundup.psfhosted.org> Message-ID: <1605285331.21.0.735942896257.issue42318@roundup.psfhosted.org> Ronald Oussoren added the comment: With 8.6.10: >>> print(ascii("?")) raises the SyntaxError mentioned earlier >>> print(ascii(input())) works and prints: '\udced\udca0\udcbd\udced\udcb8\udc84' In an editor window I don't get spurious text, but syntax colouring is a bit off: The text after the closing quote is coloured as if it is inside the string literal. That continues for the characters on the next line ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 11:38:46 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 13 Nov 2020 16:38:46 +0000 Subject: [issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget In-Reply-To: <1605043338.18.0.398355808071.issue42318@roundup.psfhosted.org> Message-ID: <1605285526.22.0.756623256491.issue42318@roundup.psfhosted.org> Ronald Oussoren added the comment: @Pixmew: I get this error with Tk 8.6.10 on macOS 11. With Tk 8.6.8 on macOS 10.15 (from the python.org installer) I get the behaviour described in msg380906. 8.6.10 is the version of Tk we'd like to switch to for the "universal2", it is the latest release in the 8.6.x branch and contains numerous bug fixes. The "Intel" installers (the ones currently on Python.org) we'll continue to use Tk 8.6.8 due to build issues on macOS 10.9 with newer Tk versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 12:04:27 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 13 Nov 2020 17:04:27 +0000 Subject: [issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget In-Reply-To: <1605043338.18.0.398355808071.issue42318@roundup.psfhosted.org> Message-ID: <1605287067.48.0.407397194607.issue42318@roundup.psfhosted.org> Ronald Oussoren added the comment: BTW. The unicodeFromTclStringAndSize() basically undoes the special treatment of \0 in Modified UTF-8 [1]. That page says that all known implementation of MUTF-8 treat surrogate pairs the same as CESU-8 [2], which is UTF-8 with characters outside of the BMP encoded as surrogate pairs which are then converted to UTF-8. Neither encoding is currently supported by Python. [1] https://en.wikipedia.org/wiki/UTF-8#Modified_UTF-8 [2] https://en.wikipedia.org/wiki/CESU-8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 12:23:56 2020 From: report at bugs.python.org (Mark Shannon) Date: Fri, 13 Nov 2020 17:23:56 +0000 Subject: [issue42349] Compiler front-end produces a broken CFG Message-ID: <1605288236.63.0.535930114151.issue42349@roundup.psfhosted.org> New submission from Mark Shannon : The front-end of the bytecode compiler produces a broken CFG. A number of "basic-block"s have terminators before their end. This makes the back-end optimizations unsafe as they rely of a well-formed CFG. The fix is simple. Insert a check that the CFG is well-formed before doing any optimizations, then fix up the front-end. Once done, we can be more aggressive with optimizations without worrying that things will break for no apparent reason. ---------- assignee: Mark.Shannon messages: 380911 nosy: BTaskaya, Mark.Shannon, pablogsal, yselivanov priority: normal severity: normal status: open title: Compiler front-end produces a broken CFG type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 12:27:22 2020 From: report at bugs.python.org (Mark Shannon) Date: Fri, 13 Nov 2020 17:27:22 +0000 Subject: [issue42349] Compiler front-end produces a broken CFG In-Reply-To: <1605288236.63.0.535930114151.issue42349@roundup.psfhosted.org> Message-ID: <1605288442.44.0.410920096381.issue42349@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +22163 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23267 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 12:51:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 17:51:36 +0000 Subject: [issue42350] Calling os.fork() at Python exit logs: AttributeError: 'NoneType' object has no attribute '_at_fork_reinit' Message-ID: <1605289896.09.0.326897860295.issue42350@roundup.psfhosted.org> New submission from STINNER Victor : The following code logs an error: --- Exception ignored in: Traceback (most recent call last): File "/home/vstinner/python/master/Lib/threading.py", line 1508, in _after_fork thread._reset_internal_locks(True) File "/home/vstinner/python/master/Lib/threading.py", line 847, in _reset_internal_locks self._tstate_lock._at_fork_reinit() AttributeError: 'NoneType' object has no attribute '_at_fork_reinit' --- Code: --- #!/usr/bin/python3 import atexit import subprocess def preexec(): pass def exit_handler(): proc = subprocess.Popen( ["pwd"], preexec_fn=preexec, ) proc.communicate() if __name__ == "__main__": atexit.register(exit_handler) --- It is a regression caused by the following bpo-40089 fix: commit 87255be6964979b5abdc4b9dcf81cdcfdad6e753 Author: Victor Stinner Date: Tue Apr 7 23:11:49 2020 +0200 bpo-40089: Add _at_fork_reinit() method to locks (GH-19195) ---------- components: Library (Lib) messages: 380912 nosy: vstinner priority: normal severity: normal status: open title: Calling os.fork() at Python exit logs: AttributeError: 'NoneType' object has no attribute '_at_fork_reinit' versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 12:59:24 2020 From: report at bugs.python.org (E. Paine) Date: Fri, 13 Nov 2020 17:59:24 +0000 Subject: [issue42351] Setup.py: UnicodeDecodeError in grep_headers_for Message-ID: <1605290364.26.0.484718067569.issue42351@roundup.psfhosted.org> New submission from E. Paine : When compiling the master branch (i.e. running 'make'), I get a UnicodeDecodeError as follows: Traceback (most recent call last): File "/home/elisha/Documents/Python/cp0/cpython/./setup.py", line 2619, in main() File "/home/elisha/Documents/Python/cp0/cpython/./setup.py", line 2589, in main setup(# PyPI Metadata (PEP 301) File "/home/elisha/Documents/Python/cp0/cpython/Lib/distutils/core.py", line 148, in setup dist.run_commands() File "/home/elisha/Documents/Python/cp0/cpython/Lib/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/home/elisha/Documents/Python/cp0/cpython/Lib/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/home/elisha/Documents/Python/cp0/cpython/Lib/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/home/elisha/Documents/Python/cp0/cpython/Lib/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/elisha/Documents/Python/cp0/cpython/Lib/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/home/elisha/Documents/Python/cp0/cpython/Lib/distutils/command/build_ext.py", line 340, in run self.build_extensions() File "/home/elisha/Documents/Python/cp0/cpython/./setup.py", line 471, in build_extensions self.detect_modules() File "/home/elisha/Documents/Python/cp0/cpython/./setup.py", line 1825, in detect_modules self.detect_ctypes() File "/home/elisha/Documents/Python/cp0/cpython/./setup.py", line 2205, in detect_ctypes if grep_headers_for('ffi_prep_cif_var', ffi_headers): File "/home/elisha/Documents/Python/cp0/cpython/./setup.py", line 246, in grep_headers_for if function in f.read(): File "/home/elisha/Documents/Python/cp0/cpython/Lib/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 4210: invalid start byte The problematic file it is trying to read is /usr/include/OMX_Other.h which is part of the libomxil-bellagio package (a copy of this package can be downloaded from https://www.archlinux.org/packages/extra/x86_64/libomxil-bellagio/download/). More specifically, there are several characters in the comments which cannot be decoded correctly (the first of these is on line 93). The fix is a very simple one and is just to add errors='replace' to line 244 of setup.py (I cannot see this having any ill-effects). I couldn't find who to nosy for this so apologies about that. ---------- components: Build messages: 380913 nosy: epaine priority: normal severity: normal status: open title: Setup.py: UnicodeDecodeError in grep_headers_for type: compile error versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 13:03:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 18:03:38 +0000 Subject: [issue42350] Calling os.fork() at Python exit logs: AttributeError: 'NoneType' object has no attribute '_at_fork_reinit' In-Reply-To: <1605289896.09.0.326897860295.issue42350@roundup.psfhosted.org> Message-ID: <1605290618.11.0.969628777424.issue42350@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +22164 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23268 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 13:15:45 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 13 Nov 2020 18:15:45 +0000 Subject: [issue42344] SimpleNamespace: update documentation regarding comparison In-Reply-To: <1605274926.75.0.147847269171.issue42344@roundup.psfhosted.org> Message-ID: <1605291345.16.0.196312918992.issue42344@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset bbeb2d266d6fc1ca9778726d0397d9d6f7a946e3 by J?rgen Gmach in branch 'master': bpo-42344: Improve pseudo implementation for SimpleNamespace (GH-23264) https://github.com/python/cpython/commit/bbeb2d266d6fc1ca9778726d0397d9d6f7a946e3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 13:16:41 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 13 Nov 2020 18:16:41 +0000 Subject: [issue42344] SimpleNamespace: update documentation regarding comparison In-Reply-To: <1605274926.75.0.147847269171.issue42344@roundup.psfhosted.org> Message-ID: <1605291401.98.0.265581953459.issue42344@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 13:17:42 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Nov 2020 18:17:42 +0000 Subject: [issue42344] SimpleNamespace: update documentation regarding comparison In-Reply-To: <1605274926.75.0.147847269171.issue42344@roundup.psfhosted.org> Message-ID: <1605291462.47.0.245318120893.issue42344@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +22166 pull_request: https://github.com/python/cpython/pull/23270 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 13:17:33 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Nov 2020 18:17:33 +0000 Subject: [issue42344] SimpleNamespace: update documentation regarding comparison In-Reply-To: <1605274926.75.0.147847269171.issue42344@roundup.psfhosted.org> Message-ID: <1605291453.86.0.125238430235.issue42344@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +22165 pull_request: https://github.com/python/cpython/pull/23269 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 13:18:39 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 13 Nov 2020 18:18:39 +0000 Subject: [issue42344] SimpleNamespace: update documentation regarding comparison In-Reply-To: <1605274926.75.0.147847269171.issue42344@roundup.psfhosted.org> Message-ID: <1605291519.35.0.198448815937.issue42344@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset cb2b2035ca752529755440990c4073d5164e80df by Miss Islington (bot) in branch '3.8': bpo-42344: Improve pseudo implementation for SimpleNamespace (GH-23264) (GH-23269) https://github.com/python/cpython/commit/cb2b2035ca752529755440990c4073d5164e80df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 13:19:08 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 13 Nov 2020 18:19:08 +0000 Subject: [issue42344] SimpleNamespace: update documentation regarding comparison In-Reply-To: <1605274926.75.0.147847269171.issue42344@roundup.psfhosted.org> Message-ID: <1605291548.75.0.679337910287.issue42344@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset 4defeb007195d2d17ea404b0b6291d1d233010f4 by Miss Islington (bot) in branch '3.9': bpo-42344: Improve pseudo implementation for SimpleNamespace (GH-23264) (GH-23270) https://github.com/python/cpython/commit/4defeb007195d2d17ea404b0b6291d1d233010f4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 13:27:47 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Nov 2020 18:27:47 +0000 Subject: [issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget In-Reply-To: <1605043338.18.0.398355808071.issue42318@roundup.psfhosted.org> Message-ID: <1605292067.32.0.89499576704.issue42318@roundup.psfhosted.org> Serhiy Storchaka added the comment: Well, try copy ? (or other text with color emoji) to clipboard and run the following code: import tkinter root = tkinter.Tk() print(ascii(root.clipboard_get())) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 13:37:15 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 13 Nov 2020 18:37:15 +0000 Subject: [issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget In-Reply-To: <1605043338.18.0.398355808071.issue42318@roundup.psfhosted.org> Message-ID: <1605292635.32.0.54855954692.issue42318@roundup.psfhosted.org> Ronald Oussoren added the comment: When I assign root.clipboard_get() to "v" I get: >>> print(ascii(v)) '\udced\udca0\udcbd\udced\udcb8\udc84' >>> print(v) ?????? This is with Tk 8.6.10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 13:38:19 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Nov 2020 18:38:19 +0000 Subject: [issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget In-Reply-To: <1605043338.18.0.398355808071.issue42318@roundup.psfhosted.org> Message-ID: <1605292699.0.0.420207329965.issue42318@roundup.psfhosted.org> Serhiy Storchaka added the comment: You can ignore msg380917. It was written before I read msg380908. Now I have the needed information. Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 13:46:32 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Nov 2020 18:46:32 +0000 Subject: [issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget In-Reply-To: <1605043338.18.0.398355808071.issue42318@roundup.psfhosted.org> Message-ID: <1605293192.17.0.894641961603.issue42318@roundup.psfhosted.org> Serhiy Storchaka added the comment: And yet one question. What do you see if you print '\udcf0\udc9f\udc98\udc80' in IDLE? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 13:47:56 2020 From: report at bugs.python.org (Ross Barnowski) Date: Fri, 13 Nov 2020 18:47:56 +0000 Subject: [issue42352] A string representation of slice objects with colon syntax Message-ID: <1605293276.23.0.88839506976.issue42352@roundup.psfhosted.org> New submission from Ross Barnowski : It would be nice if there were a way to get a string representation of a slice object in extended indexing syntax, e.g. ``` >>> myslice = slice(None, None, 2) >>> print(myslice) '::2' ``` One motivating use-case is in descriptive error messages, e.g. ``` TypeError(f"Can't slice {myobj}, try list({myobj})[{myslice}]") ``` In this case, it is much more natural for `myslice` to use the extended indexing syntax than the slice str/repr. Perhaps this could be done via __str__, or if that is too big a change, maybe via __format__ e.g. `f"{myslice:asidx}"` It's simple enough to write a conversion function, but this feels like a feature that would fit best upstream. I searched the issue tracker, PRs on GitHub, and the Python documentation and didn't see any related issues/PRs/articles. xref: https://github.com/networkx/networkx/pull/4304 ---------- messages: 380921 nosy: rossbar priority: normal severity: normal status: open title: A string representation of slice objects with colon syntax type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 13:49:00 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 13 Nov 2020 18:49:00 +0000 Subject: [issue41001] Provide wrapper for eventfd In-Reply-To: <1592389368.35.0.695966020763.issue41001@roundup.psfhosted.org> Message-ID: <1605293340.63.0.89060931557.issue41001@roundup.psfhosted.org> Christian Heimes added the comment: New changeset cd9fed6afba6f3ad2e7ef723501c739551a95fa8 by Christian Heimes in branch 'master': bpo-41001: Add os.eventfd() (#20930) https://github.com/python/cpython/commit/cd9fed6afba6f3ad2e7ef723501c739551a95fa8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 13:49:17 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 13 Nov 2020 18:49:17 +0000 Subject: [issue41001] Provide wrapper for eventfd In-Reply-To: <1592389368.35.0.695966020763.issue41001@roundup.psfhosted.org> Message-ID: <1605293357.97.0.82886601844.issue41001@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 13:49:55 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 13 Nov 2020 18:49:55 +0000 Subject: [issue40485] Provide an abstraction for a select-able Event In-Reply-To: <1588520007.12.0.424273214975.issue40485@roundup.psfhosted.org> Message-ID: <1605293395.05.0.860298177612.issue40485@roundup.psfhosted.org> Christian Heimes added the comment: os.eventfd() has landed in Python 3.10. ---------- nosy: +christian.heimes versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 13:50:14 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 13 Nov 2020 18:50:14 +0000 Subject: [issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget In-Reply-To: <1605043338.18.0.398355808071.issue42318@roundup.psfhosted.org> Message-ID: <1605293414.01.0.0522774965994.issue42318@roundup.psfhosted.org> Ronald Oussoren added the comment: > And yet one question. What do you see if you print '\udcf0\udc9f\udc98\udc80' in IDLE? This prints a smiley emoji, likewise for printing chr(128516) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 14:09:03 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 13 Nov 2020 19:09:03 +0000 Subject: [issue41611] IDLE: problems with completions on Mac In-Reply-To: <1598032297.66.0.655712746709.issue41611@roundup.psfhosted.org> Message-ID: <1605294543.96.0.939905685852.issue41611@roundup.psfhosted.org> Ronald Oussoren added the comment: It looks like the lack of completions in msg375769 is a problem with Tk 8.6.8 as used by the python.org installers. I have a build of master with Tk 8.6.10 on my DTK system and with that Edit->Show completions works in a shell window. However: Ctrl+s does not show the completion pop-up, even though the "Edit" button in the application menu flashes (which indicates that Ctrl+s is recognised as a keyboard shortcut). Just using Tab for completion works fine though (shows the completion pop-up). --- I did get a similar traceback to the one in msg375764 once, this is without using multiprocessing. I haven't been able to reproduce this yet. python3.10 -m idlelib Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/tkinter/__init__.py", line 1884, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/idlelib/autocomplete_w.py", line 248, in winconfig_event acw_width, acw_height = acw.winfo_width(), acw.winfo_height() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/tkinter/__init__.py", line 1290, in winfo_width self.tk.call('winfo', 'width', self._w)) _tkinter.TclError: bad window path name ".!listedtoplevel.!frame.text.!toplevel8" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 14:15:26 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 13 Nov 2020 19:15:26 +0000 Subject: [issue37737] mmap module track anonymous page on macOS Message-ID: <1605294926.0.0.759494111806.issue37737@roundup.psfhosted.org> New submission from Ronald Oussoren : I've closed the PR because I don't think this is a useful feature. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 14:16:12 2020 From: report at bugs.python.org (Eryk Sun) Date: Fri, 13 Nov 2020 19:16:12 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1605294972.98.0.376888217888.issue42296@roundup.psfhosted.org> Eryk Sun added the comment: > That sounds like a micro-optimization which is not worth it. In the back of my mind I was also thinking to generalize the behavior at runtime whenever a signal is tripped by a non-Python thread (e.g. a thread created by an extension module or ctypes), instead of special-casing Windows. To examine this, I created a C library in Linux that defines a test() function that creates two threads via pthread_create(). The first thread sleeps for 10 seconds, and the second thread sleeps for 5 seconds and then calls pthread_kill() to send a SIGINT to the first thread. In 3.8, calling the test() function via ctypes followed by executing an infinite loop will interrupt the loop with a KeyboardInterrupt as soon as the second thread sends SIGINT. But in 3.10, the loop never gets interrupted because the C signal handler isn't called on the main thread, so eval_breaker never gets set. ---------- keywords: +patch -3.9regression priority: -> release blocker resolution: fixed -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 14:22:23 2020 From: report at bugs.python.org (Eryk Sun) Date: Fri, 13 Nov 2020 19:22:23 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1605295343.86.0.558483780392.issue42296@roundup.psfhosted.org> Change by Eryk Sun : ---------- priority: release blocker -> stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 14:27:03 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 13 Nov 2020 19:27:03 +0000 Subject: [issue42353] Proposal: re.prefixmatch method (alias for re.match) Message-ID: <1605295623.12.0.914188426549.issue42353@roundup.psfhosted.org> New submission from Gregory P. Smith : A well known anti-pattern in Python is use of re.match when you meant to use re.search. re.fullmatch was added in 3.4 via https://bugs.python.org/issue16203 for similar reasons. re.prefixmatch would be similar: we want the re.match behavior, but want the code to be obvious about its intent. This documents the implicit ^ in the name. The goal would be to allow linters to ultimately flag re.match as the anti-pattern when in 3.10+ mode. Asking people to use re.prefixmatch or re.search instead. This would help avoid bugs where people mean re.search but write re.match. The implementation is trivial. This is **not** a decision to deprecate the widely used in 25 years worth of code's re.match name. That'd be painful and is unlikely to be worth doing without spreading it over a 8+ year timeline. ---------- components: Library (Lib) messages: 380928 nosy: gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: Proposal: re.prefixmatch method (alias for re.match) type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 14:36:42 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 13 Nov 2020 19:36:42 +0000 Subject: [issue41552] uuid.uuid1() on certain Macs does not generate unique IDs In-Reply-To: <1597398238.17.0.874687707711.issue41552@roundup.psfhosted.org> Message-ID: <1605296202.29.0.566443515341.issue41552@roundup.psfhosted.org> Ronald Oussoren added the comment: the most recent UUID implementation on opensource.apple.com: https://opensource.apple.com/source/Libc/Libc-1353.100.2/uuid/uuidsrc/gen_uuid.c.auto.html The implementation of get_node_id() doesn't ignore the iBridge interface, which means uuid_generate_time(3) could run into this issue (and because of that, Python's uuid module) I've filed an issue with Apple about this: FB8895555 Note that switching to libuuid from util-linux wouldn't help here, that also doesn't ignore the iBridge interface. I'm tempted to close this issue as "3th-party" because this is bug in the system implementation of uuid_generate_time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 14:36:46 2020 From: report at bugs.python.org (Daniel Hrisca) Date: Fri, 13 Nov 2020 19:36:46 +0000 Subject: [issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation In-Reply-To: <1560017700.11.0.127727162727.issue37205@roundup.psfhosted.org> Message-ID: <1605296206.94.0.729395466034.issue37205@roundup.psfhosted.org> Daniel Hrisca added the comment: I'm actually surprised that this problem gets so little interest. It's probably so obscure that most people don't even realize it. Why isn't it implemented using winapi calls for the windows platform? I took inspiration from this SO thread https://stackoverflow.com/questions/56502111/should-time-perf-counter-be-consistent-across-processes-in-python-on-windows and came up with this function for 64 bit Python (a few more lines would be needed for error checking) #include static PyObject* perf_counter(PyObject* self, PyObject* args) { PyObject* ret; QueryPerformanceFrequency(lpFrequency); QueryPerformanceCounter(lpPerformanceCount); ret = PyFloat_FromDouble(((double) lpPerformanceCount->QuadPart ) / lpFrequency->QuadPart); return ret; } ---------- nosy: +danielhrisca _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 14:44:22 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 13 Nov 2020 19:44:22 +0000 Subject: [issue42348] Language Reference: Set items In-Reply-To: <1605281896.65.0.701198414223.issue42348@roundup.psfhosted.org> Message-ID: <1605296662.4.0.335082195079.issue42348@roundup.psfhosted.org> Raymond Hettinger added the comment: I recommend leaving the text as is, and possibly creating a new FAQ entry discussing the relationship between immutability and hashability (something that I consider to be an intermediate or advanced topic). Other thought: * The set discussion should remain parallel that for mappings (a few paragraphs) after. That text also discusses immutability * We've never had a user incident regarding this text, so there is no actual evidence that this current wording is confusing anyone. * It is common for users to equate hashability with immutability, so I think the current wording is reasonable. My experience with users indicate that "hashable" is more cryptic than "immutable" because the former implies a knowledge of how hash tables work. * It's easy for us thinking we're helping by making precise distinctions but have the actual effect of making the docs more opaque. That is why first-aid books say "bruise" instead of "subdermal hematoma" :-) * The word "immutable" is a reasonable first approximation that doesn't require knowledge of hash table mechanics. For the most part, it is how everyday users think about dict keys and set elements. * That approximation is useful because a fuller discussion would say that if __hash__ is defined, it should do so on fields that don't mutate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 15:00:30 2020 From: report at bugs.python.org (Trey Hunner) Date: Fri, 13 Nov 2020 20:00:30 +0000 Subject: [issue42354] Tuple unpacking with * causes SyntaxError in with ... as ... Message-ID: <1605297630.46.0.898037335486.issue42354@roundup.psfhosted.org> New submission from Trey Hunner : The below code worked on Python 3.5, 3.6, 3.7, and 3.8, but it now crashes on Python 3.9. from contextlib import contextmanager @contextmanager def open_files(names): yield names # This would actually return file objects with open_files(['file1.txt', 'file2.txt']) as (first, *rest): print(first, rest) The error shown is: with open_files(['file1.txt', 'file2.txt']) as (first, *rest): ^ SyntaxError: invalid syntax ---------- messages: 380932 nosy: trey priority: normal severity: normal status: open title: Tuple unpacking with * causes SyntaxError in with ... as ... type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 15:02:57 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 13 Nov 2020 20:02:57 +0000 Subject: [issue42354] Tuple unpacking with * causes SyntaxError in with ... as ... In-Reply-To: <1605297630.46.0.898037335486.issue42354@roundup.psfhosted.org> Message-ID: <1605297777.0.0.531991358222.issue42354@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 16:45:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Nov 2020 21:45:08 +0000 Subject: [issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation In-Reply-To: <1560017700.11.0.127727162727.issue37205@roundup.psfhosted.org> Message-ID: <1605303908.23.0.118261058515.issue37205@roundup.psfhosted.org> STINNER Victor added the comment: Since I added time.perf_counter_ns() to Python 3.7, it would be acceptable to reduce the "t0" variable and suggest to use time.perf_counter_ns() instead of time.perf_counter() for best precision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 16:54:13 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 13 Nov 2020 21:54:13 +0000 Subject: [issue42339] official embedded Python fails to import certain modules In-Reply-To: <1605233981.71.0.0380654118097.issue42339@roundup.psfhosted.org> Message-ID: <1605304453.09.0.463139739964.issue42339@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +22167 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23271 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 16:54:46 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 13 Nov 2020 21:54:46 +0000 Subject: [issue40754] Test installers before releasing (ModuleNotFoundErrors) In-Reply-To: <1590324430.61.0.117510991737.issue40754@roundup.psfhosted.org> Message-ID: <1605304486.77.0.801155414239.issue40754@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +22168 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23271 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 17:05:53 2020 From: report at bugs.python.org (Daniel Hrisca) Date: Fri, 13 Nov 2020 22:05:53 +0000 Subject: [issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation In-Reply-To: <1560017700.11.0.127727162727.issue37205@roundup.psfhosted.org> Message-ID: <1605305153.96.0.442603128195.issue37205@roundup.psfhosted.org> Daniel Hrisca added the comment: That would be perfect and would help a lot with timings/synchronization across multiple processes. Which Pyhton version will get this fix? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 17:18:27 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 13 Nov 2020 22:18:27 +0000 Subject: [issue42339] official embedded Python fails to import certain modules In-Reply-To: <1605233981.71.0.0380654118097.issue42339@roundup.psfhosted.org> Message-ID: <1605305907.78.0.652159390392.issue42339@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: -22167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 17:24:44 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 13 Nov 2020 22:24:44 +0000 Subject: [issue40754] Test installers before releasing (ModuleNotFoundErrors) In-Reply-To: <1590324430.61.0.117510991737.issue40754@roundup.psfhosted.org> Message-ID: <1605306284.65.0.816333810305.issue40754@roundup.psfhosted.org> Steve Dower added the comment: New changeset 9b6934230c35e24d8582ea8c58456fa8eab72ae2 by Steve Dower in branch 'master': bpo-40754: Adds _testinternalcapi to Windows installer for test suite (GH-23271) https://github.com/python/cpython/commit/9b6934230c35e24d8582ea8c58456fa8eab72ae2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 17:24:54 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Nov 2020 22:24:54 +0000 Subject: [issue40754] Test installers before releasing (ModuleNotFoundErrors) In-Reply-To: <1590324430.61.0.117510991737.issue40754@roundup.psfhosted.org> Message-ID: <1605306294.03.0.760188572017.issue40754@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +22169 pull_request: https://github.com/python/cpython/pull/23273 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 17:25:03 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Nov 2020 22:25:03 +0000 Subject: [issue40754] Test installers before releasing (ModuleNotFoundErrors) In-Reply-To: <1590324430.61.0.117510991737.issue40754@roundup.psfhosted.org> Message-ID: <1605306303.49.0.833542085191.issue40754@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +22170 pull_request: https://github.com/python/cpython/pull/23274 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 17:25:06 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 13 Nov 2020 22:25:06 +0000 Subject: [issue42339] official embedded Python fails to import certain modules In-Reply-To: <1605233981.71.0.0380654118097.issue42339@roundup.psfhosted.org> Message-ID: <1605306306.86.0.162085324399.issue42339@roundup.psfhosted.org> Steve Dower added the comment: Sorry about the PR mess - copied the wrong issue number down, though I am looking at this one right now. My suspicion is something in the newer vcruntime140_1.dll is to blame - does it work with Python 3.9? You might need to update to KB3118401 [1], though I wouldn't have thought it was necessary (plus it should auto-update once you add the earlier version). It would be good to know if that's the case. [1]: https://support.microsoft.com/kb/3118401 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 17:28:09 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 13 Nov 2020 22:28:09 +0000 Subject: [issue40754] Test installers before releasing (ModuleNotFoundErrors) In-Reply-To: <1590324430.61.0.117510991737.issue40754@roundup.psfhosted.org> Message-ID: <1605306489.47.0.102756964532.issue40754@roundup.psfhosted.org> Change by Steve Dower : ---------- assignee: -> steve.dower nosy: -miss-islington resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 17:42:25 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Nov 2020 22:42:25 +0000 Subject: [issue40754] Test installers before releasing (ModuleNotFoundErrors) In-Reply-To: <1590324430.61.0.117510991737.issue40754@roundup.psfhosted.org> Message-ID: <1605307345.13.0.14167557102.issue40754@roundup.psfhosted.org> miss-islington added the comment: New changeset 8a4557240b98c322d611bfbba3ea51eac3fb841a by Miss Islington (bot) in branch '3.8': bpo-40754: Adds _testinternalcapi to Windows installer for test suite (GH-23271) https://github.com/python/cpython/commit/8a4557240b98c322d611bfbba3ea51eac3fb841a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 17:47:34 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Nov 2020 22:47:34 +0000 Subject: [issue40754] Test installers before releasing (ModuleNotFoundErrors) In-Reply-To: <1590324430.61.0.117510991737.issue40754@roundup.psfhosted.org> Message-ID: <1605307654.93.0.17832862234.issue40754@roundup.psfhosted.org> miss-islington added the comment: New changeset faadc52e755cdb316a53f3db5aa11cb97f1c4b87 by Miss Islington (bot) in branch '3.9': bpo-40754: Adds _testinternalcapi to Windows installer for test suite (GH-23271) https://github.com/python/cpython/commit/faadc52e755cdb316a53f3db5aa11cb97f1c4b87 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 18:14:47 2020 From: report at bugs.python.org (Jacob Middag) Date: Fri, 13 Nov 2020 23:14:47 +0000 Subject: [issue32803] smtplib: LMTP broken in the case of multiple RCPT In-Reply-To: <1518132309.75.0.467229070634.issue32803@psf.upfronthosting.co.za> Message-ID: <1605309287.72.0.298262342654.issue32803@roundup.psfhosted.org> Jacob Middag added the comment: It would be nice if someone could take a look. ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 18:15:05 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 13 Nov 2020 23:15:05 +0000 Subject: [issue42131] [zipimport] Update zipimport to use specs In-Reply-To: <1603490733.54.0.490063164948.issue42131@roundup.psfhosted.org> Message-ID: <1605309305.61.0.992179980494.issue42131@roundup.psfhosted.org> Brett Cannon added the comment: New changeset d2e94bb0848e04a90efa51be401f0ce8a9e252f2 by Brett Cannon in branch 'master': bpo-42131: Add PEP 451-related methods to zipimport (GH-23187) https://github.com/python/cpython/commit/d2e94bb0848e04a90efa51be401f0ce8a9e252f2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 18:16:12 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 13 Nov 2020 23:16:12 +0000 Subject: [issue25710] zipimport is not PEP 3147 or PEP 488 compliant In-Reply-To: <1448293496.52.0.845434990633.issue25710@psf.upfronthosting.co.za> Message-ID: <1605309372.65.0.347192803444.issue25710@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 18:17:21 2020 From: report at bugs.python.org (Eryk Sun) Date: Fri, 13 Nov 2020 23:17:21 +0000 Subject: [issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation In-Reply-To: <1560017700.11.0.127727162727.issue37205@roundup.psfhosted.org> Message-ID: <1605309441.37.0.518353065875.issue37205@roundup.psfhosted.org> Eryk Sun added the comment: > suggest to use time.perf_counter_ns() instead of time.perf_counter() > for best precision. QPC typically has a frequency of 1e7, which requires 24 bits for the fraction of a second. So a system can be up for years before the 53-bit precision of a float is an issue. What am I missing? ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 18:25:09 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 13 Nov 2020 23:25:09 +0000 Subject: [issue42336] Make PCbuild/build.bat build x64 by default In-Reply-To: <1605221450.36.0.206300145887.issue42336@roundup.psfhosted.org> Message-ID: <1605309909.37.0.592640498487.issue42336@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +22171 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23275 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 18:26:23 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 13 Nov 2020 23:26:23 +0000 Subject: [issue42336] Make PCbuild/build.bat build x64 by default In-Reply-To: <1605221450.36.0.206300145887.issue42336@roundup.psfhosted.org> Message-ID: <1605309983.52.0.966333708517.issue42336@roundup.psfhosted.org> Steve Dower added the comment: I hope you'll find that PR suitable ambitious :) It would really be nice to have proper Powershell scripts for these, but that would be a more significant rewrite (and probably require changing argument names...). I'm not *that* ambitious. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 18:42:38 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 13 Nov 2020 23:42:38 +0000 Subject: [issue42290] Unicode inconsistent display after concencated In-Reply-To: <1604814710.97.0.934662336836.issue42290@roundup.psfhosted.org> Message-ID: <1605310958.22.0.974743276462.issue42290@roundup.psfhosted.org> Terry J. Reedy added the comment: Xia, when saying 'unexpected', one usually needs to also say what was expected. When discussing mixed direction chars, we need to be especially careful in describing what we see with different terminals, different browsers, and different OSes. Steven: On Windows, I see the same thing: "Daleth 1" prints as that in both IDLE's Shell and Python's REPL in Command Prompt (with D a replacement box in the latter) but is reversed here '?1' in Firefox (and the same in Microsoft Edge. But, I just discovered, the two browsers (and Notepad and LibreOffice Writer and likely other text editors) treat runs of latin digits specially: "Daleth a" pastes in that order, '?a', and "Daleth 1 2" pastes as "1 2 Daleth", '?12'. The block, but not the individual digits, is reversed. This allows R2L writers to use what are now the global digits. In Arabic, numbers are written and read R 2 L low order to high. So Europeans used to writing and reading L 2 R high to low kept the same order. Perhaps the bidi property of the digits in the unicode datebase is different from that of other latin chars. It seems that '=' is also bidirectional, but properly not treated as digit. "Daleth = 1" is reversed in both browsers and text editors to read 'Daleth' 'equals' 'one' when read right to left. The general rule is that blocks of same direction chars are written appropriately as encountered. It seems that the classification of some characters depends on the context. The following is as expected, >>> 'ab'+chr(1837)+chr(1838)+chr(1839)+'cd' 'ab???cd' with the R2L triplet reversed. In any case, Steven is correct that Python correctly stores chars in the order given and that there is no Python bug. ---------- nosy: +terry.reedy resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 18:43:26 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 13 Nov 2020 23:43:26 +0000 Subject: [issue42290] Display of Unicode strings with bidi characters In-Reply-To: <1604814710.97.0.934662336836.issue42290@roundup.psfhosted.org> Message-ID: <1605311006.76.0.478468639046.issue42290@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: Unicode inconsistent display after concencated -> Display of Unicode strings with bidi characters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 19:18:19 2020 From: report at bugs.python.org (Eryk Sun) Date: Sat, 14 Nov 2020 00:18:19 +0000 Subject: [issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation In-Reply-To: <1560017700.11.0.127727162727.issue37205@roundup.psfhosted.org> Message-ID: <1605313099.82.0.248779799963.issue37205@roundup.psfhosted.org> Eryk Sun added the comment: > QPC typically has a frequency of 1e7, Never mind. Apparently with some combinations of chipset, processor, and Windows version, the QPC frequency runs far beyond the 1-10 MHz range. I thought Windows divided by 1024 instead of letting it run in the GHz range, but apparently not from what I see in search results. I misread "*in many cases*, QueryPerformanceFrequency returns the TSC frequency divided by 1024". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 19:29:06 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Nov 2020 00:29:06 +0000 Subject: [issue42293] Installation of pyinstaller in Windows fails with utf8 error In-Reply-To: <1604878197.58.0.426662721479.issue42293@roundup.psfhosted.org> Message-ID: <1605313746.12.0.946716493579.issue42293@roundup.psfhosted.org> Terry J. Reedy added the comment: A 'crash' is when the program hangs or stops unexpectedly *without* an Exception and message. Lib/site-packages/sitecustomize.py is an optional added module. https://docs.python.org/3/library/site.html#index-5 Apparently, attempted installation of pyinstaller resulted in an attempt to add it. Or it was later attempting to read a badly written file, and removed it when cleaning up. In any case, this appears to be a 3rd party bug that should be reported on the pypa/pip tracker. Paul, are you involved with pip? If so, can you add anything? ---------- nosy: +paul.moore, terry.reedy resolution: -> third party stage: -> resolved status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 19:43:27 2020 From: report at bugs.python.org (Kevin) Date: Sat, 14 Nov 2020 00:43:27 +0000 Subject: [issue17454] ld_so_aix not used when linking c++ (scipy) In-Reply-To: <1363595248.19.0.716647347764.issue17454@psf.upfronthosting.co.za> Message-ID: <1605314607.93.0.92874393396.issue17454@roundup.psfhosted.org> Kevin added the comment: This was fixed by https://github.com/python/cpython/pull/10437 ---------- nosy: +kadler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 19:44:58 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 14 Nov 2020 00:44:58 +0000 Subject: [issue42296] Infinite loop uninterruptable on Windows in 3.10 In-Reply-To: <1604942749.77.0.840146962275.issue42296@roundup.psfhosted.org> Message-ID: <1605314698.38.0.121963268709.issue42296@roundup.psfhosted.org> Guido van Rossum added the comment: Thanks for the quick fix. It works! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 19:55:57 2020 From: report at bugs.python.org (Kevin) Date: Sat, 14 Nov 2020 00:55:57 +0000 Subject: [issue24501] configure does not find (n)curses in /usr/local/libs In-Reply-To: <1435164904.34.0.98182021259.issue24501@psf.upfronthosting.co.za> Message-ID: <1605315357.29.0.816845584353.issue24501@roundup.psfhosted.org> Kevin added the comment: There error indicates it can't find ncurses.h configure:14223: xlc_r -c -qmaxmem=-1 -DSYSV -D_AIX -D_AIX71 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/usr/local/include -I/usr/include/ncursesw conftest.c >&5 "conftest.c", line 311.10: 1506-296 (S) #include file not found. Are you sure you don't need -I/usr/include/ncurses instead of -I/usr/include? ---------- nosy: +kadler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 19:59:01 2020 From: report at bugs.python.org (Kevin) Date: Sat, 14 Nov 2020 00:59:01 +0000 Subject: [issue24046] Incomplete build on AIX In-Reply-To: <1429844081.77.0.468875149896.issue24046@psf.upfronthosting.co.za> Message-ID: <1605315541.21.0.338413279158.issue24046@roundup.psfhosted.org> Kevin added the comment: Looks like RAND_egd was made optional in https://bugs.python.org/issue21356 Can this issue be closed? ---------- nosy: +kadler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 20:04:44 2020 From: report at bugs.python.org (Kevin) Date: Sat, 14 Nov 2020 01:04:44 +0000 Subject: [issue24886] open fails randomly on AIX In-Reply-To: <1439897092.19.0.462319646512.issue24886@psf.upfronthosting.co.za> Message-ID: <1605315884.81.0.367368144579.issue24886@roundup.psfhosted.org> Kevin added the comment: Given that the AIX bug has long been fixed and Python 2.7 is EOL we can probably close this bug. ---------- nosy: +kadler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 20:33:42 2020 From: report at bugs.python.org (Kevin) Date: Sat, 14 Nov 2020 01:33:42 +0000 Subject: [issue42309] BUILD: AIX-64-bit segmentation fault In-Reply-To: <1605008695.96.0.78391537773.issue42309@roundup.psfhosted.org> Message-ID: <1605317622.67.0.791536781959.issue42309@roundup.psfhosted.org> Kevin added the comment: I have not encountered this problem when building Python 3.10 on AIX and PASE with GCC 6.3. ---------- nosy: +kadler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 21:02:09 2020 From: report at bugs.python.org (Inada Naoki) Date: Sat, 14 Nov 2020 02:02:09 +0000 Subject: [issue24886] open fails randomly on AIX In-Reply-To: <1439897092.19.0.462319646512.issue24886@psf.upfronthosting.co.za> Message-ID: <1605319329.72.0.38578056671.issue24886@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 21:02:11 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Nov 2020 02:02:11 +0000 Subject: [issue42302] [Turtle] Add clockwise and anticlockwise method as alias to right and left In-Reply-To: <1604985181.19.0.385851397848.issue42302@roundup.psfhosted.org> Message-ID: <1605319331.03.0.451936333868.issue42302@roundup.psfhosted.org> Terry J. Reedy added the comment: 'Clockwise' and 'counterclockwise'* refer to an object either continuously spinning on an axis or possibly moving in a circle. An object in linear motion turns right or left. This is especially true for an organism or object with left or right sides#, and this is the model for turtle and logo. Where relevant (such as planer maze theory), I believe same is true in math and physics. * Counterclockwise and anticlockwise are the American and British terms respectively. American English is the standard for Python, but using either term would confuse children barely coping with the other. Either is a mouthful to say. # Since people on a ship can face any which way, 'starboard' and 'port' are used to unambiguiously refer to the right and left *of the ship*. Does anyone still object to closing this? PS Ravi: When responding to email, please delete the quoted text (except maybe for a line or two) as it is redundant noise when your response is posted. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 21:16:10 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Nov 2020 02:16:10 +0000 Subject: [issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget In-Reply-To: <1605043338.18.0.398355808071.issue42318@roundup.psfhosted.org> Message-ID: <1605320170.96.0.717084795714.issue42318@roundup.psfhosted.org> Terry J. Reedy added the comment: Yash, this is specifically a macOS issue. Printing astral chars in tkinter/IDLE on Windows and Linux has 'worked' (details not important) for over a year. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 21:19:45 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Nov 2020 02:19:45 +0000 Subject: [issue42328] ttk style.map function incorrectly handles the default state for element options. In-Reply-To: <1605140874.05.0.0614253934034.issue42328@roundup.psfhosted.org> Message-ID: <1605320385.45.0.0994834610507.issue42328@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +serhiy.storchaka, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 22:03:41 2020 From: report at bugs.python.org (kernc) Date: Sat, 14 Nov 2020 03:03:41 +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: <1605323021.49.0.996870435911.issue27578@roundup.psfhosted.org> kernc added the comment: The proposed patch doesn't break any interfaces. `inspect.getsource/.getsourcelines()` still raise `OSError` if the source is unretrievable. `linecache.getlines()` is undocumented, but the change retains perfect compatibility with *docstrings* of both `linecache.getlines()` which is affected and `linecache.updatecache()` which is touched. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 13 23:59:24 2020 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sat, 14 Nov 2020 04:59:24 +0000 Subject: [issue42351] Setup.py: UnicodeDecodeError in grep_headers_for In-Reply-To: <1605290364.26.0.484718067569.issue42351@roundup.psfhosted.org> Message-ID: <1605329964.59.0.0649882141806.issue42351@roundup.psfhosted.org> Chih-Hsuan Yen added the comment: I can also confirm the issue on our Arch Linux server [1]. The problematic file is also /usr/include/OMX_Other.h. Looks like it is a regression from https://github.com/python/cpython/pull/22855 (https://bugs.python.org/issue41100). Ronald Oussoren, mind to have a look? [1] https://build.archlinuxcn.org/~imlonghao/log/python-git/2020-11-14T01:17:02.html ---------- nosy: +ronaldoussoren, yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 00:01:23 2020 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sat, 14 Nov 2020 05:01:23 +0000 Subject: [issue42325] UnicodeDecodeError executing ./setup.py during build In-Reply-To: <1605103067.76.0.762518596297.issue42325@roundup.psfhosted.org> Message-ID: <1605330083.45.0.429939868614.issue42325@roundup.psfhosted.org> Chih-Hsuan Yen added the comment: I got a similar issue on Arch Linux - see issue42351. ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 00:40:42 2020 From: report at bugs.python.org (Daniel Hrisca) Date: Sat, 14 Nov 2020 05:40:42 +0000 Subject: [issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation In-Reply-To: <1560017700.11.0.127727162727.issue37205@roundup.psfhosted.org> Message-ID: <1605332442.62.0.533194639535.issue37205@roundup.psfhosted.org> Daniel Hrisca added the comment: Under the hood perf_counter_ns already uses the two winapi calls (see https://github.com/python/cpython/blob/41761933c1c30bb6003b65eef1ba23a83db4eae4/Python/pytime.c#L970) just that it also sets up a static variable as a time origin which makes it process-wide instead of system-wide ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 00:45:51 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Nov 2020 05:45:51 +0000 Subject: [issue42338] Enable Debug Build For Python Native Modules in Windows, with Visual Studio Toolchain In-Reply-To: <1605222375.66.0.305564714258.issue42338@roundup.psfhosted.org> Message-ID: <1605332751.89.0.893838578513.issue42338@roundup.psfhosted.org> Terry J. Reedy added the comment: This tracker is for developing patches to the cpython repository. Questions are better asked on the python-list and occasionally the pydev mailing lists. I am leaving this open in case there is a doc change request lurking somewhere. ---------- components: +Windows nosy: +paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 02:13:53 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Nov 2020 07:13:53 +0000 Subject: [issue42348] Language Reference: Set items In-Reply-To: <1605281896.65.0.701198414223.issue42348@roundup.psfhosted.org> Message-ID: <1605338033.52.0.179862191566.issue42348@roundup.psfhosted.org> Terry J. Reedy added the comment: Raymond's last point is that set objects should be immutably hashable. I would say 'must be' in the sense that mutably hashable objects break sets in various ways, starting with uniqueness. If we were to make a change, I think the replacement should be 'immutably hashable' 'unique objects' would also need qualification. As is, one might reasonably expect. for instance, {1+0j, 1.0, 1} to have 3 elements rather than 1. It is really 'objects unique up to equality', where equality may or may not be by identity. However, I am inclined to agree with Raymond that we should stick to the current easily read sentence. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 03:00:40 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Nov 2020 08:00:40 +0000 Subject: [issue42335] Python Crashes Exception code 0xc0000374 ntdll.dll In-Reply-To: <1605211002.39.0.559634487384.issue42335@roundup.psfhosted.org> Message-ID: <1605340840.01.0.596390961899.issue42335@roundup.psfhosted.org> Terry J. Reedy added the comment: When python as delivered crashes running pure non-ctype Python code, we usually consider it a bug to be fixed. As soon as one pokes around with ctypes or imports 3rd party binaries, the crash is usually due to a user or 3rd par. So this probably should be closed as 'not a (cpython) bug' or '3rd party', at least until the crash can be duplicated run pure python. I am leaving it open for now in case someone checks the zip. You might get more help posting on python-list with an import list or zip requirements.txt. Some other user might know something about intermittent crashes in one of the packages. ---------- components: +Extension Modules, Windows -Interpreter Core, Library (Lib) nosy: +paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 03:31:42 2020 From: report at bugs.python.org (Ken Jin) Date: Sat, 14 Nov 2020 08:31:42 +0000 Subject: [issue42354] Tuple unpacking with * causes SyntaxError in with ... as ... In-Reply-To: <1605297630.46.0.898037335486.issue42354@roundup.psfhosted.org> Message-ID: <1605342702.16.0.579135505488.issue42354@roundup.psfhosted.org> Ken Jin added the comment: This is a duplicate of issue bpo-41979, which was already fixed in this merged PR https://github.com/python/cpython/pull/22611 and backported to 3.9. The example code does not error on the latest 3.10. I'm guessing that the bugfix will come in 3.9.1 since the fix wasn't able to make it into 3.9.0. ---------- nosy: +kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 03:44:36 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 14 Nov 2020 08:44:36 +0000 Subject: [issue33074] dbm corrupts index on macOS (_dbm module) In-Reply-To: <1521009252.74.0.467229070634.issue33074@psf.upfronthosting.co.za> Message-ID: <1605343476.82.0.885928115799.issue33074@roundup.psfhosted.org> Ronald Oussoren added the comment: This is a duplicate of #30388 ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> ndbm can't iterate through values on OS X _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 03:45:26 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 14 Nov 2020 08:45:26 +0000 Subject: [issue30388] ndbm can't iterate through values on OS X In-Reply-To: <1495037035.06.0.766456965201.issue30388@psf.upfronthosting.co.za> Message-ID: <1605343526.72.0.114484128342.issue30388@roundup.psfhosted.org> Ronald Oussoren added the comment: See also #33074 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 03:57:55 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Nov 2020 08:57:55 +0000 Subject: [issue42334] Subclassing int and complex with keyword arguments weird In-Reply-To: <1605205437.83.0.0876606558976.issue42334@roundup.psfhosted.org> Message-ID: <1605344275.1.0.675228216288.issue42334@roundup.psfhosted.org> Terry J. Reedy added the comment: When reporting a failure please copy and paste the exception and message and when non-trivial, the traceback. In this case: "TypeError: 'test' is an invalid keyword argument for complex()". The difference between int and complex versus float is that the former have keyword arguments, so they check for invalid keyword arguments, whereas float take no keyword arguments, so it does not check for validity and, for subclasses, passes them on. ---------- nosy: +terry.reedy resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 04:16:16 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 14 Nov 2020 09:16:16 +0000 Subject: [issue42353] Proposal: re.prefixmatch method (alias for re.match) In-Reply-To: <1605295623.12.0.914188426549.issue42353@roundup.psfhosted.org> Message-ID: <1605345376.38.0.0134337157771.issue42353@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 04:34:25 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 14 Nov 2020 09:34:25 +0000 Subject: [issue42351] Setup.py: UnicodeDecodeError in grep_headers_for In-Reply-To: <1605290364.26.0.484718067569.issue42351@roundup.psfhosted.org> Message-ID: <1605346465.59.0.0939413103727.issue42351@roundup.psfhosted.org> Ronald Oussoren added the comment: That's annoying. A quick workaround is to patch setup.py:get_headers_for and add "encoding='latin1'" to the arguments of open. I'll look into a better fix later this weekend. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 04:35:36 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Nov 2020 09:35:36 +0000 Subject: [issue42330] Add browsh in the webbrowser module In-Reply-To: <1605153434.0.0.062281491373.issue42330@roundup.psfhosted.org> Message-ID: <1605346536.8.0.958564573792.issue42330@roundup.psfhosted.org> Terry J. Reedy added the comment: We do not add just any old or new browser to webrowser's predefined list. (And there are likely some that should be dropped.) The last addition was the Chrome group in 3.3. Neither Microsoft Explorer or Edge are listed. I believe the former was considered to be covered sufficient well by 'windows-default'. On Windows and Mac, one can use any browser by making it the default. It is also possible for any browser to make itself easily usable from Python by adding a module that registers the browser controller class on import. You should suggest this to the browsh dev and see if *they* care. Looking further, there are about 10 browsers with measured usage listed in https://en.wikipedia.org/wiki/Web_browser that are not on the webbrowser list. There are more at https://en.wikipedia.org/wiki/List_of_web_browsers, including Browsh appears on neither list. It does appear on https://en.wikipedia.org/wiki/Text-based_web_browser. But it seems too obscure to deserve being added. So I think this request should be rejected. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 04:54:35 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Nov 2020 09:54:35 +0000 Subject: [issue42328] ttk style.map function incorrectly handles the default state for element options. In-Reply-To: <1605140874.05.0.0614253934034.issue42328@roundup.psfhosted.org> Message-ID: <1605347675.83.0.833327220677.issue42328@roundup.psfhosted.org> Terry J. Reedy added the comment: You have 2 user names, both nosy. You logged in with the lower-case name, hence the Author listing above. However, your CLA was registered with your uppercase (older?) login name. (If this is not what you intended, please write ewa at ython.org and explain.) Hence your name (login name) is not followed by the CLA * marker. This was a bit confusing until I decyphered the situaiton. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 05:23:33 2020 From: report at bugs.python.org (Paul Moore) Date: Sat, 14 Nov 2020 10:23:33 +0000 Subject: [issue42293] Installation of pyinstaller in Windows fails with utf8 error In-Reply-To: <1604878197.58.0.426662721479.issue42293@roundup.psfhosted.org> Message-ID: <1605349413.19.0.789467046589.issue42293@roundup.psfhosted.org> Paul Moore added the comment: Erik is correct, this is a pip bug. Please raise an issue on the pip tracker linking to this issue and we can fix it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 05:27:36 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 14 Nov 2020 10:27:36 +0000 Subject: [issue42355] symtable: get_namespace doesn't check whether if there are multiple namespaces or no namespaces at all Message-ID: <1605349656.21.0.301673967264.issue42355@roundup.psfhosted.org> New submission from Batuhan Taskaya : >>> table = symtable.symtable("A = 1", "", "exec") >>> table.lookup("A") >>> table.lookup("A").get_namespace() Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.10/symtable.py", line 312, in get_namespace raise ValueError("name is bound to multiple namespaces") ValueError: name is bound to multiple namespaces >>> table.lookup("A").get_namespaces() () ---------- assignee: BTaskaya components: Library (Lib) messages: 380969 nosy: BTaskaya, benjamin.peterson priority: normal severity: normal status: open title: symtable: get_namespace doesn't check whether if there are multiple namespaces or no namespaces at all versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 05:35:59 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 14 Nov 2020 10:35:59 +0000 Subject: [issue42355] symtable: get_namespace doesn't check whether if there are multiple namespaces or no namespaces at all In-Reply-To: <1605349656.21.0.301673967264.issue42355@roundup.psfhosted.org> Message-ID: <1605350159.11.0.095981756623.issue42355@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +22172 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23278 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 05:54:58 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Nov 2020 10:54:58 +0000 Subject: [issue42316] Walrus Operator in list index In-Reply-To: <1605029315.25.0.963262062958.issue42316@roundup.psfhosted.org> Message-ID: <1605351298.14.0.801521641188.issue42316@roundup.psfhosted.org> Terry J. Reedy added the comment: PEP 572 does not saw much of anything about when parens are needed. Nor does the low priority itself. Looking through the grammar of expressions, an assignment_expression is also a starred_expression, a positional_item (in calls), and the first part of a comprehension. It is not itself an plain expression unless and until wrapped in parentheses. Subscription requires an expression list, which may be a single expression. To put it another way: an expression is an assignment expression but an assignment expression with a "name :=" prefix is not an expression, so parens are required anywhere an expression is required. That includes subscripts, slicings, displays, call items other than positional items, comprehension parts other than the initial expression (maybe, check), parts of conditional expressions (maybe, check), and lambda expression bodies. After checking, I would like a sentence added to the doc before the 'go see the PEP' bit. This has nothing to do with asyncio. ---------- assignee: -> docs at python components: +Documentation, Interpreter Core -asyncio nosy: +docs at python, terry.reedy -asvetlov, yselivanov versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 06:08:00 2020 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 14 Nov 2020 11:08:00 +0000 Subject: [issue17852] Built-in module _io can lose data from buffered files in reference cycles In-Reply-To: <1367048010.96.0.3580561262.issue17852@psf.upfronthosting.co.za> Message-ID: <1605352080.67.0.0365106795051.issue17852@roundup.psfhosted.org> Change by Charles-Fran?ois Natali : ---------- nosy: -neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 06:11:23 2020 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 14 Nov 2020 11:11:23 +0000 Subject: [issue12488] multiprocessing.Connection does not communicate pipe closure between parent and child In-Reply-To: <1309779809.62.0.10199189289.issue12488@psf.upfronthosting.co.za> Message-ID: <1605352283.41.0.256708684109.issue12488@roundup.psfhosted.org> Change by Charles-Fran?ois Natali : ---------- nosy: -neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 06:20:07 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 14 Nov 2020 11:20:07 +0000 Subject: [issue42351] Setup.py: UnicodeDecodeError in grep_headers_for In-Reply-To: <1605290364.26.0.484718067569.issue42351@roundup.psfhosted.org> Message-ID: <1605352807.62.0.42953982045.issue42351@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- keywords: +patch pull_requests: +22173 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23279 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 06:20:51 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 14 Nov 2020 11:20:51 +0000 Subject: [issue42351] Setup.py: UnicodeDecodeError in grep_headers_for In-Reply-To: <1605290364.26.0.484718067569.issue42351@roundup.psfhosted.org> Message-ID: <1605352851.99.0.6230826633.issue42351@roundup.psfhosted.org> Ronald Oussoren added the comment: I've created PR. Could you please check if that fixes the problem? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 06:28:42 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 14 Nov 2020 11:28:42 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1605353322.8.0.383134180417.issue41100@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- pull_requests: +22174 pull_request: https://github.com/python/cpython/pull/23280 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 06:33:09 2020 From: report at bugs.python.org (Nikolaus Rath) Date: Sat, 14 Nov 2020 11:33:09 +0000 Subject: [issue17852] Built-in module _io can lose data from buffered files in reference cycles In-Reply-To: <1367048010.96.0.3580561262.issue17852@psf.upfronthosting.co.za> Message-ID: <1605353589.83.0.384387308148.issue17852@roundup.psfhosted.org> Change by Nikolaus Rath : ---------- nosy: -nikratio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 06:36:46 2020 From: report at bugs.python.org (Tomek H) Date: Sat, 14 Nov 2020 11:36:46 +0000 Subject: [issue42356] Dict inline manipulations Message-ID: <1605353806.22.0.174145034354.issue42356@roundup.psfhosted.org> New submission from Tomek H : With Python3.9 there is a great feature for merging `dict`s: {1: 'a'} | {2: 'b'} => {1: 'a', 2: 'b'} It would be very handy to filter out a dict with a similar fashion (for example & operator with a list/tuple/frozenset of keys you want to get back): {1: 'a', 2: 'b', 3: 'c'} & [1, 3, 4] == {1: 'a', 3: 'c'} {1: 'a', 2: 'b', 3: 'c'} & {1, 3, 4} == {1: 'a', 3: 'c'} Also, omitting specified keys (for example - operator with a list/tuple/frozenset of keys you want to suppress): {1: 'a', 2: 'b', 3: 'c'} - [3, 4] == {1: 'a', 2: 'b'} {1: 'a', 2: 'b', 3: 'c'} - {3, 4} == {1: 'a', 2: 'b'} Regards! ---------- components: Interpreter Core messages: 380972 nosy: tomek.hlawiczka priority: normal severity: normal status: open title: Dict inline manipulations type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 06:43:44 2020 From: report at bugs.python.org (Jelle Geerts) Date: Sat, 14 Nov 2020 11:43:44 +0000 Subject: [issue42339] official embedded Python fails to import certain modules In-Reply-To: <1605233981.71.0.0380654118097.issue42339@roundup.psfhosted.org> Message-ID: <1605354224.54.0.500635330388.issue42339@roundup.psfhosted.org> Jelle Geerts added the comment: Problem still occurs with newer KB3118401 installed (instead of KB2999226). But good news: Installing update KB3063858 (or the older KB2533623) resolves the issue. That update adds the new kernel32.dll functions SetDefaultDllDirectories, AddDllDirectory, and RemoveDllDirectory. That explains why the issue didn't occur with (embedded) Python 3.7, since Python started using those functions since 3.8 if I recall correctly. So, this issue can be considered solved. But... Thinking along here, maybe there's a list of updates (or FAQ) to which you want to add KB3063858? (Note of course it only affects Windows 7 users that use the embedded Python 3.8, and it doesn't affect 3.7 users and 3.9 doesn't support Windows 7.) Or, maybe even add a bit of logic that detects when Python fails to load one of the _xxxx.pyd PE images (like _socket.pyd) and show a simple warning that tells users to check said FAQ? Or maybe that's asking too much. Just some thoughts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 06:48:37 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 14 Nov 2020 11:48:37 +0000 Subject: [issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget In-Reply-To: <1605043338.18.0.398355808071.issue42318@roundup.psfhosted.org> Message-ID: <1605354517.92.0.862729144541.issue42318@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +22175 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23281 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 07:00:38 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 14 Nov 2020 12:00:38 +0000 Subject: [issue42354] Tuple unpacking with * causes SyntaxError in with ... as ... In-Reply-To: <1605297630.46.0.898037335486.issue42354@roundup.psfhosted.org> Message-ID: <1605355238.3.0.0607079364438.issue42354@roundup.psfhosted.org> Batuhan Taskaya added the comment: Already fixed with GH-22612 ---------- nosy: +BTaskaya resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 07:02:36 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 14 Nov 2020 12:02:36 +0000 Subject: [issue42353] Proposal: re.prefixmatch method (alias for re.match) In-Reply-To: <1605295623.12.0.914188426549.issue42353@roundup.psfhosted.org> Message-ID: <1605355356.24.0.123746426977.issue42353@roundup.psfhosted.org> Serhiy Storchaka added the comment: I seen a code which uses re.search() with anchor ^ instead of re.match(), but I never seen a code which uses re.match() instead of re.search(). It just won't work unless you add explicit ".*" or ".*?" at the start of the pattern, and it is a clear indication that re.match() matches the start of the string. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 07:03:45 2020 From: report at bugs.python.org (Petr Viktorin) Date: Sat, 14 Nov 2020 12:03:45 +0000 Subject: [issue41832] PyType_FromSpec() should accept tp_doc=NULL In-Reply-To: <1600770571.99.0.249807543427.issue41832@roundup.psfhosted.org> Message-ID: <1605355425.44.0.846041232972.issue41832@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 2b39da49974bda523c5c1a8777bbe30dbafdcd12 by Hai Shi in branch 'master': bpo-41832: Restore note about NULL in PyType_Slot.pfunc (GH-23243) https://github.com/python/cpython/commit/2b39da49974bda523c5c1a8777bbe30dbafdcd12 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 08:18:05 2020 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 14 Nov 2020 13:18:05 +0000 Subject: [issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org> Message-ID: <1605359885.62.0.739268952292.issue42260@roundup.psfhosted.org> Change by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 08:39:56 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 14 Nov 2020 13:39:56 +0000 Subject: [issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation In-Reply-To: <1560017700.11.0.127727162727.issue37205@roundup.psfhosted.org> Message-ID: <1605361196.27.0.649299867261.issue37205@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +22176 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23284 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 08:40:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 14 Nov 2020 13:40:52 +0000 Subject: [issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation In-Reply-To: <1560017700.11.0.127727162727.issue37205@roundup.psfhosted.org> Message-ID: <1605361252.62.0.435462346984.issue37205@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 23284 to make time.perf_counter() on Windows and time.monotonic() on macOS system-wide (remove the offset computed at startup). I also suggested the usage of the _ns() variant functions in the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 10:07:51 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 14 Nov 2020 15:07:51 +0000 Subject: [issue42351] Setup.py: UnicodeDecodeError in grep_headers_for In-Reply-To: <1605290364.26.0.484718067569.issue42351@roundup.psfhosted.org> Message-ID: <1605366471.07.0.385363302848.issue42351@roundup.psfhosted.org> Ronald Oussoren added the comment: New changeset 7a27c7ed4b2b45bb9ea27d3f5c4f423495d6e939 by Ronald Oussoren in branch 'master': bpo-42351: Avoid error when opening header with non-UTF8 encoding (GH-23279) https://github.com/python/cpython/commit/7a27c7ed4b2b45bb9ea27d3f5c4f423495d6e939 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 10:08:32 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 14 Nov 2020 15:08:32 +0000 Subject: [issue42351] Setup.py: UnicodeDecodeError in grep_headers_for In-Reply-To: <1605290364.26.0.484718067569.issue42351@roundup.psfhosted.org> Message-ID: <1605366512.22.0.34329726884.issue42351@roundup.psfhosted.org> Ronald Oussoren added the comment: Thanks for testing! ---------- resolution: -> fixed stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 10:09:22 2020 From: report at bugs.python.org (E. Paine) Date: Sat, 14 Nov 2020 15:09:22 +0000 Subject: [issue42351] Setup.py: UnicodeDecodeError in grep_headers_for In-Reply-To: <1605290364.26.0.484718067569.issue42351@roundup.psfhosted.org> Message-ID: <1605366562.83.0.390770682473.issue42351@roundup.psfhosted.org> Change by E. Paine : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 10:18:59 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 14 Nov 2020 15:18:59 +0000 Subject: [issue42356] Dict inline manipulations In-Reply-To: <1605353806.22.0.174145034354.issue42356@roundup.psfhosted.org> Message-ID: <1605367139.29.0.0661376100755.issue42356@roundup.psfhosted.org> Eric V. Smith added the comment: I think you should bring this up on the python-ideas mailing list if you'd like to see it discussed. It will likely also require a PEP, similar to PEP 584. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 10:37:23 2020 From: report at bugs.python.org (Maiyun Zhang) Date: Sat, 14 Nov 2020 15:37:23 +0000 Subject: [issue42357] Wrong Availability for signal.SIGCHLD In-Reply-To: <1605368197.47.0.575674573541.issue42357@roundup.psfhosted.org> Message-ID: <1605368243.2.0.137121250022.issue42357@roundup.psfhosted.org> Change by Maiyun Zhang : ---------- keywords: +patch pull_requests: +22177 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23285 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 10:36:37 2020 From: report at bugs.python.org (Maiyun Zhang) Date: Sat, 14 Nov 2020 15:36:37 +0000 Subject: [issue42357] Wrong Availability for signal.SIGCHLD Message-ID: <1605368197.47.0.575674573541.issue42357@roundup.psfhosted.org> New submission from Maiyun Zhang : The availability for `signal.SIGCHLD` is not correct. This seems to be present since Python 3.7 ---------- assignee: docs at python components: Documentation messages: 380981 nosy: docs at python, myzhang1029 priority: normal severity: normal status: open title: Wrong Availability for signal.SIGCHLD versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 10:42:55 2020 From: report at bugs.python.org (Hitansh K Doshi) Date: Sat, 14 Nov 2020 15:42:55 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605368575.48.0.996006157827.issue42153@roundup.psfhosted.org> Hitansh K Doshi added the comment: I contacted them I got to know that the project is discontinued since 2008 and the resources are no more maintained. they have provided with an github repo and an archive file link This is the exact reply: Unfortunately, both UW IMAP and Pine/Alpine development was discontinued back in 2008 and removed from University systems in 2018. A community copy still exists at https://github.com/uw-imap/imap but UW provides no support or resources for it anymore. It looks like some of the information may still be available via the Wayback Machine https://web.archive.org/web/20080323102305/https://www.washington.edu/imap/ Mark Crispin, the lead developer at UW, started a fork of it called Panda IMAP when he was laid off in 2008, but he has unfortunately passed away and that no longer seems to be maintained. what would you like me to do next ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 11:42:34 2020 From: report at bugs.python.org (Yash Shete) Date: Sat, 14 Nov 2020 16:42:34 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605372154.77.0.197144137928.issue42153@roundup.psfhosted.org> Yash Shete added the comment: Should I change the link to new one (not University of Washington?s IMAP Information Center) as it contains so much information about IMAP4. I could not find any link from University of Washington, So I suggest changing the link all together. I have a link in mind I can open a PR If you agree. ---------- nosy: +Pixmew _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 12:38:53 2020 From: report at bugs.python.org (Yash Shete) Date: Sat, 14 Nov 2020 17:38:53 +0000 Subject: [issue41712] REDoS in purge In-Reply-To: <1599212842.75.0.630288607393.issue41712@roundup.psfhosted.org> Message-ID: <1605375533.88.0.693251726975.issue41712@roundup.psfhosted.org> Change by Yash Shete : ---------- pull_requests: +22179 pull_request: https://github.com/python/cpython/pull/23287 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 13:22:46 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 14 Nov 2020 18:22:46 +0000 Subject: [issue42353] Proposal: re.prefixmatch method (alias for re.match) In-Reply-To: <1605295623.12.0.914188426549.issue42353@roundup.psfhosted.org> Message-ID: <1605378166.26.0.0857474108222.issue42353@roundup.psfhosted.org> Gregory P. Smith added the comment: My point is that re.match is a common bug when people really want re.search. re.prefixmatch makes it explicit and non-confusing and thus unlikely to be used wrong or misunderstood when read or reviewed. The term "match" when talking about regular expressions is not normally meant to imply any anchoring as anchors can be expressed within the regex. Python is relatively unique in bothering to have different methods for a prefix match and an anywhere match. (We'd have been better off without a match method entirely, only having search - too late now) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 14:04:27 2020 From: report at bugs.python.org (Roundup Robot) Date: Sat, 14 Nov 2020 19:04:27 +0000 Subject: [issue42330] Add browsh in the webbrowser module In-Reply-To: <1605153434.0.0.062281491373.issue42330@roundup.psfhosted.org> Message-ID: <1605380667.89.0.945982453893.issue42330@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 2.0 -> 3.0 pull_requests: +22180 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23289 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 14:41:19 2020 From: report at bugs.python.org (giomach) Date: Sat, 14 Nov 2020 19:41:19 +0000 Subject: [issue42293] Installation of pyinstaller in Windows fails with utf8 error In-Reply-To: <1604878197.58.0.426662721479.issue42293@roundup.psfhosted.org> Message-ID: <1605382879.77.0.501497451216.issue42293@roundup.psfhosted.org> giomach added the comment: I'm not sure whose responsibility it is to take this to the "pip tracker", but as a newcomer to the python environment I know nothing about that process, so it would be appreciated if some of the other people here would be kind enough to do this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 15:00:35 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 14 Nov 2020 20:00:35 +0000 Subject: [issue42330] Add browsh in the webbrowser module In-Reply-To: <1605153434.0.0.062281491373.issue42330@roundup.psfhosted.org> Message-ID: <1605384035.69.0.790552044897.issue42330@roundup.psfhosted.org> Serhiy Storchaka added the comment: I concur with Terry. Actually, registering the browser is not necessary for using it. Set the environment variable BROWSER and use your favorite browser. The following example uses curl (which is not registered as in the webbrowser module) as a browser: BROWSER=curl python3 -m webbrowser -n http://example.org The registry in the webbrowser module is used for the case if you use Python on some non-mainstream platform which does not have OS-level infrastructure for running default browser or settings are empty. I.e. it is not Windows or macOS and does not support OpenDesktop and Posix specifications, and BROWSER is not set. If you have such marginal system and use marginal browser on it, it is worth to spend some time for setting BROWSER or configuring www-browser, x-www-browser, xdg-open, etc. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 15:01:41 2020 From: report at bugs.python.org (Dennis Clarke) Date: Sat, 14 Nov 2020 20:01:41 +0000 Subject: [issue42358] Python 3.9.0 unable to detect ax_cv_c_float_words_bigendian value on nigendan system Message-ID: <1605384101.77.0.568061256015.issue42358@roundup.psfhosted.org> New submission from Dennis Clarke : Seems related to issue42173 where the idea on the table was, simply to drop Solaris support and to quote Mr Stinner to "let the code slowly die". Regardless of this sort of neglect there are people who do try to use Python on big endian risc systems such as Solaris or Debian Linux in fact. Wherein a trivial configure reveals : alpha$ ../Python-3.9.0/configure --prefix=/opt/bw \ > --enable-shared --disable-optimizations \ > --enable-loadable-sqlite-extensions \ > --enable-ipv6 --with-pydebug --without-dtrace \ > --with-openssl=/opt/bw --with-ssl-default-suites=openssl \ > --without-gcc configure: WARNING: unrecognized options: --without-gcc checking build system type... sparc-sun-solaris2.10 checking host system type... sparc-sun-solaris2.10 checking for python3.9... no checking for python3... python3 checking for --enable-universalsdk... no checking for --with-universal-archs... no checking MACHDEP... "sunos5" checking for gcc... /opt/developerstudio12.6/bin/cc -std=iso9899:2011 -m64 -xarch=sparc -g -errfmt=error -errshort=full -xstrconst -xildoff -xmemalign=8s -xnolibmil -xcode=pic32 -xregs=no%appl -xlibmieee -mc -ftrap=%none -xbuiltin=%none -xunroll=1 -xs -xdebugformat=dwarf -errtags=yes -errwarn=%none -erroff=%none -L/opt/bw/lib -R/opt/bw/lib checking whether the C compiler works... yes . . . checking for __fpu_control... no checking for __fpu_control in -lieee... no checking for --with-libm=STRING... default LIBM="-lm" checking for --with-libc=STRING... default LIBC="" checking for x64 gcc inline assembler... no checking whether float word ordering is bigendian... unknown configure: error: Unknown float word ordering. You need to manually preset ax_cv_c_float_words_bigendian=no (or yes) according to your system. So it seems that the m4/ax_c_float_words_bigendian.m4 needs to be manually hacked or the configure script itself is at fault. I will give this a try on big endian IBM Power and also IBM Power9 ppc64le as well as FreeBSD running in RISC-V rv64imafdc little endian and see what happens. I suspect that the little endian systems will be no great concern as the bulk of Python devs seem to have never seen anything else other than little endian systems running Red Hat. To hack around this floating point endian test with blunt force : alpha$ alpha$ diff -u configure.orig configure --- configure.orig Mon Oct 5 15:07:58 2020 +++ configure Sat Nov 14 19:37:13 2020 @@ -14425,7 +14425,7 @@ else -ax_cv_c_float_words_bigendian=unknown +ax_cv_c_float_words_bigendian=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14442,9 +14442,9 @@ fi if $GREP seesnoon conftest.$ac_objext >/dev/null ; then if test "$ax_cv_c_float_words_bigendian" = unknown; then - ax_cv_c_float_words_bigendian=no + ax_cv_c_float_words_bigendian=yes else - ax_cv_c_float_words_bigendian=unknown + ax_cv_c_float_words_bigendian=yes fi fi alpha$ alpha$ diff -u m4/ax_c_float_words_bigendian.m4.orig m4/ax_c_float_words_bigendian.m4 --- m4/ax_c_float_words_bigendian.m4.orig Mon Oct 5 15:07:58 2020 +++ m4/ax_c_float_words_bigendian.m4 Sat Nov 14 19:35:44 2020 @@ -42,7 +42,7 @@ [AC_CACHE_CHECK(whether float word ordering is bigendian, ax_cv_c_float_words_bigendian, [ -ax_cv_c_float_words_bigendian=unknown +ax_cv_c_float_words_bigendian=yes AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0; @@ -54,9 +54,9 @@ fi if $GREP seesnoon conftest.$ac_objext >/dev/null ; then if test "$ax_cv_c_float_words_bigendian" = unknown; then - ax_cv_c_float_words_bigendian=no + ax_cv_c_float_words_bigendian=yes else - ax_cv_c_float_words_bigendian=unknown + ax_cv_c_float_words_bigendian=yes fi fi alpha$ This is a hack of course and it gets past the endian test sickness. Shortly thereafter the compile fails due to a trivial C99 code problem : /opt/developerstudio12.6/bin/cc -std=iso9899:2011 -m64 -xarch=sparc -g -errfmt=error -errshort=full -xstrconst -xildoff -xmemalign=8s -xnolibmil -xcode=pic32 -xregs=no%appl -xlibmieee -mc -ftrap=%none -xbuiltin=%none -xunroll=1 -xs -xdebugformat=dwarf -errtags=yes -errwarn=%none -erroff=%none -L/opt/bw/lib -R/opt/bw/lib -c -O -std=iso9899:2011 -m64 -xarch=sparc -g -errfmt=error -errshort=full -xstrconst -xildoff -xmemalign=8s -xnolibmil -xcode=pic32 -xregs=no%appl -xlibmieee -mc -ftrap=%none -xbuiltin=%none -xunroll=1 -xs -xdebugformat=dwarf -errtags=yes -errwarn=%none -erroff=%none -L/opt/bw/lib -R/opt/bw/lib -D_REENTRANT -std=iso9899:2011 -m64 -xarch=sparc -g -errfmt=error -errshort=full -xstrconst -xildoff -xmemalign=8s -xnolibmil -xcode=pic32 -xregs=no%appl -xlibmieee -mc -ftrap=%none -xbuiltin=%none -xunroll=1 -xs -xdebugformat=dwarf -errtags=yes -errwarn=%none -erroff=%none -L/opt/bw/lib -R/opt/bw/lib -I../Python-3.9.0/Include/internal -IObjects -IInclude -IPython -I. -I../Python-3.9.0/Include -I/opt/bw/include -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -I/opt/bw/include -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -xcode=pic32 -DPy_BUILD_CORE -o Objects/exceptions.o ../Python-3.9.0/Objects/exceptions.c "../Python-3.9.0/Objects/exceptions.c", line 2313: error: void function cannot return value cc: acomp failed for ../Python-3.9.0/Objects/exceptions.c gmake: *** [Makefile:1781: Objects/exceptions.o] Error 2 However that is a separate issue that has been around for at least a year or so. 2313 return Py_TYPE(self)->tp_free((PyObject *)self); ??? Why try to return anything here ? Why can we not do the same as line 2319 ? 2306 2307 static void 2308 MemoryError_dealloc(PyBaseExceptionObject *self) 2309 { 2310 BaseException_clear(self); 2311 2312 if (!Py_IS_TYPE(self, (PyTypeObject *) PyExc_MemoryError)) { 2313 Py_TYPE(self)->tp_free((PyObject *)self); 2314 } 2315 2316 _PyObject_GC_UNTRACK(self); 2317 2318 if (memerrors_numfree >= MEMERRORS_SAVE) 2319 Py_TYPE(self)->tp_free((PyObject *)self); 2320 else { 2321 self->dict = (PyObject *) memerrors_freelist; 2322 memerrors_freelist = self; 2323 memerrors_numfree++; 2324 } 2325 } 2326 The compile may then continue but eventually a bucket of tests fail. Perhaps an Oracle/Fujitsu SPARC based built bot or site would help here? -- Dennis Clarke RISC-V/SPARC/PPC/ARM/CISC UNIX and Linux spoken GreyBeard and suspenders optional ---------- components: Installation messages: 380987 nosy: blastwave priority: normal severity: normal status: open title: Python 3.9.0 unable to detect ax_cv_c_float_words_bigendian value on nigendan system versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 15:03:50 2020 From: report at bugs.python.org (Dennis Clarke) Date: Sat, 14 Nov 2020 20:03:50 +0000 Subject: [issue42358] Python 3.9.0 unable to detect ax_cv_c_float_words_bigendian value on nigendan system In-Reply-To: <1605384101.77.0.568061256015.issue42358@roundup.psfhosted.org> Message-ID: <1605384230.2.0.726813920063.issue42358@roundup.psfhosted.org> Dennis Clarke added the comment: I gave up on trying to compile this code with C99. Trying C11 and hope that blows up in different places. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 15:31:55 2020 From: report at bugs.python.org (Eryk Sun) Date: Sat, 14 Nov 2020 20:31:55 +0000 Subject: [issue42339] official embedded Python fails to import certain modules In-Reply-To: <1605233981.71.0.0380654118097.issue42339@roundup.psfhosted.org> Message-ID: <1605385915.67.0.436602704035.issue42339@roundup.psfhosted.org> Eryk Sun added the comment: > maybe there's a list of updates (or FAQ) to which you > want to add KB3063858? The documentation of the embeddable package [1] could highlight the need for KB2533623. Currently it's directly mentioned only in "What's New in Python 3.8" [2]. > ImportError: DLL load failed while importing _lzma: > De parameter is onjuist. Mixed-language output is awkward. A common _Py_FormatMessage function could be added in 3.10 that tries getting an error message in English before trying to get it in the user's default language. --- [1] https://docs.python.org/3/using/windows.html#the-embeddable-package [2] https://docs.python.org/3.8/whatsnew/3.8.html#changes-in-the-python-api ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 15:56:57 2020 From: report at bugs.python.org (Jelle Geerts) Date: Sat, 14 Nov 2020 20:56:57 +0000 Subject: [issue42339] official embedded Python fails to import certain modules In-Reply-To: <1605233981.71.0.0380654118097.issue42339@roundup.psfhosted.org> Message-ID: <1605387417.84.0.0598020298951.issue42339@roundup.psfhosted.org> Jelle Geerts added the comment: > Mixed-language output is awkward. A common _Py_FormatMessage function could be added in 3.10 that tries getting an error message in English before trying to get it in the user's default language. I agree that in general mixed-language can be odd. But I guess you could also argue it's useful that Python doesn't add another layer of complexity, and simply uses the system's own FormatMessage() function, also because developers are already used to seeing such messages in other applications as well. Just playing devil's advocate here. At the same time, I feel it would be helpful to users if there would, in this specific case, be a more helpful message as well (alongside the same error that is already shown), something that points more directly in the direction of the solution. > The documentation of the embeddable package [1] could highlight the need for KB2533623. Currently it's directly mentioned only in "What's New in Python 3.8" [2]. That would be helpful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 16:22:46 2020 From: report at bugs.python.org (Paul Moore) Date: Sat, 14 Nov 2020 21:22:46 +0000 Subject: [issue42293] Installation of pyinstaller in Windows fails with utf8 error In-Reply-To: <1604878197.58.0.426662721479.issue42293@roundup.psfhosted.org> Message-ID: <1605388966.63.0.859968270817.issue42293@roundup.psfhosted.org> Paul Moore added the comment: I've raised https://github.com/pypa/pip/issues/9135 for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 16:47:11 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 14 Nov 2020 21:47:11 +0000 Subject: [issue39411] pyclbr rewrite using AST In-Reply-To: <1579613369.33.0.216761296366.issue39411@roundup.psfhosted.org> Message-ID: <1605390431.18.0.36432137796.issue39411@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 16:48:35 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 14 Nov 2020 21:48:35 +0000 Subject: [issue42328] ttk style.map function incorrectly handles the default state for element options. In-Reply-To: <1605140874.05.0.0614253934034.issue42328@roundup.psfhosted.org> Message-ID: <1605390515.04.0.297326179881.issue42328@roundup.psfhosted.org> Serhiy Storchaka added the comment: Sorry, I did not understand how did you get an empty state? Could you please provide complete reproducible example? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 16:51:35 2020 From: report at bugs.python.org (Teugea Ioan-Teodor) Date: Sat, 14 Nov 2020 21:51:35 +0000 Subject: [issue42178] failed pickle hangs python on exit in CMD.exe only In-Reply-To: <1603831953.96.0.174038023621.issue42178@roundup.psfhosted.org> Message-ID: <1605390695.02.0.00876748098751.issue42178@roundup.psfhosted.org> Change by Teugea Ioan-Teodor : ---------- keywords: +patch nosy: +John-Ted nosy_count: 6.0 -> 7.0 pull_requests: +22181 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23290 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 17:49:19 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 14 Nov 2020 22:49:19 +0000 Subject: [issue42358] Python 3.9.0 unable to detect ax_cv_c_float_words_bigendian value on nigendan system In-Reply-To: <1605384101.77.0.568061256015.issue42358@roundup.psfhosted.org> Message-ID: <1605394159.55.0.674447679346.issue42358@roundup.psfhosted.org> Christian Heimes added the comment: > I suspect that the little endian systems will > be no great concern as the bulk of Python devs seem to have never > seen anything else other than little endian systems running Red Hat. We don't fancy this kind of passive-aggressive and accusatory communication style. Instead we prefer constructive collaboration without personal attacks. For your information our buildbot infrastructure perform regular testing on a lot of hardware platforms, distributions, and compilers including PPC64 and s390x big endian machines. Please attach your config.log and provide more information about your platform, compiler, and hardware. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 18:32:22 2020 From: report at bugs.python.org (Pat Thoyts) Date: Sat, 14 Nov 2020 23:32:22 +0000 Subject: [issue42328] ttk style.map function incorrectly handles the default state for element options. In-Reply-To: <1605140874.05.0.0614253934034.issue42328@roundup.psfhosted.org> Message-ID: <1605396742.86.0.540407154342.issue42328@roundup.psfhosted.org> Pat Thoyts added the comment: So if you look at the clamTheme.tcl file you can see the definition of the map for the TNotebook.Tab style looks like the following: ttk::style map TNotebook.Tab \ -padding [list selected {6 4 6 2}] \ -background [list selected $colors(-frame) {} $colors(-darker)] \ -lightcolor [list selected $colors(-lighter) {} $colors(-dark)] \ ; The vista theme uses these too on Windows. So calling this from script we can see the resulting empty elements in tcl: % ttk::style map TNotebook.Tab -lightcolor {selected #eeebe7 {} #cfcdc8} -padding {selected {6 4 6 2}} -background {selected #dcdad5 {} #bab5ab} As I put in the bug, this gets mistranslated in python with the value for that state map element getting put into the first element. The simplest demonstration is that the following raises an exception: import tkinter as tk import tkinter.ttk as ttk style = ttk.Style() style.theme_use('clam') style.map('Custom.TNotebook.Tab', **style.map('TNotebook.Tab')) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 18:49:30 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Nov 2020 23:49:30 +0000 Subject: [issue42330] Add browsh in the webbrowser module In-Reply-To: <1605153434.0.0.062281491373.issue42330@roundup.psfhosted.org> Message-ID: <1605397770.39.0.0905871572515.issue42330@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 18:57:31 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Nov 2020 23:57:31 +0000 Subject: [issue42328] ttk style.map function incorrectly handles the default state for element options. In-Reply-To: <1605140874.05.0.0614253934034.issue42328@roundup.psfhosted.org> Message-ID: <1605398251.94.0.201698497647.issue42328@roundup.psfhosted.org> Terry J. Reedy added the comment: Verified Traceback (most recent call last): File "F:\Python\a\tem4.py", line 5, in style.map('Custom.TNotebook.Tab', **style.map('TNotebook.Tab')) File "C:\Program Files\Python310\lib\tkinter\ttk.py", line 403, in map self.tk.call(self._name, "map", style, *_format_mapdict(kw)), File "C:\Program Files\Python310\lib\tkinter\ttk.py", line 111, in _format_mapdict _format_optvalue(_mapdict_values(value), script))) File "C:\Program Files\Python310\lib\tkinter\ttk.py", line 85, in _mapdict_values state[0] # raise IndexError if empty IndexError: list index out of range >>> PS. Pat, please don't indent code that someone might reasonably copy and paste to run. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 19:27:33 2020 From: report at bugs.python.org (Matthew Suozzo) Date: Sun, 15 Nov 2020 00:27:33 +0000 Subject: [issue42353] Proposal: re.prefixmatch method (alias for re.match) In-Reply-To: <1605295623.12.0.914188426549.issue42353@roundup.psfhosted.org> Message-ID: <1605400053.8.0.209521041473.issue42353@roundup.psfhosted.org> Matthew Suozzo added the comment: > It just won't work unless you add explicit ".*" or ".*?" at the start of the pattern But think of when regexes are used for validating input. Getting it to "just work" may be over-permissive validation that only actually checks the beginning of the input. They're one missed test case away from a crash or, worse, a security issue. This proposed name change would help make the function behavior obvious at the callsite. In the validator example, calling "prefixmatch" would stand out as wrong to even the most oblivious, documentation-averse user. > My point is that re.match is a common bug when people really want re.search. While I think better distinguishing the interfaces is a nice-to-have for usability, I think it has more absolute benefit to correctness. Again, confusion around the semantics of "match" were the motivation for adding "fullmatch" in the first place but that change only went so far to address the problem: It's still too easy to misuse the existing "match" interface and it's not realistic to remove it from the language. A new name would eliminate this class of error at a very low cost. ---------- nosy: +matthew.suozzo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 20:20:28 2020 From: report at bugs.python.org (Andy Harrington) Date: Sun, 15 Nov 2020 01:20:28 +0000 Subject: [issue42359] tutorial: list is a class Message-ID: <1605403228.0.0.0141370845785.issue42359@roundup.psfhosted.org> New submission from Andy Harrington : Documentation in Tutorial section 9.3.3 seems to be stuck in Python 2: "In Python, the term method is not unique to class instances: other object types can have methods as well. For example, list objects have methods called append, insert, remove, sort, and so on." In Python 3 built-in types are derived from Object, so list is now a class, right? ---------- assignee: docs at python components: Documentation messages: 380997 nosy: andyharrington, docs at python priority: normal severity: normal status: open title: tutorial: list is a class versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 20:28:27 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 15 Nov 2020 01:28:27 +0000 Subject: [issue42359] tutorial: list is a class In-Reply-To: <1605403228.0.0.0141370845785.issue42359@roundup.psfhosted.org> Message-ID: <1605403707.86.0.559549389336.issue42359@roundup.psfhosted.org> Raymond Hettinger added the comment: I think the current wording is fine. After the type/class unification we tend to use the words "type" and "class" almost interchangeably. For builtins, we still tend to say type though. The language itself tends to mix the terms as well: >>> class A: pass >>> type(A) >>> type(list) ---------- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 23:15:55 2020 From: report at bugs.python.org (--) Date: Sun, 15 Nov 2020 04:15:55 +0000 Subject: [issue32958] socket module calls with long host names can fail with idna codec error In-Reply-To: <1519674755.43.0.467229070634.issue32958@psf.upfronthosting.co.za> Message-ID: <1605413755.18.0.069865237427.issue32958@roundup.psfhosted.org> Change by -- : ---------- nosy: +midopa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 14 23:30:23 2020 From: report at bugs.python.org (Ravi Chityala) Date: Sun, 15 Nov 2020 04:30:23 +0000 Subject: [issue42302] [Turtle] Add clockwise and anticlockwise method as alias to right and left In-Reply-To: <1604985181.19.0.385851397848.issue42302@roundup.psfhosted.org> Message-ID: <1605414623.31.0.474687860838.issue42302@roundup.psfhosted.org> Change by Ravi Chityala : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 01:14:22 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 15 Nov 2020 06:14:22 +0000 Subject: [issue42343] threading.local documentation should be on the net... In-Reply-To: <1605266273.51.0.273989729799.issue42343@roundup.psfhosted.org> Message-ID: <1605420862.28.0.916563211925.issue42343@roundup.psfhosted.org> Raymond Hettinger added the comment: Would you like to make a PR to fix it? ---------- keywords: +newcomer friendly nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 01:17:55 2020 From: report at bugs.python.org (Hitansh K Doshi) Date: Sun, 15 Nov 2020 06:17:55 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605421075.47.0.613228699791.issue42153@roundup.psfhosted.org> Hitansh K Doshi added the comment: I made changes to rst file and added link that I got from university of Washington do check it. Let me know if any changes, you find it proper. I will submit my PR. changes in shown in image ---------- Added file: https://bugs.python.org/file49599/python doc1.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 01:46:06 2020 From: report at bugs.python.org (Yash Shete) Date: Sun, 15 Nov 2020 06:46:06 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605422766.37.0.0938752308769.issue42153@roundup.psfhosted.org> Yash Shete added the comment: The link provided gives UW IMAP Server Documentation not In general Documentation Of IMAP ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 01:47:45 2020 From: report at bugs.python.org (Yash Shete) Date: Sun, 15 Nov 2020 06:47:45 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605422865.33.0.117652324542.issue42153@roundup.psfhosted.org> Yash Shete added the comment: As Documentaion of imaplib we should provide information of imap itself ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 01:50:24 2020 From: report at bugs.python.org (Yash Shete) Date: Sun, 15 Nov 2020 06:50:24 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605423024.3.0.513124705793.issue42153@roundup.psfhosted.org> Yash Shete added the comment: Sorry my Bad your version is Good you can submit your PR,If any problem May I submit it please ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 02:35:49 2020 From: report at bugs.python.org (Georg Brandl) Date: Sun, 15 Nov 2020 07:35:49 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605425749.89.0.482486573975.issue42153@roundup.psfhosted.org> Georg Brandl added the comment: It doesn't make sense to include the archive link, the documentation it refers to is available in the GitHub repository under docs/. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 02:44:57 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 15 Nov 2020 07:44:57 +0000 Subject: [issue42316] Walrus Operator in list index In-Reply-To: <1605029315.25.0.963262062958.issue42316@roundup.psfhosted.org> Message-ID: <1605426297.58.0.853469703995.issue42316@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +22182 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23291 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 02:46:31 2020 From: report at bugs.python.org (Yash Shete) Date: Sun, 15 Nov 2020 07:46:31 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605426391.72.0.470540343392.issue42153@roundup.psfhosted.org> Yash Shete added the comment: Then I shall remove the archive link ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 03:18:11 2020 From: report at bugs.python.org (Yash Shete) Date: Sun, 15 Nov 2020 08:18:11 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605428291.93.0.522141692537.issue42153@roundup.psfhosted.org> Change by Yash Shete : ---------- keywords: +patch pull_requests: +22183 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23292 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 04:09:05 2020 From: report at bugs.python.org (hai shi) Date: Sun, 15 Nov 2020 09:09:05 +0000 Subject: [issue41832] PyType_FromSpec() should accept tp_doc=NULL In-Reply-To: <1600770571.99.0.249807543427.issue41832@roundup.psfhosted.org> Message-ID: <1605431345.63.0.537611314433.issue41832@roundup.psfhosted.org> hai shi added the comment: Hi, petr. If there is no other doubt about this bpo, I suggest close this bpo. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 04:09:14 2020 From: report at bugs.python.org (hai shi) Date: Sun, 15 Nov 2020 09:09:14 +0000 Subject: [issue41832] PyType_FromSpec() should accept tp_doc=NULL In-Reply-To: <1600770571.99.0.249807543427.issue41832@roundup.psfhosted.org> Message-ID: <1605431354.49.0.583606610057.issue41832@roundup.psfhosted.org> Change by hai shi : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 04:14:25 2020 From: report at bugs.python.org (Alejandro Gonzalez) Date: Sun, 15 Nov 2020 09:14:25 +0000 Subject: [issue42360] In the namedtuple documentation, mention that typename should match the variable name for the class to be pickle-able Message-ID: <1605431665.76.0.57179948955.issue42360@roundup.psfhosted.org> New submission from Alejandro Gonzalez : I think the namedtuple documentation should mention that, for classes created with it to be pickle-able, the typename argument must match the name of the variable the class is being assigned to. Otherwise you get an error like this: ---------------------------------------------- >>> Foo = namedtuple("Bar", "x,y") >>> pickle.dumps(Foo(1, 2)) Traceback (most recent call last): File "", line 1, in _pickle.PicklingError: Can't pickle : attribute lookup Bar on __main__ failed ---------------------------------------------- While it is indeed odd to do such naming in the first place, it should be admissible in other circumstances not involving pickling, and it is not obvious that pickling won't work if you do so. The pickle documentation does mention this, though: [...]Similarly, classes are pickled by named reference, so the same restrictions in the unpickling environment apply.[...] but for someone who encounters this error it might be difficult to figure it out from that passage. The added documentation in namedtuple could include a pointer to that section of pickle's documentation. ---------- assignee: docs at python components: Documentation messages: 381007 nosy: alegonz, docs at python priority: normal severity: normal status: open title: In the namedtuple documentation, mention that typename should match the variable name for the class to be pickle-able type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 04:31:11 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 15 Nov 2020 09:31:11 +0000 Subject: [issue29076] Mac installer shell updater script silently fails if default shell is fish In-Reply-To: <1482778000.76.0.584407589583.issue29076@psf.upfronthosting.co.za> Message-ID: <1605432671.98.0.920595094433.issue29076@roundup.psfhosted.org> Ronald Oussoren added the comment: @Erland: The attached patch looks fine to me. Could you convert it to a PR? ---------- 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 Sun Nov 15 04:57:37 2020 From: report at bugs.python.org (Yash Shete) Date: Sun, 15 Nov 2020 09:57:37 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605434257.35.0.497134912902.issue42153@roundup.psfhosted.org> Yash Shete added the comment: The build fails because of "Inline emphasis start-string without end-string." and bash script exists at code 2 can you please Help me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 05:26:49 2020 From: report at bugs.python.org (Yash Shete) Date: Sun, 15 Nov 2020 10:26:49 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605436009.58.0.653904258479.issue42153@roundup.psfhosted.org> Yash Shete added the comment: This is what I get: Run xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going -j4" doctest suspicious html make: Entering directory '/home/runner/work/cpython/cpython/Doc' make[1]: Entering directory '/home/runner/work/cpython/cpython/Doc' mkdir -p build Building NEWS from Misc/NEWS.d with blurb PATH=./venv/bin:$PATH sphinx-build -b doctest -d build/doctrees -q -W --keep-going -j4 -W . build/doctest Warning: ../build/NEWS:111: WARNING: Inline emphasis start-string without end-string. /home/runner/work/cpython/cpython/Lib/socket.py:775: ResourceWarning: unclosed self._sock = None ResourceWarning: Enable tracemalloc to get the object allocation traceback :1: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp :1: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly formatargspec(*getfullargspec(f)) Makefile:49: recipe for target 'build' failed make[1]: *** [build] Error 1 make[1]: Leaving directory '/home/runner/work/cpython/cpython/Doc' Testing of doctests in the sources finished, look at the results in build/doctest/output.txt Makefile:127: recipe for target 'doctest' failed make: *** [doctest] Error 1 make: Leaving directory '/home/runner/work/cpython/cpython/Doc' Error: Process completed with exit code 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 06:13:15 2020 From: report at bugs.python.org (Yash Shete) Date: Sun, 15 Nov 2020 11:13:15 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605438795.14.0.0337319780786.issue42153@roundup.psfhosted.org> Yash Shete added the comment: After some research all the problems are fixed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 06:44:21 2020 From: report at bugs.python.org (Dennis Clarke) Date: Sun, 15 Nov 2020 11:44:21 +0000 Subject: [issue42358] Python 3.9.0 unable to detect ax_cv_c_float_words_bigendian value on nigendan system In-Reply-To: <1605384101.77.0.568061256015.issue42358@roundup.psfhosted.org> Message-ID: <1605440661.89.0.542838335386.issue42358@roundup.psfhosted.org> Dennis Clarke added the comment: I see : https://github.com/python/cpython/blob/master/Objects/exceptions.c#L2316 the void return has been fixed and really I should not be looked anywhere else other than the master sources on some oddball platform. I will start over. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 07:24:29 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 15 Nov 2020 12:24:29 +0000 Subject: [issue42328] ttk style.map function incorrectly handles the default state for element options. In-Reply-To: <1605140874.05.0.0614253934034.issue42328@roundup.psfhosted.org> Message-ID: <1605443069.84.0.244506553544.issue42328@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you for your examples Pat. Now it looks clearer to me. Semantically this data in Tk is a sequence of pairs: states (which can be a single word or several words or empty) and default value. >>> from tkinter import ttk >>> style = ttk.Style() >>> style.theme_use('clam') >>> style.tk.eval(f'{style._name} map TCombobox -fieldbackground') '{readonly focus} #4a6984 readonly #dcdad5' >>> style.tk.eval(f'{style._name} map TNotebook.Tab -background') 'selected #dcdad5 {} #bab5ab' Internally states represented in Tk as the StateSpec object. When automatically convert to Python it became the Tcl_Obj object with typename 'StateSpec'. Without postprocessing. >>> style.tk.call(style._name, 'map', 'TCombobox', '-fieldbackground') (, '#4a6984', , '#dcdad5') >>> style.tk.call(style._name, 'map', 'TNotebook.Tab', '-background') (, '#dcdad5', , '#bab5ab') Style.map() does postprocessing. It converts a sequence (with even items number) to a list of tuples. The last item of a tuple is the default value, and the rest are items of the StateSpec object. >>> style.map('TCombobox', 'fieldbackground') [('readonly', 'focus', '#4a6984'), ('readonly', '#dcdad5')] >>> style.map('TNotebook.Tab', 'background') [('selected', '#dcdad5'), ('#bab5ab',)] But when set tkinter.wantobjects = 0 before running this example the result will be different, because StateSpec objects will be automatically represented as strings (it matches the behavior of initial versions of Tkinter): >>> style.tk.call(style._name, 'map', 'TCombobox', '-fieldbackground') '{readonly focus} #4a6984 readonly #dcdad5' >>> style.tk.call(style._name, 'map', 'TNotebook.Tab', '-background') 'selected #dcdad5 {} #bab5ab' >>> style.map('TCombobox', 'fieldbackground') [('readonly focus', '#4a6984'), ('readonly', '#dcdad5')] >>> style.map('TNotebook.Tab', 'background') [('selected', '#dcdad5'), ('', '#bab5ab')] The main problem is in representing an empty StateSpec. As every string in Python contains an empty string, {} can represent an empty sequence and a sequence containing single empty string. In Python, it can be no items before default value (like in ('#bab5ab',)) or a single item containing an empty string (like in ('', '#bab5ab')). The former representation (an empty sequence) is default for the style.map() output, but it is rejected as the style.map() input (see state[0] in _mapdict_values). There are two ways to fix it: either change the output of style.map() (what PR 23241 does) or change the validation of the input. I think that the latter solution can be backported, but the former can be used only in the future Python version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 07:29:16 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 15 Nov 2020 12:29:16 +0000 Subject: [issue42361] Use Tcl/Tk 8.6.10 in build-installer.py when building on recent macOS Message-ID: <1605443356.85.0.637246166587.issue42361@roundup.psfhosted.org> New submission from Ronald Oussoren : As discussed before we want to switch to Tcl/Tk 8.6.10 when building the installer on a recent version of macOS. The build on macOS 10.9 should continue to use 8.6.8 due to build issues. PR is forthcoming (currently running tests) ---------- assignee: ronaldoussoren components: Tkinter, macOS messages: 381014 nosy: ned.deily, ronaldoussoren priority: normal severity: normal stage: needs patch status: open title: Use Tcl/Tk 8.6.10 in build-installer.py when building on recent macOS type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 07:39:19 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 15 Nov 2020 12:39:19 +0000 Subject: [issue42361] Use Tcl/Tk 8.6.10 in build-installer.py when building on recent macOS In-Reply-To: <1605443356.85.0.637246166587.issue42361@roundup.psfhosted.org> Message-ID: <1605443959.78.0.733603334696.issue42361@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- keywords: +patch pull_requests: +22184 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23293 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 08:25:31 2020 From: report at bugs.python.org (Yurii Karabas) Date: Sun, 15 Nov 2020 13:25:31 +0000 Subject: [issue42345] Equality of typing.Literal depends on the order of arguments In-Reply-To: <1605276715.65.0.853257843244.issue42345@roundup.psfhosted.org> Message-ID: <1605446731.73.0.226931117069.issue42345@roundup.psfhosted.org> Change by Yurii Karabas <1998uriyyo at gmail.com>: ---------- keywords: +patch nosy: +uriyyo nosy_count: 3.0 -> 4.0 pull_requests: +22185 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23294 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 08:35:22 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 15 Nov 2020 13:35:22 +0000 Subject: [issue41100] Build failure on macOS 11 (beta) In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1605447322.71.0.392432108668.issue41100@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- pull_requests: +22186 pull_request: https://github.com/python/cpython/pull/23295 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 08:38:14 2020 From: report at bugs.python.org (Yash Shete) Date: Sun, 15 Nov 2020 13:38:14 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605447494.79.0.441408045885.issue42153@roundup.psfhosted.org> Change by Yash Shete : ---------- pull_requests: +22187 pull_request: https://github.com/python/cpython/pull/23296 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 08:44:13 2020 From: report at bugs.python.org (Ned Deily) Date: Sun, 15 Nov 2020 13:44:13 +0000 Subject: [issue41100] Support macOS 11 and Apple Silicon Macs In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1605447853.86.0.122627870976.issue41100@roundup.psfhosted.org> Change by Ned Deily : ---------- title: Build failure on macOS 11 (beta) -> Support macOS 11 and Apple Silicon Macs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 08:45:18 2020 From: report at bugs.python.org (Yash Shete) Date: Sun, 15 Nov 2020 13:45:18 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605447918.57.0.135188101522.issue42153@roundup.psfhosted.org> Change by Yash Shete : ---------- pull_requests: +22188 pull_request: https://github.com/python/cpython/pull/23297 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 09:39:28 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 15 Nov 2020 14:39:28 +0000 Subject: [issue42362] Switch to clang as default compiler in build-installer.py Message-ID: <1605451168.78.0.88186037593.issue42362@roundup.psfhosted.org> New submission from Ronald Oussoren : build-installer.py still defaults to gcc as the default compiler, even though clang has been the system compiler for ages (and gcc is an alias in anything remotely recent). PR is forthcoming ---------- assignee: ronaldoussoren components: macOS messages: 381015 nosy: ned.deily, ronaldoussoren priority: normal severity: normal stage: needs patch status: open title: Switch to clang as default compiler in build-installer.py type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 09:44:08 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 15 Nov 2020 14:44:08 +0000 Subject: [issue42362] Switch to clang as default compiler in build-installer.py In-Reply-To: <1605451168.78.0.88186037593.issue42362@roundup.psfhosted.org> Message-ID: <1605451448.82.0.242503967787.issue42362@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- keywords: +patch pull_requests: +22189 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23298 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 10:51:14 2020 From: report at bugs.python.org (Jim Lin) Date: Sun, 15 Nov 2020 15:51:14 +0000 Subject: [issue42363] I think it will be better to output self._state for debugging Message-ID: <1605455474.5.0.172346256047.issue42363@roundup.psfhosted.org> New submission from Jim Lin : I think the exception "raise ValueError("Pool not running")" is not easy for a programmer to quickly know the problem of their code. Therefore, I add the value of self._state when throwing the ValueError. ---------- components: Library (Lib) messages: 381016 nosy: jimlinntu priority: normal severity: normal status: open title: I think it will be better to output self._state for debugging versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 10:55:12 2020 From: report at bugs.python.org (Jim Lin) Date: Sun, 15 Nov 2020 15:55:12 +0000 Subject: [issue42363] I think it will be better to output self._state for debugging In-Reply-To: <1605455474.5.0.172346256047.issue42363@roundup.psfhosted.org> Message-ID: <1605455712.93.0.222575909106.issue42363@roundup.psfhosted.org> Change by Jim Lin : ---------- keywords: +patch pull_requests: +22190 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23299 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 10:59:37 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 15 Nov 2020 15:59:37 +0000 Subject: [issue27119] `compile` doesn't compile into an AST object as specified In-Reply-To: <1464158567.97.0.0204496298527.issue27119@psf.upfronthosting.co.za> Message-ID: <1605455977.88.0.900889340746.issue27119@roundup.psfhosted.org> Batuhan Taskaya added the comment: We've added a reference to the compiler flags into the compile(), see issue 40484 for details. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed versions: +Python 3.10 -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 11:01:46 2020 From: report at bugs.python.org (Ken Jin) Date: Sun, 15 Nov 2020 16:01:46 +0000 Subject: [issue42345] Equality of typing.Literal depends on the order of arguments In-Reply-To: <1605276715.65.0.853257843244.issue42345@roundup.psfhosted.org> Message-ID: <1605456106.31.0.036242842448.issue42345@roundup.psfhosted.org> Ken Jin added the comment: @Guido and @Ivan, Should Literals de-duplicate values in its __args__ similar to Union? PEP 586 states that: > Literal[v1, v2, v3] is equivalent to Union[Literal[v1], Literal[v2], Literal[v3]] Naturally, a Union de-duplicates values, so I was wondering if Literal should follow. ---------- nosy: +kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 11:13:05 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 15 Nov 2020 16:13:05 +0000 Subject: [issue42328] ttk style.map function incorrectly handles the default state for element options. In-Reply-To: <1605140874.05.0.0614253934034.issue42328@roundup.psfhosted.org> Message-ID: <1605456785.26.0.481292564809.issue42328@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +22191 pull_request: https://github.com/python/cpython/pull/23300 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 11:17:03 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 15 Nov 2020 16:17:03 +0000 Subject: [issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget In-Reply-To: <1605043338.18.0.398355808071.issue42318@roundup.psfhosted.org> Message-ID: <1605457023.48.0.273739359659.issue42318@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset a26215db11cfcf7b5f55cab9e91396761a0e0bcf by Serhiy Storchaka in branch 'master': bpo-42318: Fix support of non-BMP characters in Tkinter on macOS (GH-23281) https://github.com/python/cpython/commit/a26215db11cfcf7b5f55cab9e91396761a0e0bcf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 11:26:58 2020 From: report at bugs.python.org (Julien Palard) Date: Sun, 15 Nov 2020 16:26:58 +0000 Subject: [issue38495] print built-in function docs bug In-Reply-To: <1571211401.15.0.283514863374.issue38495@roundup.psfhosted.org> Message-ID: <1605457618.71.0.814149824056.issue38495@roundup.psfhosted.org> Julien Palard added the comment: Hi! Thanks Alex for reporting, and everyone involved. This has been fixed in python-docs-theme, so it's fixed for >=3.8. As 3.7 is in security-only (and embeds python-docs-theme), better not touch it. Bests. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 11:31:49 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 15 Nov 2020 16:31:49 +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: <1605457909.36.0.431635452232.issue41116@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- keywords: +patch pull_requests: +22192 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23301 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 11:43:52 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 15 Nov 2020 16:43:52 +0000 Subject: [issue29076] Mac installer shell updater script silently fails if default shell is fish In-Reply-To: <1482778000.76.0.584407589583.issue29076@psf.upfronthosting.co.za> Message-ID: <1605458632.54.0.0803614426674.issue29076@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Sure, I'll create a PR right away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 11:50:59 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 15 Nov 2020 16:50:59 +0000 Subject: [issue29076] Mac installer shell updater script silently fails if default shell is fish In-Reply-To: <1482778000.76.0.584407589583.issue29076@psf.upfronthosting.co.za> Message-ID: <1605459059.95.0.460805367986.issue29076@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +22193 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23302 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 11:56:07 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 15 Nov 2020 16:56:07 +0000 Subject: [issue41832] PyType_FromSpec() should accept tp_doc=NULL In-Reply-To: <1600770571.99.0.249807543427.issue41832@roundup.psfhosted.org> Message-ID: <1605459367.7.0.846796219536.issue41832@roundup.psfhosted.org> STINNER Victor added the comment: Sorry Petr, I didn't notice that the note was fully removed in the first change. Thanks for restoring the note! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 13:12:42 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 18:12:42 +0000 Subject: [issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10 In-Reply-To: <1583933092.46.0.675431384436.issue39934@roundup.psfhosted.org> Message-ID: <1605463962.67.0.129162120368.issue39934@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +22194 pull_request: https://github.com/python/cpython/pull/23303 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 13:27:00 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 15 Nov 2020 18:27:00 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1605464820.91.0.764120015841.issue16801@roundup.psfhosted.org> Batuhan Taskaya added the comment: I'm very late to join this thread, but since the Constant() node has now a kind field, we can possibly add this (though I'm not saying we should, depending on whether still this would be a nice addition to clinic docstrings.) 2 options that I can think off: - Introduce a couple of new tokens (BIN_NUMBER, OCT_NUMBER, HEX_NUMBER). - Add a new field to the tok_state struct (like const char* number_type) and when constructing the Constant node in the _PyPegen_number_token, add that number_type as the kind field of the constant. In case of anyone wondering, the latter would be a +20 lines addition (no changes on the grammar / tokens, just a couple of new lines into the tokenizer and the _PyPegen_number_token.) ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 13:27:18 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 15 Nov 2020 18:27:18 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1605464838.13.0.0615637024821.issue16801@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 13:32:46 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 15 Nov 2020 18:32:46 +0000 Subject: [issue42360] In the namedtuple documentation, mention that typename should match the variable name for the class to be pickle-able In-Reply-To: <1605431665.76.0.57179948955.issue42360@roundup.psfhosted.org> Message-ID: <1605465166.8.0.744727851043.issue42360@roundup.psfhosted.org> Raymond Hettinger added the comment: I'll add a brief note to the named tuple docs. FWIW, this is a special case of the more general issue that pickling errors tend to be inscrutable. ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 13:52:40 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 18:52:40 +0000 Subject: [issue4643] cgitb.html fails if getattr call raises exception In-Reply-To: <1229093313.68.0.275889144486.issue4643@psf.upfronthosting.co.za> Message-ID: <1605466360.25.0.895681651454.issue4643@roundup.psfhosted.org> Irit Katriel added the comment: The issue still occurs in 3.10. Python 3 version of the script: import cgitb class WeirdObject(object): def __getattr__(self, attr): if attr == 'a': return 'the letter a' elif attr == 'b': return str(slf) # Intentional NameError raise AttributeError(attr) try: weird = WeirdObject() print('A:', weird.a) print('B:', weird.b) print('C:', weird.c) except Exception as e: import sys print('\nSomething went wrong - attempting to generate HTML stack trace.') try: html_text = cgitb.html(sys.exc_info()) except: print('Error generating HTML stack trace!') raise else: print('Here is stack trace in HTML:\n', html_text) ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 13:53:23 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 18:53:23 +0000 Subject: [issue4643] cgitb.html fails if getattr call raises exception In-Reply-To: <1229093313.68.0.275889144486.issue4643@psf.upfronthosting.co.za> Message-ID: <1605466403.55.0.664821244588.issue4643@roundup.psfhosted.org> Irit Katriel added the comment: Arthur, are you interested in converting your patch to a github pull request? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 13:56:08 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 18:56:08 +0000 Subject: [issue16543] improve TypeError messages for missing arguments (meta issue) In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1605466568.12.0.515213618698.issue16543@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 13:58:13 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 18:58:13 +0000 Subject: [issue17437] Difference between open and codecs.open In-Reply-To: <1363431539.84.0.0934189958093.issue17437@psf.upfronthosting.co.za> Message-ID: <1605466693.74.0.299432850917.issue17437@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 14:01:44 2020 From: report at bugs.python.org (mohamed koubaa) Date: Sun, 15 Nov 2020 19:01:44 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1605466904.04.0.904379564122.issue1635741@roundup.psfhosted.org> Change by mohamed koubaa : ---------- pull_requests: +22195 pull_request: https://github.com/python/cpython/pull/23304 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 14:24:42 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 19:24:42 +0000 Subject: [issue13888] test_builtin failure when run after test_tk In-Reply-To: <1327661656.8.0.445863136974.issue13888@psf.upfronthosting.co.za> Message-ID: <1605468282.95.0.0487515992644.issue13888@roundup.psfhosted.org> Irit Katriel added the comment: I couldn't reproduce this on a macOS (3.10). Is it still an issue? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 14:31:24 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 19:31:24 +0000 Subject: [issue19070] In place operators of weakref.proxy() not returning self. In-Reply-To: <1379846143.45.0.326809671068.issue19070@psf.upfronthosting.co.za> Message-ID: <1605468684.01.0.64771310528.issue19070@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6, Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 14:34:27 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 19:34:27 +0000 Subject: [issue2941] Propagate define to resurce mingw32 compile In-Reply-To: <1211451506.25.0.765395098834.issue2941@psf.upfronthosting.co.za> Message-ID: <1605468867.2.0.66344410478.issue2941@roundup.psfhosted.org> Irit Katriel added the comment: Alexandr, is this still an issue, and if so can you explain what the issue is? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 15:16:40 2020 From: report at bugs.python.org (Anil Bishnoie) Date: Sun, 15 Nov 2020 20:16:40 +0000 Subject: [issue25053] Possible race condition in Pool In-Reply-To: <1441884822.26.0.222476862534.issue25053@psf.upfronthosting.co.za> Message-ID: <1605471400.28.0.512881157665.issue25053@roundup.psfhosted.org> Anil Bishnoie added the comment: I still get this error while processing multiple tasks in python 3.8 Is this bug resolved and where I can find resolution ? ---------- nosy: +anilb versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 15:19:28 2020 From: report at bugs.python.org (Anil Bishnoie) Date: Sun, 15 Nov 2020 20:19:28 +0000 Subject: [issue25053] Possible race condition in Pool In-Reply-To: <1441884822.26.0.222476862534.issue25053@psf.upfronthosting.co.za> Message-ID: <1605471568.82.0.0131672776797.issue25053@roundup.psfhosted.org> Anil Bishnoie added the comment: Traceback (most recent call last): File "C:\Python38\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "C:\Python38\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "C:\Python38\lib\multiprocessing\pool.py", line 114, in worker task = get() File "C:\Python38\lib\multiprocessing\queues.py", line 358, in get return _ForkingPickler.loads(res) AttributeError: Can't get attribute 'ld_df1' on ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 15:21:36 2020 From: report at bugs.python.org (Anil Bishnoie) Date: Sun, 15 Nov 2020 20:21:36 +0000 Subject: [issue25053] Possible race condition in Pool In-Reply-To: <1441884822.26.0.222476862534.issue25053@psf.upfronthosting.co.za> Message-ID: <1605471696.33.0.0520888945283.issue25053@roundup.psfhosted.org> Anil Bishnoie added the comment: Before running the Pool I checked whether my func existed in memory or not and it was there well defined by address and works fine otherwise >>> ld_df1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 15:23:56 2020 From: report at bugs.python.org (Anil Bishnoie) Date: Sun, 15 Nov 2020 20:23:56 +0000 Subject: [issue25053] Possible race condition in Pool In-Reply-To: <1441884822.26.0.222476862534.issue25053@psf.upfronthosting.co.za> Message-ID: <1605471836.52.0.930302940943.issue25053@roundup.psfhosted.org> Anil Bishnoie added the comment: from multiprocessing import Pool l_adt=ldir() l_ln=len(l_stk) p = Pool(processes=l_ln) df = p.map(ld_df1, [i for i in l_adt]) l_ln=12 processes Above is the self explanatory code snippet IS there a resolution ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 15:37:05 2020 From: report at bugs.python.org (Daniel Lenski) Date: Sun, 15 Nov 2020 20:37:05 +0000 Subject: [issue38976] Add support for HTTP Only flag in MozillaCookieJar In-Reply-To: <1575522823.75.0.720870581486.issue38976@roundup.psfhosted.org> Message-ID: <1605472625.7.0.163636476295.issue38976@roundup.psfhosted.org> Daniel Lenski added the comment: This issue is essentially a duplicate of the very-longstanding #2190. My PR (https://github.com/python/cpython/pull/22798) was submitted before this one, but this one was accepted and merged first. ---------- nosy: +dlenski _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 15:38:00 2020 From: report at bugs.python.org (Daniel Lenski) Date: Sun, 15 Nov 2020 20:38:00 +0000 Subject: [issue38976] Add support for HTTP Only flag in MozillaCookieJar In-Reply-To: <1575522823.75.0.720870581486.issue38976@roundup.psfhosted.org> Message-ID: <1605472680.27.0.349969109241.issue38976@roundup.psfhosted.org> Change by Daniel Lenski : ---------- pull_requests: +22196 pull_request: https://github.com/python/cpython/pull/22798 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 15:39:03 2020 From: report at bugs.python.org (Daniel Lenski) Date: Sun, 15 Nov 2020 20:39:03 +0000 Subject: [issue2190] MozillaCookieJar ignores HttpOnly cookies In-Reply-To: <1203957546.34.0.123660895963.issue2190@psf.upfronthosting.co.za> Message-ID: <1605472743.93.0.0680045128417.issue2190@roundup.psfhosted.org> Daniel Lenski added the comment: Issue #38976 is a duplicate of this one, and now closed by https://github.com/python/cpython/pull/17471 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 15:42:44 2020 From: report at bugs.python.org (Jacob Taylor) Date: Sun, 15 Nov 2020 20:42:44 +0000 Subject: [issue2190] MozillaCookieJar ignores HttpOnly cookies In-Reply-To: <1203957546.34.0.123660895963.issue2190@psf.upfronthosting.co.za> Message-ID: <1605472964.05.0.430901366581.issue2190@roundup.psfhosted.org> Change by Jacob Taylor : ---------- nosy: +Jacob Taylor nosy_count: 8.0 -> 9.0 pull_requests: +22197 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17471 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 16:28:28 2020 From: report at bugs.python.org (Anil Bishnoie) Date: Sun, 15 Nov 2020 21:28:28 +0000 Subject: [issue25053] Possible race condition in Pool In-Reply-To: <1441884822.26.0.222476862534.issue25053@psf.upfronthosting.co.za> Message-ID: <1605475708.03.0.0754672120884.issue25053@roundup.psfhosted.org> Anil Bishnoie added the comment: Process SpawnPoolWorker-36: Process SpawnPoolWorker-28: Process SpawnPoolWorker-33: Process SpawnPoolWorker-30: Process SpawnPoolWorker-34: Process SpawnPoolWorker-32: Process SpawnPoolWorker-35: Process SpawnPoolWorker-38: Process SpawnPoolWorker-37: Process SpawnPoolWorker-31: Process SpawnPoolWorker-29: Process SpawnPoolWorker-26: Traceback (most recent call last): File "C:\Python38\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "C:\Python38\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "C:\Python38\lib\multiprocessing\pool.py", line 114, in worker task = get() File "C:\Python38\lib\multiprocessing\queues.py", line 356, in get res = self._reader.recv_bytes() File "C:\Python38\lib\multiprocessing\connection.py", line 216, in recv_bytes buf = self._recv_bytes(maxlength) File "C:\Python38\lib\multiprocessing\connection.py", line 305, in _recv_bytes waitres = _winapi.WaitForMultipleObjects( KeyboardInterrupt Traceback (most recent call last): Traceback (most recent call last): Traceback (most recent call last): Traceback (most recent call last): Traceback (most recent call last): File "C:\Python38\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() Traceback (most recent call last): Traceback (most recent call last): File "C:\Python38\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() Traceback (most recent call last): File "C:\Python38\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "C:\Python38\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "C:\Python38\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "C:\Python38\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "C:\Python38\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) Traceback (most recent call last): File "C:\Python38\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "C:\Python38\lib\multiprocessing\pool.py", line 114, in worker task = get() File "C:\Python38\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "C:\Python38\lib\multiprocessing\pool.py", line 114, in worker task = get() File "C:\Python38\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "C:\Python38\lib\multiprocessing\pool.py", line 114, in worker task = get() File "C:\Python38\lib\multiprocessing\queues.py", line 355, in get with self._rlock: File "C:\Python38\lib\multiprocessing\synchronize.py", line 95, in __enter__ return self._semlock.__enter__() KeyboardInterrupt File "C:\Python38\lib\multiprocessing\queues.py", line 355, in get with self._rlock: File "C:\Python38\lib\multiprocessing\synchronize.py", line 95, in __enter__ return self._semlock.__enter__() KeyboardInterrupt File "C:\Python38\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "C:\Python38\lib\multiprocessing\pool.py", line 114, in worker task = get() File "C:\Python38\lib\multiprocessing\queues.py", line 355, in get with self._rlock: File "C:\Python38\lib\multiprocessing\synchronize.py", line 95, in __enter__ return self._semlock.__enter__() File "C:\Python38\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "C:\Python38\lib\multiprocessing\pool.py", line 114, in worker task = get() File "C:\Python38\lib\multiprocessing\queues.py", line 355, in get with self._rlock: File "C:\Python38\lib\multiprocessing\synchronize.py", line 95, in __enter__ return self._semlock.__enter__() KeyboardInterrupt KeyboardInterrupt ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 16:29:07 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 15 Nov 2020 21:29:07 +0000 Subject: [issue42360] In the namedtuple documentation, mention that typename should match the variable name for the class to be pickle-able In-Reply-To: <1605431665.76.0.57179948955.issue42360@roundup.psfhosted.org> Message-ID: <1605475747.46.0.48917861456.issue42360@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +22198 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23305 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 16:37:52 2020 From: report at bugs.python.org (David Lord) Date: Sun, 15 Nov 2020 21:37:52 +0000 Subject: [issue39168] Generic type subscription is a huge toll on Python performance In-Reply-To: <1577726230.5.0.713641828615.issue39168@roundup.psfhosted.org> Message-ID: <1605476272.93.0.445504904684.issue39168@roundup.psfhosted.org> David Lord added the comment: Is this performance issue supposed to be fixed in 3.9? I'm still observing severe slowdown by inheriting from `Generic[T]`. I'm currently adding typing to Werkzeug, where we define many custom data structures such as `MultiDict`. It would be ideal for these classes to be recognized as generic mappings. I remembered hearing about this performance issue somewhere, so I decided to test what happens. Here's a minimal example without Werkzeug, the results in Werkzeug are similar or worse. I'd estimate each request creates about 10 of the various data structures, which are then accessed by user code, so I simulated that by creating and iterating a list of objects. ```python class Test: def __init__(self, value): self.value = value def main(): ts = [Test(x) for x in range(10)] sum(t.value for t in ts) ``` ``` $ python3.9 -m timeit -n 100000 -s 'from example import main' 'main()' 100000 loops, best of 5: 7.67 usec per loop ``` ```python import typing V = typing.TypeVar("V") class Test(typing.Generic[V]): def __init__(self, value: V) -> None: self.value = value def main(): ts = [Test(x) for x in range(10)] sum(t.value for t in ts) ``` ``` $ python3.9 -m timeit -n 100000 -s 'from example import main' 'main()' 100000 loops, best of 5: 18.2 usec per loop ``` There is more than a 2x slowdown when using `Generic`. The timings (7 vs 18 usec) are the same across Python 3.6, 3.7, 3.8, and 3.9. It seems that 3.9 does not fix the performance issue. Since we currently support Python 3.6+, I probably won't be able to use generics anyway due to the performance in those versions, but I wanted to make sure I'm not missing something with 3.9. ---------- nosy: +davidism _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 17:01:28 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 15 Nov 2020 22:01:28 +0000 Subject: [issue42115] Caching infrastructure for the evaluation loop: specialised opcodes In-Reply-To: <1603336898.74.0.366564812208.issue42115@roundup.psfhosted.org> Message-ID: <1605477688.74.0.765324000761.issue42115@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 17:27:31 2020 From: report at bugs.python.org (Anil Bishnoie) Date: Sun, 15 Nov 2020 22:27:31 +0000 Subject: [issue25053] Possible race condition in Pool In-Reply-To: <1441884822.26.0.222476862534.issue25053@psf.upfronthosting.co.za> Message-ID: <1605479251.09.0.0429522051465.issue25053@roundup.psfhosted.org> Anil Bishnoie added the comment: Fatal Python error: init_sys_streams: can't initialize sys standard streams Python runtime state: core initialized File "C:\Python38\lib\multiprocessing\process.py", line 315, in _bootstrap During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "C:\Python38\lib\multiprocessing\spawn.py", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File "C:\Python38\lib\multiprocessing\spawn.py", line 129, in _main return self._bootstrap(parent_sentinel) File "C:\Python38\lib\multiprocessing\process.py", line 331, in _bootstrap traceback.print_exc() File "C:\Python38\lib\traceback.py", line 163, in print_exc print_exception(*sys.exc_info(), limit=limit, file=file, chain=chain) File "C:\Python38\lib\traceback.py", line 105, in print_exception print(line, file=file, end="") KeyboardInterrupt addpackage(sitedir, name, known_paths) File "C:\Python38\lib\site.py", line 169, in addpackage exec(line) File "", line 1, in File "C:\Python38\lib\importlib\util.py", line 14, in from contextlib import contextmanager File "C:\Python38\lib\contextlib.py", line 5, in from collections import deque File "C:\Python38\lib\collections\__init__.py", line 22, in from keyword import iskeyword as _iskeyword File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 779, in exec_module File "", line 874, in get_code File "", line 972, in get_data ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 17:32:20 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 15 Nov 2020 22:32:20 +0000 Subject: [issue13888] test_builtin failure when run after test_tk In-Reply-To: <1327661656.8.0.445863136974.issue13888@psf.upfronthosting.co.za> Message-ID: <1605479540.87.0.329607470943.issue13888@roundup.psfhosted.org> Terry J. Reedy added the comment: tcl/tk 8.5, likely used in 2012 test, was by default compiled without thread support. 8.6, used now for sure on psf Windows and Macs installs and I believe on most *nixes, the default is *with* thread support. Given the comments, this might affect results. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 17:40:18 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 15 Nov 2020 22:40:18 +0000 Subject: [issue2190] MozillaCookieJar ignores HttpOnly cookies In-Reply-To: <1203957546.34.0.123660895963.issue2190@psf.upfronthosting.co.za> Message-ID: <1605480018.11.0.527607462267.issue2190@roundup.psfhosted.org> Terry J. Reedy added the comment: So, is anything more needed, or should PR-22798 and this issue be closed? ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 17:55:22 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 22:55:22 +0000 Subject: [issue1676820] Add a PeriodicTimer to threading Message-ID: <1605480922.81.0.156387234777.issue1676820@roundup.psfhosted.org> Irit Katriel added the comment: Based on the comments, should this be closed as rejected? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 18:01:27 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 15 Nov 2020 23:01:27 +0000 Subject: [issue39168] Generic type subscription is a huge toll on Python performance In-Reply-To: <1577726230.5.0.713641828615.issue39168@roundup.psfhosted.org> Message-ID: <1605481287.38.0.0784393963217.issue39168@roundup.psfhosted.org> Guido van Rossum added the comment: @davidm I don't see such a dramatic difference -- the generic version is a tad slower, but the difference is less than the variation between runs. What platform are you using? (I'm doing this on Windows.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 18:12:57 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 23:12:57 +0000 Subject: [issue1289136] distutils extension library path bug on cygwin Message-ID: <1605481977.42.0.180027473811.issue1289136@roundup.psfhosted.org> Irit Katriel added the comment: I see that the erroneous "is string.find..." condition is no longer in the code: https://github.com/python/cpython/blob/master/Lib/distutils/command/build_ext.py#L220 Is this issue out of date or is there something still to do on it? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 18:14:56 2020 From: report at bugs.python.org (Mathias MICHEL) Date: Sun, 15 Nov 2020 23:14:56 +0000 Subject: [issue42364] Typo in french doc translation Message-ID: <1605482096.39.0.136403894956.issue42364@roundup.psfhosted.org> New submission from Mathias MICHEL : In https://docs.python.org/fr/3/tutorial/inputoutput.html, ? 7.1.3. Formatage de cha?nes ? la main After the code block the sentence between () should replace `donc` by `dont`: (Remarquez que l'espace s?parant les colonnes vient de la mani?re dont print() fonctionne : il ajoute toujours des espaces entre ses arguments.) ---------- assignee: docs at python components: Documentation messages: 381043 nosy: docs at python, matm priority: normal severity: normal status: open title: Typo in french doc translation type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 18:14:54 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 23:14:54 +0000 Subject: [issue1465554] Cygwin installer should create a link to libpythonX.Y.dll.a Message-ID: <1605482094.27.0.455352332194.issue1465554@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> duplicate stage: test needed -> resolved status: open -> closed superseder: -> distutils extension library path bug on cygwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 18:18:33 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 23:18:33 +0000 Subject: [issue1178136] cgitb.py support for frozen images Message-ID: <1605482313.94.0.711913584654.issue1178136@roundup.psfhosted.org> Irit Katriel added the comment: Barry, are you interested in converting this patch into a github PR? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 18:18:41 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 23:18:41 +0000 Subject: [issue1178136] cgitb.py support for frozen images Message-ID: <1605482321.19.0.801200787807.issue1178136@roundup.psfhosted.org> Change by Irit Katriel : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 18:25:28 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 23:25:28 +0000 Subject: [issue6237] Build errors when using LDFLAGS="-Wl,--no-undefined" In-Reply-To: <1244428013.0.0.0482442850802.issue6237@psf.upfronthosting.co.za> Message-ID: <1605482728.18.0.202684428938.issue6237@roundup.psfhosted.org> Irit Katriel added the comment: Closing as out of date because it's from 14 years ago and the OP did not reply to Mark's ping. If this is an issue in Python 3 please open a new issue for that. ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 18:29:31 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 23:29:31 +0000 Subject: [issue6497] Support for digital Cinema/film DPX and Kodak Cineon image file formats in imghdr module In-Reply-To: <1247779729.41.0.45019789349.issue6497@psf.upfronthosting.co.za> Message-ID: <1605482971.67.0.370623421445.issue6497@roundup.psfhosted.org> Change by Irit Katriel : ---------- type: behavior -> enhancement versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 18:37:24 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 23:37:24 +0000 Subject: [issue10898] posixmodule.c redefines FSTAT In-Reply-To: <1294857148.96.0.548396285489.issue10898@psf.upfronthosting.co.za> Message-ID: <1605483444.15.0.673327860883.issue10898@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 18:41:51 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 23:41:51 +0000 Subject: [issue14531] Backtrace should not attempt to open file In-Reply-To: <1333911683.02.0.244330903259.issue14531@psf.upfronthosting.co.za> Message-ID: <1605483711.5.0.123734471345.issue14531@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Traceback display code can attempt to open a file named "" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 18:47:02 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 23:47:02 +0000 Subject: [issue4802] detect_tkinter for cygwin In-Reply-To: <1230840510.49.0.878061128691.issue4802@psf.upfronthosting.co.za> Message-ID: <1605484022.41.0.272866275398.issue4802@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.9 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 18:48:36 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 15 Nov 2020 23:48:36 +0000 Subject: [issue4297] Add error_log attribute to optparse.OptionParser In-Reply-To: <1226413379.99.0.188665223227.issue4297@psf.upfronthosting.co.za> Message-ID: <1605484116.9.0.612929068648.issue4297@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> out of date stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 18:59:28 2020 From: report at bugs.python.org (David Lord) Date: Sun, 15 Nov 2020 23:59:28 +0000 Subject: [issue39168] Generic type subscription is a huge toll on Python performance In-Reply-To: <1577726230.5.0.713641828615.issue39168@roundup.psfhosted.org> Message-ID: <1605484768.37.0.193729541411.issue39168@roundup.psfhosted.org> David Lord added the comment: I'm using Arch Linux. After your reply I tried again and now I'm seeing the same result as you, negligible difference from inheriting `Generic` on Python 3.9. I can't explain it, I ran the timings repeatedly before I posted here, but I guess it was a weird temporary issue with my machine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 19:01:26 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 16 Nov 2020 00:01:26 +0000 Subject: [issue14338] Document how to forward POST data on redirects In-Reply-To: <1331929501.86.0.889924099512.issue14338@psf.upfronthosting.co.za> Message-ID: <1605484886.26.0.866064083771.issue14338@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy (C) versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 19:04:57 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 16 Nov 2020 00:04:57 +0000 Subject: [issue14390] Tkinter single-threaded deadlock In-Reply-To: <1332449311.13.0.974359232681.issue14390@psf.upfronthosting.co.za> Message-ID: <1605485097.14.0.867593763946.issue14390@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 19:12:17 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Nov 2020 00:12:17 +0000 Subject: [issue39168] Generic type subscription is a huge toll on Python performance In-Reply-To: <1577726230.5.0.713641828615.issue39168@roundup.psfhosted.org> Message-ID: <1605485537.22.0.419313434001.issue39168@roundup.psfhosted.org> Guido van Rossum added the comment: No worries. I tend to run each time it command at least three times before I trust the numbers. Professional bench markers also configure a machine without background tasks (email etc.). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 19:22:09 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 16 Nov 2020 00:22:09 +0000 Subject: [issue18838] The order of interactive prompt and traceback on Windows In-Reply-To: <1377507907.91.0.430796932988.issue18838@psf.upfronthosting.co.za> Message-ID: <1605486129.87.0.29148519914.issue18838@roundup.psfhosted.org> Irit Katriel added the comment: On version 3.10, windows 10 I don't see this - the prompt comes after the traceback. Adam, are you seeing this issue on any python version >= 3.8? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 20:02:01 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Nov 2020 01:02:01 +0000 Subject: [issue42365] Python launcher: sort order in "Installed versions" off with 3.10 Message-ID: <1605488521.14.0.00117878681965.issue42365@roundup.psfhosted.org> New submission from Guido van Rossum : I installed Python 3.10 on Windows and now the sort order of the versions printed by `py -0` is kind of weird: ``` Installed Pythons found by C:\WINDOWS\py.exe Launcher for Windows -3.9-64 * -3.8-64 -3.7-64 -3.6-64 -3.5-64 -3.10-64 ``` I'm guessing we're going to have to parse the versions... (I accidentally first reported this in https://github.com/brettcannon/python-launcher/issues/42.) ---------- components: Windows messages: 381049 nosy: gvanrossum, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Python launcher: sort order in "Installed versions" off with 3.10 type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 20:03:28 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Nov 2020 01:03:28 +0000 Subject: [issue42345] Equality of typing.Literal depends on the order of arguments In-Reply-To: <1605276715.65.0.853257843244.issue42345@roundup.psfhosted.org> Message-ID: <1605488608.03.0.929955290293.issue42345@roundup.psfhosted.org> Guido van Rossum added the comment: Yeah, I think it makes sense to de-dupe args for Literal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 20:31:03 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Nov 2020 01:31:03 +0000 Subject: [issue42317] Docs of `typing.get_args`: Mention that due to caching of typing generics the order of arguments for Unions can be different from the one of the returned tuple In-Reply-To: <1605036937.3.0.364895182043.issue42317@roundup.psfhosted.org> Message-ID: <1605490263.53.0.995399618058.issue42317@roundup.psfhosted.org> miss-islington added the comment: New changeset c3b9592244a9112d8af9610ff1c4e1e4cd4bfaca by Dominik1123 in branch 'master': bpo-42317: Improve docs of typing.get_args concerning Union (GH-23254) https://github.com/python/cpython/commit/c3b9592244a9112d8af9610ff1c4e1e4cd4bfaca ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 20:31:14 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Nov 2020 01:31:14 +0000 Subject: [issue42317] Docs of `typing.get_args`: Mention that due to caching of typing generics the order of arguments for Unions can be different from the one of the returned tuple In-Reply-To: <1605036937.3.0.364895182043.issue42317@roundup.psfhosted.org> Message-ID: <1605490274.75.0.701113805058.issue42317@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +22199 pull_request: https://github.com/python/cpython/pull/23307 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 20:50:44 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Nov 2020 01:50:44 +0000 Subject: [issue42280] The list of standard generic collections is incomplete In-Reply-To: <1604688598.04.0.446732481114.issue42280@roundup.psfhosted.org> Message-ID: <1605491444.08.0.662970667315.issue42280@roundup.psfhosted.org> Guido van Rossum added the comment: I think the difference between the two lists is that not every generic type is a collection. If we apply that standard, I think the contextlib and re classes need to be *removed* from the list (did I get that right?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 20:52:32 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Nov 2020 01:52:32 +0000 Subject: [issue42317] Docs of `typing.get_args`: Mention that due to caching of typing generics the order of arguments for Unions can be different from the one of the returned tuple In-Reply-To: <1605036937.3.0.364895182043.issue42317@roundup.psfhosted.org> Message-ID: <1605491552.44.0.238430854367.issue42317@roundup.psfhosted.org> miss-islington added the comment: New changeset 2369759a47c5292bacf2eef17b4e2388b7d36675 by Miss Islington (bot) in branch '3.9': bpo-42317: Improve docs of typing.get_args concerning Union (GH-23254) https://github.com/python/cpython/commit/2369759a47c5292bacf2eef17b4e2388b7d36675 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 20:54:25 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Nov 2020 01:54:25 +0000 Subject: [issue42317] Docs of `typing.get_args`: Mention that due to caching of typing generics the order of arguments for Unions can be different from the one of the returned tuple In-Reply-To: <1605036937.3.0.364895182043.issue42317@roundup.psfhosted.org> Message-ID: <1605491665.0.0.179492453515.issue42317@roundup.psfhosted.org> Guido van Rossum added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 21:05:19 2020 From: report at bugs.python.org (jack1142) Date: Mon, 16 Nov 2020 02:05:19 +0000 Subject: [issue42280] The list of standard generic collections is incomplete In-Reply-To: <1604688598.04.0.446732481114.issue42280@roundup.psfhosted.org> Message-ID: <1605492319.08.0.785349846536.issue42280@roundup.psfhosted.org> jack1142 added the comment: I was thinking that this could be the case but if I'm not mistaken, there's actually quite a lot of types in this list that aren't collections (awaitable, coroutine, iterable, iterator, generator, the async versions of those, callable, *hmm, are views collections?*, and the ones you mentioned), so I figured that listing *only* collections might have not been the intention when this was written. But listing all of the generics in Python would indeed be lengthy so it might make sense to limit it to collections nonetheless, I'm not really sure about it though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 21:16:46 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Nov 2020 02:16:46 +0000 Subject: [issue42280] The list of standard generic collections is incomplete In-Reply-To: <1604688598.04.0.446732481114.issue42280@roundup.psfhosted.org> Message-ID: <1605493006.38.0.602302134553.issue42280@roundup.psfhosted.org> Guido van Rossum added the comment: Let?s just close this, there are more important things to do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 22:11:13 2020 From: report at bugs.python.org (Yash Shete) Date: Mon, 16 Nov 2020 03:11:13 +0000 Subject: [issue42365] Python launcher: sort order in "Installed versions" off with 3.10 In-Reply-To: <1605488521.14.0.00117878681965.issue42365@roundup.psfhosted.org> Message-ID: <1605496273.66.0.0921027077424.issue42365@roundup.psfhosted.org> Yash Shete added the comment: I would like to try look into this problem. can you please point me into right direction, like: where and what to edit. I am not much experienced but i would like to try. thankyou ---------- nosy: +Pixmew _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 22:14:48 2020 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 16 Nov 2020 03:14:48 +0000 Subject: [issue42365] Python launcher: sort order in "Installed versions" off with 3.10 In-Reply-To: <1605488521.14.0.00117878681965.issue42365@roundup.psfhosted.org> Message-ID: <1605496488.79.0.121286306922.issue42365@roundup.psfhosted.org> Zackery Spytz added the comment: This seems like a duplicate of bpo-38506 (which already has a PR). ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 22:18:03 2020 From: report at bugs.python.org (Tom Kent) Date: Mon, 16 Nov 2020 03:18:03 +0000 Subject: [issue36011] ssl - tls verify on Windows fails In-Reply-To: <1550342172.09.0.390948819907.issue36011@roundup.psfhosted.org> Message-ID: <1605496683.36.0.771417741538.issue36011@roundup.psfhosted.org> Tom Kent added the comment: Christian's message indicated that a workaround was possible by adding mozilla's certs to windows cert store. I'm sure there are sysadmins who will really hate this idea, but I've successfully implemented it in a windows docker image, and wanted to document here. Powershell commands, requires OpenSSL to be installed on the system: ``` cd $env:USERPROFILE; Invoke-WebRequest https://curl.haxx.se/ca/cacert.pem -OutFile $env:USERPROFILE\cacert.pem; $plaintext_pw = 'PASSWORD'; $secure_pw = ConvertTo-SecureString $plaintext_pw -AsPlainText -Force; & 'C:\Program Files\OpenSSL-Win64\bin\openssl.exe' pkcs12 -export -nokeys -out certs.pfx -in cacert.pem -passout pass:$plaintext_pw; Import-PfxCertificate -Password $secure_pw -CertStoreLocation Cert:\LocalMachine\Root -FilePath certs.pfx; ``` Once mozilla's store is imported into the microsoft trusted root store, python has everything it needs to access files directly. ---------- nosy: +teeks99 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 22:27:36 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Nov 2020 03:27:36 +0000 Subject: [issue42332] add __weakref__ to types.GenericAlias In-Reply-To: <1605182649.58.0.535979406085.issue42332@roundup.psfhosted.org> Message-ID: <1605497256.43.0.112102853101.issue42332@roundup.psfhosted.org> miss-islington added the comment: New changeset 384b7a4bd988986bca227c7e85c32d766da74708 by kj in branch 'master': bpo-42332: Add weakref slot to types.GenericAlias (GH-23250) https://github.com/python/cpython/commit/384b7a4bd988986bca227c7e85c32d766da74708 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 22:39:08 2020 From: report at bugs.python.org (Ken Jin) Date: Mon, 16 Nov 2020 03:39:08 +0000 Subject: [issue42332] add __weakref__ to types.GenericAlias In-Reply-To: <1605182649.58.0.535979406085.issue42332@roundup.psfhosted.org> Message-ID: <1605497948.73.0.695383762129.issue42332@roundup.psfhosted.org> Change by Ken Jin : ---------- pull_requests: +22200 pull_request: https://github.com/python/cpython/pull/23309 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 23:07:58 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Nov 2020 04:07:58 +0000 Subject: [issue38506] Launcher for Windows (py.exe) may rank Python 3.xx (in the future) after 3.x In-Reply-To: <1571322664.68.0.257867788049.issue38506@roundup.psfhosted.org> Message-ID: <1605499678.73.0.925787790914.issue38506@roundup.psfhosted.org> Guido van Rossum added the comment: I think now's the time to fix it, given that we're two alphas into 3.10 already. (I independently discovered this and filed it as issue 42365.) ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 23:08:16 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Nov 2020 04:08:16 +0000 Subject: [issue42365] Python launcher: sort order in "Installed versions" off with 3.10 In-Reply-To: <1605488521.14.0.00117878681965.issue42365@roundup.psfhosted.org> Message-ID: <1605499696.7.0.158341100368.issue42365@roundup.psfhosted.org> Guido van Rossum added the comment: Oops. :-) ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 23:09:42 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Nov 2020 04:09:42 +0000 Subject: [issue38506] Launcher for Windows (py.exe) may rank Python 3.xx (in the future) after 3.x In-Reply-To: <1571322664.68.0.257867788049.issue38506@roundup.psfhosted.org> Message-ID: <1605499782.29.0.466662657599.issue38506@roundup.psfhosted.org> Change by Guido van Rossum : ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 23:12:24 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Nov 2020 04:12:24 +0000 Subject: [issue38506] Launcher for Windows (py.exe) may rank Python 3.xx (in the future) after 3.x In-Reply-To: <1571322664.68.0.257867788049.issue38506@roundup.psfhosted.org> Message-ID: <1605499944.15.0.629143780285.issue38506@roundup.psfhosted.org> Guido van Rossum added the comment: Hm, actually I think this needs to be backported to 3.8 and 3.9 (at least) since IIUC whichever release is installed last (or first?) overwrites "py.exe", so if "py.exe" came from e.g. 3.9, and 3.10 is present, we still want it to sort that correctly. ---------- versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 23:32:35 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Nov 2020 04:32:35 +0000 Subject: [issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable In-Reply-To: <1603974319.88.0.166786801787.issue42195@roundup.psfhosted.org> Message-ID: <1605501155.23.0.605253070793.issue42195@roundup.psfhosted.org> Guido van Rossum added the comment: @Hatfield-Dodds, if we changed typing.Callable to return ((int, int), str) but collections.abc.Callable continued to return ([int, int], str), would that suffice for your purposes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 15 23:33:35 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Nov 2020 04:33:35 +0000 Subject: [issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable In-Reply-To: <1603974319.88.0.166786801787.issue42195@roundup.psfhosted.org> Message-ID: <1605501215.59.0.515052404154.issue42195@roundup.psfhosted.org> Guido van Rossum added the comment: Also, maybe we should make builtins.callable generic as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 00:02:39 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Nov 2020 05:02:39 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605502959.06.0.596671295131.issue42153@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset aa01011003bb855cd52abfd49f2443446590d913 by Yash Shete in branch 'master': bpo-42153 Fix link to IMAP documents in imaplib.rst (GH-23297) https://github.com/python/cpython/commit/aa01011003bb855cd52abfd49f2443446590d913 ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 00:02:59 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Nov 2020 05:02:59 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605502979.07.0.778832333109.issue42153@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +22201 pull_request: https://github.com/python/cpython/pull/23310 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 00:04:16 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Nov 2020 05:04:16 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605503056.44.0.000982729100122.issue42153@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +22202 pull_request: https://github.com/python/cpython/pull/23311 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 00:05:57 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Nov 2020 05:05:57 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605503157.93.0.925628029386.issue42153@roundup.psfhosted.org> Guido van Rossum added the comment: Closing in anticipation of the backports landing. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 00:08:07 2020 From: report at bugs.python.org (Zac Hatfield-Dodds) Date: Mon, 16 Nov 2020 05:08:07 +0000 Subject: [issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable In-Reply-To: <1603974319.88.0.166786801787.issue42195@roundup.psfhosted.org> Message-ID: <1605503287.32.0.788392437705.issue42195@roundup.psfhosted.org> Zac Hatfield-Dodds added the comment: > @Hatfield-Dodds, if we changed typing.Callable to return ((int, int), str) but collections.abc.Callable continued to return ([int, int], str), would that suffice for your purposes? For performance reasons I'd prefer that the return value be hashable for both, but we've already shipped the workarounds [0,1,2] for 3.9.0 and will maintain that until 3.9 reaches EOL in any case. Whether we return (int, int, str) or ((int, int), str) doesn't make much difference to me, the latter will require a trivial patch to [2] so please do whatever makes most sense upstream. > Also, maybe we should make builtins.callable generic as well? I like this idea :-) [0] https://hypothesis.readthedocs.io/en/latest/changes.html#v5-39-0 [1] https://github.com/HypothesisWorks/hypothesis/pull/2653/files#diff-c56f048e926cce76dc6cd811924136f5c97e0f68f59625869b4ab01f1dbe10e0L1473-R1480 [2] https://github.com/HypothesisWorks/hypothesis/pull/2653/files#diff-f6a209c019f3f6af11a027a0035e3fc736935d9920fd85da726f9abf4c325d6bR562-R567 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 00:12:52 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Nov 2020 05:12:52 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605503572.66.0.846344497831.issue42153@roundup.psfhosted.org> miss-islington added the comment: New changeset 85a8a19134bf3f84e0c1504c2a5cd97aa255a63b by Miss Islington (bot) in branch '3.8': bpo-42153 Fix link to IMAP documents in imaplib.rst (GH-23297) https://github.com/python/cpython/commit/85a8a19134bf3f84e0c1504c2a5cd97aa255a63b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 00:22:34 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Nov 2020 05:22:34 +0000 Subject: [issue40494] collections.abc.Callable and type variables In-Reply-To: <1588579632.5.0.091811612876.issue40494@roundup.psfhosted.org> Message-ID: <1605504154.41.0.125891483614.issue40494@roundup.psfhosted.org> Guido van Rossum added the comment: >From https://bugs.python.org/issue42195 it looks like we need to create a subclass just for Callable. See https://bugs.python.org/issue42102 and PR 22848. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 00:26:40 2020 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 16 Nov 2020 05:26:40 +0000 Subject: [issue40736] better message for re.search TypeError ("expected string or bytes-like object") In-Reply-To: <1590181975.57.0.833400253921.issue40736@roundup.psfhosted.org> Message-ID: <1605504400.25.0.323621311663.issue40736@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 3.0 -> 4.0 pull_requests: +22203 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23312 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 00:27:09 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Nov 2020 05:27:09 +0000 Subject: [issue42153] doc: library imaplib a url not available In-Reply-To: <1603699175.52.0.848588068568.issue42153@roundup.psfhosted.org> Message-ID: <1605504429.13.0.414411936045.issue42153@roundup.psfhosted.org> miss-islington added the comment: New changeset 7c4d8fa82aae98f2d638be68f21e9524a92a38e6 by Miss Islington (bot) in branch '3.9': bpo-42153 Fix link to IMAP documents in imaplib.rst (GH-23297) https://github.com/python/cpython/commit/7c4d8fa82aae98f2d638be68f21e9524a92a38e6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 00:29:20 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Nov 2020 05:29:20 +0000 Subject: [issue42102] Make builtins.callable "generic" In-Reply-To: <1603230529.81.0.174539582672.issue42102@roundup.psfhosted.org> Message-ID: <1605504560.43.0.568230226978.issue42102@roundup.psfhosted.org> Guido van Rossum added the comment: I'd like to pursue this for real; other issues for callable have popped up, https://bugs.python.org/issue42195 and https://bugs.python.org/issue40494 (https://bugs.python.org/issue40398 is also related but already fixed). >From 42195 I learn that __args__ ought to be hashable. I would prefer it to still be structured, e.g. callable[[int, str], float].__args__ should be ((int, str), float). This means we have to change typing.Callable and collections.abc.Callable as well (the latter may share code with builtins.callable, but typing.Callable should probably stay separate, but returning the same structure). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 00:31:17 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Nov 2020 05:31:17 +0000 Subject: [issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable In-Reply-To: <1603974319.88.0.166786801787.issue42195@roundup.psfhosted.org> Message-ID: <1605504677.25.0.919286028956.issue42195@roundup.psfhosted.org> Guido van Rossum added the comment: In that case I prefer ((int, int), str), in case we ever end up needing to add additional parameters to Callable. I propose we first fix https://bugs.python.org/issue42102. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 02:41:08 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 16 Nov 2020 07:41:08 +0000 Subject: [issue42364] Typo in french doc translation In-Reply-To: <1605482096.39.0.136403894956.issue42364@roundup.psfhosted.org> Message-ID: <1605512468.11.0.828735009384.issue42364@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: French translation is maintained in GitHub and the issues are tracked under GitHub issues. Please open an issue at https://github.com/python/python-docs-fr ---------- nosy: +xtreak resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 02:50:08 2020 From: report at bugs.python.org (Julien Palard) Date: Mon, 16 Nov 2020 07:50:08 +0000 Subject: [issue42238] Deprecate suspicious.py? In-Reply-To: <1604274563.95.0.828690163802.issue42238@roundup.psfhosted.org> Message-ID: <1605513008.51.0.61121477653.issue42238@roundup.psfhosted.org> Julien Palard added the comment: Good idea Ned! So proposed plan: - Drop it from docs build and the CI to avoid time loss. - Add it as a step of PEP 101, for a few release, for good measures - I'll check it from time to time between releases, just to ensure it does not accumulate tons of things to do on the the release day. If during a few release, we notice this tool is no loger usefull we'll be able to drop it. If we spot some errors that can be migrated to the rstlint.py we'll do. If this tool is in fact usefull, we'll have to think about it again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 03:08:04 2020 From: report at bugs.python.org (Julien Palard) Date: Mon, 16 Nov 2020 08:08:04 +0000 Subject: [issue42238] Deprecate suspicious.py? In-Reply-To: <1604274563.95.0.828690163802.issue42238@roundup.psfhosted.org> Message-ID: <1605514084.8.0.170539845652.issue42238@roundup.psfhosted.org> Change by Julien Palard : ---------- keywords: +patch pull_requests: +22204 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23313 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 03:14:55 2020 From: report at bugs.python.org (Ma Lin) Date: Mon, 16 Nov 2020 08:14:55 +0000 Subject: [issue42366] Use MSVC2019 and /Ob3 option to compile Windows builds Message-ID: <1605514495.3.0.110639328789.issue42366@roundup.psfhosted.org> New submission from Ma Lin : MSVC2019 has a new option `/Ob3`, it specifies more aggressive inlining than /Ob2: https://docs.microsoft.com/en-us/cpp/build/reference/ob-inline-function-expansion?view=msvc-160 If use this option in MSVC2017, it will emit a warning: cl : Command line warning D9002 : ignoring unknown option '/Ob3' Just apply `Ob3.diff`, get this improvement: (Python 3.9 branch, No PGO, build.bat -p X64) +-------------------------+----------+------------------------------+ | Benchmark | baseline | ob3 | +=========================+==========+==============================+ | 2to3 | 563 ms | 552 ms: 1.02x faster (-2%) | +-------------------------+----------+------------------------------+ | chameleon | 16.5 ms | 16.1 ms: 1.03x faster (-3%) | +-------------------------+----------+------------------------------+ | chaos | 200 ms | 197 ms: 1.02x faster (-2%) | +-------------------------+----------+------------------------------+ | crypto_pyaes | 186 ms | 184 ms: 1.01x faster (-1%) | +-------------------------+----------+------------------------------+ | deltablue | 13.0 ms | 12.6 ms: 1.03x faster (-3%) | +-------------------------+----------+------------------------------+ | dulwich_log | 94.5 ms | 93.9 ms: 1.01x faster (-1%) | +-------------------------+----------+------------------------------+ | fannkuch | 806 ms | 761 ms: 1.06x faster (-6%) | +-------------------------+----------+------------------------------+ | float | 211 ms | 199 ms: 1.06x faster (-6%) | +-------------------------+----------+------------------------------+ | genshi_text | 48.3 ms | 47.7 ms: 1.01x faster (-1%) | +-------------------------+----------+------------------------------+ | go | 446 ms | 437 ms: 1.02x faster (-2%) | +-------------------------+----------+------------------------------+ | hexiom | 16.6 ms | 15.9 ms: 1.04x faster (-4%) | +-------------------------+----------+------------------------------+ | json_dumps | 19.9 ms | 19.3 ms: 1.03x faster (-3%) | +-------------------------+----------+------------------------------+ | json_loads | 45.5 us | 43.9 us: 1.04x faster (-3%) | +-------------------------+----------+------------------------------+ | logging_format | 21.4 us | 20.7 us: 1.03x faster (-3%) | +-------------------------+----------+------------------------------+ | logging_silent | 343 ns | 319 ns: 1.07x faster (-7%) | +-------------------------+----------+------------------------------+ | mako | 29.0 ms | 27.6 ms: 1.05x faster (-5%) | +-------------------------+----------+------------------------------+ | meteor_contest | 168 ms | 162 ms: 1.04x faster (-3%) | +-------------------------+----------+------------------------------+ | nbody | 256 ms | 244 ms: 1.05x faster (-5%) | +-------------------------+----------+------------------------------+ | nqueens | 168 ms | 162 ms: 1.04x faster (-4%) | +-------------------------+----------+------------------------------+ | pathlib | 175 ms | 168 ms: 1.04x faster (-4%) | +-------------------------+----------+------------------------------+ | pickle | 17.9 us | 17.3 us: 1.04x faster (-4%) | +-------------------------+----------+------------------------------+ | pickle_dict | 41.0 us | 33.2 us: 1.24x faster (-19%) | +-------------------------+----------+------------------------------+ | pickle_list | 6.73 us | 5.89 us: 1.14x faster (-12%) | +-------------------------+----------+------------------------------+ | pickle_pure_python | 829 us | 793 us: 1.05x faster (-4%) | +-------------------------+----------+------------------------------+ | pidigits | 243 ms | 243 ms: 1.00x faster (-0%) | +-------------------------+----------+------------------------------+ | pyflate | 1.21 sec | 1.18 sec: 1.03x faster (-2%) | +-------------------------+----------+------------------------------+ | raytrace | 947 ms | 915 ms: 1.03x faster (-3%) | +-------------------------+----------+------------------------------+ | regex_compile | 291 ms | 284 ms: 1.03x faster (-2%) | +-------------------------+----------+------------------------------+ | regex_dna | 217 ms | 222 ms: 1.02x slower (+2%) | +-------------------------+----------+------------------------------+ | regex_effbot | 3.97 ms | 4.13 ms: 1.04x slower (+4%) | +-------------------------+----------+------------------------------+ | regex_v8 | 35.2 ms | 34.6 ms: 1.02x faster (-2%) | +-------------------------+----------+------------------------------+ | richards | 134 ms | 131 ms: 1.02x faster (-2%) | +-------------------------+----------+------------------------------+ | scimark_fft | 616 ms | 599 ms: 1.03x faster (-3%) | +-------------------------+----------+------------------------------+ | scimark_lu | 248 ms | 241 ms: 1.03x faster (-3%) | +-------------------------+----------+------------------------------+ | scimark_monte_carlo | 187 ms | 179 ms: 1.04x faster (-4%) | +-------------------------+----------+------------------------------+ | scimark_sor | 361 ms | 343 ms: 1.05x faster (-5%) | +-------------------------+----------+------------------------------+ | scimark_sparse_mat_mult | 7.71 ms | 7.04 ms: 1.10x faster (-9%) | +-------------------------+----------+------------------------------+ | spectral_norm | 249 ms | 245 ms: 1.02x faster (-2%) | +-------------------------+----------+------------------------------+ | sqlalchemy_declarative | 237 ms | 246 ms: 1.04x slower (+4%) | +-------------------------+----------+------------------------------+ | sqlalchemy_imperative | 40.6 ms | 41.2 ms: 1.02x slower (+2%) | +-------------------------+----------+------------------------------+ | sqlite_synth | 4.64 us | 5.47 us: 1.18x slower (+18%) | +-------------------------+----------+------------------------------+ | sympy_expand | 738 ms | 718 ms: 1.03x faster (-3%) | +-------------------------+----------+------------------------------+ | sympy_integrate | 35.6 ms | 34.7 ms: 1.03x faster (-3%) | +-------------------------+----------+------------------------------+ | sympy_sum | 298 ms | 295 ms: 1.01x faster (-1%) | +-------------------------+----------+------------------------------+ | sympy_str | 484 ms | 471 ms: 1.03x faster (-3%) | +-------------------------+----------+------------------------------+ | telco | 11.3 ms | 9.76 ms: 1.16x faster (-14%) | +-------------------------+----------+------------------------------+ | tornado_http | 256 ms | 254 ms: 1.01x faster (-1%) | +-------------------------+----------+------------------------------+ | unpack_sequence | 94.3 ns | 90.5 ns: 1.04x faster (-4%) | +-------------------------+----------+------------------------------+ | unpickle | 23.6 us | 22.6 us: 1.05x faster (-5%) | +-------------------------+----------+------------------------------+ | unpickle_list | 6.63 us | 6.17 us: 1.07x faster (-7%) | +-------------------------+----------+------------------------------+ | unpickle_pure_python | 589 us | 560 us: 1.05x faster (-5%) | +-------------------------+----------+------------------------------+ | xml_etree_parse | 213 ms | 209 ms: 1.02x faster (-2%) | +-------------------------+----------+------------------------------+ | xml_etree_iterparse | 155 ms | 149 ms: 1.04x faster (-4%) | +-------------------------+----------+------------------------------+ | xml_etree_generate | 149 ms | 145 ms: 1.03x faster (-3%) | +-------------------------+----------+------------------------------+ | xml_etree_process | 117 ms | 115 ms: 1.01x faster (-1%) | +-------------------------+----------+------------------------------+ Not significant (5): django_template; genshi_xml; logging_simple; python_startup; python_startup_no_site ---------- components: Windows files: Ob3.diff keywords: patch messages: 381076 nosy: malin, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Use MSVC2019 and /Ob3 option to compile Windows builds type: performance versions: Python 3.10 Added file: https://bugs.python.org/file49600/Ob3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 03:17:22 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 16 Nov 2020 08:17:22 +0000 Subject: [issue42366] Use MSVC2019 and /Ob3 option to compile Windows builds In-Reply-To: <1605514495.3.0.110639328789.issue42366@roundup.psfhosted.org> Message-ID: <1605514642.77.0.874822310675.issue42366@roundup.psfhosted.org> Christian Heimes added the comment: Could you please try again with PGO? All our official builds use PGO. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 03:28:33 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 16 Nov 2020 08:28:33 +0000 Subject: [issue13888] test_builtin failure when run after test_tk In-Reply-To: <1327661656.8.0.445863136974.issue13888@psf.upfronthosting.co.za> Message-ID: <1605515313.48.0.693109314144.issue13888@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is still reproducible on Linux. I do not get a crash, just test failure and some strange output. ====================================================================== FAIL: test_input_tty_non_ascii (test.test_builtin.PtyTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_builtin.py", line 2122, in test_input_tty_non_ascii self.check_input_tty("prompt?", b"quux\xe9", "utf-8") File "/home/serhiy/py/cpython/Lib/test/test_builtin.py", line 2103, in check_input_tty lines = self.run_child(child, terminal_input + b"\r\n") File "/home/serhiy/py/cpython/Lib/test/test_builtin.py", line 2021, in run_child return self._run_child(child, terminal_input) File "/home/serhiy/py/cpython/Lib/test/test_builtin.py", line 2078, in _run_child self.fail("got %d lines in pipe but expected 2, child output was:\n%s" AssertionError: got 0 lines in pipe but expected 2, child output was: quux promptXIO: fatal IO error 25 (Inappropriate ioctl for device) on X server ":0" after 35926 requests (35926 known processed) with 40 events remaining. ====================================================================== FAIL: test_input_tty_non_ascii_unicode_errors (test.test_builtin.PtyTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_builtin.py", line 2126, in test_input_tty_non_ascii_unicode_errors self.check_input_tty("prompt?", b"quux\xe9", "ascii") File "/home/serhiy/py/cpython/Lib/test/test_builtin.py", line 2103, in check_input_tty lines = self.run_child(child, terminal_input + b"\r\n") File "/home/serhiy/py/cpython/Lib/test/test_builtin.py", line 2021, in run_child return self._run_child(child, terminal_input) File "/home/serhiy/py/cpython/Lib/test/test_builtin.py", line 2078, in _run_child self.fail("got %d lines in pipe but expected 2, child output was:\n%s" AssertionError: got 0 lines in pipe but expected 2, child output was: quux prompt?XIO: fatal IO error 25 (Inappropriate ioctl for device) on X server ":0" after 35926 requests (35926 known processed) with 40 events remaining. ---------------------------------------------------------------------- ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 03:28:30 2020 From: report at bugs.python.org (Ma Lin) Date: Mon, 16 Nov 2020 08:28:30 +0000 Subject: [issue42366] Use MSVC2019 and /Ob3 option to compile Windows builds In-Reply-To: <1605514495.3.0.110639328789.issue42366@roundup.psfhosted.org> Message-ID: <1605515310.99.0.874922471705.issue42366@roundup.psfhosted.org> Ma Lin added the comment: > Could you please try again with PGO? Please wait. BTW, this option was advised in another project. In that project, even enable `\Ob3`, it still slower than GCC 9 build. If you are interested, see: https://github.com/facebook/zstd/issues/2314 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 03:38:24 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 16 Nov 2020 08:38:24 +0000 Subject: [issue42102] Make builtins.callable "generic" In-Reply-To: <1603230529.81.0.174539582672.issue42102@roundup.psfhosted.org> Message-ID: <1605515904.19.0.0548405252776.issue42102@roundup.psfhosted.org> Serhiy Storchaka added the comment: Sorry, but making builtins.callable generic looks wrong to me. It is a predicate, not a constructor. If it would be called "iscallable" instead of "callable" nobody would propose to make it generic, right? It's just a coincidence that the name of this predicate equals to the name of typing.Callable and collections.abc.Callable. builtins.callable was removed in Python 3.0 in favor of instance check for collections.Callable. Maybe removing it again (or renaming to iscallable) would solve confusion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 04:25:29 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Mon, 16 Nov 2020 09:25:29 +0000 Subject: [issue42102] Make builtins.callable "generic" In-Reply-To: <1603230529.81.0.174539582672.issue42102@roundup.psfhosted.org> Message-ID: <1605518729.22.0.502761482808.issue42102@roundup.psfhosted.org> Batuhan Taskaya added the comment: > Sorry, but making builtins.callable generic looks wrong to me. It is a predicate, not a constructor. If it would be called "iscallable" instead of "callable" nobody would propose to make it generic, right? It's just a coincidence that the name of this predicate equals to the name of typing.Callable and collections.abc.Callable. I concur with Serhiy on this. ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 04:54:11 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 16 Nov 2020 09:54:11 +0000 Subject: [issue42367] Restore os.makedirs ability to apply mode to all directories created Message-ID: <1605520451.51.0.153670810596.issue42367@roundup.psfhosted.org> New submission from Gregory P. Smith : os.makedirs used to pass its mode argument on down recursively so that every level of directory it created would have the specified permissions. That was removed in Python 3.7 as https://bugs.python.org/issue19930 as if it were a mis-feature. Maybe it was in one situation, but it was also a desirable *feature*. It wasn't a bug. We've got 15 year old code depending on that and the only solution for it to work on Python 3.7-3.9 is to reimplement recursive directory creation. :( This feature needs to be brought back. Rather than flip flop on the API, adding an flag to indicate if the permissions should be applied recursively or not seems like the best way forward. The "workaround" documented in the above bug is invalid. umask cannot be used to control the intermediate directory creation permissions as that is a process wide global that would impact other threads or signal handlers. umask also cannot be used as umask does not allow setting of special bits such as stat.S_ISVTX. result: Our old os.makedirs() code that tried to set the sticky bit (ISVTX) on all directories now fails to set it at all levels. ---------- components: Library (Lib) keywords: 3.7regression messages: 381082 nosy: gregory.p.smith, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Restore os.makedirs ability to apply mode to all directories created type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 04:55:44 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 16 Nov 2020 09:55:44 +0000 Subject: [issue19930] os.makedirs('dir1/dir2', 0) always fails In-Reply-To: <1386500945.84.0.693179822476.issue19930@psf.upfronthosting.co.za> Message-ID: <1605520544.07.0.32115461994.issue19930@roundup.psfhosted.org> Gregory P. Smith added the comment: This API change was not strictly a bugfix, it removed a feature existing code was relying on. https://bugs.python.org/issue42367 opened to reconcile the two. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 05:01:31 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 16 Nov 2020 10:01:31 +0000 Subject: [issue42367] Restore os.makedirs ability to apply mode to all directories created In-Reply-To: <1605520451.51.0.153670810596.issue42367@roundup.psfhosted.org> Message-ID: <1605520891.34.0.156292516646.issue42367@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 05:01:17 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 16 Nov 2020 10:01:17 +0000 Subject: [issue42367] Restore os.makedirs ability to apply mode to all directories created In-Reply-To: <1605520451.51.0.153670810596.issue42367@roundup.psfhosted.org> Message-ID: <1605520877.69.0.397640670829.issue42367@roundup.psfhosted.org> Gregory P. Smith added the comment: For consistency, pathlib.Path.mkdir should also gain this option. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 05:26:22 2020 From: report at bugs.python.org (Ma Lin) Date: Mon, 16 Nov 2020 10:26:22 +0000 Subject: [issue42366] Use MSVC2019 and /Ob3 option to compile Windows builds In-Reply-To: <1605514495.3.0.110639328789.issue42366@roundup.psfhosted.org> Message-ID: <1605522382.14.0.762017062416.issue42366@roundup.psfhosted.org> Ma Lin added the comment: In PGO build, the improvement is not much. (3.9 branch, with PGO, build.bat -p X64 --pgo) +-------------------------+--------------+------------------------------+ | Benchmark | baseline-pgo | ob3-pgo | +=========================+==============+==============================+ | 2to3 | 464 ms | 462 ms: 1.01x faster (-1%) | +-------------------------+--------------+------------------------------+ | chameleon | 14.0 ms | 13.5 ms: 1.03x faster (-3%) | +-------------------------+--------------+------------------------------+ | crypto_pyaes | 142 ms | 143 ms: 1.00x slower (+0%) | +-------------------------+--------------+------------------------------+ | django_template | 65.0 ms | 65.4 ms: 1.01x slower (+1%) | +-------------------------+--------------+------------------------------+ | fannkuch | 665 ms | 650 ms: 1.02x faster (-2%) | +-------------------------+--------------+------------------------------+ | float | 166 ms | 164 ms: 1.01x faster (-1%) | +-------------------------+--------------+------------------------------+ | genshi_text | 41.4 ms | 41.0 ms: 1.01x faster (-1%) | +-------------------------+--------------+------------------------------+ | genshi_xml | 88.1 ms | 87.0 ms: 1.01x faster (-1%) | +-------------------------+--------------+------------------------------+ | go | 315 ms | 311 ms: 1.01x faster (-1%) | +-------------------------+--------------+------------------------------+ | hexiom | 12.7 ms | 12.6 ms: 1.01x faster (-1%) | +-------------------------+--------------+------------------------------+ | json_dumps | 16.7 ms | 16.6 ms: 1.01x faster (-1%) | +-------------------------+--------------+------------------------------+ | json_loads | 33.5 us | 32.1 us: 1.04x faster (-4%) | +-------------------------+--------------+------------------------------+ | logging_simple | 13.6 us | 13.3 us: 1.02x faster (-2%) | +-------------------------+--------------+------------------------------+ | mako | 22.7 ms | 22.8 ms: 1.01x slower (+1%) | +-------------------------+--------------+------------------------------+ | meteor_contest | 136 ms | 138 ms: 1.01x slower (+1%) | +-------------------------+--------------+------------------------------+ | nbody | 189 ms | 186 ms: 1.02x faster (-2%) | +-------------------------+--------------+------------------------------+ | nqueens | 135 ms | 135 ms: 1.01x faster (-1%) | +-------------------------+--------------+------------------------------+ | pathlib | 157 ms | 154 ms: 1.02x faster (-2%) | +-------------------------+--------------+------------------------------+ | pickle | 16.8 us | 16.4 us: 1.02x faster (-2%) | +-------------------------+--------------+------------------------------+ | pickle_dict | 41.3 us | 40.4 us: 1.02x faster (-2%) | +-------------------------+--------------+------------------------------+ | pickle_list | 6.34 us | 6.42 us: 1.01x slower (+1%) | +-------------------------+--------------+------------------------------+ | pickle_pure_python | 588 us | 584 us: 1.01x faster (-1%) | +-------------------------+--------------+------------------------------+ | pidigits | 242 ms | 242 ms: 1.00x faster (-0%) | +-------------------------+--------------+------------------------------+ | pyflate | 905 ms | 898 ms: 1.01x faster (-1%) | +-------------------------+--------------+------------------------------+ | python_startup | 28.0 ms | 27.9 ms: 1.00x faster (-0%) | +-------------------------+--------------+------------------------------+ | regex_compile | 220 ms | 218 ms: 1.01x faster (-1%) | +-------------------------+--------------+------------------------------+ | regex_v8 | 33.1 ms | 32.9 ms: 1.01x faster (-1%) | +-------------------------+--------------+------------------------------+ | richards | 88.9 ms | 88.3 ms: 1.01x faster (-1%) | +-------------------------+--------------+------------------------------+ | scimark_fft | 494 ms | 486 ms: 1.02x faster (-2%) | +-------------------------+--------------+------------------------------+ | scimark_lu | 210 ms | 207 ms: 1.02x faster (-2%) | +-------------------------+--------------+------------------------------+ | scimark_monte_carlo | 141 ms | 137 ms: 1.03x faster (-3%) | +-------------------------+--------------+------------------------------+ | scimark_sor | 263 ms | 255 ms: 1.03x faster (-3%) | +-------------------------+--------------+------------------------------+ | scimark_sparse_mat_mult | 6.48 ms | 6.10 ms: 1.06x faster (-6%) | +-------------------------+--------------+------------------------------+ | spectral_norm | 200 ms | 184 ms: 1.09x faster (-8%) | +-------------------------+--------------+------------------------------+ | sqlalchemy_imperative | 39.4 ms | 37.8 ms: 1.04x faster (-4%) | +-------------------------+--------------+------------------------------+ | sqlite_synth | 4.24 us | 4.31 us: 1.02x slower (+2%) | +-------------------------+--------------+------------------------------+ | sympy_sum | 266 ms | 270 ms: 1.01x slower (+1%) | +-------------------------+--------------+------------------------------+ | sympy_str | 416 ms | 418 ms: 1.00x slower (+0%) | +-------------------------+--------------+------------------------------+ | telco | 8.12 ms | 8.28 ms: 1.02x slower (+2%) | +-------------------------+--------------+------------------------------+ | unpack_sequence | 92.3 ns | 80.8 ns: 1.14x faster (-13%) | +-------------------------+--------------+------------------------------+ | unpickle | 17.9 us | 18.3 us: 1.02x slower (+2%) | +-------------------------+--------------+------------------------------+ | unpickle_list | 6.43 us | 6.57 us: 1.02x slower (+2%) | +-------------------------+--------------+------------------------------+ | unpickle_pure_python | 419 us | 414 us: 1.01x faster (-1%) | +-------------------------+--------------+------------------------------+ | xml_etree_parse | 184 ms | 183 ms: 1.00x faster (-0%) | +-------------------------+--------------+------------------------------+ | xml_etree_iterparse | 135 ms | 134 ms: 1.01x faster (-1%) | +-------------------------+--------------+------------------------------+ | xml_etree_generate | 130 ms | 129 ms: 1.01x faster (-1%) | +-------------------------+--------------+------------------------------+ | xml_etree_process | 101 ms | 99.4 ms: 1.01x faster (-1%) | +-------------------------+--------------+------------------------------+ Not significant (13): chaos; deltablue; dulwich_log; logging_format; logging_silent; python_startup_no_site; raytrace; regex_dna; regex_effbot; sqlalchemy_declarative; sympy_expand; sympy_integrate; tornado_http ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 05:32:46 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 16 Nov 2020 10:32:46 +0000 Subject: [issue42367] Restore os.makedirs ability to apply mode to all directories created In-Reply-To: <1605520451.51.0.153670810596.issue42367@roundup.psfhosted.org> Message-ID: <1605522766.61.0.925561018646.issue42367@roundup.psfhosted.org> Serhiy Storchaka added the comment: Alternatively we can add an optional argument for the mode of intermediate directories. makedirs(name, mode=0o777, exist_ok=False, intermediate_mode=0o777) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 05:36:36 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 16 Nov 2020 10:36:36 +0000 Subject: [issue42367] Restore os.makedirs ability to apply mode to all directories created In-Reply-To: <1605520451.51.0.153670810596.issue42367@roundup.psfhosted.org> Message-ID: <1605522996.66.0.599401178311.issue42367@roundup.psfhosted.org> Christian Heimes added the comment: +1 for restoring the feature +0 for Serhiy's proposal iff intermediate_mode defaults to the value of mode: def makedirs(name, mode=0o777, exist_ok=False, *, intermediate_mode=None): if intermediate_mode is None: intermediate_mode = mode ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 05:42:46 2020 From: report at bugs.python.org (Dan Gheorghe Haiduc) Date: Mon, 16 Nov 2020 10:42:46 +0000 Subject: [issue42368] Make set ordered Message-ID: <1605523366.24.0.798043055827.issue42368@roundup.psfhosted.org> New submission from Dan Gheorghe Haiduc : Now that dicts are ordered[1], would it by any chance make sense to also order sets? A use case that I ran into is trying to reproducibly get a random.choice from a set (after calling random.seed). At first I did not need reproducibility, and I just called random.choice(list(my_set)). Later when I did need it, it was difficult to find out what was wrong. Then I realized that sets are unordered, and that order is not dependent on random.seed. It seems there are also some other confused newbies out there.[2][3] Thank you for the powerful language that is Python! [1] https://www.python.org/dev/peps/pep-0468 [2] https://stackoverflow.com/q/11929701/235463 [3] https://stackoverflow.com/q/36317520/235463 ---------- components: Interpreter Core messages: 381088 nosy: danuker priority: normal severity: normal status: open title: Make set ordered type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 05:46:21 2020 From: report at bugs.python.org (Dan Gheorghe Haiduc) Date: Mon, 16 Nov 2020 10:46:21 +0000 Subject: [issue42368] Make set ordered In-Reply-To: <1605523366.24.0.798043055827.issue42368@roundup.psfhosted.org> Message-ID: <1605523581.5.0.436583028021.issue42368@roundup.psfhosted.org> Dan Gheorghe Haiduc added the comment: Oops. The reference number [2] in the previous message should instead be https://stackoverflow.com/q/6614447/235463 . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 06:07:51 2020 From: report at bugs.python.org (Thomas) Date: Mon, 16 Nov 2020 11:07:51 +0000 Subject: [issue42369] Reading ZipFile not thread-safe Message-ID: <1605524871.74.0.395089652548.issue42369@roundup.psfhosted.org> New submission from Thomas : According to https://docs.python.org/3.5/whatsnew/changelog.html#id108 bpo-14099, reading multiple ZipExtFiles should be thread-safe, but it is not. I created a small example where two threads try to read files from the same ZipFile simultaneously, which crashes with a Bad CRC-32 error. This is especially surprising since all files in the ZipFile only contain 0-bytes and have the same CRC. My use case is a ZipFile with 82000 files. Creating multiple ZipFiles from the same "physical" zip file is not a satisfactory workaround because it takes several seconds each time. Instead, I open it only once and clone it for each thread: with zipfile.ZipFile("/tmp/dummy.zip", "w") as dummy: pass def clone_zipfile(z): z_cloned = zipfile.ZipFile("/tmp/dummy.zip") z_cloned.NameToInfo = z.NameToInfo z_cloned.fp = open(z.fp.name, "rb") return z_cloned This is a much better solution for my use case than locking. I am using multiple threads because I want to finish my task faster, but locking defeats that purpose. However, this cloning is somewhat of a dirty hack and will break when the file is not a real file but rather a file-like object. Unfortunately, I do not have a solution for the general case. ---------- files: test.py messages: 381090 nosy: Thomas priority: normal severity: normal status: open title: Reading ZipFile not thread-safe versions: Python 3.7, Python 3.8 Added file: https://bugs.python.org/file49601/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 06:10:08 2020 From: report at bugs.python.org (Thomas) Date: Mon, 16 Nov 2020 11:10:08 +0000 Subject: [issue42369] Reading ZipFile not thread-safe In-Reply-To: <1605524871.74.0.395089652548.issue42369@roundup.psfhosted.org> Message-ID: <1605525008.28.0.121630379861.issue42369@roundup.psfhosted.org> Change by Thomas : ---------- components: +Library (Lib) type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 06:25:09 2020 From: report at bugs.python.org (Ma Lin) Date: Mon, 16 Nov 2020 11:25:09 +0000 Subject: [issue42369] Reading ZipFile not thread-safe In-Reply-To: <1605524871.74.0.395089652548.issue42369@roundup.psfhosted.org> Message-ID: <1605525909.38.0.403327669072.issue42369@roundup.psfhosted.org> Change by Ma Lin : ---------- nosy: +malin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 07:02:14 2020 From: report at bugs.python.org (mattip) Date: Mon, 16 Nov 2020 12:02:14 +0000 Subject: [issue41100] Support macOS 11 and Apple Silicon Macs In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1605528134.81.0.619738639335.issue41100@roundup.psfhosted.org> mattip added the comment: Over at NumPy we are getting reports that some python built for macOSx 11 is not accepting wheels with the `macosx_10_9_x86_64` platform tag. Could it be related to this issue, another open issue, or some other provider's python? xref https://github.com/numpy/numpy/issues/17784 ---------- nosy: +mattip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 07:05:33 2020 From: report at bugs.python.org (Max Desiatov) Date: Mon, 16 Nov 2020 12:05:33 +0000 Subject: [issue41100] Support macOS 11 and Apple Silicon Macs In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1605528333.62.0.732429308277.issue41100@roundup.psfhosted.org> Change by Max Desiatov : ---------- nosy: -MaxDesiatov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 07:22:18 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Nov 2020 12:22:18 +0000 Subject: [issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation In-Reply-To: <1560017700.11.0.127727162727.issue37205@roundup.psfhosted.org> Message-ID: <1605529338.95.0.936905533586.issue37205@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3df5c68487df9d1d20ab0cd06e7942a4f96d40a4 by Victor Stinner in branch 'master': bpo-37205: time.perf_counter() and time.monotonic() are system-wide (GH-23284) https://github.com/python/cpython/commit/3df5c68487df9d1d20ab0cd06e7942a4f96d40a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 07:41:20 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 16 Nov 2020 12:41:20 +0000 Subject: [issue42368] Make set ordered In-Reply-To: <1605523366.24.0.798043055827.issue42368@roundup.psfhosted.org> Message-ID: <1605530480.1.0.962308009816.issue42368@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: See also https://mail.python.org/pipermail/python-dev/2019-February/156466.html ---------- nosy: +methane, rhettinger, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 07:42:49 2020 From: report at bugs.python.org (Michael Felt) Date: Mon, 16 Nov 2020 12:42:49 +0000 Subject: [issue42309] BUILD: AIX-64-bit segmentation fault using xlc In-Reply-To: <1605008695.96.0.78391537773.issue42309@roundup.psfhosted.org> Message-ID: <1605530569.65.0.0366694999222.issue42309@roundup.psfhosted.org> Michael Felt added the comment: Added "using xlc" to description. When I have a system that has 64-bit support for gcc - I'll verify that it works, or does not work, for me using gcc. ---------- title: BUILD: AIX-64-bit segmentation fault -> BUILD: AIX-64-bit segmentation fault using xlc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 07:51:58 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 16 Nov 2020 12:51:58 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1605531118.96.0.439286781985.issue40939@roundup.psfhosted.org> Miro Hron?ok added the comment: Could the removal of the parser module be documented in https://docs.python.org/3.10/whatsnew/3.10.html please? ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 07:53:46 2020 From: report at bugs.python.org (Michael Felt) Date: Mon, 16 Nov 2020 12:53:46 +0000 Subject: [issue42323] [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX In-Reply-To: <1605094498.01.0.809514320528.issue42323@roundup.psfhosted.org> Message-ID: <1605531226.69.0.452219912251.issue42323@roundup.psfhosted.org> Michael Felt added the comment: I have been experimenting with different hardware and AIX versions. When building on AIX 5.3 - and the oldest libraries - test_math passes. When I run the test on POWER8, using either xlc or gcc test_math fails with just one element of the test. When I run the test on POWER6 I get many more errors - that I never had before. These are all after OS updates (I was not going to build for AIX 5.3 any more). An idea I have now - that may explain the sudden change in behavior is if the libraries have been optimized to always use the DFP (decimal floating point) internally - for what, from the application perspective - is the normal - no HW acceleration for FP - interface. I know there are ways to 'discover' this, but I'll need to write some tests so that I can see - if linking to different libraries actuates DFP performance counters yes and no. At this point - this feels like the a potential explanation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 08:12:53 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 16 Nov 2020 13:12:53 +0000 Subject: [issue41100] Support macOS 11 and Apple Silicon Macs In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1605532373.92.0.73947325858.issue41100@roundup.psfhosted.org> Ned Deily added the comment: @mattip, it could also be due to https://github.com/pypa/packaging/pull/319. I?m away from the keyboard fir the moment and can?t investigate further. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 08:31:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Nov 2020 13:31:47 +0000 Subject: [issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation In-Reply-To: <1560017700.11.0.127727162727.issue37205@roundup.psfhosted.org> Message-ID: <1605533507.07.0.361719843992.issue37205@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +22205 pull_request: https://github.com/python/cpython/pull/23314 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 09:06:03 2020 From: report at bugs.python.org (Dan Gheorghe Haiduc) Date: Mon, 16 Nov 2020 14:06:03 +0000 Subject: [issue42368] Make set ordered In-Reply-To: <1605523366.24.0.798043055827.issue42368@roundup.psfhosted.org> Message-ID: <1605535563.62.0.465789036383.issue42368@roundup.psfhosted.org> Dan Gheorghe Haiduc added the comment: rhettinger wrote [1]: > The existing setobject code has been finely tuned and micro-optimized over the years, giving it excellent performance on workloads we care about. This worries me also. But I suppose the tuning should make itself visible in benchmarks. Does Python have "canonical" benchmarks or speed tests like PyPy[2]? I am not sure how useful this is, but I made a naive and synthetic line_profiler benchmark of a naive implementation of set through a dict (see attached file). It resulted in roughly the following differences: * Initialization from a 1M-sized list: 41-66% slower * Inserting an item until doubling size: about the same (perhaps faster, due to the size I've chosen not triggering rebuilding of a dict hash table) * Deletion: 7-11% slower * Membership test: 2-15% slower Running them in the opposite order (first dict, then set) gave me the ranges. I have not considered memory usage (I have not profiled memory before). But I suspect this would be larger, since a dict would keep values in addition to keys. Additionally, initializing smaller structures (length = 100) seems to be slower; the initialization takes 2x longer (100% slower), but the O(1) operations take about the same. I suspect methane's implementation linked by xtreak is better (but I have not tried it). Profiled with: kernprof -l set_test.py python -m line_profiler set_test.py.lprof [1] https://mail.python.org/pipermail/python-dev/2019-February/156475.html [2] https://speed.pypy.org/ ---------- Added file: https://bugs.python.org/file49602/set_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 09:20:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Nov 2020 14:20:42 +0000 Subject: [issue42350] Calling os.fork() at Python exit logs: AttributeError: 'NoneType' object has no attribute '_at_fork_reinit' In-Reply-To: <1605289896.09.0.326897860295.issue42350@roundup.psfhosted.org> Message-ID: <1605536442.36.0.473662091347.issue42350@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 5909a494cd3ba43143b28bd439773ed85a485dfc by Victor Stinner in branch 'master': bpo-42350: Fix Thread._reset_internal_locks() (GH-23268) https://github.com/python/cpython/commit/5909a494cd3ba43143b28bd439773ed85a485dfc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 09:20:51 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Nov 2020 14:20:51 +0000 Subject: [issue42350] Calling os.fork() at Python exit logs: AttributeError: 'NoneType' object has no attribute '_at_fork_reinit' In-Reply-To: <1605289896.09.0.326897860295.issue42350@roundup.psfhosted.org> Message-ID: <1605536451.28.0.28577806562.issue42350@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +22206 pull_request: https://github.com/python/cpython/pull/23315 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 09:54:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Nov 2020 14:54:24 +0000 Subject: [issue42087] Remove pre-AIX 6.1 dead code paths In-Reply-To: <1603139085.09.0.736153857755.issue42087@roundup.psfhosted.org> Message-ID: <1605538464.82.0.412635456494.issue42087@roundup.psfhosted.org> STINNER Victor added the comment: Michael Felt, David Eldelsohn: are you ok to drop support for AIX 5.3 and older? ---------- nosy: +David.Edelsohn, aixtools at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 09:56:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Nov 2020 14:56:27 +0000 Subject: [issue42370] test_ttk_guionly: test_to() fails on the GitHub Ubuntu job Message-ID: <1605538587.9.0.222465124321.issue42370@roundup.psfhosted.org> New submission from STINNER Victor : Seen on the Ubuntu job on a GitHub PR: https://github.com/python/cpython/pull/23315/checks?check_run_id=1406797840 ====================================================================== FAIL: test_to (tkinter.test.test_ttk.test_widgets.SpinboxTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/runner/work/cpython/cpython/Lib/tkinter/test/test_ttk/test_widgets.py", line 1175, in test_to self.assertEqual(self.spin.get(), '5') AssertionError: '4' != '5' - 4 + 5 ---------- components: Tests, Tkinter messages: 381101 nosy: vstinner priority: normal severity: normal status: open title: test_ttk_guionly: test_to() fails on the GitHub Ubuntu job versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 16 10:00:17 2020 From: report at bugs.python.org (=?utf-8?q?Bengt_L=C3=BCers?=) Date: Mon, 16 Nov 2020 15:00:17 +0000 Subject: [issue42371] Missing colon in timezone suffix raises ValueError Message-ID: <1605538817.4.0.335687964648.issue42371@roundup.psfhosted.org> New submission from Bengt L?ers : I am trying to parse ISO8601-formatted datetime strings with timezones. This works fine when there is a colon separating the hour and minute digits: >>> import datetime >>> datetime.datetime.fromisoformat('2020-11-16T11:00:00+00:00') >>> datetime.datetime(2020, 11, 16, 11, 0, tzinfo=datetime.timezone.utc) However this fails when there is no colon between the hour and the minute digits: >>> import datetime >>> datetime.datetime.fromisoformat('2020-11-16T11:00:00+0000') Traceback (most recent call last): File "", line 1, in ValueError: Invalid isoformat string: '2020-11-16T11:00:00+0000' This behavior is unexpected, as the ISO8601 standard allows omitting the colon in the string and defining the timezone as "