From report at bugs.python.org Wed Dec 1 00:08:15 2021 From: report at bugs.python.org (Collin Anderson) Date: Wed, 01 Dec 2021 05:08:15 +0000 Subject: [issue45944] Avoid calling isatty() for most open() calls Message-ID: <1638335295.8.0.118316980587.issue45944@roundup.psfhosted.org> Change by Collin Anderson : ---------- components: IO nosy: collinanderson priority: normal severity: normal status: open title: Avoid calling isatty() for most open() calls type: performance versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 00:11:58 2021 From: report at bugs.python.org (Collin Anderson) Date: Wed, 01 Dec 2021 05:11:58 +0000 Subject: [issue45944] Avoid calling isatty() for most open() calls Message-ID: <1638335518.88.0.926181104136.issue45944@roundup.psfhosted.org> Change by Collin Anderson : ---------- keywords: +patch pull_requests: +28096 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29870 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 00:12:39 2021 From: report at bugs.python.org (Collin Anderson) Date: Wed, 01 Dec 2021 05:12:39 +0000 Subject: [issue45944] Avoid calling isatty() for most open() calls Message-ID: <1638335559.46.0.0192700736969.issue45944@roundup.psfhosted.org> New submission from Collin Anderson : isatty() is a system call on linux. Most open()s are files, and we're already getting the size of the file. If it has a size, then we know it's not a atty, and can avoid calling it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 00:17:00 2021 From: report at bugs.python.org (Zachary Ware) Date: Wed, 01 Dec 2021 05:17:00 +0000 Subject: [issue45943] Spam Message-ID: <1638335820.32.0.345644022899.issue45943@roundup.psfhosted.org> Change by Zachary Ware : ---------- components: -email nosy: -barry, oktaine57, r.david.murray title: Kids10yrsapart at gmail.com -> Spam type: behavior -> versions: -Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 00:17:17 2021 From: report at bugs.python.org (Zachary Ware) Date: Wed, 01 Dec 2021 05:17:17 +0000 Subject: [issue45943] Spam Message-ID: <1638335837.55.0.759908704753.issue45943@roundup.psfhosted.org> Change by Zachary Ware : Removed file: https://bugs.python.org/file50463/PSX_20210903_080553.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 02:40:18 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 07:40:18 +0000 Subject: [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1638344418.19.0.0491084333612.issue11352@roundup.psfhosted.org> Irit Katriel added the comment: Marking as easy. What needs to be done here is to review the patches and see if there are any doc improvements in them worth having. Then make a PR. ---------- keywords: +easy, newcomer friendly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 02:55:52 2021 From: report at bugs.python.org (Min RK) Date: Wed, 01 Dec 2021 07:55:52 +0000 Subject: [issue39529] Deprecate get_event_loop() In-Reply-To: <1580641897.21.0.210075972969.issue39529@roundup.psfhosted.org> Message-ID: <1638345352.83.0.865305048004.issue39529@roundup.psfhosted.org> Min RK added the comment: The comments in this thread suggest that `set_event_loop` should also be deprecated, but it hasn't been. It doesn't seem to have any use without `get_event_loop()`. I'm trying to understand the consequences of these changes for IPython, and make the changes intended by asyncio folks, but am not quite clear, yet. If I understand it correctly, this means that the whole concept of a 'current' event loop is deprecated while no event loop is running? My interpretation of these changes is that it means any persistent handles on any event loop while it isn't running is fully the responsibility of individual libraries (e.g. tornado, IPython). This is coming up in IPython where we need a handle on the event loop and advance it with `run_until_complete` for each iteration (it should be the same loop to maintain persistent state across advances, so `asyncio.run()` would not be appropriate). We previously relied on `get_event_loop` to manage this handle, but I think we have to now shift to tracking our own handle, and can no longer rely on standard APIs to track a shared instance across packages. ---------- nosy: +minrk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 03:05:36 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 01 Dec 2021 08:05:36 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1638345936.92.0.659717641699.issue40280@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28098 pull_request: https://github.com/python/cpython/pull/29872 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 03:10:59 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 01 Dec 2021 08:10:59 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1638346259.73.0.0473763207866.issue40280@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28099 pull_request: https://github.com/python/cpython/pull/29873 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 03:22:53 2021 From: report at bugs.python.org (Min RK) Date: Wed, 01 Dec 2021 08:22:53 +0000 Subject: [issue39529] Deprecate get_event_loop() In-Reply-To: <1580641897.21.0.210075972969.issue39529@roundup.psfhosted.org> Message-ID: <1638346973.22.0.724095177298.issue39529@roundup.psfhosted.org> Min RK added the comment: Further digging reveals that `policy.get_event_loop()` is _not_ deprecated while `asyncio.get_event_loop()` is. Is that intentional? Does that mean switching our calls to `get_event_loop_policy().get_event_loop()` should continue to work without deprecation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 03:56:24 2021 From: report at bugs.python.org (hongweipeng) Date: Wed, 01 Dec 2021 08:56:24 +0000 Subject: [issue30533] missing feature in inspect module: getmembers_static In-Reply-To: <1496271168.24.0.639482608296.issue30533@psf.upfronthosting.co.za> Message-ID: <1638348984.6.0.911419209438.issue30533@roundup.psfhosted.org> Change by hongweipeng : ---------- pull_requests: +28100 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/29874 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 03:58:17 2021 From: report at bugs.python.org (Alexander Kanavin) Date: Wed, 01 Dec 2021 08:58:17 +0000 Subject: [issue45945] compileall.py throws a traceback when using -j0 and thus 'make install' locks up Message-ID: <1638349096.96.0.35958886089.issue45945@roundup.psfhosted.org> New submission from Alexander Kanavin : Hello, Yocto project has had to disable -j0 for compileall, so that it runs serially. If it doesn't, then 'make install' locks up sporadically, with hanging processes: ``` 3837320 ? SN 0:00 \_ make -j 16 -l 52 STAGING_LIBDIR=/home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280438/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/recipe-sysroot/usr/lib STAGING_INCDIR=/ 157523 ? SNl 0:02 \_ python3.10 -Wi -OO /home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280438/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/compileall.py -j0 -d /u 160673 ? SN 0:00 \_ python3.10 -Wi -OO /home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280438/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/compileall.py -j0 - 160677 ? SN 0:00 \_ python3.10 -Wi -OO /home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280438/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/compileall.py -j0 - 160682 ? SN 0:00 \_ python3.10 -Wi -OO /home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280438/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/compileall.py -j0 - 160697 ? SN 0:00 \_ python3.10 -Wi -OO /home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280438/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/compileall.py -j0 - 160759 ? SN 0:00 \_ python3.10 -Wi -OO /home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280438/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/compileall.py -j0 - 160816 ? SN 0:00 \_ python3.10 -Wi -OO /home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280438/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/compileall.py -j0 - ... ``` and installation log reveals: ``` poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/compileall.py \ -j0 -d /usr/lib/python3.10 -f \ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ /home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280388/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10 Listing '/home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280388/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10'... Listing '/home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280388/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/asyncio'... Listing '/home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280388/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/collections'... Listing '/home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280388/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/concurrent'... Listing '/home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280388/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/concurrent/futures'... Listing '/home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280388/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/config-3.10-x86_64-linux-gnu'... Listing '/home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280388/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/ctypes'... Listing '/home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280388/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/ctypes/macholib'... ... Exception in thread Thread-1: Traceback (most recent call last): File "/home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280388/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/threading.py", line 1009, in _bootstrap_inner self.run() File "/home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280388/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/concurrent/futures/process.py", line 317, in run result_item, is_broken, cause = self.wait_result_broken_or_wakeup() File "/home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280388/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/concurrent/futures/process.py", line 376, in wait_result_broken_or_wakeup worker_sentinels = [p.sentinel for p in self.processes.values()] File "/home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1280388/tmp/work/core2-64-poky-linux/python3/3.10.0-r0/image/usr/lib/python3.10/concurrent/futures/process.py", line 376, in worker_sentinels = [p.sentinel for p in self.processes.values()] RuntimeError: dictionary changed size during iteration ``` ---------- components: Library (Lib) messages: 407431 nosy: Alexander Kanavin priority: normal severity: normal status: open title: compileall.py throws a traceback when using -j0 and thus 'make install' locks up versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 04:05:49 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 01 Dec 2021 09:05:49 +0000 Subject: [issue39529] Deprecate get_event_loop() In-Reply-To: <1580641897.21.0.210075972969.issue39529@roundup.psfhosted.org> Message-ID: <1638349549.01.0.750794048264.issue39529@roundup.psfhosted.org> Andrew Svetlov added the comment: IMHO, asyncio.set_event_loop() and policy.get_event_loop()/policy.set_event_loop() are not deprecated by oversight. In IPython, I think you could use new_event_loop() for getting a new loop instance. Then, save the loop reference somewhere as a direct attribute, threading.local or ContextVar. Calling loop.run_until_complete() looks pretty normal in your situation. At my job, we have Runner class, the basic usage is: with Runner() as runner: runner.run(async_func()) The implementation is pretty close to asyncio.run() but runner.run(...) can be called multiple times. Async context manager interface is responsible for resource closing. Maybe I should extract the implementation into a third-party library, I've found this concept useful for CLI applications at least. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 04:09:21 2021 From: report at bugs.python.org (Alexander Kanavin) Date: Wed, 01 Dec 2021 09:09:21 +0000 Subject: [issue45945] compileall.py throws a traceback when using -j0 and thus 'make install' locks up In-Reply-To: <1638349096.96.0.35958886089.issue45945@roundup.psfhosted.org> Message-ID: <1638349761.15.0.721716716933.issue45945@roundup.psfhosted.org> Alexander Kanavin added the comment: Here's the full log where you can see what happens. ---------- Added file: https://bugs.python.org/file50464/log.do_install.1905494 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 04:20:15 2021 From: report at bugs.python.org (Hai Shi) Date: Wed, 01 Dec 2021 09:20:15 +0000 Subject: [issue44133] Some C-API symbols (e.g. Py_FrozenMain) are not always exported In-Reply-To: <1621011524.07.0.0957325647121.issue44133@roundup.psfhosted.org> Message-ID: <1638350415.88.0.874569346199.issue44133@roundup.psfhosted.org> Change by Hai Shi : ---------- nosy: +shihai1991 nosy_count: 4.0 -> 5.0 pull_requests: +28101 pull_request: https://github.com/python/cpython/pull/29876 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 04:22:53 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 Dec 2021 09:22:53 +0000 Subject: [issue45944] Avoid calling isatty() for most open() calls In-Reply-To: <1638335559.46.0.0192700736969.issue45944@roundup.psfhosted.org> Message-ID: <1638350573.4.0.866344479446.issue45944@roundup.psfhosted.org> Serhiy Storchaka added the comment: What if change FileIO.isatty() instead? If make it returning False without invoking a system call if the file size is non-zero it will eliminate the need to expose _size. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 04:24:45 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 Dec 2021 09:24:45 +0000 Subject: [issue45944] Avoid calling isatty() for most open() calls In-Reply-To: <1638335559.46.0.0192700736969.issue45944@roundup.psfhosted.org> Message-ID: <1638350685.56.0.789019614225.issue45944@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +benjamin.peterson, pitrou, stutzbach 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 Dec 1 04:59:22 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 Dec 2021 09:59:22 +0000 Subject: [issue43153] tempfile seems to treat a file as a directory when processing an exception in the onerror() In-Reply-To: <1612691564.38.0.627288937354.issue43153@roundup.psfhosted.org> Message-ID: <1638352762.22.0.470261802848.issue43153@roundup.psfhosted.org> Serhiy Storchaka added the comment: I agree with Andrei. I'll test this approach on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 05:02:07 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 10:02:07 +0000 Subject: [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1638352927.45.0.561063150826.issue11352@roundup.psfhosted.org> Change by Irit Katriel : ---------- type: -> enhancement versions: +Python 3.11 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 05:11:10 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 10:11:10 +0000 Subject: [issue12957] [doc] mmap.resize changes memory address of mmap'd region In-Reply-To: <1315686259.57.0.0304440203891.issue12957@psf.upfronthosting.co.za> Message-ID: <1638353470.96.0.0820956466196.issue12957@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Library (Lib), ctypes title: mmap.resize changes memory address of mmap'd region -> [doc] mmap.resize changes memory address of mmap'd region versions: +Python 3.11 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 05:15:35 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 10:15:35 +0000 Subject: [issue25810] Python 3 documentation for eval is incorrect In-Reply-To: <1449346403.16.0.483198527619.issue25810@psf.upfronthosting.co.za> Message-ID: <1638353735.38.0.879588841043.issue25810@roundup.psfhosted.org> Irit Katriel added the comment: Help is now showing eval(source, globals=None, locals=None, /) with the / that indicates the args are positional only. The docs were updated here to state that the args are positional. ---------- nosy: +iritkatriel resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 05:16:19 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 Dec 2021 10:16:19 +0000 Subject: [issue45939] PyErr_SetObject documentation lacks mention of reference counting In-Reply-To: <1638286636.68.0.690482450072.issue45939@roundup.psfhosted.org> Message-ID: <1638353779.28.0.568408548893.issue45939@roundup.psfhosted.org> Serhiy Storchaka added the comment: I concur with Ronald. If we explicitly document that PyErr_SetObject() does not steal reference we would need to document it for every parameter of every function. It would make the documentation worse because it would be more difficult to distinguish ouliners which steal references from normal functions which does not steal references. Use official Python documentation. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 05:19:19 2021 From: report at bugs.python.org (Gobot1234) Date: Wed, 01 Dec 2021 10:19:19 +0000 Subject: [issue45946] RecursionError when annotating a field with the same name as a field Message-ID: <1638353959.47.0.043888744355.issue45946@roundup.psfhosted.org> New submission from Gobot1234 : Small snippet to reproduce: ``` from dataclasses import dataclass, field @dataclass class Foo: bool: bool = field() ``` Raises ``` --------------------------------------------------------------------------- RecursionError Traceback (most recent call last) in 2 3 @dataclass ----> 4 class Foo: 5 bool: bool = field() 6 /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/dataclasses.py in dataclass(cls, init, repr, eq, order, unsafe_hash, frozen, match_args, kw_only, slots) 1176 1177 # We're called as @dataclass without parens. -> 1178 return wrap(cls) 1179 1180 /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/dataclasses.py in wrap(cls) 1167 1168 def wrap(cls): -> 1169 return _process_class(cls, init, repr, eq, order, unsafe_hash, 1170 frozen, match_args, kw_only, slots) 1171 /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/dataclasses.py in _process_class(cls, init, repr, eq, order, unsafe_hash, frozen, match_args, kw_only, slots) 1085 # Create a class doc-string. 1086 cls.__doc__ = (cls.__name__ + -> 1087 str(inspect.signature(cls)).replace(' -> None', '')) 1088 1089 if match_args: /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/inspect.py in __str__(self) 3200 render_kw_only_separator = True 3201 for param in self.parameters.values(): -> 3202 formatted = str(param) 3203 3204 kind = param.kind /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/inspect.py in __str__(self) 2717 if self._annotation is not _empty: 2718 formatted = '{}: {}'.format(formatted, -> 2719 formatannotation(self._annotation)) 2720 2721 if self._default is not _empty: /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/inspect.py in formatannotation(annotation, base_module) 1362 return annotation.__qualname__ 1363 return annotation.__module__+'.'+annotation.__qualname__ -> 1364 return repr(annotation) 1365 1366 def formatannotationrelativeto(object): /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/dataclasses.py in __repr__(self) 281 282 def __repr__(self): --> 283 return ('Field(' 284 f'name={self.name!r},' 285 f'type={self.type!r},' ... last 1 frames repeated, from the frame below ... /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/dataclasses.py in __repr__(self) 281 282 def __repr__(self): --> 283 return ('Field(' 284 f'name={self.name!r},' 285 f'type={self.type!r},' RecursionError: maximum recursion depth exceeded while getting the repr of an object ``` This is due to the self.type being the field itself as the annotation is evaluated using the class namespace. ---------- components: Library (Lib) messages: 407438 nosy: Gobot1234, eric.smith priority: normal severity: normal status: open title: RecursionError when annotating a field with the same name as a field type: crash versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 05:38:24 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 01 Dec 2021 10:38:24 +0000 Subject: [issue12957] [doc] mmap.resize changes memory address of mmap'd region In-Reply-To: <1315686259.57.0.0304440203891.issue12957@psf.upfronthosting.co.za> Message-ID: <1638355104.6.0.509983464799.issue12957@roundup.psfhosted.org> Eryk Sun added the comment: mmap no longer allows resizing if the object has buffer exports. For example: >>> m = mmap.mmap(-1, 4096, access=mmap.ACCESS_WRITE) >>> p = (ctypes.c_char * 4096).from_buffer(m) >>> m.resize(8192) Traceback (most recent call last): File "", line 1, in BufferError: mmap can't resize with extant buffers exported. >>> del p >>> m.resize(8192) >>> len(m) 8192 ---------- nosy: +eryksun resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 05:50:26 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 10:50:26 +0000 Subject: [issue23453] [doc] Clarify bytes vs text with non-seeking tarfile stream In-Reply-To: <1423739998.49.0.706967373594.issue23453@psf.upfronthosting.co.za> Message-ID: <1638355826.99.0.439273878068.issue23453@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy title: Clarify bytes vs text with non-seeking tarfile stream -> [doc] Clarify bytes vs text with non-seeking tarfile stream versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 06:03:39 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 11:03:39 +0000 Subject: [issue25743] [doc] Clarify exactly what \w matches in UNICODE mode In-Reply-To: <1448639458.78.0.12264064003.issue25743@psf.upfronthosting.co.za> Message-ID: <1638356619.51.0.147438119232.issue25743@roundup.psfhosted.org> Irit Katriel added the comment: It's too late for the 2.7 docs, but the current docs can still be updated. ---------- keywords: +easy nosy: +iritkatriel title: Clarify exactly what \w matches in UNICODE mode -> [doc] Clarify exactly what \w matches in UNICODE mode versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 06:19:52 2021 From: report at bugs.python.org (Min RK) Date: Wed, 01 Dec 2021 11:19:52 +0000 Subject: [issue39529] Deprecate get_event_loop() In-Reply-To: <1580641897.21.0.210075972969.issue39529@roundup.psfhosted.org> Message-ID: <1638357592.86.0.0591602722394.issue39529@roundup.psfhosted.org> Min RK added the comment: Thank you! I think I have enough information to update. > IMHO, asyncio.set_event_loop()...[is] not deprecated by oversight. I'm curious, what is an appropriate use of `asyncio.set_event_loop()` if you can never get the event loop with `get_event_loop()`? If you always have to pass the handle around anyway, I'm not sure what the use case for a write-only global would be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 06:45:51 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 01 Dec 2021 11:45:51 +0000 Subject: [issue45941] help("modules") segfaults on 3.11, MacOS In-Reply-To: <1638312355.41.0.606974934326.issue45941@roundup.psfhosted.org> Message-ID: <1638359151.06.0.513016785551.issue45941@roundup.psfhosted.org> Mark Shannon added the comment: Works for me on Ubuntu. Python 3.11.0a2+ (heads/main:0aa0bd0563, Dec 1 2021, 11:39:40) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> help("modules") [lots of output, but no assertion failure or segfault] >>> I note that your debug output includes `_cffi_backend.FFI object` Is this a cffi bug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 06:47:36 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 01 Dec 2021 11:47:36 +0000 Subject: [issue45941] help("modules") segfaults on 3.11, MacOS In-Reply-To: <1638312355.41.0.606974934326.issue45941@roundup.psfhosted.org> Message-ID: <1638359256.95.0.767692768204.issue45941@roundup.psfhosted.org> Mark Shannon added the comment: When I say "cffi bug", I should say "is cffi not ported to 3.11 yet?" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 06:53:13 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 01 Dec 2021 11:53:13 +0000 Subject: [issue45944] Avoid calling isatty() for most open() calls In-Reply-To: <1638335559.46.0.0192700736969.issue45944@roundup.psfhosted.org> Message-ID: <1638359593.4.0.00903354875923.issue45944@roundup.psfhosted.org> Eryk Sun added the comment: > make it returning False without invoking a system call if the file > size is non-zero it will eliminate the need to expose _size. I suggest using the file type instead of the size. There's no reason to call isatty() if it's not an S_IFCHR file. This will avoid calling isatty() on regular files that happen to be empty. In Windows, isatty(fd) is based solely on the file type, which is flagged in the fd record when a file descriptor is opened for a native file handle. It's not a system call, but it's also nearly worthless for how isatty() is typically used, since it's true for any S_IFCHR file (e.g. con, nul, com1). ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 07:09:41 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 01 Dec 2021 12:09:41 +0000 Subject: [issue45753] Further speed up Python-to-Python calls. In-Reply-To: <1636391875.36.0.891525405866.issue45753@roundup.psfhosted.org> Message-ID: <1638360581.06.0.297885004886.issue45753@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 49444fb807ecb396462c8e5f547eeb5c6bc5d4de by Mark Shannon in branch 'main': bpo-45753: Interpreter internal tweaks (GH-29575) https://github.com/python/cpython/commit/49444fb807ecb396462c8e5f547eeb5c6bc5d4de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 07:12:41 2021 From: report at bugs.python.org (Malcolm Smith) Date: Wed, 01 Dec 2021 12:12:41 +0000 Subject: [issue31196] Blank line inconsistency between InteractiveConsole and standard interpreter In-Reply-To: <1502658757.92.0.0359191508861.issue31196@psf.upfronthosting.co.za> Message-ID: <1638360761.77.0.15113673318.issue31196@roundup.psfhosted.org> Malcolm Smith added the comment: I agree that both behaviors are reasonable. However, the InteractiveConsole documentation says it should "closely emulate the behavior of the interactive Python interpreter". Since people are familiar with the native interpreter, any difference in behavior is potentially annoying and could throw off somebody's flow. So I think the InteractiveConsole should be changed to match the native interpreter. Like the native interpreter, InteractiveConsole allows other multi-line blocks to be terminated with a blank line: >>> def foo(x): ... pass ... >>> for x in [1,2,3]: ... pass ... >>> I guess the reason why "try" is different is that a "try" block isn't a complete statement on its own. If you follow it with an "except" block, then that can indeed be terminated with a blank line. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 07:21:41 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Wed, 01 Dec 2021 12:21:41 +0000 Subject: [issue45941] help("modules") segfaults on 3.11, MacOS In-Reply-To: <1638312355.41.0.606974934326.issue45941@roundup.psfhosted.org> Message-ID: <1638361301.42.0.38332808927.issue45941@roundup.psfhosted.org> Erlend E. Aasland added the comment: Unable to reproduce on macOS 12 with latest 3.11 official build, and my most recent dev build (HEAD at b394af13f69c1a2ac0e7d32dabf6d86443606ab2). ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 07:23:40 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 01 Dec 2021 12:23:40 +0000 Subject: [issue39529] Deprecate get_event_loop() In-Reply-To: <1580641897.21.0.210075972969.issue39529@roundup.psfhosted.org> Message-ID: <1638361420.23.0.122795208504.issue39529@roundup.psfhosted.org> Andrew Svetlov added the comment: Ages ago, get_event_loop() did not return the current running loop if called from async function context; it returned a loop instance registered with previous set_event_loop(...) call instead. Later we fixed get_event_loop() behavior in 3.5.4 IIRC and added get_running_loop() in 3.7 set_event_loop() doesn't make sense now from my perspective. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 07:24:54 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 01 Dec 2021 12:24:54 +0000 Subject: [issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows In-Reply-To: <1637792122.45.0.429203503373.issue45896@roundup.psfhosted.org> Message-ID: <1638361494.77.0.59433475004.issue45896@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset f27bef30438d2f07f19de91e021f34b77ccc4b20 by Rob in branch 'main': bpo-45896: Fix docs default asyncio event loop on Windows (GH-29857) https://github.com/python/cpython/commit/f27bef30438d2f07f19de91e021f34b77ccc4b20 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 07:25:16 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 01 Dec 2021 12:25:16 +0000 Subject: [issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows In-Reply-To: <1637792122.45.0.429203503373.issue45896@roundup.psfhosted.org> Message-ID: <1638361516.72.0.0735123676919.issue45896@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +28102 pull_request: https://github.com/python/cpython/pull/29877 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 07:25:21 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 01 Dec 2021 12:25:21 +0000 Subject: [issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows In-Reply-To: <1637792122.45.0.429203503373.issue45896@roundup.psfhosted.org> Message-ID: <1638361521.13.0.067373578832.issue45896@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28103 pull_request: https://github.com/python/cpython/pull/29878 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 07:27:07 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Wed, 01 Dec 2021 12:27:07 +0000 Subject: [issue45941] help("modules") segfaults on 3.11, MacOS In-Reply-To: <1638312355.41.0.606974934326.issue45941@roundup.psfhosted.org> Message-ID: <1638361627.55.0.26534360786.issue45941@roundup.psfhosted.org> Erlend E. Aasland added the comment: Also unable to reproduce with HEAD at 49444fb807ecb396462c8e5f547eeb5c6bc5d4de. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 07:29:31 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 12:29:31 +0000 Subject: [issue45941] help("modules") segfaults on 3.11, MacOS In-Reply-To: <1638312355.41.0.606974934326.issue45941@roundup.psfhosted.org> Message-ID: <1638361771.94.0.356119888829.issue45941@roundup.psfhosted.org> Irit Katriel added the comment: I'm using MacOS 11.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 07:31:08 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Wed, 01 Dec 2021 12:31:08 +0000 Subject: [issue45941] help("modules") segfaults on 3.11, MacOS In-Reply-To: <1638312355.41.0.606974934326.issue45941@roundup.psfhosted.org> Message-ID: <1638361868.84.0.951027088383.issue45941@roundup.psfhosted.org> Erlend E. Aasland added the comment: Also unable to reproduce with HEAD at 8a45ca542a65ea27e7acaa44a4c833a27830e796. Perhaps it is related to your build/dev environment? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 07:40:43 2021 From: report at bugs.python.org (Min RK) Date: Wed, 01 Dec 2021 12:40:43 +0000 Subject: [issue39529] Deprecate get_event_loop() In-Reply-To: <1580641897.21.0.210075972969.issue39529@roundup.psfhosted.org> Message-ID: <1638362443.85.0.484515595567.issue39529@roundup.psfhosted.org> Min RK added the comment: Oops, I interpreted "not deprecated by oversight" as the opposite of what you meant. Sorry! All clear, now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 07:54:05 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 12:54:05 +0000 Subject: [issue31196] Blank line inconsistency between InteractiveConsole and standard interpreter In-Reply-To: <1502658757.92.0.0359191508861.issue31196@psf.upfronthosting.co.za> Message-ID: <1638363245.06.0.479999154734.issue31196@roundup.psfhosted.org> Irit Katriel added the comment: > any difference in behavior is potentially annoying and could throw off somebody's flow. So I think the InteractiveConsole should be changed to match the native interpreter. That would make InteractiveConsole more restrictive and break code that is currently working. It could also be annoying and throw off somebody's flow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 08:23:31 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Wed, 01 Dec 2021 13:23:31 +0000 Subject: [issue45941] help("modules") segfaults on 3.11, MacOS In-Reply-To: <1638312355.41.0.606974934326.issue45941@roundup.psfhosted.org> Message-ID: <1638365011.42.0.0172862944668.issue45941@roundup.psfhosted.org> Erlend E. Aasland added the comment: I'm unable to reproduce on macOS 11.6 as well (head at 49444fb807ecb396462c8e5f547eeb5c6bc5d4de). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 08:29:04 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Dec 2021 13:29:04 +0000 Subject: [issue45476] [C API] PEP 674: Disallow using macros as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638365344.01.0.195005660718.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: I updated my ./search_pypi_top_5000.py script to ignore files generated by Cython. On PyPI top 5000, I only found 16 projects impacted by the PEP 674 (16/5000 = 0.3%): * datatable-1.0.0 * frozendict-2.1.1 * guppy3-3.1.2 * M2Crypto-0.38.0 * mecab-python3-1.0.4 * mypy-0.910 * Naked-0.1.31 * pickle5-0.0.12 * pycurl-7.44.1 * PyGObject-3.42.0 * pysha3-1.0.2 * python-snappy-0.6.0 * recordclass-0.16.3 * scipy-1.7.3 * zodbpickle-2.2.0 * zstd-1.5.0.2 I ignored manually two false positives in 3 projects: * "#define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)" in Cython * "* Py_TYPE(obj) = new_type must be replaced with Py_SET_TYPE(obj, new_type)": comment in psycopg2 and psycopg2-binary ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 08:30:49 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 01 Dec 2021 13:30:49 +0000 Subject: [issue45947] Place dict (and values) pointers at a fixed (negative) offset from the base of the object. Message-ID: <1638365448.99.0.213832334161.issue45947@roundup.psfhosted.org> New submission from Mark Shannon : To get to the dict (or values array) of an object, we currently need 3 dependent loads. By placing the dict at a fixed offset, this can be reduced to one. What was `obj[obj->type->dictoffset]` becomes `obj[FIXED_OFFSET]` See https://github.com/faster-cpython/ideas/issues/80, specifically https://github.com/faster-cpython/ideas/issues/80#issuecomment-931504847 for more details. ---------- assignee: Mark.Shannon components: Interpreter Core messages: 407457 nosy: Mark.Shannon priority: normal severity: normal status: open title: Place dict (and values) pointers at a fixed (negative) offset from the base of the object. type: performance versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 09:04:55 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 01 Dec 2021 14:04:55 +0000 Subject: [issue45947] Place dict (and values) pointers at a fixed (negative) offset from the base of the object. In-Reply-To: <1638365448.99.0.213832334161.issue45947@roundup.psfhosted.org> Message-ID: <1638367495.95.0.769724225584.issue45947@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +28104 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29879 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 09:07:53 2021 From: report at bugs.python.org (Robert Steed) Date: Wed, 01 Dec 2021 14:07:53 +0000 Subject: [issue45948] Unexpected instantiation behavior for xml.etree.ElementTree.XMLParser(target=None) Message-ID: <1638367672.95.0.357017255599.issue45948@roundup.psfhosted.org> New submission from Robert Steed : Expected instantiation of xml.etree.ElementTree.XMLParser(target=None) to create a parser using default TreeBuilder ---------- components: XML files: XMLParserFail.py messages: 407458 nosy: rdsteed priority: normal severity: normal status: open title: Unexpected instantiation behavior for xml.etree.ElementTree.XMLParser(target=None) type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file50465/XMLParserFail.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 09:30:55 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 01 Dec 2021 14:30:55 +0000 Subject: [issue45946] RecursionError when annotating a field with the same name as a field In-Reply-To: <1638353959.47.0.043888744355.issue45946@roundup.psfhosted.org> Message-ID: <1638369055.72.0.570238379994.issue45946@roundup.psfhosted.org> Change by Eric V. Smith : ---------- assignee: -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 10:33:08 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 15:33:08 +0000 Subject: [issue45607] Make it possible to enrich an exception's error message In-Reply-To: <1635194281.32.0.0583100270803.issue45607@roundup.psfhosted.org> Message-ID: <1638372788.11.0.979426330918.issue45607@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch pull_requests: +28105 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29880 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 10:34:28 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 01 Dec 2021 15:34:28 +0000 Subject: [issue45949] Provide pure-Python implementation of Programs/_freeze_module for cross building Message-ID: <1638372868.47.0.982140813893.issue45949@roundup.psfhosted.org> New submission from Christian Heimes : As of today 3.11-dev requires Programs/_freeze_module to compile Python code to byte code. The dependency on an extra and special tool makes cross building more complicated. The _freeze_module is trivial and can be easily implemented in pure Python code. The re-introduction of _bootstrap_python helper would allow us to use a pure Python freeze_module for all modules except two importlib bootstrap modules. I have a proof of concept implementation that works for me. Proposal for standard builds: - Use Programs/_freeze_module to create Python/frozen_modules/importlib._bootstrap.h and Python/frozen_modules/importlib._bootstrap_external.h - build _bootstrap_python - use new tool "./_bootstrap_python Tools/scripts/freezemodule.py" to create remaining Python/frozen_modules/*.h Proposal for cross builds: - use user-provider Python interpreter (./configure --with-build-python) to generate all Python/frozen_modules/*.h with new freezemodule.py tool. When cross building the user must already provide a Python interpreter with same version and bytecode version as the build target. Users would no longer need to provide a _freeze_module binary with ./configure --with-freeze-module. ---------- assignee: christian.heimes components: Build, Cross-Build messages: 407459 nosy: Alex.Willmer, christian.heimes, gvanrossum priority: normal severity: normal status: open title: Provide pure-Python implementation of Programs/_freeze_module for cross building type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 10:40:58 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 01 Dec 2021 15:40:58 +0000 Subject: [issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows In-Reply-To: <1637792122.45.0.429203503373.issue45896@roundup.psfhosted.org> Message-ID: <1638373258.52.0.949191373174.issue45896@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 4203a5d1918ca874e305806b787e3c8c6fc35e3e by Miss Islington (bot) in branch '3.9': bpo-45896: Fix docs default asyncio event loop on Windows (GH-29857) (GH-29878) https://github.com/python/cpython/commit/4203a5d1918ca874e305806b787e3c8c6fc35e3e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 10:43:26 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 01 Dec 2021 15:43:26 +0000 Subject: [issue45933] Illegal Instrution (Core Dumped) In-Reply-To: <1638224710.52.0.0477949346292.issue45933@roundup.psfhosted.org> Message-ID: <1638373406.9.0.855801300487.issue45933@roundup.psfhosted.org> Ronald Oussoren added the comment: Is arch corei7-avx compatible with your CPU? One way to test is to leave out -mtune=... and -march=... when building python. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 10:44:18 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 01 Dec 2021 15:44:18 +0000 Subject: [issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows In-Reply-To: <1637792122.45.0.429203503373.issue45896@roundup.psfhosted.org> Message-ID: <1638373458.02.0.850429983347.issue45896@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset e99c5e039b380199843db4e06974883d9f3ddad0 by Miss Islington (bot) in branch '3.10': bpo-45896: Fix docs default asyncio event loop on Windows (GH-29857) (GH-29877) https://github.com/python/cpython/commit/e99c5e039b380199843db4e06974883d9f3ddad0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 10:44:36 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 01 Dec 2021 15:44:36 +0000 Subject: [issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows In-Reply-To: <1637792122.45.0.429203503373.issue45896@roundup.psfhosted.org> Message-ID: <1638373476.74.0.357905697819.issue45896@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 10:54:33 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Dec 2021 15:54:33 +0000 Subject: [issue45476] [C API] PEP 674: Disallow using macros as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638374073.71.0.474335416805.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: Oops, sorry, pycurl-7.44.1 and PyGObject-3.42.0 are not affected, they only define Py_SET_TYPE() macro for backward compatibility. So right now, only 14 projects are affected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 11:06:24 2021 From: report at bugs.python.org (Malcolm Smith) Date: Wed, 01 Dec 2021 16:06:24 +0000 Subject: [issue31196] Blank line inconsistency between InteractiveConsole and standard interpreter In-Reply-To: <1502658757.92.0.0359191508861.issue31196@psf.upfronthosting.co.za> Message-ID: <1638374783.99.0.410344175186.issue31196@roundup.psfhosted.org> Malcolm Smith added the comment: I think it's unlikely that anyone is depending on the ability to enter blank lines in a "try" block in an InteractiveConsole, especially when blank lines terminate the input in almost every other context. Conversely, everyone who's ever entered a multi-line statement into a Python console knows that blank lines usually terminate the input. And they may have gotten into the habit, as I did, of using a blank line to abandon an incomplete input, and they'll be surprised if it doesn't work in this context. On further experimentation, this also affects "def" statements, but only when the blank line is at the start of the block, causing the statement to be syntactically incomplete. Native interpreter: >>> def f(): ... File "", line 2 ^ IndentationError: expected an indented block after function definition on line 1 InteractiveConsole: >>> def f(): ... ... ... pass ... >>> So I think the current behavior is likely to annoy a much larger number of people, but whoever's responsible for this part of the standard library will have to judge that for themselves. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 11:07:25 2021 From: report at bugs.python.org (Malcolm Smith) Date: Wed, 01 Dec 2021 16:07:25 +0000 Subject: [issue31196] Blank line inconsistency between InteractiveConsole and standard interpreter In-Reply-To: <1502658757.92.0.0359191508861.issue31196@psf.upfronthosting.co.za> Message-ID: <1638374845.64.0.240449436791.issue31196@roundup.psfhosted.org> Change by Malcolm Smith : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 11:08:29 2021 From: report at bugs.python.org (Eric Snow) Date: Wed, 01 Dec 2021 16:08:29 +0000 Subject: [issue45949] Provide pure-Python implementation of Programs/_freeze_module for cross building In-Reply-To: <1638372868.47.0.982140813893.issue45949@roundup.psfhosted.org> Message-ID: <1638374909.04.0.727478269718.issue45949@roundup.psfhosted.org> Eric Snow added the comment: IIRC, Programs/_freeze_module.c was originally a C implementation of the basic functionality in Tools/freeze/freeze.py. ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 11:08:58 2021 From: report at bugs.python.org (Eric Snow) Date: Wed, 01 Dec 2021 16:08:58 +0000 Subject: [issue45949] Provide pure-Python implementation of Programs/_freeze_module for cross building In-Reply-To: <1638372868.47.0.982140813893.issue45949@roundup.psfhosted.org> Message-ID: <1638374938.9.0.590298347182.issue45949@roundup.psfhosted.org> Eric Snow added the comment: Ideally we would not have two scripts that do the same thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 11:26:37 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 01 Dec 2021 16:26:37 +0000 Subject: [issue45950] Reintroduce bootstrap_python for freezing Message-ID: <1638375997.48.0.12074215987.issue45950@roundup.psfhosted.org> New submission from Christian Heimes : bpo-45696 introduced a _bootstrap_python interpreter, which was used to create frozen and deepfrozen module files. bpo-45873 dropped the _bootstrap_python interpreter again. Instead Python used an existing Python installation to bootstrap the build. After some internal discussion we agreed that the approach is flawed and puts too much of a burden on users. Users have to install a fairly recent Python interpreter in order to build 3.11. This makes it harder to build Python on platforms with no or a too old Python version. It also complicated things for container builds and pyenv. Let's re-introduce a _bootstrap_python interpreter. Cross compiling will still require a build Python interpreter. ---------- components: Build messages: 407467 nosy: christian.heimes priority: normal severity: normal status: open title: Reintroduce bootstrap_python for freezing type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 11:26:54 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 01 Dec 2021 16:26:54 +0000 Subject: [issue45950] Reintroduce bootstrap_python for freezing In-Reply-To: <1638375997.48.0.12074215987.issue45950@roundup.psfhosted.org> Message-ID: <1638376014.49.0.361588158112.issue45950@roundup.psfhosted.org> Change by Christian Heimes : ---------- assignee: -> christian.heimes dependencies: +"Deep-freeze": skip the marshal step by generating C code, Stop using bootstrap_python for deep-freeze in UNIX builds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 11:29:12 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 01 Dec 2021 16:29:12 +0000 Subject: [issue45950] Reintroduce bootstrap_python for freezing In-Reply-To: <1638375997.48.0.12074215987.issue45950@roundup.psfhosted.org> Message-ID: <1638376152.2.0.0668161320616.issue45950@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +28106 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29859 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 11:29:24 2021 From: report at bugs.python.org (Julien Castiaux) Date: Wed, 01 Dec 2021 16:29:24 +0000 Subject: [issue44637] Quoting issue on header Reply-To and other address headers In-Reply-To: <1626266697.4.0.946779337742.issue44637@roundup.psfhosted.org> Message-ID: <1638376164.84.0.409751553867.issue44637@roundup.psfhosted.org> Change by Julien Castiaux : ---------- keywords: +patch pull_requests: +28107 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29881 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 11:29:28 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 16:29:28 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1638376168.09.0.305748436785.issue9226@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 11:30:55 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 01 Dec 2021 16:30:55 +0000 Subject: [issue45889] pathlib: Path.match does not work on paths In-Reply-To: <1637740471.98.0.448189048749.issue45889@roundup.psfhosted.org> Message-ID: <1638376255.23.0.758900836328.issue45889@roundup.psfhosted.org> Eric V. Smith added the comment: I agree with ?ric and Ronald. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 11:31:56 2021 From: report at bugs.python.org (mike mcleod) Date: Wed, 01 Dec 2021 16:31:56 +0000 Subject: [issue1284670] Allow to restrict ModuleFinder to get "direct" dependencies Message-ID: <1638376316.17.0.603768002022.issue1284670@roundup.psfhosted.org> mike mcleod added the comment: I have made the changes as indicated in the diff files. I have tested against the latest from my GitHub copy. The result is: ./python -m test -j0 == CPython 3.11.0a2+ (heads/main:3a91617590, Dec 1 2021, 15:11:41) [GCC 11.2.0] == Linux-5.13.0-22-generic-x86_64-with-glibc2.34 little-endian == cwd: /home/dougal/Documents/cpython/build/test_python_300237? == CPU count: 8 == encodings: locale=UTF-8, FS=utf-8 ... 0:01:34 load avg: 8.77 [221/430/1] test_modulefinder passed == Tests result: FAILURE == 409 tests OK. 1 test failed: test_embed 20 tests skipped: test_curses test_devpoll test_epoll test_ioctl test_kqueue test_msilib test_ossaudiodev test_smtpnet test_socketserver test_startfile test_tix test_tk test_ttk_guionly test_urllib2net test_urllibnet test_winconsoleio test_winreg test_winsound test_xmlrpc_net test_zipfile64 Total duration: 5 min 30 sec Tests result: FAILURE The first diff is attached. But there was a bug in the code and I will upload in next comment. ---------- Added file: https://bugs.python.org/file50466/1.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 11:33:24 2021 From: report at bugs.python.org (mike mcleod) Date: Wed, 01 Dec 2021 16:33:24 +0000 Subject: [issue1284670] Allow to restrict ModuleFinder to get "direct" dependencies Message-ID: <1638376404.93.0.598307565995.issue1284670@roundup.psfhosted.org> mike mcleod added the comment: Minor fix after test. ---------- Added file: https://bugs.python.org/file50467/2.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 11:34:12 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 01 Dec 2021 16:34:12 +0000 Subject: [issue45950] Reintroduce bootstrap_python for freezing In-Reply-To: <1638375997.48.0.12074215987.issue45950@roundup.psfhosted.org> Message-ID: <1638376452.24.0.116281097845.issue45950@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +eric.snow, gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 11:36:05 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 16:36:05 +0000 Subject: [issue11455] issue a warning when populating a CPython type dict with non-string keys In-Reply-To: <1299704028.56.0.168922481621.issue11455@psf.upfronthosting.co.za> Message-ID: <1638376565.65.0.121264010143.issue11455@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. >>> A = type("A", (object,), {42: "abc"}) >>> dir(A()) Traceback (most recent call last): File "", line 1, in TypeError: '<' not supported between instances of 'int' and 'str' ---------- nosy: +iritkatriel type: behavior -> enhancement versions: +Python 3.11 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 11:37:57 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 16:37:57 +0000 Subject: [issue31196] Blank line inconsistency between InteractiveConsole and standard interpreter In-Reply-To: <1502658757.92.0.0359191508861.issue31196@psf.upfronthosting.co.za> Message-ID: <1638376677.8.0.558463343751.issue31196@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 12:48:23 2021 From: report at bugs.python.org (Ben) Date: Wed, 01 Dec 2021 17:48:23 +0000 Subject: [issue45951] Debugger cannot be resolved Message-ID: <1638380903.59.0.519590962782.issue45951@roundup.psfhosted.org> New submission from Ben : First, I am not a programmer by any stretch of the imagination, and I am just trying to get this error solved. I attempted to highlight and comment out a section of code, maybe 20 lines, and the program froze, greyed out, and gave me a spinning wheel mouse. I closed & reopened program, attempted with one line of code and it worked, attempted again with 5 lines and same issue occurred. I have attached a screenshot of the error message and didn't seen how the associated error related. https://bugs.python.org/issue1180193 The screen was greyed out yes, but I didn't change anything or close the program. I left the night before and when I attempted it this morning it started behaving in this manner. ---------- files: Python error.png messages: 407473 nosy: boett1 priority: normal severity: normal status: open title: Debugger cannot be resolved versions: Python 3.7 Added file: https://bugs.python.org/file50468/Python error.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 12:49:22 2021 From: report at bugs.python.org (Eric Snow) Date: Wed, 01 Dec 2021 17:49:22 +0000 Subject: [issue45952] Tools/c-analyzer is out-of-date. Message-ID: <1638380962.78.0.734744265271.issue45952@roundup.psfhosted.org> New submission from Eric Snow : Some relatively recent changes broke "./python Tools/c-analyzer/c-analyzer.py ...". Also, Tools/c-analyzer/TODO is a bit out of date. ---------- assignee: eric.snow components: Demos and Tools messages: 407474 nosy: eric.snow priority: normal pull_requests: 28108 severity: normal stage: patch review status: open title: Tools/c-analyzer is out-of-date. type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 13:20:36 2021 From: report at bugs.python.org (Eric Snow) Date: Wed, 01 Dec 2021 18:20:36 +0000 Subject: [issue45952] Tools/c-analyzer is out-of-date. In-Reply-To: <1638380962.78.0.734744265271.issue45952@roundup.psfhosted.org> Message-ID: <1638382836.59.0.0638430669425.issue45952@roundup.psfhosted.org> Eric Snow added the comment: New changeset ee94aa0850191712e6adfc1f4a9df08ec3240195 by Eric Snow in branch 'main': bpo-45952: Get the C analyzer tool working again. (gh-29882) https://github.com/python/cpython/commit/ee94aa0850191712e6adfc1f4a9df08ec3240195 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 13:20:52 2021 From: report at bugs.python.org (Eric Snow) Date: Wed, 01 Dec 2021 18:20:52 +0000 Subject: [issue45952] Tools/c-analyzer is out-of-date. In-Reply-To: <1638380962.78.0.734744265271.issue45952@roundup.psfhosted.org> Message-ID: <1638382852.8.0.326349881415.issue45952@roundup.psfhosted.org> Change by Eric Snow : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 13:28:59 2021 From: report at bugs.python.org (Ben) Date: Wed, 01 Dec 2021 18:28:59 +0000 Subject: [issue45951] Debugger cannot be resolved In-Reply-To: <1638380903.59.0.519590962782.issue45951@roundup.psfhosted.org> Message-ID: <1638383339.41.0.803642600623.issue45951@roundup.psfhosted.org> Change by Ben : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 13:50:39 2021 From: report at bugs.python.org (Eric Snow) Date: Wed, 01 Dec 2021 18:50:39 +0000 Subject: [issue45953] Statically allocate interpreter states as much as possible. Message-ID: <1638384639.14.0.97360024283.issue45953@roundup.psfhosted.org> New submission from Eric Snow : Currently we allocate each new PyInterpreterState in PyInterpreterState_New(). Furthermore, PyInterpreterState is full of pointers which are almost all allocated on the heap during runtime init. We can statically allocate (and initialize?) most of what goes into PyInterpreterState, as well as the main interpreter itself (as part of _PyRuntimeState). This includes each interpreter's initial PyThreadState. TODO: * [ ] add `PyInterpreterState main;` to _PyRuntimeState.interpreters and use it * [ ] change references from the pointer to the value * [ ] add `PyThreadState _main;` to PyInterpreterState.threads and use it * [ ] change references from the pointer to the value * [ ] change PyInterpreterState pointer fields to values (as much as possible) * [ ] change PyThreadState pointer fields to values (as much as possible) benefits: * fewer possible failures (no memory) during runtime/interpreter/thread init * improved memory locality for pointers looked up relative to interpreter/thread state There is one non-trivial bit: embedding the various PyObject values in PyInterpreterState and PyThreadState means hard-coding the various pieces of the object there (e.g. for dict, its keys/values; for list, its array), as well as adding necessary init code to PyInterpreterState_New() and PyThreadState_New(). The resulting added complexity can be mitigated somewhat with macros or even code generation. (In fact, there is probably significant overlap with Guido's deepfreeze tool.) Regardless, we'll probably need to factor out init funcs for a number of object types, where currently there are only "Py*_New()" funcs that combine allocation and init. ---------- assignee: eric.snow components: Interpreter Core messages: 407476 nosy: Mark.Shannon, eric.snow priority: normal severity: normal stage: needs patch status: open title: Statically allocate interpreter states as much as possible. versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 13:52:19 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 18:52:19 +0000 Subject: [issue45941] help("modules") segfaults on 3.11, MacOS In-Reply-To: <1638312355.41.0.606974934326.issue45941@roundup.psfhosted.org> Message-ID: <1638384739.88.0.759686608935.issue45941@roundup.psfhosted.org> Irit Katriel added the comment: * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x000000010015fd26 python.exe`_PyObject_GenericGetAttrWithDict(obj=0x000000013feb7a50, name=0x0000000100fe9350, dict=0x0000000000000000, suppress=0) at object.c:1305:17 1302 PyDictValues **values_ptr = _PyObject_ValuesPointer(obj); 1303 if (values_ptr && *values_ptr) { 1304 if (PyUnicode_CheckExact(name)) { -> 1305 assert(*_PyObject_DictPointer(obj) == NULL); 1306 res = _PyObject_GetInstanceAttribute(obj, *values_ptr, name); 1307 if (res != NULL) { 1308 goto done; Target 0: (python.exe) stopped. (lldb) p obj (PyObject *) $0 = 0x000000013feb7a50 (lldb) p _PyObject_Dump((PyObject*)obj->ob_type) object address : 0x13ff25590 object refcount : 32 object type : 0x100518680 object type name: type object repr : (lldb) p (PyObject*)obj->ob_type (PyObject *) $1 = 0x000000013ff25590 (lldb) p (PyObject*)obj->ob_type->tp_dict (PyObject *) $2 = 0x000000013fedd910 (lldb) p _PyObject_Dump((PyObject*)obj->ob_type->tp_dict) object address : 0x13fedd910 object refcount : 1 object type : 0x100511d50 object type name: dict object repr : {'__new__': , '__getattribute__': , '__init__': , 'addressof': , 'alignof': , 'def_extern': , 'callback': , 'cast': , 'dlclose': , 'dlopen': , 'from_buffer': , 'from_handle': , 'gc': , 'getctype': , 'init_once': , 'integer_const': , 'list_types': , 'memmove': , 'new': , 'new_allocator': , 'new_handle': , 'offsetof': , 'release': , 'sizeof': , 'string': , 'typeof': , 'unpack': , 'errno': , '__doc__': None, 'NULL': , 'error': , 'CType': , 'CData': , 'buffer': , 'RTLD_LAZY': 1, 'RTLD_NOW': 2, 'RTLD_GLOBAL': 8, 'RTLD_LOCAL': 4, 'RTLD_NODELETE': 128, 'RTLD_NOLOAD': 16} (lldb) p (PyObject*)obj->ob_type->tp_dictoffset (PyObject *) $3 = NULL Because the tp_dictoffset is 0, _PyObject_DictPointer(obj) returns NULL and in the assertion, where the return value is dereferenced, it crashes. (Note: it's not that the assertion is failing, we don't get that far). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 13:54:08 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Dec 2021 18:54:08 +0000 Subject: [issue45954] Rename PyConfig.no_debug_ranges to PyConfig.code_debug_ranges Message-ID: <1638384848.75.0.0549104552795.issue45954@roundup.psfhosted.org> New submission from STINNER Victor : In the PyConfig, I tried to avoid double negative, so "no_debug_ranges" should be "debug_ranges". I propose to rename it to "code_debug_ranges" to make it more specific. If there is an agreement on the member name, I can write a PR. ---------- components: C API messages: 407478 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: Rename PyConfig.no_debug_ranges to PyConfig.code_debug_ranges versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 13:54:48 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 01 Dec 2021 18:54:48 +0000 Subject: [issue45941] help("modules") segfaults on 3.11, MacOS In-Reply-To: <1638312355.41.0.606974934326.issue45941@roundup.psfhosted.org> Message-ID: <1638384888.91.0.685300788503.issue45941@roundup.psfhosted.org> Christian Heimes added the comment: This looks like an issue with 3rd party software cffi. Are you using a fresh build of cffi? The internal ABI of an alpha build changes very often. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 13:58:33 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 18:58:33 +0000 Subject: [issue45941] help("modules") segfaults on 3.11, MacOS In-Reply-To: <1638312355.41.0.606974934326.issue45941@roundup.psfhosted.org> Message-ID: <1638385113.93.0.246290052637.issue45941@roundup.psfhosted.org> Irit Katriel added the comment: How do I check that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 14:01:50 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 01 Dec 2021 19:01:50 +0000 Subject: [issue45941] help("modules") segfaults on 3.11, MacOS In-Reply-To: <1638312355.41.0.606974934326.issue45941@roundup.psfhosted.org> Message-ID: <1638385310.73.0.141106104264.issue45941@roundup.psfhosted.org> Christian Heimes added the comment: The easiest way is to remove and rebuild 3rd party software. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 14:12:05 2021 From: report at bugs.python.org (Matt Martz) Date: Wed, 01 Dec 2021 19:12:05 +0000 Subject: [issue45955] Calling read() on HTTPError may cause KeyError in tempfile Message-ID: <1638385925.39.0.609829377944.issue45955@roundup.psfhosted.org> New submission from Matt Martz : HTTPError may not be fully initialized in some scenarios leading to an inconsistent interface. This is documented in code at: https://github.com/python/cpython/blob/55fe1ae9708d81b902b6fe8f6590e2a24b1bd4b0/Lib/urllib/error.py#L45-L50 Unfortunately the way this is implemented creates an inconsistent interface, and opaque code, without a number of inline comments explaining the behavior of HTTPError. Additionally, the way that it currently works, will cause a KeyError to be raised from tempfile, which is rather confusing. Instead of "partially initializing" the HTTPError object, I'd propose that when fp is None, that we provide it with something like io.BytesIO to fulfill the interface. There may be other recommended solutions, I've not thought through this extensively yet. I think I just prefer always calling self.__super_init but passing in something like io.BytesIO if fp is None I'm willing to create the PR once I know which direction seems to make the most sense. >>> from urllib.error import HTTPError >>> from urllib.request import HTTPDigestAuthHandler, HTTPPasswordMgrWithDefaultRealm, build_opener >>> passman = HTTPPasswordMgrWithDefaultRealm() >>> passman.add_password(None, 'httpbin.org', 'user', 'wrong') >>> opener = build_opener(HTTPDigestAuthHandler(passman)) >>> try: ... opener.open('https://httpbin.org/digest-auth/auth/user/passwd') ... except HTTPError as e: ... e.read() ... Traceback (most recent call last): File "", line 2, in File ".../3.10.0/lib/python3.10/urllib/request.py", line 525, in open response = meth(req, response) File ".../3.10.0/lib/python3.10/urllib/request.py", line 634, in http_response response = self.parent.error( File ".../3.10.0/lib/python3.10/urllib/request.py", line 557, in error result = self._call_chain(*args) File ".../3.10.0/lib/python3.10/urllib/request.py", line 496, in _call_chain result = func(*args) File ".../3.10.0/lib/python3.10/urllib/request.py", line 1238, in http_error_401 retry = self.http_error_auth_reqed('www-authenticate', File ".../3.10.0/lib/python3.10/urllib/request.py", line 1111, in http_error_auth_reqed raise HTTPError(req.full_url, 401, "digest auth failed", During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 4, in File ".../3.10.0/lib/python3.10/tempfile.py", line 473, in __getattr__ file = self.__dict__['file'] KeyError: 'file' ---------- components: Library (Lib) messages: 407482 nosy: sivel priority: normal severity: normal status: open title: Calling read() on HTTPError may cause KeyError in tempfile versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 14:23:50 2021 From: report at bugs.python.org (Dino Viehland) Date: Wed, 01 Dec 2021 19:23:50 +0000 Subject: [issue30533] missing feature in inspect module: getmembers_static In-Reply-To: <1496271168.24.0.639482608296.issue30533@psf.upfronthosting.co.za> Message-ID: <1638386630.6.0.966565014622.issue30533@roundup.psfhosted.org> Dino Viehland added the comment: New changeset c2bb29ce9ae4adb6a8123285ad3585907cd4cc73 by Weipeng Hong in branch 'main': bpo-30533: Add docs for `inspect.getmembers_static` (#29874) https://github.com/python/cpython/commit/c2bb29ce9ae4adb6a8123285ad3585907cd4cc73 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 14:24:09 2021 From: report at bugs.python.org (Dino Viehland) Date: Wed, 01 Dec 2021 19:24:09 +0000 Subject: [issue30533] missing feature in inspect module: getmembers_static In-Reply-To: <1496271168.24.0.639482608296.issue30533@psf.upfronthosting.co.za> Message-ID: <1638386649.94.0.781192298986.issue30533@roundup.psfhosted.org> Change by Dino Viehland : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 14:30:34 2021 From: report at bugs.python.org (Eric Snow) Date: Wed, 01 Dec 2021 19:30:34 +0000 Subject: [issue45953] Statically allocate interpreter states as much as possible. In-Reply-To: <1638384639.14.0.97360024283.issue45953@roundup.psfhosted.org> Message-ID: <1638387034.29.0.126748855957.issue45953@roundup.psfhosted.org> Change by Eric Snow : ---------- keywords: +patch pull_requests: +28109 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29883 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 14:43:34 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 01 Dec 2021 19:43:34 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1638387814.16.0.116201067452.issue40280@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 9deb83468c56c7484645e6e3a6d0183cd6a0afd7 by Christian Heimes in branch 'main': bpo-40280: Emscripten defaults to --with-ensurepip=no (GH-29873) https://github.com/python/cpython/commit/9deb83468c56c7484645e6e3a6d0183cd6a0afd7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 15:04:03 2021 From: report at bugs.python.org (Vishal Pandey) Date: Wed, 01 Dec 2021 20:04:03 +0000 Subject: [issue45924] Incorrect traceback when future's exception is raised multiple times In-Reply-To: <1638186926.45.0.137493772787.issue45924@roundup.psfhosted.org> Message-ID: <1638389043.85.0.0411374282621.issue45924@roundup.psfhosted.org> Vishal Pandey added the comment: hey Irit, Is this issue platform-dependent? I am on ubuntu 20.04, and running python 3.10. I am not getting the same error that you have mentioned below. This is what I am getting. ################################### hello ... Traceback (most recent call last): File "error.py", line 17, in main print(await fut) TypeError: 42 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "error.py", line 21, in asyncio.run(main()) File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "error.py", line 19, in main traceback.print_exception(e) TypeError: print_exception() missing 2 required positional arguments: 'value' and 'tb' ########################################################### and if I replace traceback.print_exception method with the print method, It runs perfectly fine, printing hello ... 42 42 42 Can you please help me with this issue? ---------- nosy: +vishalpandeyvip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 15:12:11 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 20:12:11 +0000 Subject: [issue45924] Incorrect traceback when future's exception is raised multiple times In-Reply-To: <1638186926.45.0.137493772787.issue45924@roundup.psfhosted.org> Message-ID: <1638389531.11.0.67766199876.issue45924@roundup.psfhosted.org> Irit Katriel added the comment: Vishal, your output shows you?re running 3.8, not 3.10. traceback.print_exception() used to require 3 parameters, now it can make do with just one. See the docs for the details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 15:21:03 2021 From: report at bugs.python.org (Vishal Pandey) Date: Wed, 01 Dec 2021 20:21:03 +0000 Subject: [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1638390063.24.0.343350624746.issue11352@roundup.psfhosted.org> Vishal Pandey added the comment: i am working on it. will submit a PR soon. ---------- nosy: +vishalpandeyvip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 15:26:07 2021 From: report at bugs.python.org (Vishal Pandey) Date: Wed, 01 Dec 2021 20:26:07 +0000 Subject: [issue45924] Incorrect traceback when future's exception is raised multiple times In-Reply-To: <1638186926.45.0.137493772787.issue45924@roundup.psfhosted.org> Message-ID: <1638390367.87.0.288913363839.issue45924@roundup.psfhosted.org> Vishal Pandey added the comment: thanks, It was my mistake, bug reproduced. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 15:29:35 2021 From: report at bugs.python.org (James Ferguson) Date: Wed, 01 Dec 2021 20:29:35 +0000 Subject: [issue42130] AsyncIO's wait_for can hide cancellation in a rare race condition In-Reply-To: <1603469429.01.0.760360212477.issue42130@roundup.psfhosted.org> Message-ID: <1638390575.86.0.82428037272.issue42130@roundup.psfhosted.org> James Ferguson added the comment: Echoing nmatravolgyi's comments - I got here after hitting this bug and I too am amazed it's been around so long and hasn't been addressed. It makes cancellation in my application very unreliable, and the reason I need well-controlled cancellation semantics is to allow emergency stop of physical movement. ---------- nosy: +jamesf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 15:48:09 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 01 Dec 2021 20:48:09 +0000 Subject: [issue45953] Statically allocate interpreter states as much as possible. In-Reply-To: <1638384639.14.0.97360024283.issue45953@roundup.psfhosted.org> Message-ID: <1638391689.16.0.704125564883.issue45953@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 16:02:12 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 01 Dec 2021 21:02:12 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1638392532.8.0.232382096351.issue40280@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28110 pull_request: https://github.com/python/cpython/pull/29884 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 16:21:28 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 01 Dec 2021 21:21:28 +0000 Subject: [issue45954] Rename PyConfig.no_debug_ranges to PyConfig.code_debug_ranges In-Reply-To: <1638384848.75.0.0549104552795.issue45954@roundup.psfhosted.org> Message-ID: <1638393688.95.0.335182597358.issue45954@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Makes sense! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 16:37:32 2021 From: report at bugs.python.org (Maxwell Bernstein) Date: Wed, 01 Dec 2021 21:37:32 +0000 Subject: [issue45956] Add scanf regular expressions to re Message-ID: <1638394652.04.0.59126527646.issue45956@roundup.psfhosted.org> New submission from Maxwell Bernstein : The documentation for the `re` module suggests several regular expressions for use in simulating `scanf()`. Provide these directly in the `re` module. ---------- components: Library (Lib) messages: 407491 nosy: tekknolagi priority: normal severity: normal status: open title: Add scanf regular expressions to re versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 16:38:29 2021 From: report at bugs.python.org (Nick Papior) Date: Wed, 01 Dec 2021 21:38:29 +0000 Subject: [issue45889] pathlib: Path.match does not work on paths In-Reply-To: <1637740471.98.0.448189048749.issue45889@roundup.psfhosted.org> Message-ID: <1638394709.92.0.622009513168.issue45889@roundup.psfhosted.org> Nick Papior added the comment: Ok, I can accept a no-fix ;) I'll close this. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 16:39:16 2021 From: report at bugs.python.org (Maxwell Bernstein) Date: Wed, 01 Dec 2021 21:39:16 +0000 Subject: [issue45956] Add scanf regular expressions to re In-Reply-To: <1638394652.04.0.59126527646.issue45956@roundup.psfhosted.org> Message-ID: <1638394756.64.0.16299851427.issue45956@roundup.psfhosted.org> Change by Maxwell Bernstein : ---------- keywords: +patch pull_requests: +28111 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29885 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 16:47:44 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Dec 2021 21:47:44 +0000 Subject: [issue45954] Rename PyConfig.no_debug_ranges to PyConfig.code_debug_ranges In-Reply-To: <1638384848.75.0.0549104552795.issue45954@roundup.psfhosted.org> Message-ID: <1638395264.37.0.978508784212.issue45954@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +28112 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29886 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 16:51:07 2021 From: report at bugs.python.org (Stephen Rosen) Date: Wed, 01 Dec 2021 21:51:07 +0000 Subject: [issue45356] Calling `help` executes @classmethod @property decorated methods In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org> Message-ID: <1638395467.52.0.462072065428.issue45356@roundup.psfhosted.org> Stephen Rosen added the comment: Probably >90% of the use-cases for chaining classmethod are a read-only class property. It's important enough that some tools (e.g. sphinx) even have special-cased support for classmethod(property(...)). Perhaps the general case of classmethod(descriptor(...)) should be treated separately from the common case? > I propose deprecating classmethod chaining. It has become clear that it doesn't really do what people wanted and can't easily be made to work. If classmethod(property(f)) is going to be removed, can an implementation of classproperty be considered as a replacement? Or perhaps support via the other ordering, property(classmethod(f))? ---------- nosy: +sirosen2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 16:54:38 2021 From: report at bugs.python.org (Ali Amin-Nejad) Date: Wed, 01 Dec 2021 21:54:38 +0000 Subject: [issue45957] _tkinter.TclError: expected boolean value but got "" Message-ID: <1638395678.26.0.142189706167.issue45957@roundup.psfhosted.org> New submission from Ali Amin-Nejad : On macOS, the following minimal example: ``` import tkinter as tk root = tk.Tk() button = tk.Button(root, text="Exit", command=root.destroy) button.pack() root.wm_overrideredirect(True) root.mainloop() ``` yields the following stack trace: ``` Traceback (most recent call last): File "blah.py", line 6, in root.wm_overrideredirect(True) File "/Users/ali/miniconda3/envs/bitfount/lib/python3.8/tkinter/__init__.py", line 2176, in wm_overrideredirect return self._getboolean(self.tk.call( File "/Users/ali/miniconda3/envs/bitfount/lib/python3.8/tkinter/__init__.py", line 1448, in _getboolean return self.tk.getboolean(string) _tkinter.TclError: expected boolean value but got "" ``` ---------- components: Tkinter, macOS messages: 407494 nosy: amin-nejad, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: _tkinter.TclError: expected boolean value but got "" type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 16:57:56 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 21:57:56 +0000 Subject: [issue45941] help("modules") segfaults on 3.11, MacOS In-Reply-To: <1638312355.41.0.606974934326.issue45941@roundup.psfhosted.org> Message-ID: <1638395876.53.0.8552518291.issue45941@roundup.psfhosted.org> Irit Katriel added the comment: Christian - that's what it was. I uninstalled cffi and now it works. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 17:03:06 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 22:03:06 +0000 Subject: [issue40748] Tutorial 4.7 More on Defining Functions missing screen prompts In-Reply-To: <1590272831.41.0.177431778032.issue40748@roundup.psfhosted.org> Message-ID: <1638396186.89.0.218928837563.issue40748@roundup.psfhosted.org> Change by Irit Katriel : ---------- type: -> behavior versions: +Python 3.11 -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 17:12:03 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Dec 2021 22:12:03 +0000 Subject: [issue45956] Add scanf regular expressions to re In-Reply-To: <1638394652.04.0.59126527646.issue45956@roundup.psfhosted.org> Message-ID: <1638396723.67.0.474852001354.issue45956@roundup.psfhosted.org> Raymond Hettinger added the comment: The scanf() translation table primarily serves as a way to learn regex syntax for people who only know scanf syntax. It would defeat the educational purpose to immortalize the translation as fixed constants. For the most part, people are better off writing their own customizations, for example not using [+-] unless a sign is known to be present. Also, the table in the docs provides a translation between scanf tokens and regex patterns, but it does not assign names to each pattern. The PR adds names but makes confusing choices. For example, \S+ in regex notation means "longest sequence contiguous sequence of non-space characters". In the PR, '\S+' is aliased with "whitespace" which is the opposite of its usual meaning. Another problem with the new names is that they take C scanf specific definitions and put them in a Python context where we use the words differently. For example, "octal" in scanf means "[-+]?[0-7]+" but in Python oct(333) would give '0o515' which includes an 'o' and does not include a '+'. Overall, I think it would be a mistake to put C world specific aliases into Python world. Instead, it would be better to just leave the table for education purposes as it is now. ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 17:13:20 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 22:13:20 +0000 Subject: [issue28375] cgi.py spam in Apache server logs In-Reply-To: <1475755223.43.0.818852294498.issue28375@psf.upfronthosting.co.za> Message-ID: <1638396800.59.0.206401712108.issue28375@roundup.psfhosted.org> Irit Katriel added the comment: Thanks Sebastian, I'll close this and if someone still sees this problem they will report it. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 17:16:35 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 01 Dec 2021 22:16:35 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1638396995.45.0.37077289804.issue40280@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 309110f37cdfc78d160ed08ae8faa6f6160ba87e by Christian Heimes in branch 'main': bpo-40280: Emscripten with_ensurepip=no, second attempt (GH-29884) https://github.com/python/cpython/commit/309110f37cdfc78d160ed08ae8faa6f6160ba87e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 17:19:48 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Dec 2021 22:19:48 +0000 Subject: [issue45356] Calling `help` executes @classmethod @property decorated methods In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org> Message-ID: <1638397188.01.0.774027695269.issue45356@roundup.psfhosted.org> Raymond Hettinger added the comment: In Python 3.10, classmethod() added a __wrapped__ attribute. Presumably, any use case for implicit chaining can now be accomplished in an explicit and controlled manner. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 17:24:53 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 22:24:53 +0000 Subject: [issue25933] Unhandled exception (TypeError) with ftplib in function retrbinary/retrlines causes inoperable behavior without crashing In-Reply-To: <1450899526.91.0.95420964187.issue25933@psf.upfronthosting.co.za> Message-ID: <1638397493.27.0.900133571802.issue25933@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: -needs review, patch type: behavior -> enhancement versions: +Python 3.11 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 17:33:41 2021 From: report at bugs.python.org (Tom E) Date: Wed, 01 Dec 2021 22:33:41 +0000 Subject: [issue45933] Illegal Instrution (Core Dumped) In-Reply-To: <1638224710.52.0.0477949346292.issue45933@roundup.psfhosted.org> Message-ID: <1638398021.2.0.421713147461.issue45933@roundup.psfhosted.org> Tom E added the comment: its defos fine because ive tried it without the CFLAGS and same error ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 17:35:42 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 22:35:42 +0000 Subject: [issue35201] Recursive '**' matches non-existent directories. In-Reply-To: <1541782491.74.0.788709270274.issue35201@psf.upfronthosting.co.za> Message-ID: <1638398142.7.0.448449658915.issue35201@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: not a bug -> versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 17:46:38 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 22:46:38 +0000 Subject: [issue25952] code_context not available in exec() In-Reply-To: <1451060087.44.0.968939849155.issue25952@psf.upfronthosting.co.za> Message-ID: <1638398798.93.0.429774770625.issue25952@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 17:54:27 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 22:54:27 +0000 Subject: [issue35535] time.strptime() unexpectedly gives the same result for %U and %W for 2018 In-Reply-To: <1545224060.23.0.788709270274.issue35535@psf.upfronthosting.co.za> Message-ID: <1638399267.44.0.255879292049.issue35535@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 18:03:53 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 23:03:53 +0000 Subject: [issue25403] urllib.parse.urljoin is broken in python 3.5 In-Reply-To: <1444823340.35.0.0533245258476.issue25403@psf.upfronthosting.co.za> Message-ID: <1638399833.86.0.582032429371.issue25403@roundup.psfhosted.org> Irit Katriel added the comment: See also 37235, 40594. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 18:04:01 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 23:04:01 +0000 Subject: [issue40594] urljoin since 3.5 incorrectly filters out double slashes In-Reply-To: <1589198030.38.0.614579410038.issue40594@roundup.psfhosted.org> Message-ID: <1638399841.31.0.0592123604679.issue40594@roundup.psfhosted.org> Irit Katriel added the comment: See also 25403, 37235. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 18:04:05 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 23:04:05 +0000 Subject: [issue37235] urljoin behavior unclear/not following RFC 3986 In-Reply-To: <1560267918.98.0.870769323469.issue37235@roundup.psfhosted.org> Message-ID: <1638399845.78.0.474706329286.issue37235@roundup.psfhosted.org> Irit Katriel added the comment: See also 25403, 40594. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 18:28:52 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 23:28:52 +0000 Subject: [issue25238] Version added of context parameter for xmlrpc.client.ServerProxy incorrect In-Reply-To: <1443268662.53.0.0661786105223.issue25238@psf.upfronthosting.co.za> Message-ID: <1638401332.47.0.0348386685799.issue25238@roundup.psfhosted.org> Irit Katriel added the comment: Both 3.4 and 3.5 are out of maintenance now, so this is no longer relevant. ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 18:38:41 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 23:38:41 +0000 Subject: [issue12706] timeout sentinel in ftplib and poplib documentation In-Reply-To: <1312705981.24.0.601234287082.issue12706@psf.upfronthosting.co.za> Message-ID: <1638401921.11.0.518706960778.issue12706@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 18:48:08 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 23:48:08 +0000 Subject: [issue23183] timeit CLI best of 3: undocumented output format In-Reply-To: <1420620799.47.0.00516438922368.issue23183@psf.upfronthosting.co.za> Message-ID: <1638402488.47.0.067694779064.issue23183@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 18:48:38 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 23:48:38 +0000 Subject: [issue23183] timeit CLI best of 3: undocumented output format In-Reply-To: <1420620799.47.0.00516438922368.issue23183@psf.upfronthosting.co.za> Message-ID: <1638402518.4.0.892135715604.issue23183@roundup.psfhosted.org> Irit Katriel added the comment: The patch needs to be converted to a GitHub PR. ---------- keywords: +easy -patch nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 18:50:48 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 23:50:48 +0000 Subject: [issue38760] Document for urllib.error.HTTPError.headers Should Specify What Version In-Reply-To: <1573341509.41.0.260213311106.issue38760@roundup.psfhosted.org> Message-ID: <1638402648.27.0.0377336098863.issue38760@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 18:54:31 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 23:54:31 +0000 Subject: [issue10048] urllib.request documentation confusing In-Reply-To: <1286535990.46.0.129844190964.issue10048@psf.upfronthosting.co.za> Message-ID: <1638402871.53.0.095303869171.issue10048@roundup.psfhosted.org> Irit Katriel added the comment: FancyURLopener, URLopener etc are deprecated since 3.3. Should we close this issue or repurpose it for removal? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 18:56:00 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 23:56:00 +0000 Subject: [issue10048] urllib.request documentation confusing In-Reply-To: <1286535990.46.0.129844190964.issue10048@psf.upfronthosting.co.za> Message-ID: <1638402960.0.0.255910431543.issue10048@roundup.psfhosted.org> Irit Katriel added the comment: Ah we already have issue40673 for removal. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 18:56:25 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 01 Dec 2021 23:56:25 +0000 Subject: [issue10048] urllib.request documentation confusing In-Reply-To: <1286535990.46.0.129844190964.issue10048@psf.upfronthosting.co.za> Message-ID: <1638402985.46.0.156962143286.issue10048@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 21:08:40 2021 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 02 Dec 2021 02:08:40 +0000 Subject: [issue45956] Add scanf regular expressions to re In-Reply-To: <1638394652.04.0.59126527646.issue45956@roundup.psfhosted.org> Message-ID: <1638410920.17.0.454721132076.issue45956@roundup.psfhosted.org> Eric V. Smith added the comment: Maxwell: thank you for your contribution. I agree that these don?t belong in the re module. I think a personal library or something on PyPI (logically equivalent to more-itertools) would be more appropriate. I suggest closing this as rejected. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 21:45:07 2021 From: report at bugs.python.org (Hian-Kun Tenn) Date: Thu, 02 Dec 2021 02:45:07 +0000 Subject: [issue45958] Document typo in unpack_from() Message-ID: <1638413107.8.0.703943462848.issue45958@roundup.psfhosted.org> New submission from Hian-Kun Tenn : In the document of "struct" (https://docs.python.org/3.9/library/struct.html#struct.unpack_from), there's typo in it. The document read `struct.unpack_from(format, /, buffer, offset=0)` and I believe it should be `struct.unpack_from(format, buffer, offset=0)`. Documents before Python 3.9 has no this typo. ---------- assignee: docs at python components: Documentation messages: 407510 nosy: docs at python, hiankun priority: normal severity: normal status: open title: Document typo in unpack_from() type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 22:33:55 2021 From: report at bugs.python.org (Maxwell Bernstein) Date: Thu, 02 Dec 2021 03:33:55 +0000 Subject: [issue45956] Add scanf regular expressions to re In-Reply-To: <1638394652.04.0.59126527646.issue45956@roundup.psfhosted.org> Message-ID: <1638416035.9.0.537188987286.issue45956@roundup.psfhosted.org> Change by Maxwell Bernstein : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 1 23:22:57 2021 From: report at bugs.python.org (Zachary Ware) Date: Thu, 02 Dec 2021 04:22:57 +0000 Subject: [issue45958] Document typo in unpack_from() In-Reply-To: <1638413107.8.0.703943462848.issue45958@roundup.psfhosted.org> Message-ID: <1638418977.8.0.174421817731.issue45958@roundup.psfhosted.org> Zachary Ware added the comment: The `/` denotes that `format` is a positional-only argument; you cannot make a call like `struct.unpack_from(format=my_format, buffer=my_buffer)`, it must be `struct.unpack_from(my_format, buffer=my_buffer)` or `struct.unpack_from(my_format, my_buffer)`. The same syntax can be used to define your own function with positional-only arguments, see https://docs.python.org/3/tutorial/controlflow.html#positional-only-parameters or https://docs.python.org/3/reference/compound_stmts.html#function-definitions ---------- nosy: +zach.ware resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 01:00:20 2021 From: report at bugs.python.org (Hian-Kun Tenn) Date: Thu, 02 Dec 2021 06:00:20 +0000 Subject: [issue45958] Document typo in unpack_from() In-Reply-To: <1638418977.8.0.174421817731.issue45958@roundup.psfhosted.org> Message-ID: Hian-Kun Tenn added the comment: Hi, I didn't know that and feel sorry to bother you with the non-bug "issue." Thank you for the quick and thoughtful reply. :-) Hiankun On Thu, Dec 2, 2021 at 12:23 PM Zachary Ware wrote: > > Zachary Ware added the comment: > > The `/` denotes that `format` is a positional-only argument; you cannot > make a call like `struct.unpack_from(format=my_format, buffer=my_buffer)`, > it must be `struct.unpack_from(my_format, buffer=my_buffer)` or > `struct.unpack_from(my_format, my_buffer)`. The same syntax can be used to > define your own function with positional-only arguments, see > https://docs.python.org/3/tutorial/controlflow.html#positional-only-parameters > or > https://docs.python.org/3/reference/compound_stmts.html#function-definitions > > ---------- > nosy: +zach.ware > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 02:06:56 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Dec 2021 07:06:56 +0000 Subject: [issue45959] Teach pprint about dict views Message-ID: <1638428816.23.0.206050902249.issue45959@roundup.psfhosted.org> New submission from Raymond Hettinger : The pprint() code has a number of type or protocol specific handlers but doesn't have one for dict views. So, we don't get pretty printing for the key(), values(), and items(): d = {i:i for i in range(100)} pprint(d) # This is handled correctly pprint(d.keys()) # Printed on one line pprint(d.values()) # Printed on one line pprint(d.items()) # Printed on one line ---------- components: Library (Lib) keywords: easy messages: 407513 nosy: rhettinger priority: normal severity: normal status: open title: Teach pprint about dict views type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 02:30:42 2021 From: report at bugs.python.org (primexx) Date: Thu, 02 Dec 2021 07:30:42 +0000 Subject: [issue45451] IDLE - modify text frame and widget borders In-Reply-To: <1634087096.76.0.0471723883661.issue45451@roundup.psfhosted.org> Message-ID: <1638430242.33.0.261999886091.issue45451@roundup.psfhosted.org> primexx added the comment: for what it's worth, Notepad++ is highly configurable. Here's what mine looks like with borders set to 0 and some sidebar items disabled. Even though it is the same classic theme, it looks a lot better than default. There's the more substantial point to note that Notepad++ is not interactive, the need to have an extremely tight visual coupling between the margin and the main body on a line-per-line basis is significantly reduced. Likewise, the line numbers separated by a border in the IDLE editor are not really bothersome either, it looks natural enough. It only really sticks out in the interactive interpreter. ---------- Added file: https://bugs.python.org/file50469/Capture.PNG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 03:19:20 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 02 Dec 2021 08:19:20 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1638433160.36.0.411357827519.issue40280@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28113 pull_request: https://github.com/python/cpython/pull/29887 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 03:42:21 2021 From: report at bugs.python.org (Sascha Hesse) Date: Thu, 02 Dec 2021 08:42:21 +0000 Subject: [issue45960] bullseye arm/v7 time.time() Operation not permitted Message-ID: <1638434541.68.0.574461669418.issue45960@roundup.psfhosted.org> New submission from Sascha Hesse : Given a docker container on raspbian 10.11 based on bullseye: docker run --rm -it --entrypoint sh python:3.10-slim time.time() fails with error # python Python 3.10.0 (default, Nov 18 2021, 00:56:34) [GCC 10.2.1 20210110] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.time() Traceback (most recent call last): File "", line 1, in PermissionError: [Errno 1] Operation not permitted based on buster: docker run --rm -it --entrypoint sh python:3.10-slim-buster # python Python 3.10.0 (default, Nov 18 2021, 02:00:41) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.time() 1638433441.9555993 >>> exit() # works as expected ---------- components: Interpreter Core messages: 407515 nosy: SaschaJohn priority: normal severity: normal status: open title: bullseye arm/v7 time.time() Operation not permitted type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 03:59:29 2021 From: report at bugs.python.org (Alex) Date: Thu, 02 Dec 2021 08:59:29 +0000 Subject: [issue45961] [doc] Missing documentation for wait_for module Message-ID: <1638435569.2.0.657271084148.issue45961@roundup.psfhosted.org> New submission from Alex : I wondering why there is no documentation for the synchronous module "wait_for": site-packages/wait_for/__init__.py It's just missing or there are some reason? I didn't see any deprecation info about this module. ---------- messages: 407516 nosy: Alex-Izquierdo priority: normal severity: normal status: open title: [doc] Missing documentation for wait_for module versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 04:09:40 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Dec 2021 09:09:40 +0000 Subject: [issue45957] _tkinter.TclError: expected boolean value but got "" In-Reply-To: <1638395678.26.0.142189706167.issue45957@roundup.psfhosted.org> Message-ID: <1638436180.81.0.826129023401.issue45957@roundup.psfhosted.org> Serhiy Storchaka added the comment: What is the result of root.tk.call('wm', 'overrideredirect', root._w, True) ? Is it not an empty string? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 04:15:17 2021 From: report at bugs.python.org (Antony Lee) Date: Thu, 02 Dec 2021 09:15:17 +0000 Subject: [issue45962] Clarify that PyModule_AddString{Constant, Macro} use utf-8 Message-ID: <1638436517.15.0.508323988448.issue45962@roundup.psfhosted.org> New submission from Antony Lee : The documentation for PyModule_AddString{Constant,Macro} does not specify the encoding used. Checking the source shows that these simply call PyUnicode_FromString and thus use utf8, but perhaps this could be made explicit. ---------- assignee: docs at python components: C API, Documentation messages: 407518 nosy: Antony.Lee, docs at python priority: normal severity: normal status: open title: Clarify that PyModule_AddString{Constant,Macro} use utf-8 versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 04:17:46 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 02 Dec 2021 09:17:46 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1638436666.36.0.0848382741484.issue40280@roundup.psfhosted.org> miss-islington added the comment: New changeset cb2b3c8d3566ae46b3b8d0718019e1c98484589e by Christian Heimes in branch 'main': bpo-40280: Emscripten has no support for subprocesses (GH-29872) https://github.com/python/cpython/commit/cb2b3c8d3566ae46b3b8d0718019e1c98484589e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 04:24:17 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Dec 2021 09:24:17 +0000 Subject: [issue11455] issue a warning when populating a CPython type dict with non-string keys In-Reply-To: <1299704028.56.0.168922481621.issue11455@psf.upfronthosting.co.za> Message-ID: <1638437057.84.0.831566268559.issue11455@roundup.psfhosted.org> Serhiy Storchaka added the comment: Why not raise an error if it contradicts language spec? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 04:55:13 2021 From: report at bugs.python.org (Sam Bull) Date: Thu, 02 Dec 2021 09:55:13 +0000 Subject: [issue42130] AsyncIO's wait_for can hide cancellation in a rare race condition In-Reply-To: <1603469429.01.0.760360212477.issue42130@roundup.psfhosted.org> Message-ID: <1638438913.18.0.684893684676.issue42130@roundup.psfhosted.org> Sam Bull added the comment: It has been addressed, PR should be merged this week: https://github.com/python/cpython/pull/28149 Like most open source projects, it just needed someone to actually propose a fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 05:17:30 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 02 Dec 2021 10:17:30 +0000 Subject: [issue45961] [doc] Missing documentation for wait_for module In-Reply-To: <1638435569.2.0.657271084148.issue45961@roundup.psfhosted.org> Message-ID: <1638440250.66.0.594377956185.issue45961@roundup.psfhosted.org> Irit Katriel added the comment: If you mean this: https://pypi.org/project/wait-for/ then it is not part of the python library. If you mean asyncio's wait_for, it's documented here: https://docs.python.org/3/library/asyncio-task.html#asyncio.wait_for ---------- nosy: +iritkatriel resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 05:43:41 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Dec 2021 10:43:41 +0000 Subject: [issue45954] Rename PyConfig.no_debug_ranges to PyConfig.code_debug_ranges In-Reply-To: <1638384848.75.0.0549104552795.issue45954@roundup.psfhosted.org> Message-ID: <1638441821.49.0.453581542496.issue45954@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a6c3b0faa1d55e36539caf19bd3bcf1dea12df84 by Victor Stinner in branch 'main': bpo-45954: Rename PyConfig.no_debug_ranges to code_debug_ranges (GH-29886) https://github.com/python/cpython/commit/a6c3b0faa1d55e36539caf19bd3bcf1dea12df84 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 05:43:48 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Dec 2021 10:43:48 +0000 Subject: [issue45954] Rename PyConfig.no_debug_ranges to PyConfig.code_debug_ranges In-Reply-To: <1638384848.75.0.0549104552795.issue45954@roundup.psfhosted.org> Message-ID: <1638441828.17.0.949533030732.issue45954@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 Dec 2 06:19:35 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 02 Dec 2021 11:19:35 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1638443975.1.0.129712468074.issue40280@roundup.psfhosted.org> Christian Heimes added the comment: New changeset cb8f491f46e262549f6c447b31625cab7c20a60a by Christian Heimes in branch 'main': bpo-40280: Optimize ints and and startup on wasm (GH-29887) https://github.com/python/cpython/commit/cb8f491f46e262549f6c447b31625cab7c20a60a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 06:20:59 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Dec 2021 11:20:59 +0000 Subject: [issue25403] urllib.parse.urljoin is broken in python 3.5 In-Reply-To: <1444823340.35.0.0533245258476.issue25403@psf.upfronthosting.co.za> Message-ID: <1638444059.91.0.317190245966.issue25403@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 07:23:48 2021 From: report at bugs.python.org (Mark Shannon) Date: Thu, 02 Dec 2021 12:23:48 +0000 Subject: [issue45725] test_freeze doesn't clean up after itself In-Reply-To: <1636111041.41.0.0249123262066.issue45725@roundup.psfhosted.org> Message-ID: <1638447828.74.0.207476809199.issue45725@roundup.psfhosted.org> Mark Shannon added the comment: This seems to be fixed. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 07:27:40 2021 From: report at bugs.python.org (Mark Shannon) Date: Thu, 02 Dec 2021 12:27:40 +0000 Subject: [issue45963] Embed interpreter frame in generator. Message-ID: <1638448060.39.0.766103367856.issue45963@roundup.psfhosted.org> New submission from Mark Shannon : Currently, the InterpreterFrame for a generator is allocated on the heap separately from the generator. This means that 2 allocations are needed to create a generator, and an extra indirection is needed to get from the generator to the frame. By embedding the frame in the generator, we only need one alloaction, we save an indirection *and* the code gets simpler: transferring the frame from generator to frame object is just a single memcpy. ---------- assignee: Mark.Shannon components: Interpreter Core messages: 407526 nosy: Mark.Shannon priority: normal severity: normal status: open title: Embed interpreter frame in generator. type: performance versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 07:37:21 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 02 Dec 2021 12:37:21 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1638448641.87.0.73312490679.issue45711@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +28114 pull_request: https://github.com/python/cpython/pull/29890 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 08:05:23 2021 From: report at bugs.python.org (Mark Shannon) Date: Thu, 02 Dec 2021 13:05:23 +0000 Subject: [issue45963] Embed interpreter frame in generator. In-Reply-To: <1638448060.39.0.766103367856.issue45963@roundup.psfhosted.org> Message-ID: <1638450323.14.0.571026968403.issue45963@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +28115 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29891 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 08:16:06 2021 From: report at bugs.python.org (Ethan Smith) Date: Thu, 02 Dec 2021 13:16:06 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1638450966.24.0.952481231546.issue40280@roundup.psfhosted.org> Change by Ethan Smith : ---------- pull_requests: +28116 pull_request: https://github.com/python/cpython/pull/29892 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 08:50:38 2021 From: report at bugs.python.org (Matej Cepl) Date: Thu, 02 Dec 2021 13:50:38 +0000 Subject: [issue45964] 3.10.0 tests fail in test_pdb_breakpoints_preserved_across_interactive_sessions Message-ID: <1638453038.24.0.528506960629.issue45964@roundup.psfhosted.org> New submission from Matej Cepl : When running tests with 3.10.0 test_pdb_breakpoints_preserved_across_interactive_sessions test fails: [ 842s] ====================================================================== [ 842s] FAIL: test_pdb_breakpoints_preserved_across_interactive_sessions (test.test_pdb) [ 842s] Doctest: test.test_pdb.test_pdb_breakpoints_preserved_across_interactive_sessions [ 842s] ---------------------------------------------------------------------- [ 842s] Traceback (most recent call last): [ 842s] File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/doctest.py", line 2216, in runTest [ 842s] raise self.failureException(self.format_failure(new.getvalue())) [ 842s] AssertionError: Failed doctest test for test.test_pdb.test_pdb_breakpoints_preserved_across_interactive_sessions [ 842s] File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_pdb.py", line 327, in test_pdb_breakpoints_preserved_across_interactive_sessions [ 842s] [ 842s] ---------------------------------------------------------------------- [ 842s] File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_pdb.py", line 351, in test.test_pdb.test_pdb_breakpoints_preserved_across_interactive_sessions [ 842s] Failed example: [ 842s] with PdbTestInput([ # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE [ 842s] 'break', [ 842s] 'break pdb.find_function', [ 842s] 'break', [ 842s] 'clear 1', [ 842s] 'continue', [ 842s] ]): [ 842s] pdb.run('print()') [ 842s] Expected: [ 842s] > (1)()... [ 842s] (Pdb) break [ 842s] Num Type Disp Enb Where [ 842s] 1 breakpoint keep yes at ...test_pdb.py:... [ 842s] 2 breakpoint keep yes at ...test_pdb.py:... [ 842s] (Pdb) break pdb.find_function [ 842s] Breakpoint 3 at ...pdb.py:94 [ 842s] (Pdb) break [ 842s] Num Type Disp Enb Where [ 842s] 1 breakpoint keep yes at ...test_pdb.py:... [ 842s] 2 breakpoint keep yes at ...test_pdb.py:... [ 842s] 3 breakpoint keep yes at ...pdb.py:... [ 842s] (Pdb) clear 1 [ 842s] Deleted breakpoint 1 at ...test_pdb.py:... [ 842s] (Pdb) continue [ 842s] Got: [ 842s] > (1)() [ 842s] (Pdb) break [ 842s] Num Type Disp Enb Where [ 842s] 1 breakpoint keep yes at /home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_pdb.py:425 [ 842s] 2 breakpoint keep yes at /home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_pdb.py:422 [ 842s] (Pdb) break pdb.find_function [ 842s] Breakpoint 3 at /home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/pdb.py:93 [ 842s] (Pdb) break [ 842s] Num Type Disp Enb Where [ 842s] 1 breakpoint keep yes at /home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_pdb.py:425 [ 842s] 2 breakpoint keep yes at /home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_pdb.py:422 [ 842s] 3 breakpoint keep yes at /home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/pdb.py:93 [ 842s] (Pdb) clear 1 [ 842s] Deleted breakpoint 1 at /home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_pdb.py:425 [ 842s] (Pdb) continue [ 842s] [ 842s] [ 842s] [ 842s] ---------------------------------------------------------------------- [ 842s] Ran 1 test in 0.005s [ 842s] [ 842s] FAILED (failures=1) [ 842s] 1 test failed again: [ 842s] test_pdb [ 842s] [ 842s] == Tests result: FAILURE then FAILURE == The problem is completely trivial and the attached patch fixes it (wrong line number in one expected result). ---------- components: Demos and Tools files: pdb_adjust_breakpoints.patch keywords: patch messages: 407527 nosy: mcepl priority: normal severity: normal status: open title: 3.10.0 tests fail in test_pdb_breakpoints_preserved_across_interactive_sessions versions: Python 3.10, Python 3.11 Added file: https://bugs.python.org/file50470/pdb_adjust_breakpoints.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 09:28:26 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 02 Dec 2021 14:28:26 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1638455306.62.0.194429492397.issue40280@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28117 pull_request: https://github.com/python/cpython/pull/29893 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 09:34:53 2021 From: report at bugs.python.org (Kumar Aditya) Date: Thu, 02 Dec 2021 14:34:53 +0000 Subject: [issue23819] test_asyncio fails when run under -O In-Reply-To: <1427808695.9.0.385563565443.issue23819@psf.upfronthosting.co.za> Message-ID: <1638455693.54.0.353490536791.issue23819@roundup.psfhosted.org> Change by Kumar Aditya : ---------- keywords: +patch pull_requests: +28118 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29894 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 10:13:22 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Dec 2021 15:13:22 +0000 Subject: [issue45476] [C API] PEP 674: Disallow using macros as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638458002.16.0.702365144391.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: > * zstd-1.5.0.2: src/python-zstd.c I proposed a fix upstream: https://github.com/sergey-dryabzhinsky/python-zstd/pull/70 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 10:20:49 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Dec 2021 15:20:49 +0000 Subject: [issue45476] [C API] PEP 674: Disallow using macros as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638458449.67.0.494447099644.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: > frozendict-2.1.1 If I understand correctly, this module is compatible with the PEP 674, it only has to copy Python 3.11 header files once Python 3.11 is released, to port the project to Python 3.11. Incompatable code is not part of the "frozendict" implementation, but only in copies of the Python header files (Python 3.6, 3.7, 3.8, 3.9 and 3.10). For example, it contains the frozendict/src/3_10/cpython_src/Include/object.h header: copy of CPython Include/object.h file. Source code: https://github.com/Marco-Sulla/python-frozendict ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 10:26:28 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 02 Dec 2021 15:26:28 +0000 Subject: [issue45964] 3.10.0 tests fail in test_pdb_breakpoints_preserved_across_interactive_sessions In-Reply-To: <1638453038.24.0.528506960629.issue45964@roundup.psfhosted.org> Message-ID: <1638458788.24.0.876290294229.issue45964@roundup.psfhosted.org> Irit Katriel added the comment: This is not failing on our buildbots, so the fix is probably not right. Which system are you running on? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 10:27:52 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Dec 2021 15:27:52 +0000 Subject: [issue45476] [C API] PEP 674: Disallow using macros as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638458872.64.0.458035808527.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: > pysha3-1.0.2 This module must not be used on Python 3.6 and newer which has a built-in support for SHA-3 hash functions. Example: $ python3.6 Python 3.6.15 (default, Sep 5 2021, 00:00:00) >>> import hashlib >>> h=hashlib.new('sha3_224'); h.update(b'hello'); print(h.hexdigest()) b87f88c72702fff1748e58b87e9141a42c0dbedc29a78cb0d4a5cd81 By the way, building pysha3 on Python 3.11 now fails with: Modules/_sha3/backport.inc:78:10: fatal error: pystrhex.h: No such file or directory The pystrhex.h header file has been removed in Python 3.11 by bpo-45434. But I don't think that it's worth it trying to port it to Python 3.11, if the module must not be used on Python 3.6 and newer. Environment markers can be used to skip the pysha3 dependency on Python 3.6 on newer. Example: "pysha3; python_version < '3.6'" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 10:41:06 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Dec 2021 15:41:06 +0000 Subject: [issue45476] [C API] PEP 674: Disallow using macros as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638459665.99.0.758120219981.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: > Naked-0.1.31 Affected code is only code generated by Cython: the project only has to regenerated code with a recent Cython version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 10:46:47 2021 From: report at bugs.python.org (Matej Cepl) Date: Thu, 02 Dec 2021 15:46:47 +0000 Subject: [issue45964] 3.10.0 tests fail in test_pdb_breakpoints_preserved_across_interactive_sessions In-Reply-To: <1638453038.24.0.528506960629.issue45964@roundup.psfhosted.org> Message-ID: <1638460007.91.0.909727320095.issue45964@roundup.psfhosted.org> Matej Cepl added the comment: > Which system are you running on? Happens when packaging Python 3.10 for openSUSE/Linux. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 10:46:59 2021 From: report at bugs.python.org (Jamil Raichouni) Date: Thu, 02 Dec 2021 15:46:59 +0000 Subject: [issue45965] fileinput.input(path, inplace=True) crashes for valid filename with 252-255 characters Message-ID: <1638460019.0.0.188953265928.issue45965@roundup.psfhosted.org> New submission from Jamil Raichouni : import fileinput from pathlib import Path path = Path(252 * "x") path.write_text("") for line in fileinput.input(path, inplace=True): pass raises an OSError: [Errno 63] File name too long for perfectly valid (yes, quite long) file names. Reason: Internally the fileinput library creates a backup file when we pass 'inplace=True' to fileinput.input() and that backup file gets a file name that is longer than the name for the file of interest. Enhancement idea: Work with a backup file name that is sth like GUID.bak or remove some chars from the original file name. Hint: vim /path/to/my/file creates a .swp file and can handle very long file names with 252-255 chars. ---------- components: Library (Lib) files: long_filename_passed_to_fileinput.ipynb messages: 407534 nosy: jamil.raichouni priority: normal severity: normal status: open title: fileinput.input(path, inplace=True) crashes for valid filename with 252-255 characters type: enhancement versions: Python 3.10 Added file: https://bugs.python.org/file50471/long_filename_passed_to_fileinput.ipynb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 10:47:19 2021 From: report at bugs.python.org (Matej Cepl) Date: Thu, 02 Dec 2021 15:47:19 +0000 Subject: [issue45964] 3.10.0 tests fail in test_pdb_breakpoints_preserved_across_interactive_sessions In-Reply-To: <1638453038.24.0.528506960629.issue45964@roundup.psfhosted.org> Message-ID: <1638460039.78.0.296584196988.issue45964@roundup.psfhosted.org> Matej Cepl added the comment: And no there is no other patch touching pdb (or pdb tests). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 11:19:09 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Dec 2021 16:19:09 +0000 Subject: [issue45476] [C API] PEP 674: Disallow using macros as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638461949.61.0.423224714013.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: > mypy-0.910 I proposed a fix: https://github.com/python/mypy/pull/11652 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 11:39:50 2021 From: report at bugs.python.org (Mukesh) Date: Thu, 02 Dec 2021 16:39:50 +0000 Subject: [issue45966] Error in Multiplication Message-ID: <1638463190.07.0.716534365359.issue45966@roundup.psfhosted.org> New submission from Mukesh : I've tried various methods to multiply some numbers but every time I get an unsatisfying result when I try to evaluate 48*1.2 or 41*1.2 or 51*1.4 etc. For example if I run import math NUM3 = eval(input("Your Input: ")) print(NUM3) Output: Your Input: 51*1.4 71.39999999999999 Now it should give me a straight 71.4 but instead it's giving 71.39999999999999 It's not an issue with the version of python that I'm using cause I've already tried it on various versions. ---------- components: Interpreter Core messages: 407537 nosy: M1kE priority: normal severity: normal status: open title: Error in Multiplication type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 11:43:04 2021 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 02 Dec 2021 16:43:04 +0000 Subject: [issue45966] Error in Multiplication In-Reply-To: <1638463190.07.0.716534365359.issue45966@roundup.psfhosted.org> Message-ID: <1638463384.91.0.269779979368.issue45966@roundup.psfhosted.org> Eric V. Smith added the comment: This isn't a bug, it's a function of the IEEE-754 double precision floating point type that python uses. See: https://docs.python.org/3/tutorial/floatingpoint.html You might want to consider the decimal module, although that will also have limitations. ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 11:50:06 2021 From: report at bugs.python.org (Ethan Furman) Date: Thu, 02 Dec 2021 16:50:06 +0000 Subject: [issue45535] Enum's dir() does not contain inherited members In-Reply-To: <1634726106.14.0.525814954361.issue45535@roundup.psfhosted.org> Message-ID: <1638463806.15.0.931370017707.issue45535@roundup.psfhosted.org> Ethan Furman added the comment: New changeset b2afdc95cc8f4e9228148730949a43cef0323f15 by Alex Waygood in branch 'main': bpo-45535: Improve output of Enum ``dir()`` (GH-29316) https://github.com/python/cpython/commit/b2afdc95cc8f4e9228148730949a43cef0323f15 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 11:55:46 2021 From: report at bugs.python.org (Alex Waygood) Date: Thu, 02 Dec 2021 16:55:46 +0000 Subject: [issue45897] Frozen dataclasses with slots raise TypeError In-Reply-To: <1637805231.22.0.691568548115.issue45897@roundup.psfhosted.org> Message-ID: <1638464146.33.0.611479820179.issue45897@roundup.psfhosted.org> Alex Waygood added the comment: You get the same error if you subclass a frozen dataclass, then try to set an attribute that is not one of the superclass's __slots__: ``` >>> @dataclass(slots=True, frozen=True) ... class Point: ... x: int ... y: int ... ... >>> class Subclass(Point): pass ... >>> s = Subclass(1, 2) >>> s.z = 5 Traceback (most recent call last): File "", line 1, in s.z = 5 File "", line 7, in __setattr__ TypeError: super(type, obj): obj must be an instance or subtype of type ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 12:20:40 2021 From: report at bugs.python.org (Alex Waygood) Date: Thu, 02 Dec 2021 17:20:40 +0000 Subject: [issue45897] Frozen dataclasses with slots raise TypeError In-Reply-To: <1637805231.22.0.691568548115.issue45897@roundup.psfhosted.org> Message-ID: <1638465640.24.0.648381164552.issue45897@roundup.psfhosted.org> Change by Alex Waygood : ---------- keywords: +patch pull_requests: +28119 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29895 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 12:43:05 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 02 Dec 2021 17:43:05 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1638466985.42.0.193433730528.issue40280@roundup.psfhosted.org> Christian Heimes added the comment: New changeset a31173c5ceb1708df687f942d714bdecae7cb759 by Christian Heimes in branch 'main': bpo-40280: Update what's new (GH-29893) https://github.com/python/cpython/commit/a31173c5ceb1708df687f942d714bdecae7cb759 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 13:20:31 2021 From: report at bugs.python.org (Ned Deily) Date: Thu, 02 Dec 2021 18:20:31 +0000 Subject: [issue45920] make doctest fails In-Reply-To: <1638140383.16.0.243032979083.issue45920@roundup.psfhosted.org> Message-ID: <1638469231.66.0.707811398777.issue45920@roundup.psfhosted.org> Ned Deily added the comment: > So I guess the only way to actually get make doctest to work is if the virtual env uses the version of python in main. Is there anyway to do that? By default, the Doc/Makefile "venv" target uses the first "python3" it finds on your shell PATH to build the venv and sphinx. Either arrange for "python3" to point at a Python of the same release family on your PATH or you can use the PYTHON= command line argument to "make venv" to specify the path to the interpreter, for example: cd cpython ./configure && make cd Doc make clean venv doctest PYTHON=../python [...] Doctest summary =============== 2388 tests 0 failures in tests 0 failures in setup code 0 failures in cleanup code build succeeded. [...] ---------- nosy: +ned.deily resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 14:27:33 2021 From: report at bugs.python.org (Ned Deily) Date: Thu, 02 Dec 2021 19:27:33 +0000 Subject: [issue45957] _tkinter.TclError: expected boolean value but got "" In-Reply-To: <1638395678.26.0.142189706167.issue45957@roundup.psfhosted.org> Message-ID: <1638473253.21.0.145953470478.issue45957@roundup.psfhosted.org> Ned Deily added the comment: I am not able to reproduce this failure with various macOS Pythons from python.org that are built with either Tk 8.6.8 or 8.6.12. Perhaps it's an issue with the Tk provided with your Miniconda Python? Besides answering Serhiy's question, it would be helpful to know the exact patch level of Tk that is being used and also the path to the Tk library. The output from /path/to/your/python -m test.pythoninfo and otool -L $(/path/to/your/python -c "import _tkinter;print(_tkinter.__file__)") will give those answers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 15:02:47 2021 From: report at bugs.python.org (Zachary Ware) Date: Thu, 02 Dec 2021 20:02:47 +0000 Subject: [issue45916] documentation link error In-Reply-To: <1638101696.82.0.501489879762.issue45916@roundup.psfhosted.org> Message-ID: <1638475367.57.0.734165170012.issue45916@roundup.psfhosted.org> Change by Zachary Ware : ---------- keywords: +patch pull_requests: +28120 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29896 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 15:24:37 2021 From: report at bugs.python.org (Zachary Ware) Date: Thu, 02 Dec 2021 20:24:37 +0000 Subject: [issue45916] documentation link error In-Reply-To: <1638101696.82.0.501489879762.issue45916@roundup.psfhosted.org> Message-ID: <1638476677.08.0.0919134565769.issue45916@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 9f2f7e42269db74a89fc8cd74d82a875787f01d7 by Zachary Ware in branch 'main': bpo-45916: Use HTTPS link for The Perils of Floating Point (GH-29896) https://github.com/python/cpython/commit/9f2f7e42269db74a89fc8cd74d82a875787f01d7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 15:25:02 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 02 Dec 2021 20:25:02 +0000 Subject: [issue45916] documentation link error In-Reply-To: <1638101696.82.0.501489879762.issue45916@roundup.psfhosted.org> Message-ID: <1638476702.95.0.991068477512.issue45916@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28121 pull_request: https://github.com/python/cpython/pull/29897 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 15:25:08 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 02 Dec 2021 20:25:08 +0000 Subject: [issue45916] documentation link error In-Reply-To: <1638101696.82.0.501489879762.issue45916@roundup.psfhosted.org> Message-ID: <1638476708.77.0.632335726917.issue45916@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28122 pull_request: https://github.com/python/cpython/pull/29898 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 15:44:28 2021 From: report at bugs.python.org (Alexander Mohr) Date: Thu, 02 Dec 2021 20:44:28 +0000 Subject: [issue44637] Quoting issue on header Reply-To and other address headers In-Reply-To: <1626266697.4.0.946779337742.issue44637@roundup.psfhosted.org> Message-ID: <1638477868.94.0.819639276575.issue44637@roundup.psfhosted.org> Alexander Mohr added the comment: btw my work-around was to set maxheaderlen=sys.maxsize, worked for AWS SES at least ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 15:45:20 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 02 Dec 2021 20:45:20 +0000 Subject: [issue45916] documentation link error In-Reply-To: <1638101696.82.0.501489879762.issue45916@roundup.psfhosted.org> Message-ID: <1638477920.55.0.176983273094.issue45916@roundup.psfhosted.org> miss-islington added the comment: New changeset f6648e229edf07a1e4897244d7d34989dd9ea647 by Miss Islington (bot) in branch '3.10': bpo-45916: Use HTTPS link for The Perils of Floating Point (GH-29896) https://github.com/python/cpython/commit/f6648e229edf07a1e4897244d7d34989dd9ea647 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 15:58:32 2021 From: report at bugs.python.org (Harold Meneley) Date: Thu, 02 Dec 2021 20:58:32 +0000 Subject: [issue45967] treeview Message-ID: <1638478712.78.0.334069010053.issue45967@roundup.psfhosted.org> New submission from Harold Meneley : treeview does not clear after opening and reopening another using same code block, You can see leftover treeview after clear and reopen. Simply clikc on file > view all, clear > clear, and then search > author and you should see problem ---------- components: Tkinter files: MyBooks.py messages: 407547 nosy: hmeneley priority: normal severity: normal status: open title: treeview type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file50472/MyBooks.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 16:07:08 2021 From: report at bugs.python.org (Tom E) Date: Thu, 02 Dec 2021 21:07:08 +0000 Subject: [issue45933] Illegal Instrution (Core Dumped) In-Reply-To: <1638224710.52.0.0477949346292.issue45933@roundup.psfhosted.org> Message-ID: <1638479228.22.0.549925272005.issue45933@roundup.psfhosted.org> Tom E added the comment: Well I updated the kernel to 5.15.0 and used my succeeding 3.9.9 build and now it works. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 16:08:01 2021 From: report at bugs.python.org (Alex Waygood) Date: Thu, 02 Dec 2021 21:08:01 +0000 Subject: [issue45967] Tkinter.ttk.Treeview does not clear after opening and reopening another using same code block In-Reply-To: <1638478712.78.0.334069010053.issue45967@roundup.psfhosted.org> Message-ID: <1638479281.53.0.671515985051.issue45967@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +gpolo, serhiy.storchaka title: treeview -> Tkinter.ttk.Treeview does not clear after opening and reopening another using same code block _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 16:20:33 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 02 Dec 2021 21:20:33 +0000 Subject: [issue45476] [C API] PEP 674: Disallow using macros as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638480033.18.0.152978915368.issue45476@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: -mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 17:16:46 2021 From: report at bugs.python.org (Ali Amin-Nejad) Date: Thu, 02 Dec 2021 22:16:46 +0000 Subject: [issue45957] _tkinter.TclError: expected boolean value but got "" In-Reply-To: <1638395678.26.0.142189706167.issue45957@roundup.psfhosted.org> Message-ID: <1638483406.67.0.780696101527.issue45957@roundup.psfhosted.org> Ali Amin-Nejad added the comment: @serhiy.storchaka I tried that command, the returned value is not an empty string, it is an object of type . However including that line in my script immediately after creating the `root` object actually fixes the problem - no more error and the button appears and is responsive. @ned.deily I am on tkinter 8.6.11. The output from the second command is: ``` /Users/ali/miniconda3/envs/bitfount/lib/python3.8/lib-dynload/_tkinter.cpython-38-darwin.so: @rpath/libtcl8.6.dylib (compatibility version 8.6.0, current version 8.6.11) @rpath/libtk8.6.dylib (compatibility version 8.6.0, current version 8.6.11) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0) ``` I have just tried the same script in a separate python 3.9 environment with python 3.9.6 and tkinter 8.6.10 and the error is not there so it seems like it is introduced in 8.6.11. Happy to try on 8.6.12 but I'm not sure how to upgrade to it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 17:23:08 2021 From: report at bugs.python.org (Luca) Date: Thu, 02 Dec 2021 22:23:08 +0000 Subject: [issue45968] Windows installer should add also "%USERPROFILE%\AppData\Roaming\Python\Python3x\Scripts" folder to the PATH environment variable Message-ID: <1638483787.98.0.55945714586.issue45968@roundup.psfhosted.org> New submission from Luca : This issue is related to https://bugs.python.org/issue3561 When installing Python under Windows, if the "Add Python 3.x to PATH" option is flagged, the following two folders are added to the PATH environment variable: %USERPROFILE%\AppData\Local\Programs\Python\Python3x\ %USERPROFILE%\AppData\Local\Programs\Python\Python3x\Scripts\ However also the following folder should be added, which is where scripts reside when packages are installed with "pip install --user": %USERPROFILE%\AppData\Roaming\Python\Python3x\Scripts\ ---------- components: Installation, Windows messages: 407550 nosy: lucatrv, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows installer should add also "%USERPROFILE%\AppData\Roaming\Python\Python3x\Scripts" folder to the PATH environment variable type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 17:23:30 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 02 Dec 2021 22:23:30 +0000 Subject: [issue45949] Provide pure-Python implementation of Programs/_freeze_module for cross building In-Reply-To: <1638372868.47.0.982140813893.issue45949@roundup.psfhosted.org> Message-ID: <1638483810.22.0.949439677656.issue45949@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +28123 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29899 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 17:36:06 2021 From: report at bugs.python.org (Luca) Date: Thu, 02 Dec 2021 22:36:06 +0000 Subject: [issue45969] When uninstalling Python under Windows the "Scripts" folders should be removed from the PATH environment variable Message-ID: <1638484566.06.0.085894454168.issue45969@roundup.psfhosted.org> New submission from Luca : This issue is related to: https://bugs.python.org/issue3561 and: https://bugs.python.org/issue45968 When installing Python under Windows, if the "Add Python 3.x to PATH" option is flagged, the following two folders are added to the PATH environment variable: %USERPROFILE%\AppData\Local\Programs\Python\Python3x\ %USERPROFILE%\AppData\Local\Programs\Python\Python3x\Scripts\ However when uninstalling Pyhton only the former folder is removed from the PATH environment variable, and not the latter one. Moreover if also the following folder will be added to the PATH environment variable in future (see issue #45968): %USERPROFILE%\AppData\Roaming\Python\Python3x\Scripts\ then the same would apply to it. ---------- components: Installation, Windows messages: 407551 nosy: lucatrv, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: When uninstalling Python under Windows the "Scripts" folders should be removed from the PATH environment variable type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 17:39:53 2021 From: report at bugs.python.org (Alex Waygood) Date: Thu, 02 Dec 2021 22:39:53 +0000 Subject: [issue45959] Teach pprint about dict views In-Reply-To: <1638428816.23.0.206050902249.issue45959@roundup.psfhosted.org> Message-ID: <1638484793.43.0.25867084959.issue45959@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 17:40:18 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Dec 2021 22:40:18 +0000 Subject: [issue45957] _tkinter.TclError: expected boolean value but got "" In-Reply-To: <1638395678.26.0.142189706167.issue45957@roundup.psfhosted.org> Message-ID: <1638484818.8.0.290167418142.issue45957@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you Ali. It confirms my guess, but it is still not clear why we get a Tcl_Obj rather of None or empty string. Please examine what is the output of the following code: res = root.tk.call('wm', 'overrideredirect', root._w, True) print([res.typename]) print([res.string]) If the first print crashes comment out it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 17:45:04 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Thu, 02 Dec 2021 22:45:04 +0000 Subject: [issue45878] Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro` In-Reply-To: <1637659974.6.0.574362436807.issue45878@roundup.psfhosted.org> Message-ID: <1638485104.06.0.779213825566.issue45878@roundup.psfhosted.org> Change by Nikita Sobolev : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 17:54:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 02 Dec 2021 22:54:45 +0000 Subject: [issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict In-Reply-To: <1472852881.19.0.987799736928.issue27946@psf.upfronthosting.co.za> Message-ID: <1638485685.43.0.641959455764.issue27946@roundup.psfhosted.org> Irit Katriel added the comment: This is a bug in elementtree - the caller should own a reference to the dict during the entire PyDict_GetItem call. We won't add the refcount change you propose because it's not free and this is a hot function. The test in your patch doesn't fail for me (I tried on version 3.11 on a Mac). Are you still seeing the problem on version >= 3.9, or perhaps it was fixed in eaementtree by now? ---------- nosy: +iritkatriel title: issues in elementtree and elsewhere due to PyDict_GetItem -> elementtree calls PyDict_GetItem without owning a reference to the dict _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 18:05:57 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 02 Dec 2021 23:05:57 +0000 Subject: [issue24966] shutil.get_terminal_size() throws ValueError if stdout is detached, no fallback In-Reply-To: <1440975553.42.0.716947211383.issue24966@psf.upfronthosting.co.za> Message-ID: <1638486357.56.0.714936807863.issue24966@roundup.psfhosted.org> Irit Katriel added the comment: I am unable to reproduce this, was it fixed? >>> import os, sys, codecs, shutil >>> sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach()) >>> os.get_terminal_size() os.terminal_size(columns=79, lines=36) >>> shutil.get_terminal_size((200, 30)) os.terminal_size(columns=200, lines=30) >>> ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 18:11:09 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 02 Dec 2021 23:11:09 +0000 Subject: [issue14856] argparse: creating an already defined subparsers does not raises an exception In-Reply-To: <1337430471.4.0.633032333136.issue14856@psf.upfronthosting.co.za> Message-ID: <1638486669.24.0.500936347506.issue14856@roundup.psfhosted.org> Irit Katriel added the comment: The open patch deprecates overriding the parser with add_parser, but it does not add the new set_parser method that Steven suggested. ---------- nosy: +iritkatriel stage: patch review -> type: -> enhancement versions: +Python 3.11 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 18:22:51 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 02 Dec 2021 23:22:51 +0000 Subject: [issue24966] shutil.get_terminal_size() throws ValueError if stdout is detached, no fallback In-Reply-To: <1440975553.42.0.716947211383.issue24966@psf.upfronthosting.co.za> Message-ID: <1638487371.98.0.752272719604.issue24966@roundup.psfhosted.org> Eryk Sun added the comment: This was fixed in 3.5. ---------- nosy: +eryksun resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Fix shutil.get_terminal_size() to catch AttributeError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 18:24:42 2021 From: report at bugs.python.org (Ali Amin-Nejad) Date: Thu, 02 Dec 2021 23:24:42 +0000 Subject: [issue45957] _tkinter.TclError: expected boolean value but got "" In-Reply-To: <1638395678.26.0.142189706167.issue45957@roundup.psfhosted.org> Message-ID: <1638487482.57.0.187494834827.issue45957@roundup.psfhosted.org> Ali Amin-Nejad added the comment: Thanks Serhiy, the output is: ['StateSpec'] [''] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 18:31:38 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 02 Dec 2021 23:31:38 +0000 Subject: [issue36338] urlparse of urllib returns wrong hostname In-Reply-To: <1552896371.92.0.122580708995.issue36338@roundup.psfhosted.org> Message-ID: <1638487898.17.0.0208270041269.issue36338@roundup.psfhosted.org> Irit Katriel added the comment: It produces a deprecation warning on 3.11, but still does the same. >>> urlparse('http://benign.com\[attacker.com]').hostname :1: DeprecationWarning: invalid escape sequence '\[' 'attacker.com' ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 18:55:19 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Dec 2021 23:55:19 +0000 Subject: [issue28533] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1638489319.35.0.0282813720047.issue28533@roundup.psfhosted.org> STINNER Victor added the comment: According to a code search in the PyPI top 5000 projects: the source code of 21 projects contains "import asyncore", "import asynchat" or "import smtpd": * ansible-5.0.0 * cassandra-driver-3.25.0 * django-extensions-3.1.5 * eth_abi-2.1.1 * eth-account-0.5.6 * eth-hash-0.3.2 * eth-utils-2.0.0 * gevent-21.8.0 * h5py-3.6.0 * hexbytes-0.2.2 * jedi-0.18.1 * M2Crypto-0.38.0 * mercurial-6.0 * mypy-0.910 * plac-1.3.3 * pyftpdlib-1.5.6 * pyinotify-0.9.6 * pysnmp-4.4.12 * pytest-localserver-0.5.1 * pytype-2021.11.29 * tlslite-0.4.9 I ignored false positives like "from eventlet(...) import asyncore". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 19:00:20 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Dec 2021 00:00:20 +0000 Subject: [issue28533] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1638489620.69.0.178898273959.issue28533@roundup.psfhosted.org> STINNER Victor added the comment: > ansible-5.0.0 Reported upstream (it's a single file, used for tests): https://github.com/ansible/ansible/issues/76452 > gevent-21.8.0 It's https://github.com/gevent/gevent/tree/master/src/greentest directory which contains subsets of the Python test suite. I guess that when they will copy the Python 3.11 tests, it will be fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 19:01:27 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Dec 2021 00:01:27 +0000 Subject: [issue36338] urlparse of urllib returns wrong hostname In-Reply-To: <1552896371.92.0.122580708995.issue36338@roundup.psfhosted.org> Message-ID: <1638489687.94.0.091711607802.issue36338@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 19:08:49 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 03 Dec 2021 00:08:49 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638490129.71.0.831403938763.issue45582@roundup.psfhosted.org> Steve Dower added the comment: New changeset 99fcf1505218464c489d419d4500f126b6d6dc28 by Steve Dower in branch 'main': bpo-45582: Port getpath[p].c to Python (GH-29041) https://github.com/python/cpython/commit/99fcf1505218464c489d419d4500f126b6d6dc28 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 19:10:47 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 03 Dec 2021 00:10:47 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638490247.34.0.851540685015.issue45582@roundup.psfhosted.org> Steve Dower added the comment: It's done! Those were some of the hardest memory leaks I've had to track down, but it should be clear now. As I mentioned in the commit message, this change attempts to preserve every known quirk. However, I think these ought to be streamlined across platforms to improve the code and/or startup performance. But at least we know now that any changes in the future that require test changes are expected, and not the result of this change :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 19:25:29 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 03 Dec 2021 00:25:29 +0000 Subject: [issue45966] Error in Multiplication In-Reply-To: <1638463190.07.0.716534365359.issue45966@roundup.psfhosted.org> Message-ID: <1638491129.11.0.16873812379.issue45966@roundup.psfhosted.org> Steven D'Aprano added the comment: https://docs.python.org/3/faq/design.html#why-am-i-getting-strange-results-with-simple-arithmetic-operations ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 19:30:34 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 03 Dec 2021 00:30:34 +0000 Subject: [issue45969] When uninstalling Python under Windows the "Scripts" folders should be removed from the PATH environment variable In-Reply-To: <1638484566.06.0.085894454168.issue45969@roundup.psfhosted.org> Message-ID: <1638491434.43.0.932109963728.issue45969@roundup.psfhosted.org> Steve Dower added the comment: Unless someone can find an authoring bug under Tools/msi, I don't think we can do anything about this. We rely on the built-in Windows support for adding and removing these variables, and if that's broken, we can't do anything with our current setup. I really want to get us out of this addiction to cluttering up PATH with lots of different directories - it's bad for security/reliability/etc. of the system as a whole, and I don't like Python being the cause of issues here. But I haven't quite come up with the better design yet... Anyway, all that to say that I'm not in any rush to expand or seriously mess with the current PATH settings. If there's an authoring bug we can fix, great, but I don't think this one is on us in a way we can easily deal with. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 2 20:32:33 2021 From: report at bugs.python.org (Eric Snow) Date: Fri, 03 Dec 2021 01:32:33 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1638490247.34.0.851540685015.issue45582@roundup.psfhosted.org> Message-ID: Eric Snow added the comment: Hurray! Thanks, Steve! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 00:35:05 2021 From: report at bugs.python.org (Jason Haslam) Date: Fri, 03 Dec 2021 05:35:05 +0000 Subject: [issue45970] Py_NewInterpreter causes bogus fatal error along the failure path Message-ID: <1638509705.87.0.0666625525238.issue45970@roundup.psfhosted.org> New submission from Jason Haslam : The failure cleanup of `Py_NewInterpreter` causes a bogus fatal error on the call to `PyThreadState_Delete`. The error is about deleting the current thread state. The saved thread state should be swapped back in *before* deleting the new thread state. ---------- components: C API messages: 407566 nosy: jason.haslam priority: normal severity: normal status: open title: Py_NewInterpreter causes bogus fatal error along the failure path type: crash versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 00:44:54 2021 From: report at bugs.python.org (Roundup Robot) Date: Fri, 03 Dec 2021 05:44:54 +0000 Subject: [issue45970] Py_NewInterpreter causes bogus fatal error along the failure path In-Reply-To: <1638509705.87.0.0666625525238.issue45970@roundup.psfhosted.org> Message-ID: <1638510294.38.0.47574670971.issue45970@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +28124 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29900 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 02:26:06 2021 From: report at bugs.python.org (Venkata Raman S S V) Date: Fri, 03 Dec 2021 07:26:06 +0000 Subject: [issue45971] calendar module issue Message-ID: <1638516366.75.0.743197554563.issue45971@roundup.psfhosted.org> New submission from Venkata Raman S S V : In Ubuntu 20.04.3 LTS - OS Type: 64-bit. $ cal sep 1752 September 1752 Su Mo Tu We Th Fr Sa 1 2 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 -------------------------------- $ python3 Python 3.8.10 (default, Sep 28 2021, 16:10:42) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. import calendar as cl yy=1752 mm=9 print(cl.month(yy,mm)) September 1752 Mo Tu We Th Fr Sa Su 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Note: Sep. 1752 had only 19 days. ( 11 days skipped ) ---------- components: Extension Modules messages: 407567 nosy: ssv5088 priority: normal severity: normal status: open title: calendar module issue versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 02:49:23 2021 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Fri, 03 Dec 2021 07:49:23 +0000 Subject: [issue45971] calendar module issue In-Reply-To: <1638516366.75.0.743197554563.issue45971@roundup.psfhosted.org> Message-ID: <1638517763.27.0.632698092071.issue45971@roundup.psfhosted.org> Vedran ?a?i? added the comment: https://docs.python.org/3/library/calendar.html#module-calendar The functions and classes defined in this module use an idealized calendar, the current Gregorian calendar extended indefinitely in both directions. https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar Even if we decide to change this, this is the thing locale should worry about: not every place adopted Gregorian Calendar at the same time, nor in the same way. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 03:22:21 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Fri, 03 Dec 2021 08:22:21 +0000 Subject: [issue45756] mock raises exception when using a spec with an attribute that raises exception on access In-Reply-To: <1636400873.51.0.88200985051.issue45756@roundup.psfhosted.org> Message-ID: <1638519741.53.0.511005356849.issue45756@roundup.psfhosted.org> Change by Nikita Sobolev : ---------- keywords: +patch nosy: +sobolevn nosy_count: 3.0 -> 4.0 pull_requests: +28125 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29901 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 03:26:01 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Fri, 03 Dec 2021 08:26:01 +0000 Subject: [issue41768] unittest.mock spec calls class properties In-Reply-To: <1599873024.24.0.929930382889.issue41768@roundup.psfhosted.org> Message-ID: <1638519961.36.0.829491484417.issue41768@roundup.psfhosted.org> Nikita Sobolev added the comment: Related PR: https://github.com/python/cpython/pull/29901 ---------- nosy: +sobolevn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 03:45:33 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 03 Dec 2021 08:45:33 +0000 Subject: [issue41768] unittest.mock spec calls class properties In-Reply-To: <1599873024.24.0.929930382889.issue41768@roundup.psfhosted.org> Message-ID: <1638521133.64.0.378082873421.issue41768@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 03:45:38 2021 From: report at bugs.python.org (Erik Montnemery) Date: Fri, 03 Dec 2021 08:45:38 +0000 Subject: [issue45972] typing.NamedTuple with default arguments without type annotations is falsy Message-ID: <1638521138.51.0.177788503063.issue45972@roundup.psfhosted.org> New submission from Erik Montnemery : typing.NamedTuple behaves in surprising ways when it has default arguments which lack type annotations: >>> from typing import NamedTuple >>> class MyTuple(NamedTuple): ... a = 1000 ... >>> tmp = MyTuple() >>> tmp.a 1000 >>> len(tmp) 0 >>> bool(tmp) False Tested in Python 3.8 and 3.9 ---------- messages: 407570 nosy: emontnemery priority: normal severity: normal status: open title: typing.NamedTuple with default arguments without type annotations is falsy type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 03:46:16 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 03 Dec 2021 08:46:16 +0000 Subject: [issue45756] mock raises exception when using a spec with an attribute that raises exception on access In-Reply-To: <1636400873.51.0.88200985051.issue45756@roundup.psfhosted.org> Message-ID: <1638521176.9.0.965709285145.issue45756@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 03:47:11 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 03 Dec 2021 08:47:11 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638521231.7.0.341842390164.issue45582@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +christian.heimes nosy_count: 5.0 -> 6.0 pull_requests: +28126 pull_request: https://github.com/python/cpython/pull/29902 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 03:50:08 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 03 Dec 2021 08:50:08 +0000 Subject: [issue45972] typing.NamedTuple with default arguments without type annotations is falsy In-Reply-To: <1638521138.51.0.177788503063.issue45972@roundup.psfhosted.org> Message-ID: <1638521408.82.0.146678275982.issue45972@roundup.psfhosted.org> Change by Alex Waygood : ---------- components: +Library (Lib) nosy: +AlexWaygood, gvanrossum, kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 03:58:36 2021 From: report at bugs.python.org (Spencer Brown) Date: Fri, 03 Dec 2021 08:58:36 +0000 Subject: [issue45972] typing.NamedTuple with default arguments without type annotations is falsy In-Reply-To: <1638521138.51.0.177788503063.issue45972@roundup.psfhosted.org> Message-ID: <1638521916.75.0.199168284891.issue45972@roundup.psfhosted.org> Spencer Brown added the comment: What's happening is that typing.NamedTuple ignores non-annotated attributes entirely when computing the names it passes along to namedtuple(), so here "a" is just a class attribute. You're accessing it from there, but the tuple itself is entirely empty. Perhaps it should error out if no names at all are found? ---------- nosy: +Spencer Brown _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 04:27:05 2021 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 03 Dec 2021 09:27:05 +0000 Subject: [issue45972] typing.NamedTuple with default arguments without type annotations is falsy In-Reply-To: <1638521138.51.0.177788503063.issue45972@roundup.psfhosted.org> Message-ID: <1638523625.7.0.251814702934.issue45972@roundup.psfhosted.org> Eric V. Smith added the comment: I don't think we'd want to prohibit zero-length namedtuples (or NamedTuples). I've used them, especially when I'm dynamically creating them. This is just a side effect of how Python works. I don't think there's anything to do here, except maybe mention it in the docs, and I'm not even sure that's a good idea. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 04:33:21 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 03 Dec 2021 09:33:21 +0000 Subject: [issue45972] typing.NamedTuple with default arguments without type annotations is falsy In-Reply-To: <1638521138.51.0.177788503063.issue45972@roundup.psfhosted.org> Message-ID: <1638524001.81.0.897158640149.issue45972@roundup.psfhosted.org> Alex Waygood added the comment: I agree that prohibiting zero-length NamedTuples seems like a bad idea, and also agree that this probably doesn't need to be documented. The behaviour here definitely looks weird at first glance, but it's probably not a good idea to tamper with the __bool__() methods of NamedTuple classes either: an empty NamedTuple probably *should* be falsey by default, even if it has a class attribute. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 04:41:18 2021 From: report at bugs.python.org (E. Paine) Date: Fri, 03 Dec 2021 09:41:18 +0000 Subject: [issue45967] Tkinter.ttk.Treeview does not clear after opening and reopening another using same code block In-Reply-To: <1638478712.78.0.334069010053.issue45967@roundup.psfhosted.org> Message-ID: <1638524478.29.0.878890622126.issue45967@roundup.psfhosted.org> E. Paine added the comment: This is because your code isn't clearing the Treeview, it's hiding it by setting the parent Frame's width and height to 0. When this parent Frame is reshown, because you want to put a new TreeView on it, the old one is still there. The easiest way to solve this is to probably create `xtree` just below where you set-up the menu instead of in the function (since you're already calling `xtree.delete`, problem is it's currently being called on the empty tree you've just created). In the future, for issues such as this, please try posting on Stack Overflow first before then raising it with us. Additionally, please post a minimal reproducible example, rather than your full code since it makes it much harder for us to get to the bottom of the problem. One final thing: you may wish to change your MariaDB password for security, since this was included in the file you uploaded. ---------- nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 05:20:56 2021 From: report at bugs.python.org (Erik Montnemery) Date: Fri, 03 Dec 2021 10:20:56 +0000 Subject: [issue45972] typing.NamedTuple with default arguments without type annotations is falsy In-Reply-To: <1638521138.51.0.177788503063.issue45972@roundup.psfhosted.org> Message-ID: <1638526856.2.0.235260257366.issue45972@roundup.psfhosted.org> Erik Montnemery added the comment: I think elaborating in the documentation that only annotated attributes make it to the underlying namedtuple() would be helpful, it's not obvious that they are instead just class attributes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 05:32:54 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 03 Dec 2021 10:32:54 +0000 Subject: [issue45972] typing.NamedTuple with default arguments without type annotations is falsy In-Reply-To: <1638521138.51.0.177788503063.issue45972@roundup.psfhosted.org> Message-ID: <1638527574.57.0.279255459507.issue45972@roundup.psfhosted.org> Alex Waygood added the comment: To me, the fact that NamedTuple uses class attributes to provide field defaults feels like an implementation detail that is only relevant to an unusual edge case. Where do you think the documentation should be improved, and what is your suggested wording? :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 06:17:38 2021 From: report at bugs.python.org (Kumar Aditya) Date: Fri, 03 Dec 2021 11:17:38 +0000 Subject: [issue45654] Freeze the runpy module. In-Reply-To: <1635444830.43.0.574749380857.issue45654@roundup.psfhosted.org> Message-ID: <1638530258.4.0.316841690491.issue45654@roundup.psfhosted.org> Change by Kumar Aditya : ---------- keywords: +patch nosy: +kumaraditya303 nosy_count: 2.0 -> 3.0 pull_requests: +28127 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29903 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 06:29:16 2021 From: report at bugs.python.org (Mark Shannon) Date: Fri, 03 Dec 2021 11:29:16 +0000 Subject: [issue45885] Specialize COMPARE_OP In-Reply-To: <1637701224.16.0.881347004039.issue45885@roundup.psfhosted.org> Message-ID: <1638530956.25.0.647482889607.issue45885@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 03768c4d139df46212a091ed931aad03bec18b57 by Dennis Sweeney in branch 'main': bpo-45885: Specialize COMPARE_OP (GH-29734) https://github.com/python/cpython/commit/03768c4d139df46212a091ed931aad03bec18b57 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 06:39:03 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 11:39:03 +0000 Subject: [issue20750] Roundtrip-test tokenize.untokenize(iterable_of_5_tuples) In-Reply-To: <1393193226.83.0.860669897793.issue20750@psf.upfronthosting.co.za> Message-ID: <1638531543.94.0.933918473254.issue20750@roundup.psfhosted.org> Irit Katriel added the comment: The 7 tests are still removed and need to be checked: https://github.com/python/cpython/blob/03768c4d139df46212a091ed931aad03bec18b57/Lib/test/test_tokenize.py#L1620 ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 06:44:35 2021 From: report at bugs.python.org (Erik Montnemery) Date: Fri, 03 Dec 2021 11:44:35 +0000 Subject: [issue45972] typing.NamedTuple with default arguments without type annotations is falsy In-Reply-To: <1638521138.51.0.177788503063.issue45972@roundup.psfhosted.org> Message-ID: <1638531875.32.0.4151754765.issue45972@roundup.psfhosted.org> Erik Montnemery added the comment: Maybe something like this: diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 735d477db4..8de913d8db 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -1291,7 +1291,8 @@ These are not used in annotations. They are building blocks for declaring types. .. class:: NamedTuple - Typed version of :func:`collections.namedtuple`. + Typed version of :func:`collections.namedtuple`, annotated fields are passed + to an underlying `collections.namedtuple`. Usage:: @@ -1311,9 +1312,20 @@ These are not used in annotations. They are building blocks for declaring types. employee = Employee('Guido') assert employee.id == 3 + assert employee == ('Guido', 3) Fields with a default value must come after any fields without a default. + Non-annotated fields will not be part of the `collections.namedtuple`:: + + class Employee(NamedTuple): + name = 'Guido' + id = 3 + + employee = Employee() + assert employee.id == 3 + assert not employee # Passes because the collections.namedtuple is empty + The resulting class has an extra attribute ``__annotations__`` giving a dict that maps the field names to the field types. (The field names are in ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 07:22:16 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 12:22:16 +0000 Subject: [issue7727] xmlrpc library returns string which contain null ( \x00 ) In-Reply-To: <1263758368.94.0.169057465263.issue7727@psf.upfronthosting.co.za> Message-ID: <1638534136.51.0.61429406654.issue7727@roundup.psfhosted.org> Irit Katriel added the comment: 2.7 is no longer relevant, and it looks like these examples are working now: >>> xmlrpc.client.dumps(('\u20ac',), encoding='iso-8859-1') '\n\n?\n\n\n' >>> xmlrpc.client.dumps((u'\u20ac',), encoding='iso-8859-1') '\n\n?\n\n\n' There is possibly still a documentation enhancement to make regarding non-ascii strings. This is what I get now with Serhiy's examples: >>> xmlrpc.client.loads(xmlrpc.client.dumps(('\xe2\x82\xac',))) (('?\x82?',), None) >>> xmlrpc.client.loads(xmlrpc.client.dumps(('\r',))) (('\n',), None) >>> xmlrpc.client.loads(xmlrpc.client.dumps(('\r\n',))) (('\n',), None) ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 07:34:25 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 12:34:25 +0000 Subject: [issue23538] New Windows installer in 3.5.0a1 breaks compatibility with Wine In-Reply-To: <1425058127.83.0.0230104914567.issue23538@psf.upfronthosting.co.za> Message-ID: <1638534865.34.0.707310968829.issue23538@roundup.psfhosted.org> Irit Katriel added the comment: There doesn't seem to be information here that can help do anything about it, and version 3.5 is no longer maintained. Please create a new issue if you are still having this problem with current versions (>= 3.9). ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 07:45:17 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Dec 2021 12:45:17 +0000 Subject: [issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict In-Reply-To: <1472852881.19.0.987799736928.issue27946@psf.upfronthosting.co.za> Message-ID: <1638535517.76.0.415313703231.issue27946@roundup.psfhosted.org> Serhiy Storchaka added the comment: Concur with Irit. We should patch the caller of PyDict_GetItem, not PyDict_GetItem. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 07:48:18 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 12:48:18 +0000 Subject: [issue20970] [doc] contradictory documentation for prog option of argparse In-Reply-To: <1395160969.17.0.758674872934.issue20970@psf.upfronthosting.co.za> Message-ID: <1638535698.7.0.787830384547.issue20970@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy -patch title: contradictory documentation for prog option of argparse -> [doc] contradictory documentation for prog option of argparse type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 08:05:22 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 13:05:22 +0000 Subject: [issue30214] make_zip.py lacks command a few line options. In-Reply-To: <1493526948.12.0.00156119032978.issue30214@psf.upfronthosting.co.za> Message-ID: <1638536722.16.0.280055785963.issue30214@roundup.psfhosted.org> Irit Katriel added the comment: Tools/msi/make_zip.py does not exist since 3.7. ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 08:06:13 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Dec 2021 13:06:13 +0000 Subject: [issue45957] _tkinter.TclError: expected boolean value but got "" In-Reply-To: <1638395678.26.0.142189706167.issue45957@roundup.psfhosted.org> Message-ID: <1638536773.66.0.0650232608097.issue45957@roundup.psfhosted.org> Serhiy Storchaka added the comment: It looks like a bug in Tk 8.6.11. It is expected that the implementation of "wm overrideredirect" returns an empty string if pass the boolean argument. The returned value is an empty string, but its type is not cleared. Seems it keeps the type of previous result. I think that we can add a workaround for this bug, although it may be inconvenient to test it. Do we still use Tk 8.6.11 on any platform with Python 3.9+? Note that Python 3.8 only takes security fixes, so any changes can only be made in 3.9+. ---------- nosy: +epaine, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 08:17:20 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 03 Dec 2021 13:17:20 +0000 Subject: [issue45957] _tkinter.TclError: expected boolean value but got "" In-Reply-To: <1638395678.26.0.142189706167.issue45957@roundup.psfhosted.org> Message-ID: <1638537440.46.0.450171127901.issue45957@roundup.psfhosted.org> Change by Alex Waygood : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 08:20:29 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 03 Dec 2021 13:20:29 +0000 Subject: [issue45695] Out-of-tree builds are not tested. In-Reply-To: <1635895785.09.0.174517598815.issue45695@roundup.psfhosted.org> Message-ID: <1638537629.19.0.305675880526.issue45695@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +28128 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/29904 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 08:24:12 2021 From: report at bugs.python.org (E. Paine) Date: Fri, 03 Dec 2021 13:24:12 +0000 Subject: [issue45957] _tkinter.TclError: expected boolean value but got "" In-Reply-To: <1638395678.26.0.142189706167.issue45957@roundup.psfhosted.org> Message-ID: <1638537852.88.0.80306094297.issue45957@roundup.psfhosted.org> E. Paine added the comment: > Do we still use Tk 8.6.11 on any platform with Python 3.9+ No, none of the python.org installers include it now. On Linux, according to https://pkgs.org/download/tk, several distros still use 8.6.11 (most notably Ubuntu 21.04). I'll see if I can reproduce it on Linux using 8.6.11 and then we can decide whether or not a workaround is required. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 08:39:48 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 03 Dec 2021 13:39:48 +0000 Subject: [issue45971] calendar module issue In-Reply-To: <1638516366.75.0.743197554563.issue45971@roundup.psfhosted.org> Message-ID: <1638538788.08.0.772281710442.issue45971@roundup.psfhosted.org> Christian Heimes added the comment: > Note: Sep. 1752 had only 19 days. ( 11 days skipped ) That statement is only correct for countries where the Church of England was predominant: Great Britain and colonies of the British Empire in e.g, North America (later known as US of A). Alaska changed later when Russia sold it to the US. Catholic countries such as Italy, Spain, Portugal, and France adopted the Gregorian calendar 170 years earlier. For Germany it gets really complicated and depends on county, kingdom, and the current religion of sovereign. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 08:47:16 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 03 Dec 2021 13:47:16 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638539236.11.0.210592692042.issue45582@roundup.psfhosted.org> Christian Heimes added the comment: New changeset ccb73a0d50dd03bc8455fe210cb83e41a6dc91d8 by Christian Heimes in branch 'main': bpo-45582: Fix out-of-tree build issues with new getpath (GH-29902) https://github.com/python/cpython/commit/ccb73a0d50dd03bc8455fe210cb83e41a6dc91d8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 08:47:51 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 03 Dec 2021 13:47:51 +0000 Subject: [issue45962] Clarify that PyModule_AddString{Constant, Macro} use utf-8 In-Reply-To: <1638436517.15.0.508323988448.issue45962@roundup.psfhosted.org> Message-ID: <1638539271.03.0.0876888489143.issue45962@roundup.psfhosted.org> Change by Alex Waygood : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 08:48:21 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 03 Dec 2021 13:48:21 +0000 Subject: [issue45964] 3.10.0 tests fail in test_pdb_breakpoints_preserved_across_interactive_sessions In-Reply-To: <1638453038.24.0.528506960629.issue45964@roundup.psfhosted.org> Message-ID: <1638539301.91.0.0287966742632.issue45964@roundup.psfhosted.org> Change by Alex Waygood : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 09:02:29 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 14:02:29 +0000 Subject: [issue45964] gdb test fails when packaging Python 3.10 for openSUSE/Linux In-Reply-To: <1638453038.24.0.528506960629.issue45964@roundup.psfhosted.org> Message-ID: <1638540149.29.0.468554537847.issue45964@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: 3.10.0 tests fail in test_pdb_breakpoints_preserved_across_interactive_sessions -> gdb test fails when packaging Python 3.10 for openSUSE/Linux _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 09:01:20 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 14:01:20 +0000 Subject: [issue45964] 3.10.0 tests fail in test_pdb_breakpoints_preserved_across_interactive_sessions In-Reply-To: <1638453038.24.0.528506960629.issue45964@roundup.psfhosted.org> Message-ID: <1638540080.18.0.0481278797355.issue45964@roundup.psfhosted.org> Irit Katriel added the comment: > Happens when packaging Python 3.10 for openSUSE/Linux. Can you give full details of what you're doing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 09:04:56 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 14:04:56 +0000 Subject: [issue45635] Tidy up error handling in traceback.c / python run.c In-Reply-To: <1635370026.46.0.0220648873339.issue45635@roundup.psfhosted.org> Message-ID: <1638540296.54.0.510509029289.issue45635@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch pull_requests: +28129 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29905 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 09:10:48 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 14:10:48 +0000 Subject: [issue20741] Documentation archives should be available also in tar.xz format In-Reply-To: <1393142720.31.0.255845110134.issue20741@psf.upfronthosting.co.za> Message-ID: <1638540648.88.0.653736633796.issue20741@roundup.psfhosted.org> Irit Katriel added the comment: Those archives seem to go only up to 3.9. Is this still relevant? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 09:11:14 2021 From: report at bugs.python.org (Daniel) Date: Fri, 03 Dec 2021 14:11:14 +0000 Subject: [issue45973] Not possible to clear PyImport_Inittab after PyImport_AppendInittab Message-ID: <1638540674.64.0.96956184479.issue45973@roundup.psfhosted.org> New submission from Daniel : Hello, When embedding Python into a C application and not using Py_RunMain it is not possible to remove a module added to PyImport_Inittab even if the interpreter is finalized and a new is created. One reason for not using Py_RunMain is to use python as a subprocessor to my primary C application by initializing an interpreter, run some python code, then go back to execute some C code and again execute some python code in the same interpreter. After a while I might want to finalize the interpreter and create a new one without the module added to inittab, still being in the same process. See example: #include /* * Create a python interpreter, run a command and delete the interpreter */ void run_in_new_interpreter(char *cmd) { Py_Initialize(); PyRun_SimpleString(cmd); if (Py_FinalizeEx() < 0) { exit(120); } } /* * Create a module "my_spam" but do not append it to inittab */ static PyModuleDef EmbModule = { PyModuleDef_HEAD_INIT, "my_spam", NULL, -1, NULL, NULL, NULL, NULL, NULL }; static PyObject* PyInit_emb(void) { return PyModule_Create(&EmbModule); } /* * Main program */ char *LIST_MODULES_CMD="try:\n import my_spam; print('SPAM!');\nexcept:\n print('no mod my_spam')"; int main(int argc, char *argv[]) { // Run with no "my_spam" module run_in_new_interpreter(LIST_MODULES_CMD); // Run with "my_spam" module PyImport_AppendInittab("my_spam", &PyInit_emb); run_in_new_interpreter(LIST_MODULES_CMD); // How to run without my_spam? The module is still in the PyImport_Inittab // despite the Py_FinalizeEx() call. This list is not reset until // _PyImport_Fini2() is called, but that is never exposed in anyi public header, // only in Include/internal/pycore_pylifecycle.h run_in_new_interpreter(LIST_MODULES_CMD); return 0; } The output of the program is: >>> gcc test_embed.c `pkg-config --cflags --libs python-3.6` && ./a.out no mod my_spam SPAM! SPAM! ---------- components: C API messages: 407590 nosy: daniel-falk priority: normal severity: normal status: open title: Not possible to clear PyImport_Inittab after PyImport_AppendInittab type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 09:16:17 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 03 Dec 2021 14:16:17 +0000 Subject: [issue45695] Out-of-tree builds are not tested. In-Reply-To: <1635895785.09.0.174517598815.issue45695@roundup.psfhosted.org> Message-ID: <1638540977.81.0.715282907627.issue45695@roundup.psfhosted.org> Christian Heimes added the comment: Good news: I got a test case for OOT build with read-only sources Bad news: 15 test cases are failing and testing takes much longer because pyc files are missing. 15 re-run tests: test__xxsubinterpreters test_ast test_bdb test_capi test_doctest test_import test_importlib test_interpreters test_pickle test_pydoc test_runpy test_support test_threading test_trace test_unicodedata We have to live with read-only OOT builds and writable tests for now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 09:18:05 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 14:18:05 +0000 Subject: [issue20751] Misleading descriptor protocol documentation: direct call, super binding In-Reply-To: <1393193636.36.0.125202538555.issue20751@psf.upfronthosting.co.za> Message-ID: <1638541085.52.0.281005682453.issue20751@roundup.psfhosted.org> Change by Irit Katriel : ---------- type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 10:01:19 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 03 Dec 2021 15:01:19 +0000 Subject: [issue45950] Reintroduce bootstrap_python for freezing In-Reply-To: <1638375997.48.0.12074215987.issue45950@roundup.psfhosted.org> Message-ID: <1638543679.59.0.150124174704.issue45950@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 84ca1232b0f1e4be368e89550a9ceb46f64a0eff by Christian Heimes in branch 'main': bpo-45950: Introduce Bootstrap Python again (#29859) https://github.com/python/cpython/commit/84ca1232b0f1e4be368e89550a9ceb46f64a0eff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 10:37:53 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 03 Dec 2021 15:37:53 +0000 Subject: [issue45964] gdb test fails when packaging Python 3.10 for openSUSE/Linux In-Reply-To: <1638453038.24.0.528506960629.issue45964@roundup.psfhosted.org> Message-ID: <1638545873.83.0.440322373012.issue45964@roundup.psfhosted.org> Christian Heimes added the comment: This looks like a problem on your side. Line 94 is the correct line for the function in 3.10.0 release. $ git checkout v3.10.0 $ sed -n '94p' Lib/pdb.py def find_function(funcname, filename): Matej, does your build system perhaps strip off the shebang of Lib/pdb.py? That would explain why you are getting the function on line 93. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 11:17:57 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 03 Dec 2021 16:17:57 +0000 Subject: [issue20751] Misleading descriptor protocol documentation: direct call, super binding In-Reply-To: <1393193636.36.0.125202538555.issue20751@psf.upfronthosting.co.za> Message-ID: <1638548277.46.0.308903613083.issue20751@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 11:19:24 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 03 Dec 2021 16:19:24 +0000 Subject: [issue20751] Harmonize descriptor protocol documentation: direct call, super binding with Descriptor Howto docs In-Reply-To: <1393193636.36.0.125202538555.issue20751@psf.upfronthosting.co.za> Message-ID: <1638548364.79.0.694682475856.issue20751@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- title: Misleading descriptor protocol documentation: direct call, super binding -> Harmonize descriptor protocol documentation: direct call, super binding with Descriptor Howto docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 12:16:24 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 17:16:24 +0000 Subject: [issue27582] Mispositioned SyntaxError caret for unknown code points In-Reply-To: <1469102054.52.0.839726574023.issue27582@psf.upfronthosting.co.za> Message-ID: <1638551784.5.0.272773008236.issue27582@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: needs patch -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 12:18:40 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 03 Dec 2021 17:18:40 +0000 Subject: [issue45695] Out-of-tree builds are not tested. In-Reply-To: <1635895785.09.0.174517598815.issue45695@roundup.psfhosted.org> Message-ID: <1638551920.78.0.281594822603.issue45695@roundup.psfhosted.org> Gregory P. Smith added the comment: Nice trick with that RO bind mount. tests... yes we do have some writable source tree messes in there to be dealt with. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 13:09:57 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Fri, 03 Dec 2021 18:09:57 +0000 Subject: [issue45695] Out-of-tree builds are not tested. In-Reply-To: <1635895785.09.0.174517598815.issue45695@roundup.psfhosted.org> Message-ID: <1638554997.59.0.587818059605.issue45695@roundup.psfhosted.org> Erlend E. Aasland added the comment: FWIW, it is also impossible to build the docs OOT without cluttering the source tree. $ cd ../build $ make -C ../cpython.git/Doc venv $ make -C ../cpython.git/Doc html # <= modifies Doc/build in the source tree ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 13:48:31 2021 From: report at bugs.python.org (Ned Deily) Date: Fri, 03 Dec 2021 18:48:31 +0000 Subject: [issue45967] Tkinter.ttk.Treeview does not clear after opening and reopening another using same code block In-Reply-To: <1638478712.78.0.334069010053.issue45967@roundup.psfhosted.org> Message-ID: <1638557311.13.0.881675903736.issue45967@roundup.psfhosted.org> Change by Ned Deily : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 13:51:37 2021 From: report at bugs.python.org (Harold Meneley) Date: Fri, 03 Dec 2021 18:51:37 +0000 Subject: [issue45967] Tkinter.ttk.Treeview does not clear after opening and reopening another using same code block In-Reply-To: <1638557311.19.0.0926048909987.issue45967@roundup.psfhosted.org> Message-ID: Harold Meneley added the comment: Some times , I forget the program languages differences. Sorry. Thanks for your time. Harold On Fri, Dec 3, 2021, 12:48 PM Ned Deily wrote: > > Change by Ned Deily : > > > ---------- > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 14:05:23 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 19:05:23 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1638558323.64.0.863824772999.issue45711@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 2ff758bd1a144ee712e96ae1db91f476c3b252bb by Irit Katriel in branch 'main': bpo-45711: [asyncio] Normalize exceptions immediately after Fetch, before they are stored as StackItem, which should be normalized (GH-29890) https://github.com/python/cpython/commit/2ff758bd1a144ee712e96ae1db91f476c3b252bb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 14:34:10 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 03 Dec 2021 19:34:10 +0000 Subject: [issue45960] bullseye arm/v7 time.time() Operation not permitted In-Reply-To: <1638434541.68.0.574461669418.issue45960@roundup.psfhosted.org> Message-ID: <1638560050.98.0.0830255610879.issue45960@roundup.psfhosted.org> Christian Heimes added the comment: time.time() is a wrapper for libc function call clock_gettime() with CLOCK_REALTIME. This is either a problem with the container build or a Kernel ABI issue between the container build and your operating system. I suggest that you report the issue to https://github.com/docker-library/python . The Dockerhub Python image is not maintained by us. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 14:47:48 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 03 Dec 2021 19:47:48 +0000 Subject: [issue45816] Python does not support standalone MSVC v143 (VS 2022) Build Tools In-Reply-To: <1637073304.41.0.776528442295.issue45816@roundup.psfhosted.org> Message-ID: <1638560868.58.0.0575978616765.issue45816@roundup.psfhosted.org> Steve Dower added the comment: New changeset d9301703fb1086cafbd730c17e3d450a192485d6 by Crowthebird in branch 'main': bpo-45816: Support building with VS 2022 (v143 toolset) on Windows (GH-29577) https://github.com/python/cpython/commit/d9301703fb1086cafbd730c17e3d450a192485d6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 14:48:45 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 03 Dec 2021 19:48:45 +0000 Subject: [issue45816] Python does not support standalone MSVC v143 (VS 2022) Build Tools In-Reply-To: <1637073304.41.0.776528442295.issue45816@roundup.psfhosted.org> Message-ID: <1638560925.04.0.302231341569.issue45816@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 14:50:26 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 03 Dec 2021 19:50:26 +0000 Subject: [issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data In-Reply-To: <1624919733.39.0.974767657181.issue44530@roundup.psfhosted.org> Message-ID: <1638561026.04.0.661895463419.issue44530@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 14:52:45 2021 From: report at bugs.python.org (Ben Darnell) Date: Fri, 03 Dec 2021 19:52:45 +0000 Subject: [issue39529] Deprecate get_event_loop() In-Reply-To: <1580641897.21.0.210075972969.issue39529@roundup.psfhosted.org> Message-ID: <1638561165.58.0.836768924173.issue39529@roundup.psfhosted.org> Ben Darnell added the comment: > In IPython, I think you could use new_event_loop() for getting a new loop instance. > Then, save the loop reference somewhere as a direct attribute, threading.local or ContextVar. > Calling loop.run_until_complete() looks pretty normal in your situation. That works if you're a leaf in the dependency tree, but what about a library like Tornado (which IPython depends on)? If intermediate libraries (say Tornado and Twisted) introduce their own thread-local loops for backwards compatibility of their existing interfaces, the ecosystem gets fragmented again. Having the thread-local live in asyncio is useful for seamless interoperability across frameworks. > asyncio.run() is entirely self-reliant in that it creates all needed resources at the start and closes them in finalization, rather than depending on existing resources. I believe this to be significantly safer and better guaranteed to function as intended, although perhaps at some cost to convenience in cases like your own where there only needs to be one event loop. Whether or not this is more likely to function as intended depends on assumptions about user expectations. In Tornado (and other async systems I have used in the past), it is the norm to set up handlers on an event loop while it is not running and then start it afterwards. The behavior of asyncio.run is surprising to me. Maybe I'm weird, but regardless of which behavior is surprising to the fewest people, my point is that this change is very disruptive to Tornado and most applications using it, contrary to the claim that the maintenance burden should be pretty low. I realize it may be too late to change course, but my preference would have been to resolve the conflict between get_event_loop and asyncio.run by making asyncio.run essentially an alias for asyncio.get_event_loop().run_until_complete. This would relax the isolation of asyncio.run, but that doesn't seem very important to me. The comparable idioms in Tornado (using the IOLoop.run_sync method) all work this way and I've never seen any confusion related to this or a situation in which creating a brand-new event loop in run_sync would be desirable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 15:27:52 2021 From: report at bugs.python.org (neonene) Date: Fri, 03 Dec 2021 20:27:52 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638563272.29.0.800472579265.issue45582@roundup.psfhosted.org> Change by neonene : ---------- nosy: +neonene nosy_count: 6.0 -> 7.0 pull_requests: +28130 pull_request: https://github.com/python/cpython/pull/29906 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 16:02:37 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 21:02:37 +0000 Subject: [issue35419] Thread.is_alive while running Process.is_alive causes either premature termination or never-terminating. In-Reply-To: <1544014510.18.0.788709270274.issue35419@psf.upfronthosting.co.za> Message-ID: <1638565357.16.0.299594696585.issue35419@roundup.psfhosted.org> Irit Katriel added the comment: Use this queue for multithreaded applications: https://docs.python.org/3/library/queue.html Mixing multiprocessing with multithreading often doesn't work. ---------- nosy: +iritkatriel resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 16:04:14 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 03 Dec 2021 21:04:14 +0000 Subject: [issue45877] Inconsistency in minimal supported version of Microsoft Visual Studio In-Reply-To: <1637658070.78.0.512777632516.issue45877@roundup.psfhosted.org> Message-ID: <1638565454.48.0.0940111541913.issue45877@roundup.psfhosted.org> Steve Dower added the comment: It probably all needs straightening out: * Microsoft Visual Studio 2015 *or later* can be used to build the project files * Microsoft Visual C++ 14.3 is what we use to build the official releases for the main branch (3.11) * earlier branches may still be using prior compiler versions for the official releases ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 16:16:31 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 21:16:31 +0000 Subject: [issue31735] Documentation incorrectly states how descriptors are invoked In-Reply-To: <1507561484.86.0.213398074469.issue31735@psf.upfronthosting.co.za> Message-ID: <1638566191.02.0.511464530013.issue31735@roundup.psfhosted.org> Irit Katriel added the comment: See also Issue20751 ---------- nosy: +iritkatriel, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 16:27:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 21:27:55 +0000 Subject: [issue12384] difflib.SequenceMatcher and Match: code and doc bugs In-Reply-To: <1308686441.84.0.396418173173.issue12384@psf.upfronthosting.co.za> Message-ID: <1638566875.64.0.531724255462.issue12384@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 16:35:04 2021 From: report at bugs.python.org (neonene) Date: Fri, 03 Dec 2021 21:35:04 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638567304.14.0.693448026756.issue45582@roundup.psfhosted.org> neonene added the comment: PGO-instrumented binary seems not to specify the stdlib directory on PR29041. I can run it with PYTHONPATH set. Python path configuration: PYTHONHOME = 'C:\Py311\' PYTHONPATH = (not set) program name = 'C:\Py311\PCbuild\amd64\instrumented\python.exe' isolated = 0 environment = 1 user site = 1 import site = 1 is in build tree = 1 stdlib dir = 'C:\Py311\PCbuild\Lib' sys._base_executable = 'C:\\py311\\PCbuild\\amd64\\instrumented\\python.exe' sys.base_prefix = 'C:\\py311\\' sys.base_exec_prefix = 'C:\\py311\\' sys.platlibdir = 'DLLs' sys.executable = 'C:\\py311\\PCbuild\\amd64\\instrumented\\python.exe' sys.prefix = 'C:\\py311\\' sys.exec_prefix = 'C:\\py311\\' sys.path = [ 'C:\\py311\\PCbuild\\amd64\\instrumented\\python311.zip', 'C:\\py311\\PCbuild\\Lib', 'C:\\py311\\PCbuild\\amd64\\instrumented', ] 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' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 16:44:28 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 03 Dec 2021 21:44:28 +0000 Subject: [issue31735] Documentation incorrectly states how descriptors are invoked In-Reply-To: <1507561484.86.0.213398074469.issue31735@psf.upfronthosting.co.za> Message-ID: <1638567868.53.0.895345866992.issue31735@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 16:46:26 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 21:46:26 +0000 Subject: [issue31735] Documentation incorrectly states how descriptors are invoked In-Reply-To: <1507561484.86.0.213398074469.issue31735@psf.upfronthosting.co.za> Message-ID: <1638567986.34.0.0238211783639.issue31735@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 16:48:31 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 21:48:31 +0000 Subject: [issue23317] Incorrect description of descriptor invocation in Python Language Reference In-Reply-To: <1422206163.24.0.274216799196.issue23317@psf.upfronthosting.co.za> Message-ID: <1638568111.79.0.922710544583.issue23317@roundup.psfhosted.org> Irit Katriel added the comment: See also issue20751. ---------- nosy: +iritkatriel, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 16:49:26 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 21:49:26 +0000 Subject: [issue31441] Descriptor example in documentation is confusing, possibly wrong In-Reply-To: <1505291907.9.0.809761592922.issue31441@psf.upfronthosting.co.za> Message-ID: <1638568166.11.0.22459323258.issue31441@roundup.psfhosted.org> Irit Katriel added the comment: see also issue20751. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 17:01:23 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 22:01:23 +0000 Subject: [issue45607] Make it possible to enrich an exception's error message In-Reply-To: <1635194281.32.0.0583100270803.issue45607@roundup.psfhosted.org> Message-ID: <1638568883.78.0.111505673312.issue45607@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 5bb7ef2768be5979b306e4c7552862b1746c251d by Irit Katriel in branch 'main': bpo-45607: Make it possible to enrich exception displays via setting their __note__ field (GH-29880) https://github.com/python/cpython/commit/5bb7ef2768be5979b306e4c7552862b1746c251d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 17:02:13 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 22:02:13 +0000 Subject: [issue45607] Make it possible to enrich an exception's error message In-Reply-To: <1635194281.32.0.0583100270803.issue45607@roundup.psfhosted.org> Message-ID: <1638568933.82.0.622047371212.issue45607@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 17:02:59 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 22:02:59 +0000 Subject: [issue28953] Use `raise from` when raising new IncompleteRead In-Reply-To: <1481578993.98.0.52471260982.issue28953@psf.upfronthosting.co.za> Message-ID: <1638568979.29.0.269673554044.issue28953@roundup.psfhosted.org> Irit Katriel added the comment: I just pushed a new feature which may provide a simpler way to do this: https://bugs.python.org/issue45607 ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 17:04:21 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 03 Dec 2021 22:04:21 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638569061.12.0.568091980974.issue45582@roundup.psfhosted.org> Steve Dower added the comment: New changeset 7d7c91a8e8c0bb04105a21a17d1061ffc1c04d80 by neonene in branch 'main': bpo-45582: Add a NOT operator to the condition in getpath_isxfile (GH-29906) https://github.com/python/cpython/commit/7d7c91a8e8c0bb04105a21a17d1061ffc1c04d80 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 17:07:41 2021 From: report at bugs.python.org (Fatih Kilic) Date: Fri, 03 Dec 2021 22:07:41 +0000 Subject: [issue45974] Using walrus produces different/unoptimized bytecode Message-ID: <1638569261.56.0.379053627232.issue45974@roundup.psfhosted.org> New submission from Fatih Kilic : So, what I mean by unoptimized bytecode is, for example when you type `a = 10 * 10`, the resulting bytecode is the following: ``` LOAD_CONST 0 (100) STORE_NAME 0 (a) ... ``` However, when you type, `(a := 10 * 10) == None`, the resulting bytecode is the following: ``` LOAD_CONST 0 (10) LOAD_CONST 0 (10) BINARY_MULTIPLY DUP_TOP STORE_NAME 0 (a) ... ``` I don't know if this is intentional, but shouldn't the resulting bytecode be the following: ``` LOAD_CONST 0 (100) DUP_TOP STORE_NAME 0 (a) ... ``` ---------- components: Parser messages: 407610 nosy: FKLC, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: Using walrus produces different/unoptimized bytecode type: behavior versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 17:25:53 2021 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 03 Dec 2021 22:25:53 +0000 Subject: [issue45974] Using walrus produces different/unoptimized bytecode In-Reply-To: <1638569261.56.0.379053627232.issue45974@roundup.psfhosted.org> Message-ID: <1638570353.09.0.244826062958.issue45974@roundup.psfhosted.org> Batuhan Taskaya added the comment: See: https://bugs.python.org/issue42282 and the reason for not backporting this: https://bugs.python.org/issue42282#msg380506 ---------- components: +Interpreter Core -Parser nosy: +BTaskaya resolution: -> duplicate stage: -> resolved status: open -> closed type: behavior -> performance versions: -Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 17:34:23 2021 From: report at bugs.python.org (Fatih Kilic) Date: Fri, 03 Dec 2021 22:34:23 +0000 Subject: [issue45974] Using walrus produces different/unoptimized bytecode In-Reply-To: <1638569261.56.0.379053627232.issue45974@roundup.psfhosted.org> Message-ID: <1638570863.14.0.205066520034.issue45974@roundup.psfhosted.org> Fatih Kilic added the comment: Ah, I see. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 17:48:54 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 03 Dec 2021 22:48:54 +0000 Subject: [issue44844] The command line of launching Edge on Linux hangs In-Reply-To: <1628189911.42.0.278044129333.issue44844@roundup.psfhosted.org> Message-ID: <1638571734.57.0.733965329262.issue44844@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: -27916 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 17:56:53 2021 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 03 Dec 2021 22:56:53 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638572213.59.0.412150141095.issue45582@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- nosy: +benjamin.peterson nosy_count: 7.0 -> 8.0 pull_requests: +28131 pull_request: https://github.com/python/cpython/pull/29907 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 17:58:42 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 03 Dec 2021 22:58:42 +0000 Subject: [issue31441] Descriptor example in documentation is confusing, possibly wrong In-Reply-To: <1505291907.9.0.809761592922.issue31441@psf.upfronthosting.co.za> Message-ID: <1638572322.63.0.140957306596.issue31441@roundup.psfhosted.org> Raymond Hettinger added the comment: This example was removed and replaced with better examples. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 18:08:46 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 03 Dec 2021 23:08:46 +0000 Subject: [issue44844] The command line of launching Edge on Linux hangs In-Reply-To: <1628189911.42.0.278044129333.issue44844@roundup.psfhosted.org> Message-ID: <1638572926.2.0.592204101992.issue44844@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +28132 pull_request: https://github.com/python/cpython/pull/29908 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 18:10:09 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 03 Dec 2021 23:10:09 +0000 Subject: [issue44844] The command line of launching Edge on Linux hangs In-Reply-To: <1628189911.42.0.278044129333.issue44844@roundup.psfhosted.org> Message-ID: <1638573009.36.0.540080208235.issue44844@roundup.psfhosted.org> Steve Dower added the comment: @Ray I posted a PR that works fine on Windows, would you be able to try it on Linux? The executables seem to have different names, so I'm a little concerned about the change, but I think it should be alright. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 18:10:41 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 23:10:41 +0000 Subject: [issue33909] PyObject_CallFinalizerFromDealloc is not referenced in any documentation In-Reply-To: <1529483004.36.0.56676864532.issue33909@psf.upfronthosting.co.za> Message-ID: <1638573041.8.0.0419700626012.issue33909@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +pitrou versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 18:15:50 2021 From: report at bugs.python.org (Nick Drozd) Date: Fri, 03 Dec 2021 23:15:50 +0000 Subject: [issue45975] Simplify some while-loops with walrus operator Message-ID: <1638573350.23.0.80297686747.issue45975@roundup.psfhosted.org> New submission from Nick Drozd : The following pattern occurs a few times in the codebase: while 1: data = conn.recv(blocksize) if not data: break ... There is an unbounded while loop in which some kind of input is read. If the input is there, it is processed and the loop is continued; otherwise the loop is broken. This can be expressed more cleanly with the walrus operator: while data := conn.recv(blocksize): ... Some of this code goes back to the days of Python 1. I assume that the original authors would have used the walrus idiom if it had been available, which it wasn't. But now it is. Rewriting the instances of this pattern shaves off 148 lines from the codebase. Removing the manual break statements makes the logic more straightforward. This should not change the behavior of anything. I'm assuming that this code is all under test and that any deviations from the existing behavior will be caught. Anything that isn't tested shouldn't be changed (and should be tested). ---------- components: Library (Lib) messages: 407615 nosy: nickdrozd priority: normal pull_requests: 28133 severity: normal status: open title: Simplify some while-loops with walrus operator versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 18:22:05 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 03 Dec 2021 23:22:05 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638573725.05.0.566370306635.issue45582@roundup.psfhosted.org> miss-islington added the comment: New changeset 0ae4e0c959bbc90ec18180ef3cc957759d346ced by Benjamin Peterson in branch 'main': bpo-45582 Fix prototype of _Py_Get_Getpath_CodeObject. (GH-29907) https://github.com/python/cpython/commit/0ae4e0c959bbc90ec18180ef3cc957759d346ced ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 18:23:09 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 23:23:09 +0000 Subject: [issue26160] [doc] Tutorial incorrectly claims that (explicit) relative imports don't work in the main module In-Reply-To: <1453273352.49.0.425335373136.issue26160@psf.upfronthosting.co.za> Message-ID: <1638573789.61.0.423964868534.issue26160@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: Tutorial incorrectly claims that (explicit) relative imports don't work in the main module -> [doc] Tutorial incorrectly claims that (explicit) relative imports don't work in the main module versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 18:39:41 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 03 Dec 2021 23:39:41 +0000 Subject: [issue20751] Harmonize descriptor protocol documentation: direct call, super binding with Descriptor Howto docs In-Reply-To: <1393193636.36.0.125202538555.issue20751@psf.upfronthosting.co.za> Message-ID: <1638574781.2.0.22898103265.issue20751@roundup.psfhosted.org> Raymond Hettinger added the comment: Regarding comment #1, The wording is correct and there was a reason for using a method. While super() can be used for attribute lookup, use cases are almost entirely dominated by method lookups. For many users, an attribute lookup with super() is unconventional, weird, hard to grok, awkward to demonstrate, and not well motivated by the way super() is actually used. ############################################################## # Demonstration code for the example in text class A: def m(self): return 42 class B(A): def m(obj): return super(B, obj).m() >>> b = B() >>> b.m() # Normal invocation 42 >>> A.__dict__['m'].__get__(b, B)() # Equivalent call 42 That said, I will switch it to an attribute lookup for consistency with the other examples in the section and with the current version of the DescriptorHowto. Regarding comment #2, the objtype argument is optional as shown in all of the examples. The call from object.__getattribute__() always passes in both parameters, even though only the first is required. ################################################################ # Demonstration of __get__() being called with one or two params class A: def __init__(self, x): self.x = x def m(self, y): return self.x * y >>> a = A(10) >>> a.m(5) 50 >>> vars(A)['m'].__get__(a)(5) # objtype is not required 50 >>> vars(A)['m'].__get__(a, A)(5) # objtype may be used 50 ################################################################ # Demonstration of object.__getattribute__ supplying both args class Desc: def __get__(self, *args): return args class B: z = Desc() >>> b = B() >>> b.z (<__main__.B object at 0x109156110>, ) ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 18:42:33 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 03 Dec 2021 23:42:33 +0000 Subject: [issue9544] [doc] xdrlib.Packer().pack_fstring throws a TypeError when called with a str() In-Reply-To: <1281333086.43.0.820305754452.issue9544@psf.upfronthosting.co.za> Message-ID: <1638574953.02.0.805658897266.issue9544@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: xdrlib.Packer().pack_fstring throws a TypeError when called with a str() -> [doc] xdrlib.Packer().pack_fstring throws a TypeError when called with a str() versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 18:44:33 2021 From: report at bugs.python.org (Ammar Askar) Date: Fri, 03 Dec 2021 23:44:33 +0000 Subject: [issue24709] Unix build uses '-Wno-unused-result', which icc doesn't recognize In-Reply-To: <1437767034.87.0.232698584454.issue24709@psf.upfronthosting.co.za> Message-ID: <1638575073.23.0.28697034034.issue24709@roundup.psfhosted.org> Ammar Askar added the comment: Looks like the latest versions of icc support this flag: https://www.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/compiler-options/compiler-option-details/compiler-diagnostic-options/wunused-variable.html Closing as outdated. ---------- nosy: +ammar2 resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 18:45:56 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Fri, 03 Dec 2021 23:45:56 +0000 Subject: [issue45885] Specialize COMPARE_OP In-Reply-To: <1637701224.16.0.881347004039.issue45885@roundup.psfhosted.org> Message-ID: <1638575156.15.0.286436101963.issue45885@roundup.psfhosted.org> Change by Dennis Sweeney : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 18:46:36 2021 From: report at bugs.python.org (Zachary Ware) Date: Fri, 03 Dec 2021 23:46:36 +0000 Subject: [issue45975] Simplify some while-loops with walrus operator In-Reply-To: <1638573350.23.0.80297686747.issue45975@roundup.psfhosted.org> Message-ID: <1638575196.83.0.889786918425.issue45975@roundup.psfhosted.org> Zachary Ware added the comment: As a general rule, refactorings like this tend to be rejected as the risk of inadvertently adding a new bug outweighs the benefit of subjectively cleaner code ("if it ain't broke, don't fix it!"). Is there any measurable performance benefit from this? Reducing several hundred thousand lines of code by 148 is not a compelling benefit :) ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 18:47:23 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 03 Dec 2021 23:47:23 +0000 Subject: [issue20751] Harmonize descriptor protocol documentation: direct call, super binding with Descriptor Howto docs In-Reply-To: <1393193636.36.0.125202538555.issue20751@psf.upfronthosting.co.za> Message-ID: <1638575243.1.0.287884879761.issue20751@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +28134 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29909 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 19:12:50 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sat, 04 Dec 2021 00:12:50 +0000 Subject: [issue20907] behavioral differences between shutil.unpack_archive and ZipFile.extractall In-Reply-To: <1394703965.34.0.603199781912.issue20907@psf.upfronthosting.co.za> Message-ID: <1638576770.39.0.78528655432.issue20907@roundup.psfhosted.org> Change by Andrei Kulakov : ---------- nosy: +andrei.avk nosy_count: 6.0 -> 7.0 pull_requests: +28135 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29910 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 19:29:55 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sat, 04 Dec 2021 00:29:55 +0000 Subject: [issue20907] behavioral differences between shutil.unpack_archive and ZipFile.extractall In-Reply-To: <1394703965.34.0.603199781912.issue20907@psf.upfronthosting.co.za> Message-ID: <1638577795.24.0.847777515278.issue20907@roundup.psfhosted.org> Andrei Kulakov added the comment: I think it may be good enough to add a warning on skipped files in _unpack_zipfile(). - this way we keep backwards compatibility (especially since behavior in both modules differed for such a long time.) - it's not clear that ZipFile behavior is superior -- for example, what if a file with stripped path components overwrites existing files? - if requested in the future, a parameter can be added to enable ZipFile-like behavior - it can be very confusing if files are silently skipped, especially if an archive has thousands of files. I've added a PR, note that the test in PR also tests that files with '..' are indeed skipped, we don't have a test for that now, so that's an added benefit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 19:38:54 2021 From: report at bugs.python.org (Ammar Askar) Date: Sat, 04 Dec 2021 00:38:54 +0000 Subject: [issue27831] Python 3.4.5 leaks memory when attempting to load non-existent file In-Reply-To: <1471917436.63.0.291205173926.issue27831@psf.upfronthosting.co.za> Message-ID: <1638578334.43.0.827231208685.issue27831@roundup.psfhosted.org> Ammar Askar added the comment: Looks like this got fixed somewhere along between 3.5 and 3.6 --- 3.5 --- ./python: can't open file 'id:000109': [Errno 2] No such file or directory ================================================================= ==28078==ERROR: LeakSanitizer: detected memory leak --- 3.6 --- ./python id:000109 ./python: can't open file 'id:000109': [Errno 2] No such file or directory Closing as 3.5 is no longer a supported version. ---------- nosy: +ammar2 resolution: -> out of date stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 20:34:53 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sat, 04 Dec 2021 01:34:53 +0000 Subject: [issue20907] behavioral differences between shutil.unpack_archive and ZipFile.extractall In-Reply-To: <1394703965.34.0.603199781912.issue20907@psf.upfronthosting.co.za> Message-ID: <1638581693.42.0.576612369893.issue20907@roundup.psfhosted.org> Andrei Kulakov added the comment: I forgot to add this: - we may not want to follow the behavior of command line unzip - it's interactive so considerations are somewhat different. For example, it will warn if file is being overwritten and show a prompt on whether to skip, overwrite, abort, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 20:44:12 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 04 Dec 2021 01:44:12 +0000 Subject: [issue31735] Documentation incorrectly states how descriptors are invoked In-Reply-To: <1507561484.86.0.213398074469.issue31735@psf.upfronthosting.co.za> Message-ID: <1638582252.44.0.0747756989777.issue31735@roundup.psfhosted.org> Raymond Hettinger added the comment: > it should have > > d.__get__(obj, type(obj)) instead of d.__get__(obj) The objtype argument is optional as shown in all of the examples. The call from object.__getattribute__() always passes in both parameters, even though only the first is required. ################################################################ # Demonstration of __get__() being called with one or two params class A: def __init__(self, x): self.x = x def m(self, y): return self.x * y >>> a = A(10) >>> a.m(5) 50 >>> vars(A)['m'].__get__(a)(5) # objtype is not required 50 >>> vars(A)['m'].__get__(a, A)(5) # objtype may be used 50 ################################################################ # Demonstration of object.__getattribute__ supplying both args class Desc: def __get__(self, *args): return args class B: z = Desc() >>> b = B() >>> b.z (<__main__.B object at 0x109156110>, ) ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 20:54:16 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 04 Dec 2021 01:54:16 +0000 Subject: [issue23317] Incorrect description of descriptor invocation in Python Language Reference In-Reply-To: <1422206163.24.0.274216799196.issue23317@psf.upfronthosting.co.za> Message-ID: <1638582856.74.0.751969489503.issue23317@roundup.psfhosted.org> Raymond Hettinger added the comment: I think we can leave this as-is. It does a reasonable job of communicating where the descriptor is found and the arguments used when it is called. Marking this as out of date because later in the howto guide there is a precise pure python equivalent for the lookup and invocation steps. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 21:20:56 2021 From: report at bugs.python.org (Andrew Lin) Date: Sat, 04 Dec 2021 02:20:56 +0000 Subject: [issue45976] Random._randbelow() loses time by caching an attribute lookup Message-ID: <1638584456.65.0.012587553781.issue45976@roundup.psfhosted.org> New submission from Andrew Lin : This PR obtains a performance improvement in the random module by removing a cached attribute lookup in Random._randbelow_with_getrandbits() that costs time on average. In the best cases (on my machine) I get 10% improvement for randrange(), 7% for shuffle(), and 11% for sample(), with no change in the worst cases. To elaborate... If n is slightly less than a power of 2, _randbelow_with_getrandbits(n) almost always makes just one call to getrandbits(), so caching the attribute lookup never pays for itself. Even in the worst case, when n is exactly a power of 2, the expected number of calls to getrandbits() is still only 2, and on my machine caching just breaks even. (A friend ran it on ARM and got even more favorable results.) I included a similar change to _randbelow_without_getrandbits() on similar grounds, although I didn't benchmark it. (Brand new here; let me know if I've left anything out!) ---------- components: Library (Lib) messages: 407625 nosy: onethreeseven priority: normal severity: normal status: open title: Random._randbelow() loses time by caching an attribute lookup type: performance versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 21:22:38 2021 From: report at bugs.python.org (Roundup Robot) Date: Sat, 04 Dec 2021 02:22:38 +0000 Subject: [issue45976] Random._randbelow() loses time by caching an attribute lookup In-Reply-To: <1638584456.65.0.012587553781.issue45976@roundup.psfhosted.org> Message-ID: <1638584558.93.0.0923656640553.issue45976@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +28136 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29911 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 21:32:54 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 04 Dec 2021 02:32:54 +0000 Subject: [issue45976] Random._randbelow() loses time by caching an attribute lookup In-Reply-To: <1638584456.65.0.012587553781.issue45976@roundup.psfhosted.org> Message-ID: <1638585174.49.0.995472206746.issue45976@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for the suggestion. I'll try this out on various builds and machines to see how it works out. The speed of locals is consistently fast, but the speed of method calls has varied over the last few versions of Python (generally getting faster). When this code was first written, it was benchmarked and localizing was a net win. ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 21:37:15 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 04 Dec 2021 02:37:15 +0000 Subject: [issue20751] Harmonize descriptor protocol documentation: direct call, super binding with Descriptor Howto docs In-Reply-To: <1393193636.36.0.125202538555.issue20751@psf.upfronthosting.co.za> Message-ID: <1638585435.21.0.309990321684.issue20751@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 135ecc3492cee259090fd4aaed9056c130cd2eba by Raymond Hettinger in branch 'main': bpo-20751: Replace method example with attribute example, matching the descriptor howto (GH-29909) https://github.com/python/cpython/commit/135ecc3492cee259090fd4aaed9056c130cd2eba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 21:39:44 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 04 Dec 2021 02:39:44 +0000 Subject: [issue20751] Harmonize descriptor protocol documentation: direct call, super binding with Descriptor Howto docs In-Reply-To: <1393193636.36.0.125202538555.issue20751@psf.upfronthosting.co.za> Message-ID: <1638585584.73.0.898875495656.issue20751@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 21:46:49 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 04 Dec 2021 02:46:49 +0000 Subject: [issue45976] Random._randbelow() loses time by caching an attribute lookup In-Reply-To: <1638584456.65.0.012587553781.issue45976@roundup.psfhosted.org> Message-ID: <1638586009.03.0.937880822734.issue45976@roundup.psfhosted.org> Raymond Hettinger added the comment: * If you post a timing script, it will make it easier for me to verify this across versions and across machine and for various input sizes. * If you have time, do run some benchmarks for _randbelow_without_getrandbits() * Try your change with and without the walrus operator. If it doesn't make a difference in the timings, let's us the non-walrus version which is more readable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 21:49:48 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 04 Dec 2021 02:49:48 +0000 Subject: [issue45975] Simplify some while-loops with walrus operator In-Reply-To: <1638573350.23.0.80297686747.issue45975@roundup.psfhosted.org> Message-ID: <1638586188.65.0.625749431.issue45975@roundup.psfhosted.org> Raymond Hettinger added the comment: The general rule as stated by Zachary is correct; however, I'm in mildly favor of this PR because these are the use cases that the walrus operator was specifically designed for. That said, it would be nice to verify that timings don't get worse and to carefully review each edit to make sure it doesn't introduce a bug. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 22:03:35 2021 From: report at bugs.python.org (Andrew Lin) Date: Sat, 04 Dec 2021 03:03:35 +0000 Subject: [issue45976] Random._randbelow() loses time by caching an attribute lookup In-Reply-To: <1638584456.65.0.012587553781.issue45976@roundup.psfhosted.org> Message-ID: <1638587015.88.0.937656818818.issue45976@roundup.psfhosted.org> Andrew Lin added the comment: Timings are unaffected by updating to non-walrus, so I'll do so in the PR. Using _randbelow_without_getrandbits() I get 5% improvement to sample([None] * 2047, 50); 6% to shuffle([None] * 2000); and approximately 6% to randrange() for any number significantly less than 2**32. It's not surprising that the absolute speedup is smaller, because _randbelow_without_getrandbits() does a lot more work that is untouched by the change. On the other hand, the speedup is more consistent, since _randbelow_without_getrandbits(n) almost never calls random() more than once for any n significantly less than 2**32. I will clean up my benchmark script and post it. Thanks for the feedback! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 22:45:20 2021 From: report at bugs.python.org (Ivan Pozdeev) Date: Sat, 04 Dec 2021 03:45:20 +0000 Subject: [issue43799] OpenSSL 3.0.0: define OPENSSL_API_COMPAT 1.1.1 In-Reply-To: <1618047260.96.0.943530034595.issue43799@roundup.psfhosted.org> Message-ID: <1638589520.55.0.611871922276.issue43799@roundup.psfhosted.org> Ivan Pozdeev added the comment: @christian.heimes https://github.com/python/cpython/pull/25481 also needs backporting to 3.9 and 3.8. A Pyenv user has been affected by the "implicit declaration of function ?SSLv3_method?" compliation error that it fixes in 3.9.9: https://github.com/pyenv/pyenv/issues/2181 ---------- nosy: +ivan.pozdeev.gm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 22:58:31 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sat, 04 Dec 2021 03:58:31 +0000 Subject: [issue45977] Unexpected effect of sys.pycache_prefix = "" Message-ID: <1638590311.18.0.778355816492.issue45977@roundup.psfhosted.org> New submission from Andrei Kulakov : Setting sys.pycache_prefix = "", re-creates CWD structure under current directory, e.g. if run from /Users/foo/test, will create /Users/foo/test/Users/foo/test/myfile.pyc . Is that intentional? It seems a little weird. At least it might be good to document it. ---------- components: Interpreter Core messages: 407632 nosy: andrei.avk priority: low severity: normal status: open title: Unexpected effect of sys.pycache_prefix = "" type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 22:59:05 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sat, 04 Dec 2021 03:59:05 +0000 Subject: [issue45977] Unexpected effect of sys.pycache_prefix = "" In-Reply-To: <1638590311.18.0.778355816492.issue45977@roundup.psfhosted.org> Message-ID: <1638590345.63.0.500219183342.issue45977@roundup.psfhosted.org> Andrei Kulakov added the comment: (I forgot to mention this happens on MacOS). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 23:06:10 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 04 Dec 2021 04:06:10 +0000 Subject: [issue45976] Random._randbelow() loses time by caching an attribute lookup In-Reply-To: <1638584456.65.0.012587553781.issue45976@roundup.psfhosted.org> Message-ID: <1638590770.77.0.137358097304.issue45976@roundup.psfhosted.org> Raymond Hettinger added the comment: I just did a few timings using the stock python.org Mac builds. Only Python 3.10 gave the expected speed-up. Python 3.8 and Python 3.9 got slower. Python 3.11 was slightly slower. I think we should pass on this proposed change. The current code is safer in that it has been consistently good while the proposed change is inconsistent and can't be relied upon across builds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 23:22:33 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 04 Dec 2021 04:22:33 +0000 Subject: [issue45976] Random._randbelow() loses time by caching an attribute lookup In-Reply-To: <1638584456.65.0.012587553781.issue45976@roundup.psfhosted.org> Message-ID: <1638591753.38.0.130081231239.issue45976@roundup.psfhosted.org> Raymond Hettinger added the comment: On the current 3.11, I do get a speedup below a power of two, but a slight degradation (as expected) at power of two. python3.11 -m timeit -s 'from random import randrange' 'randrange(65535)' python3.11 -m timeit -s 'from random import randrange' 'randrange(65536)' Also, I used PyPy3 on its 3.7 version of random.py but with the modern code for _getrandbits. There was no discernible change with and without the proposed edit. Please go ahead and update to the best version of your patch. I'll mark this BPO issue as "later" and will run tests again as 3.11 gets close to a release. Right now, CPython's performance is still in flux and it is too early to try tune application code the current version. ---------- resolution: -> later stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 23:36:47 2021 From: report at bugs.python.org (Andrew Lin) Date: Sat, 04 Dec 2021 04:36:47 +0000 Subject: [issue45976] Random._randbelow() loses time by caching an attribute lookup In-Reply-To: <1638584456.65.0.012587553781.issue45976@roundup.psfhosted.org> Message-ID: <1638592607.3.0.183676000411.issue45976@roundup.psfhosted.org> Andrew Lin added the comment: I finally cleaned up my benchmark script, which feels like a big hack. I should really learn to use pyperf or something. Inspired by your comment about 3.8 on the Mac I tried my Ubuntu installation's stock 3.8. I get a small degradation (~0.5%) for powers of two and 4-5% speedups just below powers of two and for shuffle. (This is under the slightly strange situation where _randbelow is using the main branch code but everything else in the class is imported from 3.8.) _randbelow_without_getrandbits() is consistently (if only slightly) faster, as you would expect for cases that are basically guaranteed to call self.random() only once. I am impressed (if not necessarily surprised) by the variation between builds, especially with my friend's ARM builds which reached nearly 20% for one case. So I completely understand if it's less uncertain just to pass. Thanks for your attention, in any event! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 3 23:37:12 2021 From: report at bugs.python.org (Andrew Lin) Date: Sat, 04 Dec 2021 04:37:12 +0000 Subject: [issue45976] Random._randbelow() loses time by caching an attribute lookup In-Reply-To: <1638584456.65.0.012587553781.issue45976@roundup.psfhosted.org> Message-ID: <1638592632.83.0.035549474788.issue45976@roundup.psfhosted.org> Change by Andrew Lin : Added file: https://bugs.python.org/file50473/randbelow_timing.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 00:00:02 2021 From: report at bugs.python.org (David Jack) Date: Sat, 04 Dec 2021 05:00:02 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502210311.11.0.464984034279.issue31148@psf.upfronthosting.co.za> Message-ID: <1638594002.13.0.123225742491.issue31148@roundup.psfhosted.org> David Jack added the comment: Thank you for the information. That will definitely be helpful. Also, thank you for being so detailed with your explanation.?Thank you so much. my name is david. i am provide?mac optimizer pro software your mac has been speed slow and?malware attack and junk files & more issues solve any time.?feel free to reach out at @ +1-866-252-2104 for instant and assured support for any queries regarding the mac optimizer pro Download best mac optimizer pc goto this link and download https://macoptimizerpro.com/ ---------- nosy: +macoptimizer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 00:26:55 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 04 Dec 2021 05:26:55 +0000 Subject: [issue45914] Very first multiprocessing example not working on Windows 11 In-Reply-To: <1638074274.33.0.534994157782.issue45914@roundup.psfhosted.org> Message-ID: <1638595615.27.0.608295889163.issue45914@roundup.psfhosted.org> Terry J. Reedy added the comment: I think something should be said right after the example. But the 20 line note seems a bit too much at this location. Perhaps insert (For reasons given _below_, this will raise error if enter interactively.) with _below_, say, linked to the 20 line note. It is not quite clear to me it this only applies on Windows or is general. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, rhettinger, terry.reedy versions: +Python 3.11 -Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 00:28:38 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 04 Dec 2021 05:28:38 +0000 Subject: [issue45916] documentation link error In-Reply-To: <1638101696.82.0.501489879762.issue45916@roundup.psfhosted.org> Message-ID: <1638595718.44.0.518786937022.issue45916@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 257eea55860c5f35acce49c062c5823c7a3a1317 by Miss Islington (bot) in branch '3.9': bpo-45916: Use HTTPS link for The Perils of Floating Point (GH-29896) https://github.com/python/cpython/commit/257eea55860c5f35acce49c062c5823c7a3a1317 ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 00:29:45 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 04 Dec 2021 05:29:45 +0000 Subject: [issue45916] documentation link error In-Reply-To: <1638101696.82.0.501489879762.issue45916@roundup.psfhosted.org> Message-ID: <1638595785.15.0.515205880691.issue45916@roundup.psfhosted.org> Terry J. Reedy added the comment: Zach, I presume you wanted the last backport merged and issue closed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 00:43:21 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 04 Dec 2021 05:43:21 +0000 Subject: [issue45922] Make more methods, functions, built-ins ... clickable In-Reply-To: <1638151109.2.0.445399231307.issue45922@roundup.psfhosted.org> Message-ID: <1638596601.83.0.0377531271374.issue45922@roundup.psfhosted.org> Terry J. Reedy added the comment: I am generally in favor of adding more links. PR-29633, covering one doc file, has more than enough changes for one PR. Please read the original patch, the comments, and the subsequent changes. I plan to do the same. ---------- nosy: +terry.reedy title: Many method, function, built-in... are not clickable and should be -> Make more methods, functions, built-ins ... clickable _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 01:00:06 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 04 Dec 2021 06:00:06 +0000 Subject: [issue45971] calendar module does not recognize switch to Gregorian In-Reply-To: <1638516366.75.0.743197554563.issue45971@roundup.psfhosted.org> Message-ID: <1638597606.83.0.515836798046.issue45971@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- components: +Library (Lib) -Extension Modules resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> calendar bug related to September 2-14, 1752 title: calendar module issue -> calendar module does not recognize switch to Gregorian type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 01:50:30 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sat, 04 Dec 2021 06:50:30 +0000 Subject: [issue37198] _parse_localename fail to parse 'en_IL' In-Reply-To: <1559925201.97.0.400746291459.issue37198@roundup.psfhosted.org> Message-ID: <1638600630.36.0.952541252517.issue37198@roundup.psfhosted.org> Andrei Kulakov added the comment: I confirmed that it works on 3.9 so I think this can be closed as not a bug: [ins] In [4]: _parse_localename('en_IL') Out[4]: ('en_IL', 'UTF-8') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 01:52:35 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sat, 04 Dec 2021 06:52:35 +0000 Subject: [issue43098] tarfile list() method does not show file type In-Reply-To: <1612240547.16.0.611621491067.issue43098@roundup.psfhosted.org> Message-ID: <1638600755.81.0.0271831918626.issue43098@roundup.psfhosted.org> Andrei Kulakov added the comment: Val: contributions are only now accepted in form of github PRs, not patches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 01:55:34 2021 From: report at bugs.python.org (Joe Cool) Date: Sat, 04 Dec 2021 06:55:34 +0000 Subject: [issue40467] subprocess: replacement shell on windows with executable="..." arg In-Reply-To: <1588340057.85.0.281023369912.issue40467@roundup.psfhosted.org> Message-ID: <1638600934.54.0.771663662246.issue40467@roundup.psfhosted.org> Joe Cool added the comment: Proposed solution: if comspec.endswith('sh.exe') or comspec.endswith('sh'): # issue 40467 args = '{} -c "{}"'.format (comspec, args) # issue 40467 else: # issue 40467 args = '{} /c "{}"'.format (comspec, args) ---------- nosy: +snoopyjc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 02:26:13 2021 From: report at bugs.python.org (Ram Rachum) Date: Sat, 04 Dec 2021 07:26:13 +0000 Subject: [issue28953] Use `raise from` when raising new IncompleteRead In-Reply-To: <1481578993.98.0.52471260982.issue28953@psf.upfronthosting.co.za> Message-ID: <1638602773.21.0.445566633331.issue28953@roundup.psfhosted.org> Ram Rachum added the comment: Interesting feature Irit, thank you Two things: 1. Is there better documentation for that feature than what was in the CL of the issue you linked to? Because that documentation was more lawyery than explanatory. 2. If I understand correctly, the note is meant for things that don't exactly fit in the exception message for some reason or another. (A better documentation with examples would have given me a clearer understanding of your use cases.) I'm not sure why the message included here should be relegated to a note. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 02:37:31 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 04 Dec 2021 07:37:31 +0000 Subject: [issue45914] Very first multiprocessing example not working on Windows 11 In-Reply-To: <1638074274.33.0.534994157782.issue45914@roundup.psfhosted.org> Message-ID: <1638603451.19.0.130733832528.issue45914@roundup.psfhosted.org> Eryk Sun added the comment: > not quite clear to me it this only applies on Windows or is general. macOS defaults to the spawn method (bpo-33725). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 04:08:33 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 04 Dec 2021 09:08:33 +0000 Subject: [issue40467] subprocess: replacement shell on windows with executable="..." arg In-Reply-To: <1588340057.85.0.281023369912.issue40467@roundup.psfhosted.org> Message-ID: <1638608913.8.0.839347602233.issue40467@roundup.psfhosted.org> Eryk Sun added the comment: > it might be nice if it's possible to give some sort of useful > warning/error when this happens -- perhaps say that specifying > both shell=True and executable="..." isn't supported on Windows? The `shell` parameter is documented as follows for Windows: On Windows with shell=True, the COMSPEC environment variable specifies the default shell. The only time you need to specify shell=True on Windows is when the command you wish to execute is built into the shell (e.g. dir or copy). You do not need shell=True to run a batch file or console-based executable. It wouldn't hurt to clarify that the COMSPEC shell has to support `/c`. This is required by CreateProcessW(), which uses COMSPEC to run BAT and CMD files. The discussion about using `executable` with `shell` could be extended for Windows. But this would also require new behavior. For example: Original: if shell: startupinfo.dwFlags |= _winapi.STARTF_USESHOWWINDOW startupinfo.wShowWindow = _winapi.SW_HIDE comspec = os.environ.get("COMSPEC", "cmd.exe") args = '{} /c "{}"'.format (comspec, args) Proposed: if shell: startupinfo.dwFlags |= _winapi.STARTF_USESHOWWINDOW startupinfo.wShowWindow = _winapi.SW_HIDE if executable is not None: cmd = executable else: cmd = os.path.normpath(os.environ.get("COMSPEC", "cmd.exe")) if "\\" in cmd: executable = cmd args = '"{}" /c "{}"'.format(cmd, args) > if comspec.endswith('sh.exe') or comspec.endswith('sh'): > args = '{} -c "{}"'.format (comspec, args) sh is not a valid COMSPEC shell. To use sh automatically, subprocess would have to support and prefer the SHELL [1] environment variable in Windows -- and in POSIX for that matter. --- [1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03 ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 04:14:59 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 04 Dec 2021 09:14:59 +0000 Subject: [issue40467] subprocess: replacement shell on windows with executable="..." arg In-Reply-To: <1588340057.85.0.281023369912.issue40467@roundup.psfhosted.org> Message-ID: <1638609299.41.0.409868208109.issue40467@roundup.psfhosted.org> Change by Eryk Sun : ---------- versions: +Python 3.10, Python 3.11 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 04:39:30 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 04 Dec 2021 09:39:30 +0000 Subject: [issue37198] _parse_localename fail to parse 'en_IL' In-Reply-To: <1559925201.97.0.400746291459.issue37198@roundup.psfhosted.org> Message-ID: <1638610770.15.0.673150888156.issue37198@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 04:47:09 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 04 Dec 2021 09:47:09 +0000 Subject: [issue45978] deepfreeze opaquely fails on Windows when building from Visual Studio Message-ID: <1638611229.31.0.384123662554.issue45978@roundup.psfhosted.org> New submission from Dennis Sweeney : I'd love to know if there is something I'm doing wrong, but with recent deepfreeze changes, my Visual Studio 2019 setup has been having trouble build things. It seems PCBuild/build.bat works perfectly and all tests pass and everything, but using the GUI in Visual Studio 2019 to build with the "Local Windows Debugger" green play button leads to a build failure. It gives the following output: Build started... 1>------ Build started: Project: _freeze_module, Configuration: Debug x64 ------ 1>_freeze_module.vcxproj -> C:\Users\sween\Source\Repos\temp\cpython\PCbuild\amd64\_freeze_module_d.exe 1>C:\Users\sween\Source\Repos\temp\cpython\PCbuild\_freeze_module.vcxproj(413,5): error MSB3073: The command " "C:\Users\sween\Source\Repos\temp\cpython\Tools\scripts\deepfreeze.py" "C:\Users\sween\Source\Repos\temp\cpython\Python\frozen_modules\importlib._bootstrap.h" "-m" "importlib._bootstrap" -o "C:\Users\sween\Source\Repos\temp\cpython\PCbuild\obj\311amd64_Debug\_freeze_module\importlib._bootstrap.g.h"" exited with code 103. 1>Done building project "_freeze_module.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 3 up-to-date, 0 skipped ========== I wonder if it has something to do with how .py files are set to open? (shouldn't that be made not to matter?) Attached are my more detailed steps to reproduce the failure. ---------- components: Build, Windows files: reproducer.txt messages: 407648 nosy: Dennis Sweeney, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: deepfreeze opaquely fails on Windows when building from Visual Studio type: compile error versions: Python 3.11 Added file: https://bugs.python.org/file50474/reproducer.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 04:53:06 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 04 Dec 2021 09:53:06 +0000 Subject: [issue45975] Simplify some while-loops with walrus operator In-Reply-To: <1638573350.23.0.80297686747.issue45975@roundup.psfhosted.org> Message-ID: <1638611586.42.0.70339831241.issue45975@roundup.psfhosted.org> Irit Katriel added the comment: As I mentioned in the PR, merging this can make future backports to 3.6 and 3.7 more complicated. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 04:54:05 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 04 Dec 2021 09:54:05 +0000 Subject: [issue45978] deepfreeze opaquely fails on Windows when building from Visual Studio In-Reply-To: <1638611229.31.0.384123662554.issue45978@roundup.psfhosted.org> Message-ID: <1638611645.1.0.644816944018.issue45978@roundup.psfhosted.org> Dennis Sweeney added the comment: I think I've been getting similar issues for a little while that I've been able to work around until now. If I git checkout 3.10 and then hit the "Local Windows Debugger" button, I get this: Build started... 1>------ Build started: Project: pythoncore, Configuration: Debug x64 ------ 1>Killing any running python_d.exe instances... 1>Regenerate opcode.h opcode_targets.h 1>C:\Users\sween\Source\Repos\temp\cpython\PCbuild\regen.targets(62,5): error MSB3073: The command " Tools\scripts\generate_opcode_h.py Lib\opcode.py Include\opcode.h" exited with code 103. 1>Done building project "pythoncore.vcxproj" -- FAILED. 2>------ Build started: Project: _ctypes, Configuration: Debug x64 ------ 3>------ Build started: Project: python, Configuration: Debug x64 ------ ========== Build: 0 succeeded, 3 failed, 0 up-to-date, 0 skipped ========== However, if I then run .\PCbuild\build.bat, and then hit the "Local Windows Debugger" button, the build succeeds. Is there some difference in which python executable is chosen to run .py files between build.bat versus what Visual Studio does? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 04:57:26 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 04 Dec 2021 09:57:26 +0000 Subject: [issue28953] Use `raise from` when raising new IncompleteRead In-Reply-To: <1481578993.98.0.52471260982.issue28953@psf.upfronthosting.co.za> Message-ID: <1638611846.41.0.792246677763.issue28953@roundup.psfhosted.org> Irit Katriel added the comment: It?s meant for thing you want to add to the msg after the exception was created. The PR here seems to create a new exception of the same type in order to chain it with an additional msg. I?m suggesting that it might be sufficient to attach a note to the existing exception instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 05:08:03 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 04 Dec 2021 10:08:03 +0000 Subject: [issue45695] Out-of-tree builds are not tested. In-Reply-To: <1635895785.09.0.174517598815.issue45695@roundup.psfhosted.org> Message-ID: <1638612483.7.0.948696340331.issue45695@roundup.psfhosted.org> Christian Heimes added the comment: New changeset cee07b162843694e8166ad8715162d4d5886b50f by Christian Heimes in branch 'main': bpo-45695: Test out-of-tree builds on GHA (GH-29904) https://github.com/python/cpython/commit/cee07b162843694e8166ad8715162d4d5886b50f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 05:18:40 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 04 Dec 2021 10:18:40 +0000 Subject: [issue45978] deepfreeze opaquely fails on Windows when building from Visual Studio In-Reply-To: <1638611229.31.0.384123662554.issue45978@roundup.psfhosted.org> Message-ID: <1638613120.04.0.0579819336767.issue45978@roundup.psfhosted.org> Dennis Sweeney added the comment: Sure enough, if I go to "Choose Default Apps by File Type" in Windows settings and associate ".py" --> "Notepad", then Visual studio keeps opening Notepad windows during build. Can the Visual Studio build configurations be made to run python scripts as "SOME_SPECIFIC_PYTHON_EXECUTABLE ./script.py" or perhaps "py ./script.py" instead of just "./script.py"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 05:21:49 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 04 Dec 2021 10:21:49 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638613309.27.0.273656665125.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 4045392e0e3446362841b3336497cb6eeccfcd23 by Christian Heimes in branch 'main': bpo-45847: Port _ctypes partly to PY_STDLIB_MOD (GH-29747) https://github.com/python/cpython/commit/4045392e0e3446362841b3336497cb6eeccfcd23 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 05:24:25 2021 From: report at bugs.python.org (Ram Rachum) Date: Sat, 04 Dec 2021 10:24:25 +0000 Subject: [issue28953] Use `raise from` when raising new IncompleteRead In-Reply-To: <1481578993.98.0.52471260982.issue28953@psf.upfronthosting.co.za> Message-ID: <1638613465.29.0.0390483182756.issue28953@roundup.psfhosted.org> Ram Rachum added the comment: This might work here, but you'd need to be sure there isn't any important code that looks at the IncompleteRead exception and expects the data to be in its message. Also I hope that various tools like IDEs would learn quickly that they need to display the note in their traceback views, otherwise all of these notes would be hidden from many people. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 05:41:31 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 04 Dec 2021 10:41:31 +0000 Subject: [issue45978] deepfreeze opaquely fails on Windows when building from Visual Studio In-Reply-To: <1638611229.31.0.384123662554.issue45978@roundup.psfhosted.org> Message-ID: <1638614491.49.0.549238044303.issue45978@roundup.psfhosted.org> Dennis Sweeney added the comment: Actually, it seems $(PythonForBuild) is already used everywhere, it's just that $(PythonForBuild) is giving the empty string when VS uses it. On the other hand, PCBuild/build.bat sets $(PythonForBuild) by calling out to find_python.bat, and that works great. So perhaps the VS build should just be made to invoke find_python.bat. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 05:53:10 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 04 Dec 2021 10:53:10 +0000 Subject: [issue28953] Use `raise from` when raising new IncompleteRead In-Reply-To: <1481578993.98.0.52471260982.issue28953@psf.upfronthosting.co.za> Message-ID: <1638615190.82.0.379625350192.issue28953@roundup.psfhosted.org> Irit Katriel added the comment: Exception message text is not part of the api. The type is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 05:57:33 2021 From: report at bugs.python.org (David Jack) Date: Sat, 04 Dec 2021 10:57:33 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502210311.11.0.464984034279.issue31148@psf.upfronthosting.co.za> Message-ID: <1638615453.81.0.625508352782.issue31148@roundup.psfhosted.org> David Jack added the comment: Thank you for the information. That will definitely be helpful. https://pcoptimizerpro.com/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 05:58:36 2021 From: report at bugs.python.org (Ram Rachum) Date: Sat, 04 Dec 2021 10:58:36 +0000 Subject: [issue28953] Use `raise from` when raising new IncompleteRead In-Reply-To: <1481578993.98.0.52471260982.issue28953@psf.upfronthosting.co.za> Message-ID: <1638615516.74.0.734075003431.issue28953@roundup.psfhosted.org> Ram Rachum added the comment: Okay, works for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 06:33:45 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 04 Dec 2021 11:33:45 +0000 Subject: [issue45978] deepfreeze opaquely fails on Windows when building from Visual Studio In-Reply-To: <1638611229.31.0.384123662554.issue45978@roundup.psfhosted.org> Message-ID: <1638617625.14.0.70820497527.issue45978@roundup.psfhosted.org> Christian Heimes added the comment: Main requires a recent version of Python in order to bootstrap the build process. I just re-introduced _bootstrap_python for configure & make builds in bpo-45950. Could somebody with a Windows system re-add _bootstrap_python to Windows build process? bpo-45850 and bpo-45873 have more context. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 06:38:47 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Dec 2021 11:38:47 +0000 Subject: [issue45979] Fix Tkinter tests with old Tk Message-ID: <1638617927.57.0.610724634525.issue45979@roundup.psfhosted.org> New submission from Serhiy Storchaka : Some recently added tests are not compatible with old Tk versions. I have build all 8.5 and 8.6 versions and build and test Tkinter against them. The proposed PR makes tests passes on Tk versions 8.5.4 to 8.5.19 and 8.6.0 to 8.6.12. There are some issues with running the pure Tk shell for versions < 8.5.4 so I skipped them. ---------- components: Tests, Tkinter messages: 407661 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Fix Tkinter tests with old Tk type: enhancement versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 06:42:24 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Dec 2021 11:42:24 +0000 Subject: [issue45979] Fix Tkinter tests with old Tk In-Reply-To: <1638617927.57.0.610724634525.issue45979@roundup.psfhosted.org> Message-ID: <1638618144.36.0.151018071975.issue45979@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +28138 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29913 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 06:43:43 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Dec 2021 11:43:43 +0000 Subject: [issue45979] Fix Tkinter tests with old Tk In-Reply-To: <1638617927.57.0.610724634525.issue45979@roundup.psfhosted.org> Message-ID: <1638618223.34.0.204508389464.issue45979@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 07:05:19 2021 From: report at bugs.python.org (Julius Hamilton) Date: Sat, 04 Dec 2021 12:05:19 +0000 Subject: [issue45934] python curses newterm implementation Message-ID: <1638619519.48.0.50416526918.issue45934@roundup.psfhosted.org> Change by Julius Hamilton : ---------- nosy: +Guido.van.Rossum, juliushamilton100 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 07:07:29 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 04 Dec 2021 12:07:29 +0000 Subject: [issue45823] python stopped working In-Reply-To: <1637091661.28.0.129849432506.issue45823@roundup.psfhosted.org> Message-ID: <1638619649.47.0.0441982079607.issue45823@roundup.psfhosted.org> Andrew Svetlov added the comment: The reproducer is absent, closing ---------- nosy: +asvetlov resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 07:39:59 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 04 Dec 2021 12:39:59 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638621599.87.0.850715315144.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28139 pull_request: https://github.com/python/cpython/pull/29914 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 08:12:15 2021 From: report at bugs.python.org (chen-y0y0) Date: Sat, 04 Dec 2021 13:12:15 +0000 Subject: =?utf-8?q?=5Bissue45980=5D_Why_there_isn=27t_a_=E2=80=9CPython_2=2E2?= =?utf-8?b?4oCdIGZvciBQeVBJJ3MgY2xhc3NpZmllcnM/?= Message-ID: <1638623535.66.0.141979014031.issue45980@roundup.psfhosted.org> New submission from chen-y0y0 : The output: Upload failed (400): Invalid value for classifiers. Error: Classifier ' Programming Language :: Python :: 2.2' is not a valid classifier. error: Upload failed (400): Invalid value for classifiers. Error: Classifier ' Programming Language :: Python :: 2.2' is not a valid classifier. So, why is there no Python 2.2? Is it because it is outdated or because it is discriminated against? ---------- components: Distutils messages: 407663 nosy: dstufft, eric.araujo, prasechen priority: normal severity: normal status: open title: Why there isn't a ?Python 2.2? for PyPI's classifiers? type: performance versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 08:26:48 2021 From: report at bugs.python.org (chen-y0y0) Date: Sat, 04 Dec 2021 13:26:48 +0000 Subject: =?utf-8?q?=5Bissue45980=5D_Why_there_isn=27t_a_=E2=80=9CPython_2=2E2?= =?utf-8?b?4oCdIGZvciBQeVBJJ3MgY2xhc3NpZmllcnM/?= In-Reply-To: <1638623535.66.0.141979014031.issue45980@roundup.psfhosted.org> Message-ID: <1638624408.04.0.337480893867.issue45980@roundup.psfhosted.org> chen-y0y0 added the comment: And NOT ONLY Python 2.2, there aren't also Python 2.1 or earlier version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 08:39:26 2021 From: report at bugs.python.org (Devourer Station) Date: Sat, 04 Dec 2021 13:39:26 +0000 Subject: [issue45981] Get raw file name in bytes from ZipFile Message-ID: <1638625166.93.0.299659631229.issue45981@roundup.psfhosted.org> New submission from Devourer Station : It's quite annoying that ZipFile corrupts the filename by simply replacing '\\' with '/', not providing the raw file name in bytes to us. ---------- components: Library (Lib) messages: 407665 nosy: accelerator0099 priority: normal severity: normal status: open title: Get raw file name in bytes from ZipFile type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 09:01:19 2021 From: report at bugs.python.org (Devourer Station) Date: Sat, 04 Dec 2021 14:01:19 +0000 Subject: [issue45981] Get raw file name in bytes from ZipFile In-Reply-To: <1638625166.93.0.299659631229.issue45981@roundup.psfhosted.org> Message-ID: <1638626479.32.0.427915201739.issue45981@roundup.psfhosted.org> Devourer Station added the comment: In file Lib/zipfile.py: 1357> flags = centdir[5] 1358> if flags & 0x800: 1359> # UTF-8 file names extension 1360> filename = filename.decode('utf-8') 1361> else: 1362> # Historical ZIP filename encoding 1363> filename = filename.decode('cp437') ZipFile simply decodes all non-utf8 file names by encoding CP437. In file Lib/zipfile.py: 352> # This is used to ensure paths in generated ZIP files always use 353> # forward slashes as the directory separator, as required by the 354> # ZIP format specification. 355> if os.sep != "/" and os.sep in filename: 356> filename = filename.replace(os.sep, "/") And it replaces every '\\' with '/' on windows. Consider we have a file named '\x97\x5c\x92\x9b', which is '??' in Japanese encoded in SHIFT_JIS. You may have noticed the problem: '\x5c' is '\\'(backslash) in ASCII So you will see ZipFile decodes the bytes by CP437, and replaces all '\\' with '/'. And the Japanese character '?' is replaced partially, it is no longer itself. Someone says we can replace '/' with '\\' back, and decode it by CP437 to get the raw bytes. But what if both '/'('\x2f') and '\\'('\x5c') appear in the raw filename? Simply replacing '\\' in a bytestream without knowning the encoding is by no means a good way. Maybe we can provide a rawname field in the ZipInfo struct? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 09:09:46 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 04 Dec 2021 14:09:46 +0000 Subject: =?utf-8?q?=5Bissue45980=5D_Why_there_isn=27t_a_=E2=80=9CPython_2=2E2?= =?utf-8?b?4oCdIGZvciBQeVBJJ3MgY2xhc3NpZmllcnM/?= In-Reply-To: <1638623535.66.0.141979014031.issue45980@roundup.psfhosted.org> Message-ID: <1638626986.19.0.0178117151066.issue45980@roundup.psfhosted.org> Eric V. Smith added the comment: What's the use case for this? Can wheels even be installed in 2.2? I think it's safe to assume the classifiers are not present because they're outdated. I think https://github.com/pypa/pypi-support/issues would be the best place to report this, since it's not a bug in python itself. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 09:14:56 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 04 Dec 2021 14:14:56 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638627296.94.0.58061761225.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 64be8d369b7e3878078dbef466804ae8be49c1cf by Christian Heimes in branch 'main': bpo-45847: Update whatsnew and add place holder entries for missing extensions (GH-29914) https://github.com/python/cpython/commit/64be8d369b7e3878078dbef466804ae8be49c1cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 09:16:18 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 04 Dec 2021 14:16:18 +0000 Subject: [issue45981] Get raw file name in bytes from ZipFile In-Reply-To: <1638625166.93.0.299659631229.issue45981@roundup.psfhosted.org> Message-ID: <1638627378.0.0.697154974166.issue45981@roundup.psfhosted.org> Eric V. Smith added the comment: You would also need to decide what to do with these lines, just before the os.sep test: # Terminate the file name at the first null byte. Null bytes in file # names are used as tricks by viruses in archives. null_byte = filename.find(chr(0)) if null_byte >= 0: filename = filename[0:null_byte] I don't think you'd want to do this on an encoded (raw) filename, but on the other hand the comment makes a good point. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 09:55:58 2021 From: report at bugs.python.org (UnknownLITE) Date: Sat, 04 Dec 2021 14:55:58 +0000 Subject: [issue45982] Bug in Error messages Message-ID: <1638629758.22.0.232820967453.issue45982@roundup.psfhosted.org> New submission from UnknownLITE : A dot is missing between `now()` and `strftime` but it is suggesting that most probably a comma is missing. ---------- components: Interpreter Core files: Screenshot 2021-12-04 202054.png messages: 407670 nosy: UnknownLITE priority: normal severity: normal status: open title: Bug in Error messages type: enhancement versions: Python 3.10 Added file: https://bugs.python.org/file50475/Screenshot 2021-12-04 202054.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 09:56:56 2021 From: report at bugs.python.org (Zachary Ware) Date: Sat, 04 Dec 2021 14:56:56 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502210311.11.0.464984034279.issue31148@psf.upfronthosting.co.za> Message-ID: <1638629816.56.0.267121660337.issue31148@roundup.psfhosted.org> Change by Zachary Ware : ---------- Removed message: https://bugs.python.org/msg407637 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 09:57:11 2021 From: report at bugs.python.org (Zachary Ware) Date: Sat, 04 Dec 2021 14:57:11 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502210311.11.0.464984034279.issue31148@psf.upfronthosting.co.za> Message-ID: <1638629831.17.0.818038483233.issue31148@roundup.psfhosted.org> Change by Zachary Ware : ---------- Removed message: https://bugs.python.org/msg407658 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 10:16:12 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 04 Dec 2021 15:16:12 +0000 Subject: [issue45982] Bug in Error messages In-Reply-To: <1638629758.22.0.232820967453.issue45982@roundup.psfhosted.org> Message-ID: <1638630972.89.0.536576183465.issue45982@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 10:18:36 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 04 Dec 2021 15:18:36 +0000 Subject: [issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict In-Reply-To: <1472852881.19.0.987799736928.issue27946@psf.upfronthosting.co.za> Message-ID: <1638631116.36.0.626925693374.issue27946@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 10:46:31 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 04 Dec 2021 15:46:31 +0000 Subject: [issue45982] Bug in Error messages In-Reply-To: <1638629758.22.0.232820967453.issue45982@roundup.psfhosted.org> Message-ID: <1638632791.95.0.136611453485.issue45982@roundup.psfhosted.org> Eric V. Smith added the comment: Syntactically, this could be many possible errors: missing comma, missing period, missing parens, missing brackets, etc. A human can figure it out based on semantics, but based purely on syntax, I think this error message is good enough. ---------- components: +Parser -Interpreter Core nosy: +eric.smith, lys.nikolaou, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 10:53:44 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 04 Dec 2021 15:53:44 +0000 Subject: [issue45982] Bug in Error messages In-Reply-To: <1638629758.22.0.232820967453.issue45982@roundup.psfhosted.org> Message-ID: <1638633224.97.0.272665270998.issue45982@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I concur with Eric: the purpose of the error message is a suggestion based in the most likely cause. Also we have recently refined this so I will trigger in less uncommon situations. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 10:54:08 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 04 Dec 2021 15:54:08 +0000 Subject: [issue45934] python curses newterm implementation In-Reply-To: <1638619519.53.0.693758482199.issue45934@roundup.psfhosted.org> Message-ID: New submission from Guido van Rossum : Since this is an enhancement, it should only target 3.11.-- --Guido (mobile) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 10:57:51 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 04 Dec 2021 15:57:51 +0000 Subject: [issue45934] python curses newterm implementation In-Reply-To: Message-ID: <1638633471.05.0.694312733031.issue45934@roundup.psfhosted.org> Guido van Rossum added the comment: This does not apply to Windows (we don?t support curses there). ---------- components: +Library (Lib) -C API, Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 10:58:33 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 04 Dec 2021 15:58:33 +0000 Subject: [issue45975] Simplify some while-loops with walrus operator In-Reply-To: <1638573350.23.0.80297686747.issue45975@roundup.psfhosted.org> Message-ID: <1638633513.35.0.648908019713.issue45975@roundup.psfhosted.org> Raymond Hettinger added the comment: > As I mentioned in the PR, merging this can make future > backports to 3.6 and 3.7 more complicated. That's correct, but it is also true that we do very few of those and the likelihood of a conflict with one of these edits is low. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 11:25:52 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 04 Dec 2021 16:25:52 +0000 Subject: [issue45906] Python github installation issue In-Reply-To: <1637957258.27.0.535906199774.issue45906@roundup.psfhosted.org> Message-ID: <1638635152.08.0.23806398261.issue45906@roundup.psfhosted.org> Change by ?ric Araujo : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 11:32:04 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 04 Dec 2021 16:32:04 +0000 Subject: [issue45983] PyType_Spec.name must remain valid after PyType_FromSpec Message-ID: <1638635524.2.0.650786330944.issue45983@roundup.psfhosted.org> New submission from Ronald Oussoren : The documentation for PyType_Spec and the related functions is not clear about the required lifetime of fields of PyType_Spec. In particular, PyType_Spec.name must remain valid for the entire lifetime of types created with PyType_FromSpec*. The documentation doesn't mention this. I ran into this with code that calculates the name as needed an cleans up the memory used for the type spec after creating the type. The type appears to work fine when looking at it in Python scripts, but the tp_name slot is wrong. ---------- assignee: docs at python components: Documentation messages: 407676 nosy: docs at python, ronaldoussoren priority: normal severity: normal status: open title: PyType_Spec.name must remain valid after PyType_FromSpec type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 11:45:18 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 04 Dec 2021 16:45:18 +0000 Subject: [issue45983] PyType_Spec.name must remain valid after PyType_FromSpec In-Reply-To: <1638635524.2.0.650786330944.issue45983@roundup.psfhosted.org> Message-ID: <1638636318.14.0.84227281739.issue45983@roundup.psfhosted.org> Ronald Oussoren added the comment: I just noticed this duplicates #45315, sorry about the noise. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> `PyType_FromSpec` does not copy the name _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 12:31:40 2021 From: report at bugs.python.org (Ken Jin) Date: Sat, 04 Dec 2021 17:31:40 +0000 Subject: [issue45947] Place dict (and values) pointers at a fixed (negative) offset from the base of the object. In-Reply-To: <1638365448.99.0.213832334161.issue45947@roundup.psfhosted.org> Message-ID: <1638639100.66.0.00609816689536.issue45947@roundup.psfhosted.org> Change by Ken Jin : ---------- nosy: +kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 12:35:54 2021 From: report at bugs.python.org (Matej Cepl) Date: Sat, 04 Dec 2021 17:35:54 +0000 Subject: [issue45964] gdb test fails when packaging Python 3.10 for openSUSE/Linux In-Reply-To: <1638453038.24.0.528506960629.issue45964@roundup.psfhosted.org> Message-ID: <1638639354.71.0.834491912941.issue45964@roundup.psfhosted.org> Matej Cepl added the comment: > Matej, does your build system perhaps strip off the shebang of Lib/pdb.py? That would explain why you are getting the function on line 93. Yes, that?s it. Thank you. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 13:38:16 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 04 Dec 2021 18:38:16 +0000 Subject: [issue45976] Random._randbelow() loses time by caching an attribute lookup In-Reply-To: <1638584456.65.0.012587553781.issue45976@roundup.psfhosted.org> Message-ID: <1638643096.55.0.413546350552.issue45976@roundup.psfhosted.org> Raymond Hettinger added the comment: Notes ===== Without Boundmethod ------------------- LOAD FAST self LOAD METHOD getrandbits LOAD FAST k CALL_METHOD 1 Form Boundmethod ---------------- LOAD FAST self LOAD ATTR getrandbits STORE FAST getrandbits Call Boundmethod ---------------- LOAD FAST getrandbits LOAD FAST k CALL FUNCTION 1 Expected Call Frequency ----------------------- n = 1000 r = 0 .. 1024 P(r > n) 24 / 1024 = 2.3% E[calls] = 1 / (1 - 24/1024) = 1.024 n = 1024 r = 0 .. 2048 P(r > n) = 1024 / 2048 = 50% E[calls] = 1 / (1 - 1024/2048) = 2.0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 13:45:21 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Dec 2021 18:45:21 +0000 Subject: [issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict In-Reply-To: <1472852881.19.0.987799736928.issue27946@psf.upfronthosting.co.za> Message-ID: <1638643521.38.0.2475547427.issue27946@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +28140 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29915 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 13:53:34 2021 From: report at bugs.python.org (Andrew Lin) Date: Sat, 04 Dec 2021 18:53:34 +0000 Subject: [issue45976] Random._randbelow() loses time by caching an attribute lookup In-Reply-To: <1638584456.65.0.012587553781.issue45976@roundup.psfhosted.org> Message-ID: <1638644014.79.0.280214960392.issue45976@roundup.psfhosted.org> Andrew Lin added the comment: E[calls] reduces down to 2**k / n. I only just realized from working that out that it therefore doesn't quite vary linearly over [2**k, 2**(k+1)), although by what weight one wants to average I couldn't say. Personally if the change adversely impacts performance for any n on any major platform I will retract the PR. I was under the impression based on my own machine that this would not happen, but it is only my one machine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 13:55:25 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Dec 2021 18:55:25 +0000 Subject: [issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict In-Reply-To: <1472852881.19.0.987799736928.issue27946@psf.upfronthosting.co.za> Message-ID: <1638644125.36.0.00121739703253.issue27946@roundup.psfhosted.org> Serhiy Storchaka added the comment: The issue is no longer reproduced by the original test because of the cache for dict key tables. But it is not gone, and can be reproduced with modified test. There may be many similar bugs in the Python core end extensions. Adding incref/decref in PyDict_GetItem and similar C API functions could fix many of them, but perhaps not all, and it would hit performance. I suppose modt of uses of PyDict_GetItem are safe. ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 13:57:27 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Dec 2021 18:57:27 +0000 Subject: [issue13236] unittest needs more flush calls In-Reply-To: <1319137324.16.0.266090134048.issue13236@psf.upfronthosting.co.za> Message-ID: <1638644247.58.0.66588784066.issue13236@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset f42a06ba279c916fb67289e47f9bc60dc5dee4ee by Serhiy Storchaka in branch 'main': bpo-13236: Flush the output stream more often in unittest (GH-29864) https://github.com/python/cpython/commit/f42a06ba279c916fb67289e47f9bc60dc5dee4ee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 14:16:46 2021 From: report at bugs.python.org (Matt Wozniski) Date: Sat, 04 Dec 2021 19:16:46 +0000 Subject: [issue45982] Bug in Error messages In-Reply-To: <1638629758.22.0.232820967453.issue45982@roundup.psfhosted.org> Message-ID: <1638645406.89.0.300039862788.issue45982@roundup.psfhosted.org> Matt Wozniski added the comment: > Syntactically, this could be many possible errors: missing comma, missing period, missing parens, missing brackets, etc. Syntactically, it cannot be a missing comma. Adding the comma is a syntax error. $ python3 -c 'if datetime.now(),strftime(...) != "19:50:00": pass' File "", line 1 if datetime.now(),strftime(...) != "19:50:00": pass ^ SyntaxError: invalid syntax Granted this is a heuristic, but it would be nice if it was able to not suggest a change that it would reject as syntactically incorrect. ---------- nosy: +godlygeek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 15:22:08 2021 From: report at bugs.python.org (Nick Drozd) Date: Sat, 04 Dec 2021 20:22:08 +0000 Subject: [issue45975] Simplify some while-loops with walrus operator In-Reply-To: <1638573350.23.0.80297686747.issue45975@roundup.psfhosted.org> Message-ID: <1638649328.86.0.503829722143.issue45975@roundup.psfhosted.org> Nick Drozd added the comment: > Is there any measurable performance benefit from this? I wouldn't expect any performance changes either way. If it worked out to be slower, that would an unpleasant surprise and a good reason to reject this change. If it worked out to be faster, well, that would be great! > Reducing several hundred thousand lines of code by 148 is not a compelling benefit :) But it's not just any old 148 lines. By my count it includes the removal of 47 `break` statements. For a change of this nature there's certainly a chance of introducing errors. On the other hand, every one of those `break` statements is a site of manual loop-handling logic, and those already present some risk of introducing errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 15:27:35 2021 From: report at bugs.python.org (Alex Waygood) Date: Sat, 04 Dec 2021 20:27:35 +0000 Subject: [issue45975] Simplify some while-loops with walrus operator In-Reply-To: <1638573350.23.0.80297686747.issue45975@roundup.psfhosted.org> Message-ID: <1638649655.57.0.756661243611.issue45975@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 16:04:39 2021 From: report at bugs.python.org (mike mcleod) Date: Sat, 04 Dec 2021 21:04:39 +0000 Subject: [issue10483] http.server - what is executable on Windows In-Reply-To: <1290324390.55.0.445837984524.issue10483@psf.upfronthosting.co.za> Message-ID: <1638651879.58.0.860641178108.issue10483@roundup.psfhosted.org> Change by mike mcleod : ---------- keywords: +patch pull_requests: +28141 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29624 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 16:15:49 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 04 Dec 2021 21:15:49 +0000 Subject: [issue45982] Bug in Error messages In-Reply-To: <1638629758.22.0.232820967453.issue45982@roundup.psfhosted.org> Message-ID: <1638652549.29.0.746456558915.issue45982@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: It doesn't happen anymore with the latest 3.10: >>> if datetime.now(),strftime(...) != "19:50:00": pass File "", line 1 if datetime.now(),strftime(...) != "19:50:00": pass ^ SyntaxError: invalid syntax ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 16:16:39 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 04 Dec 2021 21:16:39 +0000 Subject: [issue45982] Bug in Error messages In-Reply-To: <1638629758.22.0.232820967453.issue45982@roundup.psfhosted.org> Message-ID: <1638652599.83.0.755770718684.issue45982@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: It doesn't happen anymore with the latest 3.10: >>> if datetime.now()strftime(...) != "19:50:00": pass File "", line 1 if datetime.now()strftime(...) != "19:50:00": pass ^^^^^^^^ SyntaxError: invalid syntax ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 16:16:42 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 04 Dec 2021 21:16:42 +0000 Subject: [issue45982] Bug in Error messages In-Reply-To: <1638629758.22.0.232820967453.issue45982@roundup.psfhosted.org> Message-ID: <1638652602.51.0.0955786189138.issue45982@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg407685 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 16:31:23 2021 From: report at bugs.python.org (STINNER Victor) Date: Sat, 04 Dec 2021 21:31:23 +0000 Subject: [issue10483] http.server - what is executable on Windows In-Reply-To: <1290324390.55.0.445837984524.issue10483@psf.upfronthosting.co.za> Message-ID: <1638653483.88.0.651465227248.issue10483@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 17:08:32 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Sat, 04 Dec 2021 22:08:32 +0000 Subject: [issue45984] Error messages for invalid string prefixes and potential attribute accesses Message-ID: <1638655712.59.0.26828555414.issue45984@roundup.psfhosted.org> New submission from theeshallnotknowethme : In the current version of CPython, this code: if datetime.now()strftime(...) != "19:50:00": return produces this error: File "", line 4 if datetime.now()strftime(...) != "19:50:00": return ^^^^^^^^ SyntaxError: invalid syntax This is a potential attribute access, and this bug report proposes it would produce this error instead: File "", line 4 if datetime.now()strftime(...) != "19:50:00": return ^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a dot? Also, for string prefixes, this is the current error: >>> kf'dsdsfddsf' File "", line 1 kf'dsdsfddsf' ^^^^^^^^^^^ SyntaxError: invalid syntax This bug report proposes this error instead: >>> kf'dsdsfddsf' File "", line 1 kf'dsdsfddsf' ^^ SyntaxError: invalid string prefix 'kf' ---------- components: Parser messages: 407687 nosy: February291948, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: Error messages for invalid string prefixes and potential attribute accesses versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 17:10:14 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Sat, 04 Dec 2021 22:10:14 +0000 Subject: [issue45984] Error messages for invalid string prefixes and potential attribute accesses In-Reply-To: <1638655712.59.0.26828555414.issue45984@roundup.psfhosted.org> Message-ID: <1638655814.61.0.845005172455.issue45984@roundup.psfhosted.org> Change by theeshallnotknowethme : ---------- keywords: +patch pull_requests: +28142 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29916 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 17:10:57 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 04 Dec 2021 22:10:57 +0000 Subject: [issue45984] Error messages for invalid string prefixes and potential attribute accesses In-Reply-To: <1638655712.59.0.26828555414.issue45984@roundup.psfhosted.org> Message-ID: <1638655857.59.0.60299054877.issue45984@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Duplicate of https://bugs.python.org/issue45982 ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 17:18:45 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 04 Dec 2021 22:18:45 +0000 Subject: [issue45906] Python github installation issue In-Reply-To: <1637957258.27.0.535906199774.issue45906@roundup.psfhosted.org> Message-ID: <1638656325.68.0.891717893094.issue45906@roundup.psfhosted.org> Christian Heimes added the comment: Could you please provide your operating system / Linux distro and the steps and commands you used to download Python from GitHub. Please also attach config.log file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 17:20:01 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 04 Dec 2021 22:20:01 +0000 Subject: [issue45984] Error messages for invalid string prefixes and potential attribute accesses In-Reply-To: <1638655712.59.0.26828555414.issue45984@roundup.psfhosted.org> Message-ID: <1638656401.28.0.0460416311392.issue45984@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Actually, is not technically a duplicate of https://bugs.python.org/issue45982 but is related. ---------- resolution: duplicate -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 17:27:49 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 04 Dec 2021 22:27:49 +0000 Subject: [issue45984] Error messages for invalid string prefixes and potential attribute accesses In-Reply-To: <1638655712.59.0.26828555414.issue45984@roundup.psfhosted.org> Message-ID: <1638656869.31.0.141309746115.issue45984@roundup.psfhosted.org> Eric V. Smith added the comment: Since the two reported problems are unrelated, this should be two bug reports. The first one does seem like a duplicate, as Pablo mentions. I haven?t checked to see if the second one already has an issue. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 17:30:16 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Sat, 04 Dec 2021 22:30:16 +0000 Subject: [issue45984] Error messages for invalid string prefixes and potential attribute accesses In-Reply-To: <1638655712.59.0.26828555414.issue45984@roundup.psfhosted.org> Message-ID: <1638657016.85.0.181332709736.issue45984@roundup.psfhosted.org> theeshallnotknowethme added the comment: I actually didn't know bpo-45982 existed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 18:01:23 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 04 Dec 2021 23:01:23 +0000 Subject: [issue45934] python curses newterm implementation In-Reply-To: Message-ID: <1638658883.32.0.988486851875.issue45934@roundup.psfhosted.org> Change by ?ric Araujo : ---------- stage: -> needs patch versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 18:56:38 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sat, 04 Dec 2021 23:56:38 +0000 Subject: [issue44534] unittest.mock.Mock.unsafe doc is garbled In-Reply-To: <1624968855.9.0.632630406188.issue44534@roundup.psfhosted.org> Message-ID: <1638662198.45.0.593217659989.issue44534@roundup.psfhosted.org> Change by Andrei Kulakov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.11 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 19:22:33 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sun, 05 Dec 2021 00:22:33 +0000 Subject: [issue43474] http.server.BaseHTTPRequestHandler end_header() fails In-Reply-To: <1615460999.3.0.75730553286.issue43474@roundup.psfhosted.org> Message-ID: <1638663753.6.0.715451154342.issue43474@roundup.psfhosted.org> Andrei Kulakov added the comment: It seems like sending zero headers is not supported, because: - if using http/1.0 https://www.rfc-editor.org/rfc/rfc7230#section-6.1 -- Connection: close must be sent - if using http/1.1 -- https://docs.python.org/3.11/library/http.server.html#http.server.BaseHTTPRequestHandler.protocol_version Content-Length must be included. Therefore closing as not a bug. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 19:44:21 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 05 Dec 2021 00:44:21 +0000 Subject: =?utf-8?q?=5Bissue45980=5D_Why_there_isn=27t_a_=E2=80=9CPython_2=2E2?= =?utf-8?b?4oCdIGZvciBQeVBJJ3MgY2xhc3NpZmllcnM/?= In-Reply-To: <1638623535.66.0.141979014031.issue45980@roundup.psfhosted.org> Message-ID: <1638665061.26.0.215889368213.issue45980@roundup.psfhosted.org> Steven D'Aprano added the comment: This is not a performance issue. Why did you flag it as performance? Python 2.2 and 2.1 are so out of date that I'm just going to close this and not even ask why you are bothering to write and publish code for Python 2.2 :-) ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed type: performance -> versions: -Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 19:48:11 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sun, 05 Dec 2021 00:48:11 +0000 Subject: [issue43418] FTPLib error when server returns byte message instead of string In-Reply-To: <1615037606.06.0.879407636626.issue43418@roundup.psfhosted.org> Message-ID: <1638665291.2.0.296886025987.issue43418@roundup.psfhosted.org> Andrei Kulakov added the comment: Closing as third party. Cowrie overrides ftplib.FTP class and implements __init__ in a way that doesn't work properly with some other methods of `FTP` class. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 21:02:49 2021 From: report at bugs.python.org (Devourer Station) Date: Sun, 05 Dec 2021 02:02:49 +0000 Subject: [issue45981] Get raw file name in bytes from ZipFile In-Reply-To: <1638625166.93.0.299659631229.issue45981@roundup.psfhosted.org> Message-ID: <1638669769.73.0.149919078639.issue45981@roundup.psfhosted.org> Devourer Station added the comment: Null bytes appear in abnormal zip files. (I haven't seen any multibyte encoding that represents a character with null bytes) But non-utf8 encodings are common in normal zip files, as windows uses different encodings for different language settings. (On the other hand, Linux suggests everyone use UTF8 regardless of their language settings.) It's a pity that nowadays few software supports specifying encoding when extracting archives. (We have unzip-iconv patch on Linux, even if the patch is never accepted by unzip) Changing the language and rebooting my OS makes no sense, and I don't know why. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 21:06:34 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 05 Dec 2021 02:06:34 +0000 Subject: [issue45981] Get raw file name in bytes from ZipFile In-Reply-To: <1638625166.93.0.299659631229.issue45981@roundup.psfhosted.org> Message-ID: <1638669994.1.0.504808079801.issue45981@roundup.psfhosted.org> Eric V. Smith added the comment: UTF-16 uses null bytes. I'm sure there are other encodings that do, too. But I don't know if these encodings are permitted or common in zip files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 22:04:26 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Sun, 05 Dec 2021 03:04:26 +0000 Subject: [issue45984] Error messages for invalid string prefixes and potential attribute accesses In-Reply-To: <1638655712.59.0.26828555414.issue45984@roundup.psfhosted.org> Message-ID: <1638673466.73.0.52649935821.issue45984@roundup.psfhosted.org> Change by theeshallnotknowethme : ---------- resolution: rejected -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 22:04:45 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Sun, 05 Dec 2021 03:04:45 +0000 Subject: [issue45984] Error messages for invalid string prefixes and potential attribute accesses In-Reply-To: <1638655712.59.0.26828555414.issue45984@roundup.psfhosted.org> Message-ID: <1638673485.54.0.658798652203.issue45984@roundup.psfhosted.org> Change by theeshallnotknowethme : ---------- resolution: -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 21:54:32 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sun, 05 Dec 2021 02:54:32 +0000 Subject: [issue44735] Failed venv Activation With "&" In Folder Name In-Reply-To: <1627190638.68.0.811624039795.issue44735@roundup.psfhosted.org> Message-ID: <1638672872.7.0.874135272622.issue44735@roundup.psfhosted.org> Andrei Kulakov added the comment: Duplicate of https://bugs.python.org/issue44540 ---------- nosy: +andrei.avk superseder: -> venv: activate.bat fails for venv with special characters in PATH _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 22:43:01 2021 From: report at bugs.python.org (Eryk Sun) Date: Sun, 05 Dec 2021 03:43:01 +0000 Subject: [issue44540] venv: activate.bat fails for venv with special characters in PATH In-Reply-To: <1625057041.78.0.250792490415.issue44540@roundup.psfhosted.org> Message-ID: <1638675781.54.0.485377471446.issue44540@roundup.psfhosted.org> Change by Eryk Sun : ---------- stage: -> needs patch versions: +Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 22:43:14 2021 From: report at bugs.python.org (Eryk Sun) Date: Sun, 05 Dec 2021 03:43:14 +0000 Subject: [issue44735] Failed venv Activation With "&" In Folder Name In-Reply-To: <1627190638.68.0.811624039795.issue44735@roundup.psfhosted.org> Message-ID: <1638675794.71.0.53020214016.issue44735@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 4 23:55:28 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sun, 05 Dec 2021 04:55:28 +0000 Subject: [issue36392] IPv4Interface Object has no attributte prefixlen In-Reply-To: <1553197512.13.0.766410741462.issue36392@roundup.psfhosted.org> Message-ID: <1638680128.38.0.777778490405.issue36392@roundup.psfhosted.org> Andrei Kulakov added the comment: The docs for current bugfix releases (3.9+) have clear links from the Interface class attribute `network` to the Network class which lists the `prefixlen` attribute. I don't think it can be made clearer - there's two ways to find it - either searching for `prefixlen` and working backwards from network to interface, or following the link from Interface.network. ---------- nosy: +andrei.avk, kj resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 04:52:08 2021 From: report at bugs.python.org (E. Paine) Date: Sun, 05 Dec 2021 09:52:08 +0000 Subject: [issue45979] Fix Tkinter tests with old Tk In-Reply-To: <1638617927.57.0.610724634525.issue45979@roundup.psfhosted.org> Message-ID: <1638697928.61.0.54456051545.issue45979@roundup.psfhosted.org> E. Paine added the comment: Is support for such old Tk versions useful? 8.5.4 was released in late 2008, and I highly doubt anyone would still be using it. IMO, 8.5.12 would be a good compromise, since we're giving support to a version more than 9 years old, but would simplify PR-29913 by removing several 8.5.x specific branches. (FYI, 8.5.12 was released on 2012-07-27 and 8.6.0 on 2012-12-20) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 06:02:26 2021 From: report at bugs.python.org (Ofer Koren) Date: Sun, 05 Dec 2021 11:02:26 +0000 Subject: [issue45985] AttributeError from @property inadvertantly flows into __getattr__ Message-ID: <1638702146.56.0.573091484317.issue45985@roundup.psfhosted.org> New submission from Ofer Koren : There's For quite a long time I've been seeing this bug: >>> class A(): ... @property ... def foo(self): ... return self.bar # <---- this is where it all starts ('bar' isn't found) ... ... def __getattr__(self, attr): ... raise AttributeError(attr) # <--- let's pretend our getattr couldn't find the attr >>> A().foo Traceback (most recent call last): File "t.py", line 13, in A().foo File "t.py", line 10, in __getattr__ raise AttributeError(attr) AttributeError: foo So an AttributeError spawned by `self.bar` caused us to "fallback" on __getattr__ with attr='foo', leading the naive code there to produce a very confusing error message. My workaround was to use a @safe_property decorator, one that catches AttributeError exceptions and converts them to RuntimeErrors instead, so that they don't flow into the unsuspecting __getattr__. I believe python should adopt this behavior into the built-in property decorator, perhaps with a more appropriate exception type. ---------- messages: 407701 nosy: koreno priority: normal severity: normal status: open title: AttributeError from @property inadvertantly flows into __getattr__ type: behavior versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 06:25:03 2021 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 05 Dec 2021 11:25:03 +0000 Subject: [issue7946] Convoy effect with I/O bound threads and New GIL In-Reply-To: <1266353325.38.0.278549753357.issue7946@psf.upfronthosting.co.za> Message-ID: <1638703503.1.0.693962109037.issue7946@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 06:35:40 2021 From: report at bugs.python.org (Alex Waygood) Date: Sun, 05 Dec 2021 11:35:40 +0000 Subject: [issue45985] AttributeError from @property inadvertantly flows into __getattr__ In-Reply-To: <1638702146.56.0.573091484317.issue45985@roundup.psfhosted.org> Message-ID: <1638704140.99.0.0999974724937.issue45985@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 07:05:52 2021 From: report at bugs.python.org (Marko) Date: Sun, 05 Dec 2021 12:05:52 +0000 Subject: [issue43806] asyncio.StreamReader hangs when reading from pipe and other process exits unexpectedly In-Reply-To: <1618143469.5.0.154132734242.issue43806@roundup.psfhosted.org> Message-ID: <1638705952.9.0.189300365022.issue43806@roundup.psfhosted.org> Marko added the comment: Thanks, takluyver! You are right. Synchronous code that I was comparing it to had os.close(ctx), but I forgot to add it in the async example, so I thought it was a bug. Closing this issue. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 07:06:49 2021 From: report at bugs.python.org (Athanasius) Date: Sun, 05 Dec 2021 12:06:49 +0000 Subject: [issue45986] 3.10.0 ships with older tcl/tk DLLs than 3.9.9 causing Windows Installer problems Message-ID: <1638706009.9.0.557448740254.issue45986@roundup.psfhosted.org> New submission from Athanasius : Python 3.10.0 ships with version 8.6.2.10 of both tcl86t.dll and tk86t.dll. Python 3.9.9, released after 3.10.0, ships with the later version 8.6.2.12 of both files. Releasing a project using py2exe and WiX to build a windows MSI installer file means that upgrading Python we use from 3.9.9 to 3.10.0 then refuses to install the files tcl86t.dll and tk86t.dll because their versions are older than the already installed files (but for some reason it *does* remove those older versions). For the user this then means the application crashes on startup when import of _tkinter.pyd fails due to the missing DLLs. There are two workarounds of: 1) Do a subsequent repair install of the MSI, 2) Manually uninstall the application before installing our version based on Python 3.10. Neither of these are attractive given the often non-technical backgrounds of our users. How soon is a 3.10.1 expected that will address this ? In the meantime I'm either going to have to special-case things and pull in the Python 3.9.9 versions of the files, or just not upgrade the project to Python 3.10. ---------- components: Tkinter messages: 407703 nosy: Athanasius priority: normal severity: normal status: open title: 3.10.0 ships with older tcl/tk DLLs than 3.9.9 causing Windows Installer problems versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 07:19:33 2021 From: report at bugs.python.org (Alex Waygood) Date: Sun, 05 Dec 2021 12:19:33 +0000 Subject: [issue45986] 3.10.0 ships with older tcl/tk DLLs than 3.9.9 causing Windows Installer problems In-Reply-To: <1638706009.9.0.557448740254.issue45986@roundup.psfhosted.org> Message-ID: <1638706773.67.0.869128070943.issue45986@roundup.psfhosted.org> Alex Waygood added the comment: You can find the release schedule here, which says that 3.10.1 is expected... tomorrow https://www.python.org/dev/peps/pep-0619/#id6 ---------- nosy: +AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 07:23:24 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Dec 2021 12:23:24 +0000 Subject: [issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict In-Reply-To: <1472852881.19.0.987799736928.issue27946@psf.upfronthosting.co.za> Message-ID: <1638707004.33.0.999645256343.issue27946@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +28143 pull_request: https://github.com/python/cpython/pull/29919 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 07:23:24 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Dec 2021 12:23:24 +0000 Subject: [issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict In-Reply-To: <1472852881.19.0.987799736928.issue27946@psf.upfronthosting.co.za> Message-ID: <1638707004.85.0.341115936785.issue27946@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset d15cdb2f32f572ce56d7120135da24b9fdce4c99 by Serhiy Storchaka in branch 'main': bpo-27946: Fix possible crash in ElementTree.Element (GH-29915) https://github.com/python/cpython/commit/d15cdb2f32f572ce56d7120135da24b9fdce4c99 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 07:23:29 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Dec 2021 12:23:29 +0000 Subject: [issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict In-Reply-To: <1472852881.19.0.987799736928.issue27946@psf.upfronthosting.co.za> Message-ID: <1638707009.03.0.845964372069.issue27946@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28144 pull_request: https://github.com/python/cpython/pull/29920 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 07:28:32 2021 From: report at bugs.python.org (Athanasius) Date: Sun, 05 Dec 2021 12:28:32 +0000 Subject: [issue45986] 3.10.0 ships with older tcl/tk DLLs than 3.9.9 causing Windows Installer problems In-Reply-To: <1638706009.9.0.557448740254.issue45986@roundup.psfhosted.org> Message-ID: <1638707312.03.0.608567853483.issue45986@roundup.psfhosted.org> Athanasius added the comment: Thanks, I have my fingers crossed that 3.10.1 will have automatically picked up >= 8.6.2.12 versions of the files. I'll check once it's available. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 07:29:53 2021 From: report at bugs.python.org (Akash Mishra) Date: Sun, 05 Dec 2021 12:29:53 +0000 Subject: [issue44166] Make IndexError messages for list more informative In-Reply-To: <1621323219.05.0.0543571942932.issue44166@roundup.psfhosted.org> Message-ID: <1638707393.94.0.102931472437.issue44166@roundup.psfhosted.org> Akash Mishra added the comment: While browsing some traceback error reporting i land on this solution threads. Specially beginner face traceback error for - KeyError - IndexError (As mentioned in current message thread) - ValueError .. It is sometime self explanatory from error reports but may be it can help to design some error document in python to more generalize errors. Found some of traceback error with some possible cause explanations. Sharing if this is useful. https://github.com/pablorgarcia/Learn-to-program-with-Python-guide/blob/master/Understanding%20errors/IndexError-list-index-out-of-range.py https://www.quizcure.com/python/traceback-most-recent-call-last-in-python#Keyerror-dictionary https://stackoverflow.com/questions/64428188/deep-learning-chatbot-specific-index-error-list-index-out-of-range ---------- nosy: +mishra.akash.myself _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 07:34:31 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 12:34:31 +0000 Subject: [issue19153] [doc] Embedding into a shared library fails again In-Reply-To: <1380818213.13.0.0445211197564.issue19153@psf.upfronthosting.co.za> Message-ID: <1638707671.23.0.407947190697.issue19153@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: Embedding into a shared library fails again -> [doc] Embedding into a shared library fails again versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 07:47:05 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 12:47:05 +0000 Subject: [issue29251] [doc] Class __dict__ is only a mapping proxy In-Reply-To: <1484222660.7.0.65822313324.issue29251@psf.upfronthosting.co.za> Message-ID: <1638708425.89.0.0241103402877.issue29251@roundup.psfhosted.org> Irit Katriel added the comment: The patch would still apply to Doc/library/functions.rst. https://docs.python.org/3.10/reference/datamodel.html#the-standard-type-hierarchy seems to have been changed quite a lot, but still has: 1. "Special read-only attribute: __dict__ is the module?s namespace as a dictionary object." 2. "__dict__ The dictionary containing the class?s namespace." ---------- keywords: +easy -patch nosy: +iritkatriel title: Class __dict__ is only a mapping proxy -> [doc] Class __dict__ is only a mapping proxy versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 07:49:40 2021 From: report at bugs.python.org (Marko) Date: Sun, 05 Dec 2021 12:49:40 +0000 Subject: [issue43805] multiprocessing.Queue hangs when process on other side dies In-Reply-To: <1618141970.93.0.19986621438.issue43805@roundup.psfhosted.org> Message-ID: <1638708580.0.0.0326831424004.issue43805@roundup.psfhosted.org> Marko added the comment: Yes, something like that would indeed be really helpful. How likely is that something like that gets implemented? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 08:37:24 2021 From: report at bugs.python.org (Ladislav Heller) Date: Sun, 05 Dec 2021 13:37:24 +0000 Subject: [issue44245] Cross-compilation of CPython 3.8 with _socket module using Anddroid NDK fails In-Reply-To: <1622116302.56.0.159914345765.issue44245@roundup.psfhosted.org> Message-ID: <1638711444.15.0.923395188461.issue44245@roundup.psfhosted.org> Ladislav Heller added the comment: Tried to cross-compile with an old version of Android NDK. Using the latest NDK it works perfectly. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 09:25:09 2021 From: report at bugs.python.org (Toshihiro Kamiya) Date: Sun, 05 Dec 2021 14:25:09 +0000 Subject: [issue45987] os.chdir in unittest's test case causes RecursionError on Windows Message-ID: <1638714309.05.0.538480655841.issue45987@roundup.psfhosted.org> New submission from Toshihiro Kamiya : When I was writing unit tests, I noticed that os.chdir in the unittest test case failed with RecursionError. It seems to work fine on Ubuntu 20.04, but fails on Windows 10 (might fail on macOS). The attached file is a minimal code to reproduce this. When I run it, I got an error message as follows ``` PS C:\Users\toshihiro\tmp> python .\test_chdir_fails.py Traceback (most recent call last): File "C:\Users\toshihiro\tmp\test_chdir_fails.py", line 11, in unittest.main() File "C:\Users\toshihiro\AppData\Local\Programs\Python\Python39\lib\unittest\main.py", line 101, in __init__ self.runTests() (snip) File "C:\Users\toshihiro\AppData\Local\Programs\Python\Python39\lib\traceback.py", line 493, in __init__ context = TracebackException( [Previous line repeated 487 more times] RecursionError: maximum recursion depth exceeded PS C:\Users\toshihiro\tmp> ``` The version of python was: Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32 Regards, ---------- components: Library (Lib) files: test_chdir_fails.py messages: 407711 nosy: tos-kamiya priority: normal severity: normal status: open title: os.chdir in unittest's test case causes RecursionError on Windows type: crash versions: Python 3.9 Added file: https://bugs.python.org/file50476/test_chdir_fails.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 10:51:21 2021 From: report at bugs.python.org (hongweipeng) Date: Sun, 05 Dec 2021 15:51:21 +0000 Subject: [issue33632] undefined behaviour: signed integer overflow in threadmodule.c In-Reply-To: <1527151195.18.0.682650639539.issue33632@psf.upfronthosting.co.za> Message-ID: <1638719481.91.0.206786446259.issue33632@roundup.psfhosted.org> hongweipeng added the comment: I think PR https://github.com/python/cpython/pull/28674 has resolved this issue. ---------- nosy: +hongweipeng _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 10:57:52 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 15:57:52 +0000 Subject: [issue3687] Popen() object stdout attribute reassignment behaviour In-Reply-To: <1219766265.83.0.904411616188.issue3687@psf.upfronthosting.co.za> Message-ID: <1638719872.57.0.628090277014.issue3687@roundup.psfhosted.org> Irit Katriel added the comment: The situation is the same in 3.11, both doc and implementation. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 11:00:54 2021 From: report at bugs.python.org (E. Paine) Date: Sun, 05 Dec 2021 16:00:54 +0000 Subject: [issue45986] 3.10.0 ships with older tcl/tk DLLs than 3.9.9 causing Windows Installer problems In-Reply-To: <1638706009.9.0.557448740254.issue45986@roundup.psfhosted.org> Message-ID: <1638720054.91.0.0302885587451.issue45986@roundup.psfhosted.org> E. Paine added the comment: I can confirm that 3.10.1 is going to use Tk 8.6.12 (see #45732). Python 3.10.0 was meant to use Tk 8.6.11, but there was an issue with the build process (#43652). ---------- nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 11:07:11 2021 From: report at bugs.python.org (Filippo Vicentini) Date: Sun, 05 Dec 2021 16:07:11 +0000 Subject: [issue45988] inspect.signature fails on a @staticmethod Message-ID: <1638720431.62.0.74657433322.issue45988@roundup.psfhosted.org> New submission from Filippo Vicentini : Attempting to inspect the signature of a method marked as @staticmethod during class construction fails. This happens in 3.8, 3.9. A MWE is given here: ```python from typing import signature def decorator(fun): print(signature(fun)) return fun class Test2: @decorator @staticmethod def test(arg): return arg ``` which fails with error ```python Traceback (most recent call last): File "", line 1, in File "", line 4, in Test File "", line 2, in decorator File "/Users/filippovicentini/.pyenv/versions/3.9.7/lib/python3.9/inspect.py", line 3111, in signature return Signature.from_callable(obj, follow_wrapped=follow_wrapped) File "/Users/filippovicentini/.pyenv/versions/3.9.7/lib/python3.9/inspect.py", line 2860, in from_callable return _signature_from_callable(obj, sigcls=cls, File "/Users/filippovicentini/.pyenv/versions/3.9.7/lib/python3.9/inspect.py", line 2259, in _signature_from_callable raise TypeError('{!r} is not a callable object'.format(obj)) TypeError: is not a callable object ``` ---------- components: Library (Lib) messages: 407715 nosy: PhilipVinc priority: normal severity: normal status: open title: inspect.signature fails on a @staticmethod versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 11:10:36 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 16:10:36 +0000 Subject: [issue28816] [doc] Clarify that zipimport does not invoke import hooks to load custom files from zip. In-Reply-To: <1480326340.52.0.39566018579.issue28816@psf.upfronthosting.co.za> Message-ID: <1638720636.66.0.830971482004.issue28816@roundup.psfhosted.org> Irit Katriel added the comment: I think that (1) the patch is not worded very clearly (2) the docs should not reference py2exe for instructions how to do something Perhaps it would suffice to change the sentence: Any files may be present in the ZIP archive, but only files .py and .pyc are available for import to: Any files may be present in the ZIP archive, but the importer is only invoked for .py and .pyc files ? ---------- keywords: +easy nosy: +iritkatriel status: open -> pending title: Document if zipimport can respect import hooks to load custom files from zip. -> [doc] Clarify that zipimport does not invoke import hooks to load custom files from zip. type: -> enhancement versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 11:14:40 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 05 Dec 2021 16:14:40 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638720880.82.0.537118914399.issue45582@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28145 pull_request: https://github.com/python/cpython/pull/29921 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 11:22:00 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 16:22:00 +0000 Subject: [issue12833] Document the need to pass the prompt to raw_input() with readline In-Reply-To: <1314205212.4.0.313319940132.issue12833@psf.upfronthosting.co.za> Message-ID: <1638721319.99.0.672036033463.issue12833@roundup.psfhosted.org> Irit Katriel added the comment: I agree with Martin that this belongs in the input() rather than readline() docs. However, the input() does is quite concise, and the sole example specifies the right way to use it: https://docs.python.org/3/library/functions.html#input I find it hard to justify real estate in this doc in which to explain what happens if you combine input with readline and do the wrong thing. I suggest we leave it as it is. ---------- nosy: +iritkatriel resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 11:26:40 2021 From: report at bugs.python.org (Andre Roberge) Date: Sun, 05 Dec 2021 16:26:40 +0000 Subject: [issue44166] Make IndexError messages for list more informative In-Reply-To: <1621323219.05.0.0543571942932.issue44166@roundup.psfhosted.org> Message-ID: <1638721600.81.0.877756857728.issue44166@roundup.psfhosted.org> Change by Andre Roberge : ---------- nosy: +aroberge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 11:59:15 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 16:59:15 +0000 Subject: [issue1705393] Document select() failure with buffered file Message-ID: <1638723555.13.0.676265815888.issue1705393@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 12:06:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 17:06:55 +0000 Subject: [issue26897] [doc] Clarify Popen stdin, stdout, stderr In-Reply-To: <1462077137.11.0.0338937138998.issue26897@psf.upfronthosting.co.za> Message-ID: <1638724015.48.0.352236659117.issue26897@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy title: Clarify Popen stdin, stdout, stderr -> [doc] Clarify Popen stdin, stdout, stderr versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 12:14:45 2021 From: report at bugs.python.org (Alex Waygood) Date: Sun, 05 Dec 2021 17:14:45 +0000 Subject: [issue45987] os.chdir in unittest's test case causes RecursionError on Windows In-Reply-To: <1638714309.05.0.538480655841.issue45987@roundup.psfhosted.org> Message-ID: <1638724485.05.0.9109127036.issue45987@roundup.psfhosted.org> Change by Alex Waygood : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 12:24:28 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 17:24:28 +0000 Subject: [issue28546] [doc] Clarify setting pdb breakpoints In-Reply-To: <1477659342.78.0.0469891681289.issue28546@psf.upfronthosting.co.za> Message-ID: <1638725068.48.0.845310938094.issue28546@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy -patch title: Better explain setting pdb breakpoints -> [doc] Clarify setting pdb breakpoints versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 12:24:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 17:24:45 +0000 Subject: [issue28546] [doc] Clarify setting pdb breakpoints In-Reply-To: <1477659342.78.0.0469891681289.issue28546@psf.upfronthosting.co.za> Message-ID: <1638725085.42.0.895338377059.issue28546@roundup.psfhosted.org> Irit Katriel added the comment: The patch needs to be converted to a GitHub PR. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 12:31:12 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 17:31:12 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1638725472.83.0.647138835902.issue45711@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +28146 pull_request: https://github.com/python/cpython/pull/29922 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 12:37:28 2021 From: report at bugs.python.org (Masoud Azizi) Date: Sun, 05 Dec 2021 17:37:28 +0000 Subject: [issue45989] Getting key of max value of dict really dose not sense Message-ID: <1638725848.56.0.191951522901.issue45989@roundup.psfhosted.org> New submission from Masoud Azizi : Maximum_signal_key=max(collective_signals,key=collective_signals.get) This code is really hard to learn and remember. Please change it to something that more sense. ---------- messages: 407719 nosy: mablue priority: normal severity: normal status: open title: Getting key of max value of dict really dose not sense type: enhancement versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 12:41:54 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 05 Dec 2021 17:41:54 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638726114.85.0.211987034444.issue45582@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 628abe4463ed40cd54ca952a2b4cc2d6e74073f7 by Christian Heimes in branch 'main': bpo-45582: Fix signature of _Py_Get_Getpath_CodeObject (GH-29921) https://github.com/python/cpython/commit/628abe4463ed40cd54ca952a2b4cc2d6e74073f7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 12:43:07 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 17:43:07 +0000 Subject: [issue21761] [doc] language reference describes the role of module.__file__ inaccurately In-Reply-To: <1402778004.82.0.418404996295.issue21761@psf.upfronthosting.co.za> Message-ID: <1638726187.74.0.894314198731.issue21761@roundup.psfhosted.org> Irit Katriel added the comment: Would it suffice to change "Ultimately, the loader is what makes use of __file__ and/or __cached__" to "Ultimately, the loader set the values of __file__ and/or __cached__" ? ---------- nosy: +iritkatriel title: language reference describes the role of module.__file__ inaccurately -> [doc] language reference describes the role of module.__file__ inaccurately versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 12:49:09 2021 From: report at bugs.python.org (Ram Rachum) Date: Sun, 05 Dec 2021 17:49:09 +0000 Subject: [issue45990] Exception notes need more documentation Message-ID: <1638726549.23.0.192280798069.issue45990@roundup.psfhosted.org> New submission from Ram Rachum : The new __note__ feature for exception could be useful, but the documentation (and the section in "What's new") aren't good enough: "__note__: A mutable field which is :const:`None` by default and can be set to a string. If it is not :const:`None`, it is included in the traceback. This field can be used to enrich exceptions after they have been caught." This is more of a definition than an explanation. If this is solving a problem, there should be an explanation that starts from the problem being solved, hopefully with 2-3 examples where this is useful. If people start using this feature without some guidance, they might put things in the note that should have been in the message. ---------- assignee: docs at python components: Documentation messages: 407722 nosy: cool-RR, docs at python, iritkatriel priority: normal severity: normal status: open title: Exception notes need more documentation versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 12:53:00 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 05 Dec 2021 17:53:00 +0000 Subject: [issue45989] Getting key of max value of dict really dose not sense In-Reply-To: <1638725848.56.0.191951522901.issue45989@roundup.psfhosted.org> Message-ID: <1638726780.69.0.62520562613.issue45989@roundup.psfhosted.org> Steven D'Aprano added the comment: The code makes perfect sense. If you want to find the maximum key in a dict, you write: max(collective_signals) If you want to find the maximum key according to some key function, you write: max(collective_signals, key=function) If you want to find the maximum key according to its associated value, the key function that will work is collective_signals.get. That makes perfect sense. Not every one-line piece of code needs to be a builtin function. In any case, Python 3.6 to 3.10 are all in feature-freeze. Even if we added some special function to do this, which I doubt we will do, it could only go into 3.11. ---------- nosy: +steven.daprano 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 Dec 5 12:54:14 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 05 Dec 2021 17:54:14 +0000 Subject: [issue45989] Add new function or method to return the dict key with the maximum value In-Reply-To: <1638725848.56.0.191951522901.issue45989@roundup.psfhosted.org> Message-ID: <1638726854.32.0.755188472937.issue45989@roundup.psfhosted.org> Change by Steven D'Aprano : ---------- title: Getting key of max value of dict really dose not sense -> Add new function or method to return the dict key with the maximum value _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 13:06:14 2021 From: report at bugs.python.org (Julius Hamilton) Date: Sun, 05 Dec 2021 18:06:14 +0000 Subject: [issue45934] python curses newterm implementation In-Reply-To: Message-ID: <1638727574.53.0.443979859548.issue45934@roundup.psfhosted.org> Julius Hamilton added the comment: I?m trying to patch this bug. Here are my current working questions: 1. What is the relationship between an fd (file descriptor) and a terminal? What software / hardware component goes to ?fd 0? to receive input from it? Is there a GNU Screen command to receive stdin from ?fd n?, fd 3 for example? 2. Looking at the source code: def initscr(): import _curses, curses # we call setupterm() here because it raises an error # instead of calling exit() in error cases. setupterm(term=_os.environ.get("TERM", "unknown"), fd=_sys.__stdout__.fileno()) stdscr = _curses.initscr() for key, value in _curses.__dict__.items(): if key[0:4] == 'ACS_' or key in ('LINES', 'COLS'): setattr(curses, key, value) return stdscr - why does initscr() begin by importing _curses and curses? Precompiled C curses and non-compiled C or is the second importing Python? How can a module be importing itself? - they call ?setupterm?, a C curses function, because it raises an error if there?s a problem in case of just quitting. But how so, specifically? Do the errors get detected at stderr and then the terminal raises another error or something? I?m not clear on the details. Plus, why can they call this function without referring to the enclosing package, curses.setupterm? Is that a C thing that all functions are automatically added to the namespace? - Someone wrote that ?initscr? actually calls ?newterm?, in the code. So I guess I should look at the C newterm code, see how it works and see if a direct implementation is possible. (I said in an email I would double post an email I sent but instead I?m posting more specific questions here related to that email. Also, I?m still studying an email Guido sent, so apologies for any redundant questions here.) Thanks, Julius ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 13:21:30 2021 From: report at bugs.python.org (Julius Hamilton) Date: Sun, 05 Dec 2021 18:21:30 +0000 Subject: [issue45934] python curses newterm implementation In-Reply-To: <1638658883.36.0.145478613.issue45934@roundup.psfhosted.org> Message-ID: Julius Hamilton added the comment: I?m trying to patch this bug. Here are my current working questions: 1. What is the relationship between an fd (file descriptor) and a terminal? What software / hardware component goes to ?fd 0? to receive input from it? Is there a GNU Screen command to receive stdin from ?fd n?, fd 3 for example? 2. Looking at the source code: def initscr(): import _curses, curses # we call setupterm() here because it raises an error # instead of calling exit() in error cases. setupterm(term=_os.environ.get("TERM", "unknown"), fd=_sys.__stdout__.fileno()) stdscr = _curses.initscr() for key, value in _curses.__dict__.items(): if key[0:4] == 'ACS_' or key in ('LINES', 'COLS'): setattr(curses, key, value) return stdscr - why does initscr() begin by importing _curses and curses? Precompiled C curses and non-compiled C or is the second importing Python? How can a module be importing itself? - they call ?setupterm?, a C curses function, because it raises an error if there?s a problem in case of just quitting. But how so, specifically? Do the errors get detected at stderr and then the terminal raises another error or something? I?m not clear on the details. Plus, why can they call this function without referring to the enclosing package, curses.setupterm? Is that a C thing that all functions are automatically added to the namespace? - Someone wrote that ?initscr? actually calls ?newterm?, in the code. So I guess I should look at the C newterm code, see how it works and see if a direct implementation is possible. (I said in an email I would double post an email I sent but instead I?m posting more specific questions here related to that email. Also, I?m still studying an email Guido sent, so apologies for any redundant questions here.) Thanks, Julius On Sun 5. Dec 2021 at 00:01, ?ric Araujo wrote: > > Change by ?ric Araujo : > > > ---------- > stage: -> needs patch > versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 13:44:45 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 05 Dec 2021 18:44:45 +0000 Subject: [issue45989] Add new function or method to return the dict key with the maximum value In-Reply-To: <1638725848.56.0.191951522901.issue45989@roundup.psfhosted.org> Message-ID: <1638729885.46.0.755740005843.issue45989@roundup.psfhosted.org> Eric V. Smith added the comment: I agree that we don't need a special function for this, so I'm going to close this. ---------- nosy: +eric.smith resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 13:56:47 2021 From: report at bugs.python.org (Kevin Hock) Date: Sun, 05 Dec 2021 18:56:47 +0000 Subject: [issue45991] Improve ambiguous docstrings in pkgutil Message-ID: <1638730607.25.0.754715317111.issue45991@roundup.psfhosted.org> New submission from Kevin Hock : # Issue If you search for "list of paths" in https://github.com/KevinHock/cpython/blob/main/Lib/pkgutil.py A lot of people mistake this as `PosixPath`. You can see an example here: https://github.com/duo-labs/parliament/pull/207 that references other OSS repositories. # Solution We can - Change the wording. e.g. "list of strings of the paths" or some variation of that. and perhaps additionally - Throw a ValueError similar to: https://github.com/python/cpython/blob/628abe4463ed40cd54ca952a2b4cc2d6e74073f7/Lib/pkgutil.py#L122 ---------- assignee: docs at python components: Documentation messages: 407727 nosy: docs at python, khock priority: normal severity: normal status: open title: Improve ambiguous docstrings in pkgutil type: enhancement versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 13:59:14 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 05 Dec 2021 18:59:14 +0000 Subject: [issue45977] Unexpected effect of sys.pycache_prefix = "" In-Reply-To: <1638590311.18.0.778355816492.issue45977@roundup.psfhosted.org> Message-ID: <1638730754.44.0.637777509589.issue45977@roundup.psfhosted.org> Christian Heimes added the comment: It works as designed and documented. An empty string is considered a relative directory. https://docs.python.org/3/library/sys.html#sys.pycache_prefix > If this is set (not None), Python will write bytecode-cache .pyc files to (and read them from) a parallel directory tree rooted at this directory... > > A relative path is interpreted relative to the current working directory. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 14:05:06 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Dec 2021 19:05:06 +0000 Subject: [issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict In-Reply-To: <1472852881.19.0.987799736928.issue27946@psf.upfronthosting.co.za> Message-ID: <1638731106.75.0.590632576516.issue27946@roundup.psfhosted.org> miss-islington added the comment: New changeset 52a9a71fe682e47f6c78a9c34aa9a797ca632c86 by Miss Islington (bot) in branch '3.9': bpo-27946: Fix possible crash in ElementTree.Element (GH-29915) https://github.com/python/cpython/commit/52a9a71fe682e47f6c78a9c34aa9a797ca632c86 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 14:05:06 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Dec 2021 19:05:06 +0000 Subject: [issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict In-Reply-To: <1472852881.19.0.987799736928.issue27946@psf.upfronthosting.co.za> Message-ID: <1638731106.55.0.04427935371.issue27946@roundup.psfhosted.org> miss-islington added the comment: New changeset beb834292db54fea129dd073cc822179430cee52 by Miss Islington (bot) in branch '3.10': bpo-27946: Fix possible crash in ElementTree.Element (GH-29915) https://github.com/python/cpython/commit/beb834292db54fea129dd073cc822179430cee52 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 14:05:06 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Dec 2021 19:05:06 +0000 Subject: [issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict In-Reply-To: <1472852881.19.0.987799736928.issue27946@psf.upfronthosting.co.za> Message-ID: <1638731106.55.0.04427935371.issue27946@roundup.psfhosted.org> miss-islington added the comment: New changeset beb834292db54fea129dd073cc822179430cee52 by Miss Islington (bot) in branch '3.10': bpo-27946: Fix possible crash in ElementTree.Element (GH-29915) https://github.com/python/cpython/commit/beb834292db54fea129dd073cc822179430cee52 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 14:07:13 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Dec 2021 19:07:13 +0000 Subject: [issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict In-Reply-To: <1472852881.19.0.987799736928.issue27946@psf.upfronthosting.co.za> Message-ID: <1638731233.25.0.199388045112.issue27946@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 14:10:45 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Dec 2021 19:10:45 +0000 Subject: [issue45987] os.chdir in unittest's test case causes RecursionError on Windows In-Reply-To: <1638714309.05.0.538480655841.issue45987@roundup.psfhosted.org> Message-ID: <1638731445.67.0.691865512536.issue45987@roundup.psfhosted.org> Serhiy Storchaka added the comment: What is (snip)? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 14:15:01 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Dec 2021 19:15:01 +0000 Subject: [issue45934] python curses newterm implementation In-Reply-To: Message-ID: <1638731701.09.0.874083588737.issue45934@roundup.psfhosted.org> Serhiy Storchaka added the comment: What is it about? The first message is by Guido, but not this message nor the title does not give me any idea what is it about. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 14:20:49 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Sun, 05 Dec 2021 19:20:49 +0000 Subject: [issue45984] Error messages for invalid string prefixes and potential attribute accesses In-Reply-To: <1638655712.59.0.26828555414.issue45984@roundup.psfhosted.org> Message-ID: <1638732049.21.0.261733580759.issue45984@roundup.psfhosted.org> theeshallnotknowethme added the comment: Can I know the reason for rejection? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 15:05:14 2021 From: report at bugs.python.org (Eryk Sun) Date: Sun, 05 Dec 2021 20:05:14 +0000 Subject: [issue45987] os.chdir in unittest's test case causes RecursionError on Windows In-Reply-To: <1638714309.05.0.538480655841.issue45987@roundup.psfhosted.org> Message-ID: <1638734714.81.0.230891087589.issue45987@roundup.psfhosted.org> Eryk Sun added the comment: Windows opens the working directory without delete sharing, so trying to delete it fails with a PermissionError for ERROR_SHARING_VIOLATION (winerror 32). I discussed a modified version of the _rmtree() method in msg377358. The proposed version would try to reset the permissions in the first pass, recur once, and then give up because the permission error cannot be handled. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 15:26:19 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Dec 2021 20:26:19 +0000 Subject: [issue37295] Possible optimizations for math.comb() In-Reply-To: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org> Message-ID: <1638735979.38.0.731253681189.issue37295@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 60c320c38e4e95877cde0b1d8562ebd6bc02ac61 by Serhiy Storchaka in branch 'main': bpo-37295: Optimize math.comb() and math.perm() (GH-29090) https://github.com/python/cpython/commit/60c320c38e4e95877cde0b1d8562ebd6bc02ac61 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 15:35:28 2021 From: report at bugs.python.org (Spencer Brown) Date: Sun, 05 Dec 2021 20:35:28 +0000 Subject: [issue44166] Make IndexError messages for list more informative In-Reply-To: <1621323219.05.0.0543571942932.issue44166@roundup.psfhosted.org> Message-ID: <1638736528.04.0.22354708558.issue44166@roundup.psfhosted.org> Spencer Brown added the comment: One potential solution would be to add two Py_ssize_t to IndexError, storing the index and length along with the existing exception value. Then __str__() can append that to the message if set, perhaps having len be negative to signal they're not passed. An issue though is that it might be backwards incompatible with classes trying to multiply inherit from other exceptions too. To deal with that it could put the values in the args tuple, though then it'd have to allocate the tuple and ints which might hurt perf. ---------- nosy: +Spencer Brown _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 15:42:05 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Dec 2021 20:42:05 +0000 Subject: [issue45662] Incorrect repr of InitVar of a type alias In-Reply-To: <1635450363.22.0.969198768309.issue45662@roundup.psfhosted.org> Message-ID: <1638736925.52.0.834482466324.issue45662@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 1fd4de5bddbbf2a97cdbac4d298c89e1156bdc6c by Serhiy Storchaka in branch 'main': bpo-45662: Fix the repr of InitVar with a type alias to the built-in class (GH-29291) https://github.com/python/cpython/commit/1fd4de5bddbbf2a97cdbac4d298c89e1156bdc6c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 15:42:18 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Dec 2021 20:42:18 +0000 Subject: [issue45662] Incorrect repr of InitVar of a type alias In-Reply-To: <1635450363.22.0.969198768309.issue45662@roundup.psfhosted.org> Message-ID: <1638736938.06.0.257830165785.issue45662@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28147 pull_request: https://github.com/python/cpython/pull/29923 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 15:42:22 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Dec 2021 20:42:22 +0000 Subject: [issue45662] Incorrect repr of InitVar of a type alias In-Reply-To: <1635450363.22.0.969198768309.issue45662@roundup.psfhosted.org> Message-ID: <1638736942.54.0.125302618942.issue45662@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28148 pull_request: https://github.com/python/cpython/pull/29924 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 15:42:54 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Dec 2021 20:42:54 +0000 Subject: [issue45663] is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias In-Reply-To: <1635451831.16.0.493312475993.issue45663@roundup.psfhosted.org> Message-ID: <1638736974.19.0.18535178012.issue45663@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 446be166861b2f08f87f74018113dd98ca5fca02 by Serhiy Storchaka in branch 'main': bpo-45663: Fix is_dataclass() for dataclasses which are subclasses of types.GenericAlias (GH-29294) https://github.com/python/cpython/commit/446be166861b2f08f87f74018113dd98ca5fca02 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 15:42:57 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Dec 2021 20:42:57 +0000 Subject: [issue45663] is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias In-Reply-To: <1635451831.16.0.493312475993.issue45663@roundup.psfhosted.org> Message-ID: <1638736977.47.0.556468296051.issue45663@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28149 pull_request: https://github.com/python/cpython/pull/29925 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 15:43:01 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Dec 2021 20:43:01 +0000 Subject: [issue45663] is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias In-Reply-To: <1635451831.16.0.493312475993.issue45663@roundup.psfhosted.org> Message-ID: <1638736981.55.0.738121156274.issue45663@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28150 pull_request: https://github.com/python/cpython/pull/29926 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 15:44:08 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Dec 2021 20:44:08 +0000 Subject: [issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type In-Reply-To: <1635453507.8.0.842225708276.issue45664@roundup.psfhosted.org> Message-ID: <1638737048.58.0.207361510473.issue45664@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +28151 pull_request: https://github.com/python/cpython/pull/29927 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 15:44:08 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Dec 2021 20:44:08 +0000 Subject: [issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type In-Reply-To: <1635453507.8.0.842225708276.issue45664@roundup.psfhosted.org> Message-ID: <1638737048.97.0.485994330678.issue45664@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 2b318ce1c988b7b6e3caf293d55f289e066b6e0f by Serhiy Storchaka in branch 'main': bpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a base (GH-29298) https://github.com/python/cpython/commit/2b318ce1c988b7b6e3caf293d55f289e066b6e0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 15:44:12 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Dec 2021 20:44:12 +0000 Subject: [issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type In-Reply-To: <1635453507.8.0.842225708276.issue45664@roundup.psfhosted.org> Message-ID: <1638737052.64.0.266239613227.issue45664@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28152 pull_request: https://github.com/python/cpython/pull/29928 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 15:49:44 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Dec 2021 20:49:44 +0000 Subject: [issue45840] Improve cross-references in the data model documentation In-Reply-To: <1637287286.96.0.846227383123.issue45840@roundup.psfhosted.org> Message-ID: <1638737384.76.0.00811680446978.issue45840@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset c0521fe49fd75e794a38a216813658ab40185834 by Alex Waygood in branch 'main': bpo-45840: Improve cross-references in the data model documentation (GH-29633) https://github.com/python/cpython/commit/c0521fe49fd75e794a38a216813658ab40185834 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 15:54:52 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Dec 2021 20:54:52 +0000 Subject: [issue13236] unittest needs more flush calls In-Reply-To: <1319137324.16.0.266090134048.issue13236@psf.upfronthosting.co.za> Message-ID: <1638737692.27.0.00577182629268.issue13236@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +28153 pull_request: https://github.com/python/cpython/pull/29929 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 16:02:51 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Dec 2021 21:02:51 +0000 Subject: [issue45662] Incorrect repr of InitVar of a type alias In-Reply-To: <1635450363.22.0.969198768309.issue45662@roundup.psfhosted.org> Message-ID: <1638738171.92.0.318765334194.issue45662@roundup.psfhosted.org> miss-islington added the comment: New changeset f1dd5ed1f35a7ed5c3833c822e9965de2400d77e by Miss Islington (bot) in branch '3.10': bpo-45662: Fix the repr of InitVar with a type alias to the built-in class (GH-29291) https://github.com/python/cpython/commit/f1dd5ed1f35a7ed5c3833c822e9965de2400d77e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 16:04:37 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Dec 2021 21:04:37 +0000 Subject: [issue45663] is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias In-Reply-To: <1635451831.16.0.493312475993.issue45663@roundup.psfhosted.org> Message-ID: <1638738277.73.0.236558281575.issue45663@roundup.psfhosted.org> miss-islington added the comment: New changeset abceb66c7e33d165361d8a26efb3770faa721aff by Miss Islington (bot) in branch '3.10': bpo-45663: Fix is_dataclass() for dataclasses which are subclasses of types.GenericAlias (GH-29294) https://github.com/python/cpython/commit/abceb66c7e33d165361d8a26efb3770faa721aff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 16:17:35 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Dec 2021 21:17:35 +0000 Subject: [issue44166] Make IndexError messages for list more informative In-Reply-To: <1621323219.05.0.0543571942932.issue44166@roundup.psfhosted.org> Message-ID: <1638739055.31.0.995311007709.issue44166@roundup.psfhosted.org> Raymond Hettinger added the comment: I also share Serhiy's concerns and prefer that it be left as-is. Conceptually, adding more information in the error message would make it more useful for debugging, but in practice, it would rarely be helpful. In teaching and coaching Python, I've learned that the intended, dominant effect of seeing "IndexError: list index out of range" is that a person understands that index is invalid because it is out of range. That is a helpful dominant impression. IMO it would be distracting and rarely helpful to focus on the specific index and length. The important point is that a nonsense lookup was being made. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 16:25:54 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Dec 2021 21:25:54 +0000 Subject: [issue45663] is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias In-Reply-To: <1635451831.16.0.493312475993.issue45663@roundup.psfhosted.org> Message-ID: <1638739554.35.0.692302202573.issue45663@roundup.psfhosted.org> miss-islington added the comment: New changeset 19050711f5a68e50b942b3b7f1f4cf398f27efff by Miss Islington (bot) in branch '3.9': bpo-45663: Fix is_dataclass() for dataclasses which are subclasses of types.GenericAlias (GH-29294) https://github.com/python/cpython/commit/19050711f5a68e50b942b3b7f1f4cf398f27efff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 16:26:46 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Dec 2021 21:26:46 +0000 Subject: [issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type In-Reply-To: <1635453507.8.0.842225708276.issue45664@roundup.psfhosted.org> Message-ID: <1638739606.58.0.971992471041.issue45664@roundup.psfhosted.org> miss-islington added the comment: New changeset cb68c0a3a4aeb4ec58ab1f71b70bc8bfecbceef6 by Miss Islington (bot) in branch '3.10': bpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a base (GH-29298) https://github.com/python/cpython/commit/cb68c0a3a4aeb4ec58ab1f71b70bc8bfecbceef6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 16:31:17 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Dec 2021 21:31:17 +0000 Subject: [issue44166] Make IndexError messages for list more informative In-Reply-To: <1621323219.05.0.0543571942932.issue44166@roundup.psfhosted.org> Message-ID: <1638739877.67.0.978595337095.issue44166@roundup.psfhosted.org> Raymond Hettinger added the comment: Here's another way to think of it: The call s[i] raising an IndexError isn't a numerical error, it is a conceptual error. Knowing that i==15 and len(s)==10 doesn't usually help resolve the problem. The fix typically isn't replacing s[i] with s[i - 5]. Usually the issue is usually deeper than that. Note, this is different than KeyError where misspellings are common and where the fix can be indicated by knowing the key: d['missteak'] -> d['mistake']. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 16:55:02 2021 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sun, 05 Dec 2021 21:55:02 +0000 Subject: [issue44166] Make IndexError messages for list more informative In-Reply-To: <1621323219.05.0.0543571942932.issue44166@roundup.psfhosted.org> Message-ID: <1638741302.0.0.654708435791.issue44166@roundup.psfhosted.org> Vedran ?a?i? added the comment: > fix typically isn't replacing s[i] with s[i - 5] ... especially since that will still raise IndexError (in case when i==15 and len(s)==10). ;-P ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 16:58:33 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 21:58:33 +0000 Subject: [issue1512163] mailbox (2.5b1): locking doesn't work (esp. on FreeBSD) Message-ID: <1638741513.39.0.063196597159.issue1512163@roundup.psfhosted.org> Irit Katriel added the comment: The original bug has been fixed, so I am closing this. Please create a new issue (probably of type enhancement) for the .lock()/.unlock() override support if this is still an issue. The use case/test can be discussed on that issue. ---------- nosy: +iritkatriel resolution: -> fixed stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 17:00:56 2021 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sun, 05 Dec 2021 22:00:56 +0000 Subject: [issue45988] inspect.signature fails on a @staticmethod In-Reply-To: <1638720431.62.0.74657433322.issue45988@roundup.psfhosted.org> Message-ID: <1638741656.71.0.611529646159.issue45988@roundup.psfhosted.org> Vedran ?a?i? added the comment: Of course, signature should be imported from inspect, not from typing. In that case, the example works on Python 3.10 and 3.11. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 17:32:23 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 05 Dec 2021 22:32:23 +0000 Subject: [issue45984] Error messages for invalid string prefixes and potential attribute accesses In-Reply-To: <1638655712.59.0.26828555414.issue45984@roundup.psfhosted.org> Message-ID: <1638743543.45.0.951950604633.issue45984@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Check my multiple comments in PR29916 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 17:35:22 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 05 Dec 2021 22:35:22 +0000 Subject: [issue44166] Make IndexError messages for list more informative In-Reply-To: <1621323219.05.0.0543571942932.issue44166@roundup.psfhosted.org> Message-ID: <1638743722.57.0.0852386444446.issue44166@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I concur with Serhiy and Raymond and I would prefer to leave as is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 17:46:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 22:46:55 +0000 Subject: [issue25668] Deadlock in logging caused by a possible race condition with "format" In-Reply-To: <1447942973.46.0.788007678714.issue25668@psf.upfronthosting.co.za> Message-ID: <1638744415.97.0.836496154292.issue25668@roundup.psfhosted.org> Irit Katriel added the comment: > Please tell me what is unusual for you with this testcase? Grabbing a lock in __str__/__repr__ strikes me as unusual and a recipe for problems. You don't really know when those functions are called - from the debugger, from exception handlers, etc.. Even if the logging module protected you from the deadlock you found, you won't be safe from similar situations with other libraries that use locks. ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 18:01:22 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 23:01:22 +0000 Subject: [issue13821] [doc] misleading return from isidentifier In-Reply-To: <1326934459.59.0.614334427327.issue13821@psf.upfronthosting.co.za> Message-ID: <1638745282.53.0.331461551432.issue13821@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy title: misleading return from isidentifier -> [doc] misleading return from isidentifier versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 18:03:56 2021 From: report at bugs.python.org (Toshihiro Kamiya) Date: Sun, 05 Dec 2021 23:03:56 +0000 Subject: [issue45987] os.chdir in unittest's test case causes RecursionError on Windows In-Reply-To: <1638714309.05.0.538480655841.issue45987@roundup.psfhosted.org> Message-ID: <1638745436.99.0.857915662822.issue45987@roundup.psfhosted.org> Toshihiro Kamiya added the comment: Sorry, the "(snip)" means that it was omitted because it was too long. I' ll attach a screenshot. ---------- Added file: https://bugs.python.org/file50477/FF2dfQ_acAc497b.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 18:10:56 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 23:10:56 +0000 Subject: [issue12290] __setstate__ is called for false values In-Reply-To: <1307586060.34.0.652262251036.issue12290@psf.upfronthosting.co.za> Message-ID: <1638745856.45.0.69229194488.issue12290@roundup.psfhosted.org> Irit Katriel added the comment: See also issue26695. ---------- nosy: +iritkatriel type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 18:11:25 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 23:11:25 +0000 Subject: [issue26695] pickle and _pickle accelerator have different behavior when unpickling an object with falsy __getstate__ return In-Reply-To: <1459868506.3.0.857595967516.issue26695@psf.upfronthosting.co.za> Message-ID: <1638745885.49.0.779874877102.issue26695@roundup.psfhosted.org> Irit Katriel added the comment: See also issue12290. ---------- nosy: +iritkatriel type: -> behavior versions: +Python 3.10, Python 3.11, 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 Dec 5 18:18:44 2021 From: report at bugs.python.org (Toshihiro Kamiya) Date: Sun, 05 Dec 2021 23:18:44 +0000 Subject: [issue45987] os.chdir in unittest's test case causes RecursionError on Windows In-Reply-To: <1638714309.05.0.538480655841.issue45987@roundup.psfhosted.org> Message-ID: <1638746324.97.0.989897943234.issue45987@roundup.psfhosted.org> Toshihiro Kamiya added the comment: Thank you, eryksun, for pointing out the cause of the problem. I have modified the test script and it can now be run on Windows. The attached file is a revised version of the reproduction script, which reflects the modifications made to the test script to prevent the error. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed Added file: https://bugs.python.org/file50478/test_chdir_wo_fail.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 18:21:32 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 23:21:32 +0000 Subject: [issue38836] Links are duplicated in documentation search result In-Reply-To: <1574096104.71.0.223088739291.issue38836@roundup.psfhosted.org> Message-ID: <1638746492.38.0.0910641750519.issue38836@roundup.psfhosted.org> Irit Katriel added the comment: On a Mac I was unable to reproduce this - the link to the search results give me a list of two items: 1. os.walk linking to https://docs.python.org/3.9/library/os.html?highlight=os.walk#os.walk 2. Changelog linking to https://docs.python.org/3.9/whatsnew/changelog.html?highlight=os.walk However, on windows I got a list of 4 items: 1. os.walk : https://docs.python.org/3.9/library/os.html?highlight=os%20walk#os.walk 2. os.fwalk: https://docs.python.org/3.9/library/os.html?highlight=os%20walk#os.fwalk 3. os.fwalk: https://docs.python.org/3.9/library/os.html?highlight=os%20walk#os.fwalk 4. os.walk: https://docs.python.org/3.9/library/os.html?highlight=os%20walk#os.walk In summary: Mac didn't know os.fwalk. Windows didn't show the Changelog. Windows showed each link twice. ---------- nosy: +iritkatriel status: open -> pending versions: +Python 3.10, Python 3.11 -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 18:25:12 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 23:25:12 +0000 Subject: [issue29317] test_copyxattr_symlinks fails In-Reply-To: <1484782411.92.0.520036190929.issue29317@psf.upfronthosting.co.za> Message-ID: <1638746712.68.0.775064107272.issue29317@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 18:29:00 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 23:29:00 +0000 Subject: [issue26894] Readline not aborting line edition on sigint In-Reply-To: <1462027506.98.0.545203031593.issue26894@psf.upfronthosting.co.za> Message-ID: <1638746940.97.0.876234232.issue26894@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 18:33:23 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 23:33:23 +0000 Subject: [issue31879] Launcher fails on custom command starting with "python" In-Reply-To: <1509037268.43.0.213398074469.issue31879@psf.upfronthosting.co.za> Message-ID: <1638747203.93.0.134704738781.issue31879@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +loewis, mhammond type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 18:38:16 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 23:38:16 +0000 Subject: [issue16247] Report failing url in URLError? In-Reply-To: <1350390680.77.0.132205585956.issue16247@psf.upfronthosting.co.za> Message-ID: <1638747496.71.0.882492949014.issue16247@roundup.psfhosted.org> Irit Katriel added the comment: Senthil, can this issue be closed now or is there something left to do? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 18:49:21 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 23:49:21 +0000 Subject: [issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth In-Reply-To: <1484021927.49.0.387886726852.issue29221@psf.upfronthosting.co.za> Message-ID: <1638748161.91.0.395008596839.issue29221@roundup.psfhosted.org> Irit Katriel added the comment: I am unable to reproduce this on 3.11. Is it still a problem? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 18:51:21 2021 From: report at bugs.python.org (Toshihiro Kamiya) Date: Sun, 05 Dec 2021 23:51:21 +0000 Subject: [issue45987] os.chdir in unittest's test case causes RecursionError on Windows In-Reply-To: <1638714309.05.0.538480655841.issue45987@roundup.psfhosted.org> Message-ID: <1638748281.51.0.855697362072.issue45987@roundup.psfhosted.org> Toshihiro Kamiya added the comment: I think it may be difficult to understand the error message that deleting a directory causes "RecursionError or stack overflow", though. I hope the issue reported as msg377358 will be resolved in some way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 18:56:48 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 23:56:48 +0000 Subject: [issue27920] Embedding python in a shared library fails to import the Python module In-Reply-To: <1472672150.5.0.175635801824.issue27920@psf.upfronthosting.co.za> Message-ID: <1638748608.84.0.0120851329091.issue27920@roundup.psfhosted.org> Irit Katriel added the comment: Did Antoine's fix from issue19153 solve your problem? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 18:57:06 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 05 Dec 2021 23:57:06 +0000 Subject: [issue27920] Embedding python in a shared library fails to import the Python module In-Reply-To: <1472672150.5.0.175635801824.issue27920@psf.upfronthosting.co.za> Message-ID: <1638748626.83.0.466595134142.issue27920@roundup.psfhosted.org> Change by Irit Katriel : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 19:07:05 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 00:07:05 +0000 Subject: [issue17179] Misleading error from type() when passing unknown keyword argument In-Reply-To: <1360571201.2.0.86006347662.issue17179@psf.upfronthosting.co.za> Message-ID: <1638749225.67.0.633783034771.issue17179@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: needs patch -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 19:07:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 00:07:55 +0000 Subject: [issue24851] infinite loop in faulthandler._stack_overflow In-Reply-To: <1439412048.1.0.772925582506.issue24851@psf.upfronthosting.co.za> Message-ID: <1638749275.11.0.731081085665.issue24851@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 19:08:26 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 00:08:26 +0000 Subject: [issue23360] Content-Type when sending data with urlopen() In-Reply-To: <1422794612.5.0.505084736818.issue23360@psf.upfronthosting.co.za> Message-ID: <1638749306.54.0.801203258356.issue23360@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: patch review -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 19:52:45 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Mon, 06 Dec 2021 00:52:45 +0000 Subject: [issue45977] Unexpected effect of sys.pycache_prefix = "" In-Reply-To: <1638590311.18.0.778355816492.issue45977@roundup.psfhosted.org> Message-ID: <1638751965.6.0.291626063415.issue45977@roundup.psfhosted.org> Andrei Kulakov added the comment: If CWD=/a/b and pycache_prefix=c, the resulting dir is /a/b/c as I would expect. If CWD=/a/b and pycache_prefix='', I would expect resulting dir to be /a/b instead of /a/b/a/b . For example as the shell `cd` command accepts relative path as arg, I would expect that `cd c` changes to /a/b/c ; but it would be very strange to expect `cd ` with empty arg to change to /a/b/a/b . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 19:54:53 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Mon, 06 Dec 2021 00:54:53 +0000 Subject: [issue45977] Unexpected effect of sys.pycache_prefix = "" In-Reply-To: <1638590311.18.0.778355816492.issue45977@roundup.psfhosted.org> Message-ID: <1638752093.62.0.384810276816.issue45977@roundup.psfhosted.org> Andrei Kulakov added the comment: Can this also create the risk of 'path too long' issues? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 19:57:31 2021 From: report at bugs.python.org (neonene) Date: Mon, 06 Dec 2021 00:57:31 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638752251.83.0.600345827737.issue45582@roundup.psfhosted.org> Change by neonene : ---------- pull_requests: +28154 pull_request: https://github.com/python/cpython/pull/29930 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 20:27:54 2021 From: report at bugs.python.org (Daniel Hillier) Date: Mon, 06 Dec 2021 01:27:54 +0000 Subject: [issue45981] Get raw file name in bytes from ZipFile In-Reply-To: <1638625166.93.0.299659631229.issue45981@roundup.psfhosted.org> Message-ID: <1638754074.77.0.405177301479.issue45981@roundup.psfhosted.org> Daniel Hillier added the comment: Handling different character sets is not completely supported yet. There are a couple of open issues relating to this: https://bugs.python.org/issue40407 (reading file names), https://bugs.python.org/issue41928 (support for reading and writing filenames using the unicode filename extra field) and https://bugs.python.org/issue40172 (issues with reading and then writing a filename from and back into a zip where the initial filename isn't encoded in cp437). Most modern zip programs that deal with characters outside ascii or cp437 either set the utf-8 flag or write both an ascii or cp437 compatible filename (to the original filename field in the zip header) and the actual filename with all non-ascii characters in the unicode filename extra field. I think adding support for the unicode field to Python would probably cover the majority files generated by modern zip programs. For complete support, including older zip programs that don't support the utf-8 flag or unicode filename extra field, we may need to provide another parameter in Python's ZipFile's read and write functions to be able to override the charset used for the filename stored directly in the zip file header. I've added my thoughts on how to approach this in https://bugs.python.org/issue40172 but haven't had time to implement these myself. ---------- nosy: +dhillier _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 21:22:29 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 06 Dec 2021 02:22:29 +0000 Subject: [issue44166] Make IndexError messages for list more informative In-Reply-To: <1621323219.05.0.0543571942932.issue44166@roundup.psfhosted.org> Message-ID: <1638757349.96.0.683308779319.issue44166@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 21:23:10 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 06 Dec 2021 02:23:10 +0000 Subject: [issue44166] Make IndexError messages for list more informative In-Reply-To: <1621323219.05.0.0543571942932.issue44166@roundup.psfhosted.org> Message-ID: <1638757390.9.0.302761310891.issue44166@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 21:33:35 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 06 Dec 2021 02:33:35 +0000 Subject: [issue44166] Make IndexError messages for list more informative In-Reply-To: <1621323219.05.0.0543571942932.issue44166@roundup.psfhosted.org> Message-ID: <1638758015.61.0.176173428719.issue44166@roundup.psfhosted.org> Raymond Hettinger added the comment: Thank for the suggestion. While we're going to a pass on this one, no doubt there are other places that language can improve its communication with the user. Please continue to submit ideas and patches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 22:51:51 2021 From: report at bugs.python.org (Ma Lin) Date: Mon, 06 Dec 2021 03:51:51 +0000 Subject: [issue44092] [sqlite3] Remove special rollback handling In-Reply-To: <1620596162.31.0.000417990177807.issue44092@roundup.psfhosted.org> Message-ID: <1638762711.81.0.938440705838.issue44092@roundup.psfhosted.org> Ma Lin added the comment: I think this change is no problem. Erlend E. Aasland's explanation is very clear. There is only one situation that a problem may occur. Write code with SQLite 3.8.7.2+ (2014-11-18), and run it on 3.7.15 (2012-12-12) ~ 3.8.7.1-, but this situation may be difficult to happen, we can note this situation in doc. More securely, if run on SQLite 3.8.7.1-, and encounter SQLITE_ABORT_ROLLBACK error code, a prompt can be given to explain the reason. Also note that the current main branch is buggy. If don't adopt this change or revert this change later, don't forget to fix the bug of msg407185 (`pysqlite_Statement.in_use` flag is not reset). ---------- nosy: +malin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 5 23:36:01 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 06 Dec 2021 04:36:01 +0000 Subject: [issue45934] python curses newterm implementation In-Reply-To: Message-ID: <1638765361.21.0.297782951127.issue45934@roundup.psfhosted.org> Guido van Rossum added the comment: Serhiy, this started with a post by Julius to the core-mentorship list. He wants to add newterm(), and found that an issue about that was just created by a different user (draganic1) -- apparently without a comment body, so it appears the first comment is mine (I didn't know that was possible in bpo). Windows experts are welcome to take themselves off the nosy list. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 02:00:11 2021 From: report at bugs.python.org (Tzu-ping Chung) Date: Mon, 06 Dec 2021 07:00:11 +0000 Subject: [issue45992] distutils paths are scattered between PythonXY and PythonXY-32 on WoW64 Message-ID: <1638774011.75.0.410629931242.issue45992@roundup.psfhosted.org> New submission from Tzu-ping Chung : Should be reproducible with a 32-bit Python 3.10 running on 64-bit Windows. $ py -3.10-32 -q >>> from distutils.command.install import install :1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives >>> from distutils.dist import Distribution >>> c = install(Distribution()) >>> c.user = 1 >>> c.finalize_options() >>> for k in ('purelib', 'platlib', 'headers', 'scripts', 'data'): ... print(f'{k}\t{getattr(c, "install_" + k)}') ... purelib C:\Users\uranusjr\AppData\Roaming\Python\Python310-32\site-packages platlib C:\Users\uranusjr\AppData\Roaming\Python\Python310-32\site-packages headers C:\Users\uranusjr\AppData\Roaming\Python\Python310\Include\UNKNOWN scripts C:\Users\uranusjr\AppData\Roaming\Python\Python310\Scripts data C:\Users\uranusjr\AppData\Roaming\Python This is different from sysconfig, where all files are placed in the *-32 suffix: >>> import sysconfig >>> for k in ('purelib', 'platlib', 'include', 'scripts', 'data'): ... print(f'{k}\t{paths[k]}') ... purelib C:\Users\uranusjr\AppData\Roaming\Python\Python310-32\site-packages platlib C:\Users\uranusjr\AppData\Roaming\Python\Python310-32\site-packages include C:\Users\uranusjr\AppData\Roaming\Python\Python310-32\Include scripts C:\Users\uranusjr\AppData\Roaming\Python\Python310-32\Scripts data C:\Users\uranusjr\AppData\Roaming\Python And also different from Python 3.9 (and prior), which does not use the *-32 prefix: $ py -3.9-32 -q >>> from distutils.command.install import install >>> from distutils.dist import Distribution >>> c = install(Distribution()) >>> c.user = 1 >>> c.finalize_options() >>> for k in ('purelib', 'platlib', 'headers', 'scripts', 'data'): ... print(f'{k}\t{getattr(c, "install_" + k)}') ... purelib C:\Users\uranusjr\AppData\Roaming\Python\Python39\site-packages platlib C:\Users\uranusjr\AppData\Roaming\Python\Python39\site-packages headers C:\Users\uranusjr\AppData\Roaming\Python\Python39\Include\UNKNOWN scripts C:\Users\uranusjr\AppData\Roaming\Python\Python39\Scripts data C:\Users\uranusjr\AppData\Roaming\Python It?s of course not a problem to change the prefix and add the *-32 suffix on 3.10 (since the only thing that?s important is to have a consistent prefix for a given version), but the change should likely need to be applied consistently. I think we should fix distutils to match sysconfig? ---------- components: Distutils, Windows messages: 407769 nosy: dstufft, eric.araujo, paul.moore, steve.dower, tim.golden, uranusjr, zach.ware priority: normal severity: normal status: open title: distutils paths are scattered between PythonXY and PythonXY-32 on WoW64 versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 02:22:18 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 06 Dec 2021 07:22:18 +0000 Subject: [issue45732] Make python.org Windows and macOS installers use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1638775338.1.0.0806334220684.issue45732@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +28155 pull_request: https://github.com/python/cpython/pull/29931 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 02:24:10 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 06 Dec 2021 07:24:10 +0000 Subject: [issue45732] Make python.org Windows and macOS installers use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1638775450.3.0.440739792639.issue45732@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +28156 pull_request: https://github.com/python/cpython/pull/29932 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 02:26:42 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 06 Dec 2021 07:26:42 +0000 Subject: [issue45732] Make python.org Windows and macOS installers use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1638775602.45.0.0455562610329.issue45732@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +28157 pull_request: https://github.com/python/cpython/pull/29933 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 02:39:15 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 06 Dec 2021 07:39:15 +0000 Subject: [issue45732] Make python.org Windows and macOS installers use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1638776355.69.0.890312505008.issue45732@roundup.psfhosted.org> Ned Deily added the comment: New changeset 20801982fa696a01ad2c116925bddf2fda106338 by Ned Deily in branch '3.10': bpo-45732: Update python.org macOS installer to use Tcl/Tk 8.6.12. (GH-29932) https://github.com/python/cpython/commit/20801982fa696a01ad2c116925bddf2fda106338 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 02:40:00 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 06 Dec 2021 07:40:00 +0000 Subject: [issue45732] Make python.org Windows and macOS installers use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1638776400.71.0.896099852595.issue45732@roundup.psfhosted.org> Ned Deily added the comment: New changeset 7accb4fdb3dc1b4140089edee290998aff496fe2 by Ned Deily in branch '3.9': bpo-45732: Update python.org macOS installer to use Tcl/Tk 8.6.12. (GH-29933) https://github.com/python/cpython/commit/7accb4fdb3dc1b4140089edee290998aff496fe2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 02:44:20 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 06 Dec 2021 07:44:20 +0000 Subject: [issue45732] Make python.org Windows and macOS installers use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1638776660.94.0.916215147573.issue45732@roundup.psfhosted.org> Ned Deily added the comment: New changeset f34d181fa15e1f082140a4e4a8fa3b77118f8e98 by Ned Deily in branch 'main': bpo-45732: Update python.org macOS installer to use Tcl/Tk 8.6.12. (GH-29931) https://github.com/python/cpython/commit/f34d181fa15e1f082140a4e4a8fa3b77118f8e98 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 02:47:19 2021 From: report at bugs.python.org (hongweipeng) Date: Mon, 06 Dec 2021 07:47:19 +0000 Subject: [issue42918] Nested multi-line expression will lead to "compile()" fails In-Reply-To: <1610517717.73.0.740461753555.issue42918@roundup.psfhosted.org> Message-ID: <1638776839.38.0.226059867888.issue42918@roundup.psfhosted.org> Change by hongweipeng : ---------- keywords: +patch nosy: +hongweipeng nosy_count: 4.0 -> 5.0 pull_requests: +28158 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29934 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 02:48:20 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 06 Dec 2021 07:48:20 +0000 Subject: [issue45732] Make python.org Windows and macOS installers use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1638776900.09.0.867935533451.issue45732@roundup.psfhosted.org> Change by Ned Deily : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 03:00:18 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Mon, 06 Dec 2021 08:00:18 +0000 Subject: [issue45993] Main branch of CPython does not build anymore on macOS Message-ID: <1638777618.8.0.921239379718.issue45993@roundup.psfhosted.org> New submission from Nikita Sobolev : New version of `main` branch does not build for me anymore. Command: `make -j` System information: - macOS 10.14.6 - Apple clang version 11.0.0 (clang-1100.0.33.16) I am also attaching resulting Makefile. Output: ``` ? make -j gcc -L/usr/local/opt/openssl/lib -L/usr/local/opt/openssl/lib -o Programs/_freeze_module Programs/_freeze_module.o Modules/getpath_noop.o Modules/getbuildinfo.o Parser/token.o Parser/pegen.o Parser/pegen_errors.o Parser/action_helpers.o Parser/parser.o Parser/string_parser.o Parser/peg_api.o Parser/myreadline.o Parser/tokenizer.o Objects/abstract.o Objects/accu.o Objects/boolobject.o Objects/bytes_methods.o Objects/bytearrayobject.o Objects/bytesobject.o Objects/call.o Objects/capsule.o Objects/cellobject.o Objects/classobject.o Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o Objects/enumobject.o Objects/exceptions.o Objects/genericaliasobject.o Objects/genobject.o Objects/fileobject.o Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o Objects/interpreteridobject.o Objects/iterobject.o Objects/listobject.o Objects/longobject.o Objects/dictobject.o Objects/odictobject.o Objects/memoryobject.o Objects/methodobject.o Objects/moduleobject.o Objects/namespaceobject.o Objects/object.o Objects/obmalloc.o Objects/picklebufobject.o Objects/rangeobject.o Objects/setobject.o Objects/sliceobject.o Objects/structseq.o Objects/tupleobject.o Objects/typeobject.o Objects/unicodeobject.o Objects/unicodectype.o Objects/unionobject.o Objects/weakrefobject.o Python/_warnings.o Python/Python-ast.o Python/Python-tokenize.o Python/asdl.o Python/ast.o Python/ast_opt.o Python/ast_unparse.o Python/bltinmodule.o Python/ceval.o Python/codecs.o Python/compile.o Python/context.o Python/dynamic_annotations.o Python/errors.o Python/frame.o Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o Python/getcopyright.o Python/getplatform.o Python/getversion.o Python/hamt.o Python/hashtable.o Python/import.o Python/importdl.o Python/initconfig.o Python/marshal.o Python/modsupport.o Python/mysnprintf.o Python/mystrtoul.o Python/pathconfig.o Python/preconfig.o Python/pyarena.o Python/pyctype.o Python/pyfpe.o Python/pyhash.o Python/pylifecycle.o Python/pymath.o Python/pystate.o Python/pythonrun.o Python/pytime.o Python/bootstrap_hash.o Python/specialize.o Python/structmember.o Python/symtable.o Python/sysmodule.o Python/thread.o Python/traceback.o Python/getopt.o Python/pystrcmp.o Python/pystrtod.o Python/pystrhex.o Python/dtoa.o Python/formatter_unicode.o Python/fileutils.o Python/suggestions.o Python/dynload_shlib.o Modules/config.o Modules/main.o Modules/gcmodule.o Modules/xxsubtype.o -lintl -ldl -framework CoreFoundation Undefined symbols for architecture x86_64: "_PyErr_CheckSignals", referenced from: _my_fgets in myreadline.o _long_to_decimal_string_internal in longobject.o _x_mul in longobject.o _x_divrem in longobject.o _PyObject_Print in object.o _PyObject_Str in object.o _PyObject_Repr in object.o ... "_PyOS_FSPath", referenced from: _PyUnicode_FSConverter in unicodeobject.o _PyUnicode_FSDecoder in unicodeobject.o "__PyAtExit_Call", referenced from: _Py_FinalizeEx in pylifecycle.o _Py_EndInterpreter in pylifecycle.o "__PyAtExit_Fini", referenced from: _interpreter_clear in pystate.o "__PyAtExit_Init", referenced from: _pycore_interp_init in pylifecycle.o "__PyErr_CheckSignalsTstate", referenced from: _handle_signals in ceval.o "__PyFaulthandler_Fini", referenced from: _Py_FinalizeEx in pylifecycle.o _fatal_error in pylifecycle.o "__PyFaulthandler_Init", referenced from: _init_interp_main in pylifecycle.o "__PyMem_DumpTraceback", referenced from: __PyObject_AssertFailed in object.o __PyObject_DebugDumpAddress in obmalloc.o "__PyOS_InterruptOccurred", referenced from: _my_fgets in myreadline.o "__PySignal_Fini", referenced from: _Py_FinalizeEx in pylifecycle.o "__PySignal_Init", referenced from: _init_interp_main in pylifecycle.o "__PyTraceMalloc_Fini", referenced from: _Py_FinalizeEx in pylifecycle.o "__PyTraceMalloc_Init", referenced from: _init_interp_main in pylifecycle.o "__PyTraceMalloc_NewReference", referenced from: __Py_NewReference in object.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Programs/_freeze_module] Error 1 ``` ---------- components: Build files: Makefile messages: 407773 nosy: sobolevn priority: normal severity: normal status: open title: Main branch of CPython does not build anymore on macOS type: compile error versions: Python 3.11 Added file: https://bugs.python.org/file50479/Makefile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 03:27:42 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 08:27:42 +0000 Subject: [issue45993] Main branch of CPython does not build anymore on macOS In-Reply-To: <1638777618.8.0.921239379718.issue45993@roundup.psfhosted.org> Message-ID: <1638779262.27.0.071313603483.issue45993@roundup.psfhosted.org> Christian Heimes added the comment: Did you run "make distclean" or "git clean -xdf" before ./configure? ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 03:31:51 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 08:31:51 +0000 Subject: [issue44035] Regenerating the configure script fails even if dependencies are satisfied In-Reply-To: <1620147514.31.0.864280114209.issue44035@roundup.psfhosted.org> Message-ID: <1638779511.23.0.417186886001.issue44035@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +28159 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29935 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 04:04:21 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 09:04:21 +0000 Subject: [issue45977] Unexpected effect of sys.pycache_prefix = "" In-Reply-To: <1638590311.18.0.778355816492.issue45977@roundup.psfhosted.org> Message-ID: <1638781461.71.0.0818314843256.issue45977@roundup.psfhosted.org> Christian Heimes added the comment: The cache prefix mirrors the directory structure. Python takes the absolute path to the .py file, converts the path to a relative path by stripping off the leading slash, and finally joins the path with the prefix. Take this example: $ PYTHONPYCACHEPREFIX=/tmp/pycache python3.10 -c pass This will create the cache file "/tmp/pycache/usr/lib64/python3.10/os.cpython-310.pyc" for the Python file "/usr/lib64/python3.10/os.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 04:10:47 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 06 Dec 2021 09:10:47 +0000 Subject: [issue45950] Reintroduce bootstrap_python for freezing In-Reply-To: <1638375997.48.0.12074215987.issue45950@roundup.psfhosted.org> Message-ID: <1638781847.6.0.647362084647.issue45950@roundup.psfhosted.org> Ned Deily added the comment: Framework builds on macOS now fail with a bus error when trying to run the newly built _bootstrap_python. A simplified example: $ ./configure --enable-framework=$PWD/Library/Frameworks checking for git... found checking build system type... x86_64-apple-darwin20.6.0 checking host system type... x86_64-apple-darwin20.6.0 checking for Python interpreter freezing... ./_bootstrap_python checking for python3.11... no checking for python3.10... no checking for python3.9... no checking for python3.8... no checking for python3.7... no checking for python3.6... no checking for python3... python3 checking Python for regen version... Python 3.8.9 [...] creating Modules/Setup.local creating Makefile pkg-config is missing. Some dependencies may not be detected correctly. If you want a release build with all stable optimizations active (PGO, etc), please run ./configure --enable-optimizations $ make [...] gcc -o _bootstrap_python Modules/getbuildinfo.o Parser/token.o Parser/pegen.o Parser/pegen_errors.o Parser/action_helpers.o Parser/parser.o Parser/string_parser.o Parser/peg_api.o Parser/myreadline.o Parser/tokenizer.o Objects/abstract.o Objects/accu.o Objects/boolobject.o Objects/bytes_methods.o Objects/bytearrayobject.o Objects/bytesobject.o Objects/call.o Objects/capsule.o Objects/cellobject.o Objects/classobject.o Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o Objects/enumobject.o Objects/exceptions.o Objects/genericaliasobject.o Objects/genobject.o Objects/fileobject.o Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o Objects/interpreteridobject.o Objects/iterobject.o Objects/listobject.o Objects/longobject.o Objects/dictobject.o Objects/odictobject.o Objects/memoryobject.o Objects/methodobject.o Objects/moduleobject.o Objects/namespaceobject.o Objects/object.o Objects/obmalloc.o Objects/picklebufobject.o Objects/rangeobject.o Objects/setobject.o Objects/sliceobject.o Objects/structseq.o Objects/tupleobject.o Objects/typeobject.o Objects/unicodeobject.o Objects/unicodectype.o Objects/unionobject.o Objects/weakrefobject.o Python/_warnings.o Python/Python-ast.o Python/Python-tokenize.o Python/asdl.o Python/ast.o Python/ast_opt.o Python/ast_unparse.o Python/bltinmodule.o Python/ceval.o Python/codecs.o Python/compile.o Python/context.o Python/dynamic_annotations.o Python/errors.o Python/frame.o Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o Python/getcopyright.o Python/getplatform.o Python/getversion.o Python/hamt.o Python/hashtable.o Python/import.o Python/importdl.o Python/initconfig.o Python/marshal.o Python/modsupport.o Python/mysnprintf.o Python/mystrtoul.o Python/pathconfig.o Python/preconfig.o Python/pyarena.o Python/pyctype.o Python/pyfpe.o Python/pyhash.o Python/pylifecycle.o Python/pymath.o Python/pystate.o Python/pythonrun.o Python/pytime.o Python/bootstrap_hash.o Python/specialize.o Python/structmember.o Python/symtable.o Python/sysmodule.o Python/thread.o Python/traceback.o Python/getopt.o Python/pystrcmp.o Python/pystrtod.o Python/pystrhex.o Python/dtoa.o Python/formatter_unicode.o Python/fileutils.o Python/suggestions.o Python/dynload_shlib.o Modules/config.o Modules/main.o Modules/gcmodule.o Modules/atexitmodule.o Modules/faulthandler.o Modules/posixmodule.o Modules/signalmodule.o Modules/_tracemalloc.o Modules/_codecsmodule.o Modules/_collectionsmodule.o Modules/errnomodule.o Modules/_io/_iomodule.o Modules/_io/iobase.o Modules/_io/fileio.o Modules/_io/bytesio.o Modules/_io/bufferedio.o Modules/_io/textio.o Modules/_io/stringio.o Modules/itertoolsmodule.o Modules/_sre.o Modules/_threadmodule.o Modules/timemodule.o Modules/_weakref.o Modules/_abc.o Modules/_functoolsmodule.o Modules/_localemodule.o Modules/_operator.o Modules/_stat.o Modules/symtablemodule.o Modules/pwdmodule.o Modules/xxsubtype.o \ Programs/_bootstrap_python.o Modules/getpath.o -ldl -framework CoreFoundation ./_bootstrap_python ./Tools/scripts/deepfreeze.py Python/frozen_modules/importlib._bootstrap.h -m importlib._bootstrap -o Python/deepfreeze/importlib._bootstrap.c make: *** [Python/deepfreeze/importlib._bootstrap.c] Bus error: 10 $ --enable-framework causes a number of changes in interpreter building and initialization. Since, as it stands, _bootstrap_python executable isn't and doesn't need to be built as a framework, there is probably some path confusion in getpath.c or elsewhere. Prior to these changes (at 3.11.0a2 at least), it was still possible to run a framework build executable in the build directory through some careful use of build variables in Makefile (like how "make test" works). Without delving deeper into it at the moment, I'm not sure what to suggest. It may be simpler to just do a clean separate non-framework build to provide _bootstrap_python. And/or possibly re-allow the use of --with-build-python to specify a user-supplied build python. I wonder if there are certain configurations on other platforms where there might be similar problems with the current approach. I'm marking this as a "release blocker" since it is preventing building the usual python.org macOS binary installer for 3.11.0a3. Since it is still early in the release cycle for 3.11, the release manager might reasonably decide to not delay the release for a fix and thus skip having a macOS installer for a3. ---------- nosy: +ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 04:25:31 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 09:25:31 +0000 Subject: [issue45950] Reintroduce bootstrap_python for freezing In-Reply-To: <1638375997.48.0.12074215987.issue45950@roundup.psfhosted.org> Message-ID: <1638782731.1.0.804210369686.issue45950@roundup.psfhosted.org> Christian Heimes added the comment: Ned, does this change solve the issue with framework builds? $ git diff diff --git a/Makefile.pre.in b/Makefile.pre.in index 8e6e553554d..2068db30855 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -106,7 +106,7 @@ PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST) -I$(srcdir)/Include PY_CPPFLAGS= $(BASECPPFLAGS) -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS) PY_LDFLAGS= $(CONFIGURE_LDFLAGS) $(LDFLAGS) PY_LDFLAGS_NODIST=$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST) -PY_LDFLAGS_NOLTO=$(PY_LDFLAGS) $(CONFIGURE_LDFLAGS_NOLTO) $(LDFLAGS_NODIST) +PY_LDFLAGS_NOLTO=$(PY_LDFLAGS_NODIST) $(CONFIGURE_LDFLAGS_NOLTO) $(LDFLAGS_NODIST) NO_AS_NEEDED= @NO_AS_NEEDED@ CCSHARED= @CCSHARED@ # LINKFORSHARED are the flags passed to the $(CC) command that links ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 04:32:49 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Mon, 06 Dec 2021 09:32:49 +0000 Subject: [issue45993] Main branch of CPython does not build anymore on macOS In-Reply-To: <1638777618.8.0.921239379718.issue45993@roundup.psfhosted.org> Message-ID: <1638783169.9.0.636398836859.issue45993@roundup.psfhosted.org> Nikita Sobolev added the comment: Looks like removing cache worked. Thanks! ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 04:40:28 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 06 Dec 2021 09:40:28 +0000 Subject: [issue45950] Reintroduce bootstrap_python for freezing In-Reply-To: <1638375997.48.0.12074215987.issue45950@roundup.psfhosted.org> Message-ID: <1638783628.93.0.42937167806.issue45950@roundup.psfhosted.org> Ned Deily added the comment: > Ned, does this change solve the issue with framework builds? No. I would guess at a minimum getpath.c for _bootstrap_python might need to be built without WITH_NEXT_FRAMEWORK defined. But I'm out of time for today and don't expect to have much time available in the immediate future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 05:02:48 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 10:02:48 +0000 Subject: [issue45950] Reintroduce bootstrap_python for freezing In-Reply-To: <1638375997.48.0.12074215987.issue45950@roundup.psfhosted.org> Message-ID: <1638784968.07.0.497905644281.issue45950@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28160 pull_request: https://github.com/python/cpython/pull/29936 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 05:10:58 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 10:10:58 +0000 Subject: [issue41921] REDoS in parseentities In-Reply-To: <1601737969.46.0.495788645161.issue41921@roundup.psfhosted.org> Message-ID: <1638785458.8.0.876957108885.issue41921@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +lemburg versions: +Python 3.11 -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 05:13:34 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 06 Dec 2021 10:13:34 +0000 Subject: [issue44092] [sqlite3] Remove special rollback handling In-Reply-To: <1620596162.31.0.000417990177807.issue44092@roundup.psfhosted.org> Message-ID: <1638785614.27.0.298647506409.issue44092@roundup.psfhosted.org> Erlend E. Aasland added the comment: > I think this change is no problem. Thanks, and thank you for looking reviewing this change. > There is only one situation that a problem may occur. Write code with SQLite > 3.8.7.2+ (2014-11-18), and run it on 3.7.15 (2012-12-12) ~ 3.8.7.1-, but > this situation may be difficult to happen, we can note this situation in > doc. How realistic is this scenario? If you compile with, for example 3.14.0 or newer, you'd link with sqlite3_trace_v2, not sqlite3_trace, so the loader would prevent you from running with anything pre 3.14. AFAIK, we've never had such problems. > More securely, if run on SQLite 3.8.7.1-, and encounter > SQLITE_ABORT_ROLLBACK error code, a prompt can be given to explain the > reason. You already get both an error message, an (extended) error code. That should be sufficient. > Also note that the current main branch is buggy. If don't adopt this change > or revert this change later, don't forget to fix the bug of msg407185 > (`pysqlite_Statement.in_use` flag is not reset). It is a change of behaviour of the internal machinery. Does the change lead to wrong results (duplicate rows, wrong rows returned, no rows returned)? Corrupted/garbage data? Non-deterministic behaviour? Does any of the API's provided by sqlite3 not behave according to the documentation anymore? NB: I plan to get rid of the in_use flag long before the beta sets in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 05:13:59 2021 From: report at bugs.python.org (Mark Shannon) Date: Mon, 06 Dec 2021 10:13:59 +0000 Subject: [issue45963] Embed interpreter frame in generator. In-Reply-To: <1638448060.39.0.766103367856.issue45963@roundup.psfhosted.org> Message-ID: <1638785639.68.0.194066020478.issue45963@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 299483c95d601ddcfdce2f96418b6499c1fc7b9f by Mark Shannon in branch 'main': bpo-45963: Make space for the InterpreterFrame of a generator in that generator. (GH-29891) https://github.com/python/cpython/commit/299483c95d601ddcfdce2f96418b6499c1fc7b9f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 05:23:33 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 10:23:33 +0000 Subject: [issue45950] Reintroduce bootstrap_python for freezing In-Reply-To: <1638375997.48.0.12074215987.issue45950@roundup.psfhosted.org> Message-ID: <1638786213.43.0.167060727801.issue45950@roundup.psfhosted.org> Christian Heimes added the comment: Ronald, Pablo, could you please test GH-29936 on macOS with --enable-framework? ---------- nosy: +pablogsal, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 05:24:39 2021 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 06 Dec 2021 10:24:39 +0000 Subject: [issue41921] REDoS in parseentities In-Reply-To: <1601737969.46.0.495788645161.issue41921@roundup.psfhosted.org> Message-ID: <1638786279.26.0.286877049196.issue41921@roundup.psfhosted.org> Marc-Andre Lemburg added the comment: Interesting that the tool still exists. It uses mxTextTools, but in a non-packaged version, so it's been broken for two decades now :-) I think it's safe to remove it from Tools\scripts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 05:30:32 2021 From: report at bugs.python.org (Ma Lin) Date: Mon, 06 Dec 2021 10:30:32 +0000 Subject: [issue44092] [sqlite3] Remove special rollback handling In-Reply-To: <1620596162.31.0.000417990177807.issue44092@roundup.psfhosted.org> Message-ID: <1638786632.09.0.220750844955.issue44092@roundup.psfhosted.org> Ma Lin added the comment: > How realistic is this scenario? If you compile with, for example 3.14.0 or > newer, you'd link with sqlite3_trace_v2, not sqlite3_trace, so the loader > would prevent you from running with anything pre 3.14. AFAIK, we've never > had such problems. I mean, after this change, different versions of SQLite will behave differently. And give a message for SQLITE_ABORT_ROLLBACK to explain this problem. > It is a change of behaviour of the internal machinery. Does the change lead > to wrong results (duplicate rows, wrong rows returned, no rows returned)? > Corrupted/garbage data? Non-deterministic behaviour? Does any of the API's > provided by sqlite3 not behave according to the documentation anymore? It just leaks resource, apart from this, there seems to be no problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 05:37:11 2021 From: report at bugs.python.org (Thomas Kluyver) Date: Mon, 06 Dec 2021 10:37:11 +0000 Subject: [issue43805] multiprocessing.Queue hangs when process on other side dies In-Reply-To: <1618141970.93.0.19986621438.issue43805@roundup.psfhosted.org> Message-ID: <1638787031.6.0.511494580487.issue43805@roundup.psfhosted.org> Thomas Kluyver added the comment: It's not my decision, so I can't really say. But the Queue API is pretty stable, and exists 3 times over in Python (the queue module for use with threads, in multiprocessing and in asyncio). So I'd guess that anyone wanting to add to that API would need to make a compelling case for why it's important, and be prepared for a lot of wrangling over API details (like method names and exceptions). If you want to push that idea, you could try the ideas board on the Python discourse forum: https://discuss.python.org/c/ideas/6 . You might also want to look at previous discussions about adding a Queue.close() method: issue29701 and issue40888. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 05:38:14 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 06 Dec 2021 10:38:14 +0000 Subject: [issue44092] [sqlite3] Remove special rollback handling In-Reply-To: <1620596162.31.0.000417990177807.issue44092@roundup.psfhosted.org> Message-ID: <1638787094.27.0.189738452765.issue44092@roundup.psfhosted.org> Erlend E. Aasland added the comment: > I mean, after this change, different versions of SQLite will behave differently. Yes, this is explained in the news item: Fetch across rollback no longer raises :exc:`~sqlite3.InterfaceError`. Instead we leave it to the SQLite library to handle these cases. > And give a message for SQLITE_ABORT_ROLLBACK to explain this problem. I'm not sure this is a good idea; I believe letting the underlying SQLite library explain the error is better than trying to deduce stuff based on what was known at compile time and what we know at runtime. > It just leaks resource, apart from this, there seems to be no problem. Can you provide a reproducer? We've run this change through the ref. leak bots, and they are all green, so if there's a ref. leak, the test suite needs improvements. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 05:43:11 2021 From: report at bugs.python.org (Ma Lin) Date: Mon, 06 Dec 2021 10:43:11 +0000 Subject: [issue44092] [sqlite3] Remove special rollback handling In-Reply-To: <1620596162.31.0.000417990177807.issue44092@roundup.psfhosted.org> Message-ID: <1638787391.12.0.67904455813.issue44092@roundup.psfhosted.org> Ma Lin added the comment: Imagine a person write a code with Python 3.11 and SQLite 3.8.7.2+, and then deploying it to Python 3.11 and SQLite 3.8.7.1-, error may occur. However, this situation is difficult to happen. > Can you provide a reproducer? We've run this change through the ref. > leak bots, and they are all green, so if there's a ref. leak, the > test suite needs improvements. The statement in cache will be never reused. If you don't mind, it's not a big problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 05:44:20 2021 From: report at bugs.python.org (Taiga Katarao) Date: Mon, 06 Dec 2021 10:44:20 +0000 Subject: [issue45994] Add simple usage to email module Message-ID: <1638787460.4.0.146511552632.issue45994@roundup.psfhosted.org> Change by Taiga Katarao : ---------- assignee: docs at python components: Documentation nosy: docs at python, tarao1006 priority: normal severity: normal status: open title: Add simple usage to email module type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 05:55:37 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 06 Dec 2021 10:55:37 +0000 Subject: [issue44092] [sqlite3] Remove special rollback handling In-Reply-To: <1620596162.31.0.000417990177807.issue44092@roundup.psfhosted.org> Message-ID: <1638788137.36.0.061201856449.issue44092@roundup.psfhosted.org> Erlend E. Aasland added the comment: > Imagine a person write a code with Python 3.11 and SQLite 3.8.7.2+, and then > deploying it to Python 3.11 and SQLite 3.8.7.1-, error may occur. However, > this situation is difficult to happen. Yes, I also think this is a far fetched case. I'll see if there's an easy way to handle this. If there isn't, I'm not sure the added complexity will be worth it. > The statement in cache will be never reused. That is not necessarily correct; if the "problematic cursor" executes a new statement, the statement in the cache will be reset, thus it can be reused. Also, if the "problematic cursor" is closed (or deleted), the statement can also be reused. But, if the "problematic cursor" just gets stale and is _never_ used again, it may be a performance issue if it is a hot statement. But, as soon as I can land my changes related to the in_use flag, this will not be an issue anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 05:57:16 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 10:57:16 +0000 Subject: [issue38836] Links are duplicated in documentation search result In-Reply-To: <1574096104.71.0.223088739291.issue38836@roundup.psfhosted.org> Message-ID: <1638788236.47.0.360220223256.issue38836@roundup.psfhosted.org> Change by Irit Katriel : ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 06:29:24 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 11:29:24 +0000 Subject: [issue30988] Exception parsing invalid email address headers starting or ending with dot In-Reply-To: <1500699002.76.0.343337119039.issue30988@psf.upfronthosting.co.za> Message-ID: <1638790164.57.0.50099435322.issue30988@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 06:35:20 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 11:35:20 +0000 Subject: [issue45950] Reintroduce bootstrap_python for freezing In-Reply-To: <1638375997.48.0.12074215987.issue45950@roundup.psfhosted.org> Message-ID: <1638790520.59.0.93143716302.issue45950@roundup.psfhosted.org> Christian Heimes added the comment: If the patch does not help then I can re-enable --with-build-python for non-cross builds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 06:43:40 2021 From: report at bugs.python.org (pmp-p) Date: Mon, 06 Dec 2021 11:43:40 +0000 Subject: [issue45256] Remove the usage of the C stack in Python to Python calls In-Reply-To: <1632220919.85.0.309558064668.issue45256@roundup.psfhosted.org> Message-ID: <1638791020.35.0.96513591363.issue45256@roundup.psfhosted.org> Change by pmp-p : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 06:43:48 2021 From: report at bugs.python.org (pmp-p) Date: Mon, 06 Dec 2021 11:43:48 +0000 Subject: [issue45829] Remove C stack use by specializing BINARY_SUBSCR, STORE_SUBSCR, LOAD_ATTR, and STORE_ATTR In-Reply-To: <1637142611.15.0.521267590311.issue45829@roundup.psfhosted.org> Message-ID: <1638791028.62.0.836349413296.issue45829@roundup.psfhosted.org> Change by pmp-p : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 06:43:58 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 11:43:58 +0000 Subject: [issue18774] There is still last bit of GNU Pth code in signalmodule.c In-Reply-To: <1376801880.96.0.197365143686.issue18774@psf.upfronthosting.co.za> Message-ID: <1638791038.61.0.472394878642.issue18774@roundup.psfhosted.org> Irit Katriel added the comment: Two of the three remaining comments Christian mentioned are still there: % grep -r "gnu pth" Python/ configure.ac Python//thread.c: library (e.g. gnu pth in pthread emulation) */ configure.ac: # (e.g. gnu pth with pthread emulation) ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 07:03:47 2021 From: report at bugs.python.org (John Belmonte) Date: Mon, 06 Dec 2021 12:03:47 +0000 Subject: [issue45995] string formatting: normalize negative zero Message-ID: <1638792226.95.0.292604366656.issue45995@roundup.psfhosted.org> New submission from John Belmonte : proposal: add a string formatting option to normalize negative 0 values to 0 use case: rounded display of a float that is nominally 0, where the distraction of a flashing minus sign from minute changes around 0 is unwanted example: >>> '%~5.1f' % -.00001 ' 0.0' format spec before: format_spec ::= [[fill]align][sign][#][0][width][grouping_option][.precision][type] after: format_spec ::= [[fill]align][sign][~][#][0][width][grouping_option][.precision][type] where '~' is only allowed for number types implementation: if '~' is present in the spec, add 0 to the value after applying precision ---------- components: Library (Lib) messages: 407792 nosy: John Belmonte priority: normal severity: normal status: open title: string formatting: normalize negative zero type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 07:15:51 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Dec 2021 12:15:51 +0000 Subject: [issue45995] string formatting: normalize negative zero In-Reply-To: <1638792226.95.0.292604366656.issue45995@roundup.psfhosted.org> Message-ID: <1638792951.69.0.120734385745.issue45995@roundup.psfhosted.org> Serhiy Storchaka added the comment: To normalize negative 0.0 to 0.0 you can just add 0.0. It will work with any method of converting floats to string, there is no need to change all formatting specifications. >>> x = -0.0 >>> x -0.0 >>> x + 0.0 0.0 ---------- nosy: +mark.dickinson, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 07:19:14 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 06 Dec 2021 12:19:14 +0000 Subject: [issue44035] Regenerating the configure script fails even if dependencies are satisfied In-Reply-To: <1620147514.31.0.864280114209.issue44035@roundup.psfhosted.org> Message-ID: <1638793154.74.0.698419433641.issue44035@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +28161 pull_request: https://github.com/python/cpython/pull/29937 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 07:19:30 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 12:19:30 +0000 Subject: [issue44035] Regenerating the configure script fails even if dependencies are satisfied In-Reply-To: <1620147514.31.0.864280114209.issue44035@roundup.psfhosted.org> Message-ID: <1638793170.71.0.532948081103.issue44035@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 98fac8bc183c113903403793ffe411358ee40d8a by Christian Heimes in branch 'main': bpo-44035: Check autoconf files thoroughly (GH-29935) https://github.com/python/cpython/commit/98fac8bc183c113903403793ffe411358ee40d8a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 07:21:33 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 12:21:33 +0000 Subject: [issue44035] Regenerating the configure script fails even if dependencies are satisfied In-Reply-To: <1620147514.31.0.864280114209.issue44035@roundup.psfhosted.org> Message-ID: <1638793293.08.0.683940135699.issue44035@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28162 pull_request: https://github.com/python/cpython/pull/29938 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 07:29:47 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Dec 2021 12:29:47 +0000 Subject: [issue45934] python curses newterm implementation In-Reply-To: Message-ID: <1638793787.08.0.970261878166.issue45934@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you Guido for clarification. I have found that post: https://mail.python.org/archives/list/core-mentorship at python.org/thread/YGSMPKP7G3HO73ISEQZFAWPPGCOA3JYZ/ I agree that it is worth to implement newterm. In particular it would be useful in tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 07:30:06 2021 From: report at bugs.python.org (John Belmonte) Date: Mon, 06 Dec 2021 12:30:06 +0000 Subject: [issue45995] string formatting: normalize negative zero In-Reply-To: <1638792226.95.0.292604366656.issue45995@roundup.psfhosted.org> Message-ID: <1638793806.3.0.575370955252.issue45995@roundup.psfhosted.org> John Belmonte added the comment: > To normalize negative 0.0 to 0.0 you can just add 0.0. yes, I'm aware-- see "implementation" in the original post > there is no need to change all formatting specifications For adding 0 to work, it must be done after the rounding. That means if you want make use of anything in the current formatting spec regarding precision, normalizing negative zero would need to be a proper option of the formatting spec. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 07:41:59 2021 From: report at bugs.python.org (Chris Wesseling) Date: Mon, 06 Dec 2021 12:41:59 +0000 Subject: [issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type In-Reply-To: <1635453507.8.0.842225708276.issue45664@roundup.psfhosted.org> Message-ID: <1638794519.6.0.381680184428.issue45664@roundup.psfhosted.org> Change by Chris Wesseling : ---------- nosy: -CharString, CharString _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 07:47:51 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 12:47:51 +0000 Subject: [issue44035] Regenerating the configure script fails even if dependencies are satisfied In-Reply-To: <1620147514.31.0.864280114209.issue44035@roundup.psfhosted.org> Message-ID: <1638794871.17.0.933105537537.issue44035@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 1528d249a5f8492801d09755f402618688337006 by Miss Islington (bot) in branch '3.10': [3.10] bpo-44035: Check autoconf files thoroughly (GH-29935) (GH-29937) https://github.com/python/cpython/commit/1528d249a5f8492801d09755f402618688337006 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 07:48:58 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 12:48:58 +0000 Subject: [issue44035] Regenerating the configure script fails even if dependencies are satisfied In-Reply-To: <1620147514.31.0.864280114209.issue44035@roundup.psfhosted.org> Message-ID: <1638794938.02.0.865607116894.issue44035@roundup.psfhosted.org> Christian Heimes added the comment: New changeset f147248795bf22be05bbc891053d60ef6a2f035d by Christian Heimes in branch '3.9': [3.9] bpo-44035: Check autoconf files thoroughly (GH-29935) (GH-29938) https://github.com/python/cpython/commit/f147248795bf22be05bbc891053d60ef6a2f035d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 07:50:28 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 12:50:28 +0000 Subject: [issue44035] Regenerating the configure script fails even if dependencies are satisfied In-Reply-To: <1620147514.31.0.864280114209.issue44035@roundup.psfhosted.org> Message-ID: <1638795028.77.0.7343181038.issue44035@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 07:52:06 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Dec 2021 12:52:06 +0000 Subject: [issue45934] python curses newterm implementation In-Reply-To: Message-ID: <1638795126.19.0.328686775111.issue45934@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 08:17:21 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 13:17:21 +0000 Subject: [issue45950] Reintroduce bootstrap_python for freezing In-Reply-To: <1638375997.48.0.12074215987.issue45950@roundup.psfhosted.org> Message-ID: <1638796641.15.0.682648528732.issue45950@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28163 pull_request: https://github.com/python/cpython/pull/29939 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 08:17:24 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 13:17:24 +0000 Subject: [issue45950] Reintroduce bootstrap_python for freezing In-Reply-To: <1638375997.48.0.12074215987.issue45950@roundup.psfhosted.org> Message-ID: <1638796644.91.0.973593159743.issue45950@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28163, 28164 pull_request: https://github.com/python/cpython/pull/29939 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 08:23:16 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Dec 2021 13:23:16 +0000 Subject: [issue45256] Remove the usage of the C stack in Python to Python calls In-Reply-To: <1632220919.85.0.309558064668.issue45256@roundup.psfhosted.org> Message-ID: <1638796996.12.0.369460924092.issue45256@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 08:24:20 2021 From: report at bugs.python.org (Dima Tisnek) Date: Mon, 06 Dec 2021 13:24:20 +0000 Subject: [issue45996] Worse error from asynccontextmanager in Python 3.10 Message-ID: <1638797059.87.0.372415243632.issue45996@roundup.psfhosted.org> New submission from Dima Tisnek : Consider this illegal code: import logging from asyncio import sleep, gather, run from contextlib import asynccontextmanager @asynccontextmanager async def foo(): await sleep(1) yield async def test(): f = foo() await gather(f.__aenter__(), f.__aenter__()) run(test()) If it's ran with Python 3.9, user gets a sensible error: File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 175, in __aenter__ return await self.gen.__anext__() RuntimeError: anext(): asynchronous generator is already running However, if it's ran with Python 3.10, user gets a cryptic error: File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 197, in __aenter__ del self.args, self.kwds, self.func AttributeError: args Which makes it harder to pinpoint what's wrong when the stack is complex. I've hit this with fastapi/starlette/mangum combo and a custom middleware. ---------- components: asyncio messages: 407799 nosy: Dima.Tisnek, asvetlov, yselivanov priority: normal severity: normal status: open title: Worse error from asynccontextmanager in Python 3.10 type: behavior versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 08:26:08 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Dec 2021 13:26:08 +0000 Subject: [issue33632] undefined behaviour: signed integer overflow in threadmodule.c In-Reply-To: <1527151195.18.0.682650639539.issue33632@psf.upfronthosting.co.za> Message-ID: <1638797168.54.0.162356056183.issue33632@roundup.psfhosted.org> STINNER Victor added the comment: > I think PR https://github.com/python/cpython/pull/28674 has resolved this issue. You're right. _threadmodule.c now uses _PyDeadline_Init() which calls _PyTime_Add(), and _PyTime_Add() prevents integer overflows; Extract of its implementation: // Compute t1 + t2. Clamp to [_PyTime_MIN; _PyTime_MAX] on overflow. static inline int pytime_add(_PyTime_t *t1, _PyTime_t t2) { if (t2 > 0 && *t1 > _PyTime_MAX - t2) { *t1 = _PyTime_MAX; return -1; } else if (t2 < 0 && *t1 < _PyTime_MIN - t2) { *t1 = _PyTime_MIN; return -1; } else { *t1 += t2; return 0; } } ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed superseder: -> threading.Lock.acquire(timeout) should use sem_clockwait(CLOCK_MONOTONIC) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 08:27:11 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Dec 2021 13:27:11 +0000 Subject: [issue41710] threading.Lock.acquire(timeout) should use sem_clockwait(CLOCK_MONOTONIC) In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org> Message-ID: <1638797231.09.0.146466790308.issue41710@roundup.psfhosted.org> STINNER Victor added the comment: bpo-33632 "undefined behaviour: signed integer overflow in threadmodule.c" has been fixed by this change: New changeset 833fdf126c8fe77fd17e8a8ffbc5c571b3bf64bd by Victor Stinner in branch 'main': bpo-41710: Add private _PyDeadline_Get() function (GH-28674) https://github.com/python/cpython/commit/833fdf126c8fe77fd17e8a8ffbc5c571b3bf64bd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 08:27:11 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 13:27:11 +0000 Subject: [issue45950] Reintroduce bootstrap_python for freezing In-Reply-To: <1638375997.48.0.12074215987.issue45950@roundup.psfhosted.org> Message-ID: <1638797231.24.0.908021627881.issue45950@roundup.psfhosted.org> Christian Heimes added the comment: I added --enable-framework=yes to macOS GHA builder. GH-29939 has ./configure --enable-framework=yes without proposed bootstrap fix. The build is failing early: ./_bootstrap_python ./Tools/scripts/deepfreeze.py Python/frozen_modules/importlib._bootstrap.h -m importlib._bootstrap -o Python/deepfreeze/importlib._bootstrap.c make: *** [Python/deepfreeze/importlib._bootstrap.c] Bus error: 10 GH-29936 has ./configure --enable-framework=yes and introduces a Modules/getpath_bootstrap.o file. It is the same build as Modules/getpath.o except it does not use the framework feature. The target compiles getpath.c with an additional -DPY_BOOTSTRAP_PYTHON=1 option. The build fails later: /bin/sh: line 1: 14772 Bus error: 10 DYLD_FRAMEWORK_PATH=/Users/runner/work/cpython/cpython ./python.exe -E -S -m sysconfig --generate-posix-vars generate-posix-vars failed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 08:30:53 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 06 Dec 2021 13:30:53 +0000 Subject: [issue45994] Add simple usage to email module Message-ID: <1638797453.53.0.368114444849.issue45994@roundup.psfhosted.org> New submission from Eric V. Smith : What sort of usage example would help you? Is https://docs.python.org/3/library/email.examples.html lacking something? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 08:42:33 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 13:42:33 +0000 Subject: [issue37927] No Instantiation Restrictions for AbstractBaseClasses derived from builtin types In-Reply-To: <1566546715.82.0.869555987333.issue37927@roundup.psfhosted.org> Message-ID: <1638798153.63.0.212677731449.issue37927@roundup.psfhosted.org> Irit Katriel added the comment: Closed issue35362 as duplicate of this issue because there is a bit more info here. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11 -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 08:42:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 13:42:45 +0000 Subject: [issue35362] list inheritor with abstract content does not raise In-Reply-To: <1543591825.01.0.788709270274.issue35362@psf.upfronthosting.co.za> Message-ID: <1638798165.08.0.55155242703.issue35362@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> No Instantiation Restrictions for AbstractBaseClasses derived from builtin types _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 08:46:09 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 13:46:09 +0000 Subject: [issue35063] Checking for abstractmethod implementation fails to consider MRO for builtins In-Reply-To: <1540457504.91.0.788709270274.issue35063@psf.upfronthosting.co.za> Message-ID: <1638798369.45.0.538440051498.issue35063@roundup.psfhosted.org> Irit Katriel added the comment: See also issue37927. ---------- nosy: +iritkatriel type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 08:49:24 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Dec 2021 13:49:24 +0000 Subject: [issue45996] Worse error from asynccontextmanager in Python 3.10 In-Reply-To: <1638797059.87.0.372415243632.issue45996@roundup.psfhosted.org> Message-ID: <1638798564.01.0.567131525214.issue45996@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +graingert, lukasz.langa, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 08:55:09 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 13:55:09 +0000 Subject: [issue34338] abstractmethod can run on classes In-Reply-To: <1533486586.96.0.56676864532.issue34338@psf.upfronthosting.co.za> Message-ID: <1638798909.53.0.427925657541.issue34338@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 08:55:49 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 06 Dec 2021 13:55:49 +0000 Subject: [issue37927] No Instantiation Restrictions for AbstractBaseClasses derived from builtin types In-Reply-To: <1566546715.82.0.869555987333.issue37927@roundup.psfhosted.org> Message-ID: <1638798949.91.0.0765110343582.issue37927@roundup.psfhosted.org> Alex Waygood added the comment: See also #5996 ---------- nosy: +AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 08:59:39 2021 From: report at bugs.python.org (Akuli) Date: Mon, 06 Dec 2021 13:59:39 +0000 Subject: [issue45620] A misleading url in 'Floating Point Arithmetic' page In-Reply-To: <1635313160.15.0.740336077946.issue45620@roundup.psfhosted.org> Message-ID: <1638799179.77.0.0755001945109.issue45620@roundup.psfhosted.org> Akuli added the comment: To me, it redirects or doesn't redirect to the drugs site, depending on what Accept-Language header your browser sends. And when the redirecting happens, the site is in chinese. (I don't speak chinese, and I don't know why my browser is sending zh-CN in Accept-Language.) akuli at akuli-desktop:~$ curl -s -H 'Accept-Language: en-US,en;q=0.9' https://www.lahey.com/float.htm | head Lahey - Floating point akuli at akuli-desktop:~$ curl -s -H 'Accept-Language: en-US,en;q=0.9,zh-CN;q=0.4' https://www.lahey.com/float.htm | head Document Moved

Object Moved

This document may be found here Incognito mode worked for me, because it sends `Accept-Language: en-US,en;q=0.9` without any additional languages. ---------- nosy: +Akuli _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 09:03:59 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 06 Dec 2021 14:03:59 +0000 Subject: [issue45620] A misleading url in 'Floating Point Arithmetic' page In-Reply-To: <1635313160.15.0.740336077946.issue45620@roundup.psfhosted.org> Message-ID: <1638799439.35.0.8964726751.issue45620@roundup.psfhosted.org> Eric V. Smith added the comment: That's interesting. I see the same behavior. So this seems to be a problem on www.lahey.com. I'll see if I can report it to them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 09:04:23 2021 From: report at bugs.python.org (Yevhenii Hyzyla) Date: Mon, 06 Dec 2021 14:04:23 +0000 Subject: [issue45997] asyncio.Semaphore waiters deqeueu doesn't work Message-ID: <1638799463.93.0.445533986487.issue45997@roundup.psfhosted.org> New submission from Yevhenii Hyzyla : Class `asyncio.Semaphore` has dequeue in implementation for waiters of semaphore and seems like the intention of this dequeue is to maintain FIFO queue of waiters. But it doesn't work, coroutine that releases semaphore can acquire semaphore again. Below is reproducible example: ```python import asyncio async def process(idx: int, semaphore: asyncio.Semaphore) -> None: while True: async with semaphore: print(f'ACQUIRE {idx}') await asyncio.sleep(1) async def main() -> None: semaphore = asyncio.Semaphore(5) await asyncio.gather(*[process(idx, semaphore) for idx in range(20)]) asyncio.run(main()) ``` In console: ``` /home/y.hyzyla/Work/asynciosemaphorebug/venv/bin/python /home/y.hyzyla/Work/asynciosemaphorebug/main.py ACQUIRE 0 ACQUIRE 1 ACQUIRE 2 ACQUIRE 3 ACQUIRE 4 ACQUIRE 0 ACQUIRE 1 ACQUIRE 2 ACQUIRE 3 ACQUIRE 4 ACQUIRE 0 ACQUIRE 1 ACQUIRE 2 ACQUIRE 3 ACQUIRE 4 .... ``` Ugly fix, is to add asyncio.sleep right before semaphore. ```python while True: await asyncio.sleep(0) async with semaphore: ... ``` Also, I found a comment on Stack Overflow about race condition in Semaphore implementation, but I don't know about the quality of that comment: https://stackoverflow.com/questions/55951233/does-pythons-asyncio-lock-acquire-maintain-order#comment112978366_55951304 ---------- components: asyncio messages: 407809 nosy: asvetlov, hyzyla, yselivanov priority: normal severity: normal status: open title: asyncio.Semaphore waiters deqeueu doesn't work versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 09:12:13 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 06 Dec 2021 14:12:13 +0000 Subject: [issue45620] A misleading url in 'Floating Point Arithmetic' page In-Reply-To: <1635313160.15.0.740336077946.issue45620@roundup.psfhosted.org> Message-ID: <1638799933.37.0.926069428197.issue45620@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: works for me -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 09:13:37 2021 From: report at bugs.python.org (Ken Jin) Date: Mon, 06 Dec 2021 14:13:37 +0000 Subject: [issue43153] tempfile seems to treat a file as a directory when processing an exception in the onerror() In-Reply-To: <1612691564.38.0.627288937354.issue43153@roundup.psfhosted.org> Message-ID: <1638800017.49.0.454915973977.issue43153@roundup.psfhosted.org> Change by Ken Jin : ---------- keywords: +patch pull_requests: +28165 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29940 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 09:18:04 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 06 Dec 2021 14:18:04 +0000 Subject: [issue45995] string formatting: normalize negative zero In-Reply-To: <1638792226.95.0.292604366656.issue45995@roundup.psfhosted.org> Message-ID: <1638800284.34.0.567121552468.issue45995@roundup.psfhosted.org> Steven D'Aprano added the comment: It was decided long ago that % formatting would not be enhanced with new features. I think that it is supposed to match the standard C formatting codes, and nothing else. So this is unlikely to be approved for % formatting. It *might* be approved for the format method and f-strings. (I suspect that unless you get immediate and uncontroversial agreement from multiple core developers, you may need to take it for further discussion and perhaps even a PEP.) What you call a "distraction" I consider to be critical part of the display. The numbers you are displaying actually are negative, and rounding them for display does not change that. So they ought to show the minus sign. So I'm not really very sympathetic to this feature request. ---------- nosy: +steven.daprano versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 09:18:22 2021 From: report at bugs.python.org (Thomas Grainger) Date: Mon, 06 Dec 2021 14:18:22 +0000 Subject: [issue45996] Worse error from asynccontextmanager in Python 3.10 In-Reply-To: <1638797059.87.0.372415243632.issue45996@roundup.psfhosted.org> Message-ID: <1638800302.87.0.584847308846.issue45996@roundup.psfhosted.org> Thomas Grainger added the comment: I think `AttributeError: args` is the desired/expected behaviour consider the sync version: ``` import logging from asyncio import sleep, gather, run from contextlib import asynccontextmanager, contextmanager @contextmanager def foo(): yield def test(): f = foo() f.__enter__() f.__enter__() test() ``` ``` Traceback (most recent call last): File "/home/graingert/projects/example/sync.py", line 15, in test() File "/home/graingert/projects/example/sync.py", line 13, in test f.__enter__() File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__ del self.args, self.kwds, self.func AttributeError: args ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 09:19:07 2021 From: report at bugs.python.org (Thomas Grainger) Date: Mon, 06 Dec 2021 14:19:07 +0000 Subject: [issue45996] Worse error from asynccontextmanager in Python 3.10 In-Reply-To: <1638797059.87.0.372415243632.issue45996@roundup.psfhosted.org> Message-ID: <1638800347.68.0.701716090778.issue45996@roundup.psfhosted.org> Thomas Grainger added the comment: or consider the trio version: ``` import logging import trio from contextlib import asynccontextmanager @asynccontextmanager async def foo(): await trio.sleep(1) yield async def test(): async with trio.open_nursery() as n: f = foo() n.start_soon(f.__aenter__) n.start_soon(f.__aenter__) trio.run(test) ``` ``` Traceback (most recent call last): File "/home/graingert/projects/examples/bar.py", line 17, in trio.run(test) File "/home/graingert/.virtualenvs/testing39/lib/python3.9/site-packages/trio/_core/_run.py", line 1932, in run raise runner.main_task_outcome.error File "/home/graingert/projects/examples/bar.py", line 15, in test n.start_soon(f.__aenter__) File "/home/graingert/.virtualenvs/testing39/lib/python3.9/site-packages/trio/_core/_run.py", line 815, in __aexit__ raise combined_error_from_nursery File "/usr/lib/python3.9/contextlib.py", line 179, in __aenter__ del self.args, self.kwds, self.func AttributeError: args ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 09:23:32 2021 From: report at bugs.python.org (neonene) Date: Mon, 06 Dec 2021 14:23:32 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638800612.38.0.0240387885528.issue45582@roundup.psfhosted.org> Change by neonene : ---------- pull_requests: +28166 pull_request: https://github.com/python/cpython/pull/29941 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 09:25:35 2021 From: report at bugs.python.org (Thomas Grainger) Date: Mon, 06 Dec 2021 14:25:35 +0000 Subject: [issue45996] Worse error from asynccontextmanager in Python 3.10 In-Reply-To: <1638797059.87.0.372415243632.issue45996@roundup.psfhosted.org> Message-ID: <1638800735.76.0.0761079484011.issue45996@roundup.psfhosted.org> Thomas Grainger added the comment: ah I can repeat this on python3.8.10 trio but not python3.9.9 trio: ``` import logging import trio from contextlib import asynccontextmanager @asynccontextmanager async def foo(): await trio.sleep(1) yield async def test(): async with trio.open_nursery() as n: f = foo() n.start_soon(f.__aenter__) n.start_soon(f.__aenter__) trio.run(test) ``` ``` Traceback (most recent call last): File "bar.py", line 17, in trio.run(test) File "/home/graingert/.virtualenvs/osirium-main/lib/python3.8/site-packages/trio/_core/_run.py", line 1932, in run raise runner.main_task_outcome.error File "bar.py", line 15, in test n.start_soon(f.__aenter__) File "/home/graingert/.virtualenvs/osirium-main/lib/python3.8/site-packages/trio/_core/_run.py", line 815, in __aexit__ raise combined_error_from_nursery File "/usr/lib/python3.8/contextlib.py", line 171, in __aenter__ return await self.gen.__anext__() RuntimeError: anext(): asynchronous generator is already running ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 09:30:12 2021 From: report at bugs.python.org (Thomas Grainger) Date: Mon, 06 Dec 2021 14:30:12 +0000 Subject: [issue45996] Worse error from asynccontextmanager in Python 3.10 In-Reply-To: <1638797059.87.0.372415243632.issue45996@roundup.psfhosted.org> Message-ID: <1638801012.53.0.636678863989.issue45996@roundup.psfhosted.org> Thomas Grainger added the comment: I see the change here: https://github.com/python/cpython/commit/1c5c9c89ffc36875afaf4c3cc6a716d4bd089bbf#diff-e00601a380ba6c916ba4333277fe6ea43d2477804002ab1ae64480f80fec8e3aR177-R179 this is intentionally implementing https://bugs.python.org/issue30306 for asynccontextmanagers that was initially missing ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 09:31:40 2021 From: report at bugs.python.org (E. Paine) Date: Mon, 06 Dec 2021 14:31:40 +0000 Subject: [issue45957] _tkinter.TclError: expected boolean value but got "" In-Reply-To: <1638395678.26.0.142189706167.issue45957@roundup.psfhosted.org> Message-ID: <1638801100.16.0.876457384477.issue45957@roundup.psfhosted.org> E. Paine added the comment: I cannot reproduce on Ubuntu 21.10 (Tk 8.6.11), so I believe we can close this issue. ---------- type: behavior -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 09:33:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 14:33:45 +0000 Subject: [issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified In-Reply-To: <1258226856.45.0.72736645389.issue7325@psf.upfronthosting.co.za> Message-ID: <1638801225.02.0.507407018694.issue7325@roundup.psfhosted.org> Irit Katriel added the comment: It's still the same in 3.11. I don't know whether this is something to fix in the code or in the docs. >> import tempfile >>> tempfile.mkdtemp(dir='.') './tmplvkt14za' >>> tempfile.mkstemp(dir='.') (3, '/Users/iritkatriel/src/cpython/tmp86ljh34k') ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 09:34:48 2021 From: report at bugs.python.org (Thomas Grainger) Date: Mon, 06 Dec 2021 14:34:48 +0000 Subject: [issue45996] Worse error from asynccontextmanager in Python 3.10 In-Reply-To: <1638797059.87.0.372415243632.issue45996@roundup.psfhosted.org> Message-ID: <1638801288.26.0.325599068166.issue45996@roundup.psfhosted.org> Thomas Grainger added the comment: you can see the analogous sync contextmanager issue on python3.6 with: ``` import logging from contextlib import contextmanager @contextmanager def foo(): yield def test(): f = foo() f.__enter__() f.__enter__() test() ``` on python3.7+ you get the bpo-30306 behaviour ``` Traceback (most recent call last): File "sync.py", line 14, in test() File "sync.py", line 12, in test f.__enter__() File "/usr/lib/python3.8/contextlib.py", line 111, in __enter__ del self.args, self.kwds, self.func AttributeError: args ``` and python3.6 you get the same sort of error you see now for asynccontextmanagers: ``` Traceback (most recent call last): File "sync.py", line 14, in test() File "sync.py", line 12, in test f.__enter__() File "/usr/lib/python3.6/contextlib.py", line 83, in __enter__ raise RuntimeError("generator didn't yield") from None RuntimeError: generator didn't yield ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 09:38:05 2021 From: report at bugs.python.org (Mark Shannon) Date: Mon, 06 Dec 2021 14:38:05 +0000 Subject: [issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations In-Reply-To: <1624890138.2.0.824780513801.issue44525@roundup.psfhosted.org> Message-ID: <1638801485.92.0.082353739699.issue44525@roundup.psfhosted.org> Change by Mark Shannon : ---------- pull_requests: +28167 pull_request: https://github.com/python/cpython/pull/29942 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 09:40:30 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 14:40:30 +0000 Subject: [issue15013] [doc] smtplib: add low-level APIs to doc? In-Reply-To: <1338968663.18.0.754320203153.issue15013@psf.upfronthosting.co.za> Message-ID: <1638801630.55.0.156792184212.issue15013@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: smtplib: add low-level APIs to doc? -> [doc] smtplib: add low-level APIs to doc? type: -> enhancement versions: +Python 3.11 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 09:42:27 2021 From: report at bugs.python.org (E. Paine) Date: Mon, 06 Dec 2021 14:42:27 +0000 Subject: [issue45436] test_tk.test_configure_type() fails with Tcl/Tk 8.6.11 In-Reply-To: <1633984027.59.0.32532195896.issue45436@roundup.psfhosted.org> Message-ID: <1638801747.96.0.0806771041793.issue45436@roundup.psfhosted.org> E. Paine added the comment: > Any word on the tk Menu type parameter change? I'll admit to having completely forgot about this issue and not raising it with the Tk team. Manually trying this case on Tk 8.6.12 segfaults, so I really need to raise it. To reproduce the segfault, simply run the top command in Python, or the bottom command in Wish: tk.Menu(type="") menu .m -type {} ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 09:47:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 14:47:45 +0000 Subject: [issue29309] Interpreter hang when interrupting a loop.run_in_executor() future In-Reply-To: <1484751513.93.0.173979168861.issue29309@psf.upfronthosting.co.za> Message-ID: <1638802065.66.0.423594408078.issue29309@roundup.psfhosted.org> Irit Katriel added the comment: @asyncio.coroutine was removed in 3.10, and the run_in_executor.py doesn't run with async def because that does not allow yield. I'll close this as out of date, please create a new issue if you are still having a related problem with async def. ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 09:52:27 2021 From: report at bugs.python.org (Ken Jin) Date: Mon, 06 Dec 2021 14:52:27 +0000 Subject: [issue36392] IPv4Interface Object has no attributte prefixlen In-Reply-To: <1553197512.13.0.766410741462.issue36392@roundup.psfhosted.org> Message-ID: <1638802347.5.0.269136609425.issue36392@roundup.psfhosted.org> Ken Jin added the comment: The link to what Andrei is referring to: https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Network.prefixlen ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 10:00:33 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 06 Dec 2021 15:00:33 +0000 Subject: [issue45998] Document best practice for including and linking python framework Message-ID: <1638802833.35.0.414122287903.issue45998@roundup.psfhosted.org> New submission from Ronald Oussoren : There are two ways to develop against a Python.framework on MacOS: 1. Use the regular Unix pattern with "#include "Python.h", using compiler flags to select the right headers and libraries. 2. Using the native framework pattern with "#import " and "-framework Python" Both works, but the latter has the disadvantage of loosing control over which version of Python is used when multiple versions are installed. The version is selected by the "Current" link in the framework, which is overwritten to point to whatever version was last installed or updated. IMHO we should document this pitfall in the C API documentation. ---------- assignee: docs at python components: Documentation, macOS messages: 407821 nosy: docs at python, ned.deily, ronaldoussoren priority: normal severity: normal stage: needs patch status: open title: Document best practice for including and linking python framework type: enhancement versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 10:10:31 2021 From: report at bugs.python.org (John Belmonte) Date: Mon, 06 Dec 2021 15:10:31 +0000 Subject: [issue45995] string formatting: normalize negative zero In-Reply-To: <1638792226.95.0.292604366656.issue45995@roundup.psfhosted.org> Message-ID: <1638803431.49.0.901747070116.issue45995@roundup.psfhosted.org> John Belmonte added the comment: Here is the same proposal made for C++ `std::format`: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1496r2.pdf It makes fair arguments for the feature's use, and explains why the problem is hard to work around. It was withdrawn by the author for C++20, but a consensus proposal is promised for C++23. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 10:12:48 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 15:12:48 +0000 Subject: [issue13548] line number when tracing an implicit return In-Reply-To: <1323275290.33.0.837630531134.issue13548@psf.upfronthosting.co.za> Message-ID: <1638803568.8.0.880361161839.issue13548@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. An implicit return doesn't have a line, so it's not clear what should happen. Assigning the next line to it wouldn't be correct either (it could be the first line of the next function). We could say that in this case there is no line event, just a return event (unless that messes up the tracer somehow). If you add a return statement it makes sense: /Users/iritkatriel/src/cpython/mm.py 7 call /Users/iritkatriel/src/cpython/mm.py 8 line /Users/iritkatriel/src/cpython/mm.py 10 line /Users/iritkatriel/src/cpython/mm.py 11 line /Users/iritkatriel/src/cpython/mm.py 14 line /Users/iritkatriel/src/cpython/mm.py 14 return (line 13 does not appear because that's the else, the return is assigned line 14 which is where it really is). ---------- nosy: +iritkatriel title: Invalid 'line' tracer event on pass within else clause -> line number when tracing an implicit return versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 10:31:35 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 06 Dec 2021 15:31:35 +0000 Subject: [issue45997] asyncio.Semaphore waiters deque doesn't work In-Reply-To: <1638799463.93.0.445533986487.issue45997@roundup.psfhosted.org> Message-ID: <1638804695.04.0.338083162417.issue45997@roundup.psfhosted.org> Change by Alex Waygood : ---------- title: asyncio.Semaphore waiters deqeueu doesn't work -> asyncio.Semaphore waiters deque doesn't work _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 10:31:52 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 06 Dec 2021 15:31:52 +0000 Subject: [issue45997] asyncio.Semaphore waiters deque doesn't work In-Reply-To: <1638799463.93.0.445533986487.issue45997@roundup.psfhosted.org> Message-ID: <1638804712.92.0.787054400205.issue45997@roundup.psfhosted.org> Change by Alex Waygood : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 10:55:03 2021 From: report at bugs.python.org (Douglas Wright) Date: Mon, 06 Dec 2021 15:55:03 +0000 Subject: [issue45999] Links to packaging broken Message-ID: <1638806103.81.0.408526409699.issue45999@roundup.psfhosted.org> New submission from Douglas Wright : Links in this section from the docs from 3.9 and newer are currently broken. https://docs.python.org/3.9/distributing/index.html#reading-the-python-packaging-user-guide They are currently leading to a "page not found" error. ---------- assignee: docs at python components: Documentation messages: 407824 nosy: docs at python, douglas277 priority: normal severity: normal status: open title: Links to packaging broken versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 11:11:52 2021 From: report at bugs.python.org (Thomas Klausner) Date: Mon, 06 Dec 2021 16:11:52 +0000 Subject: [issue46000] NetBSD curses compatibility Message-ID: <1638807112.42.0.171377770564.issue46000@roundup.psfhosted.org> New submission from Thomas Klausner : The code in Modules/_cursesmodule.c has an assumption on ncurses. The attached simple patch fixes this and works with both NetBSD curses and ncurses. ---------- components: Extension Modules files: patch-Modules___cursesmodule.c messages: 407825 nosy: wiz priority: normal severity: normal status: open title: NetBSD curses compatibility type: behavior versions: Python 3.10 Added file: https://bugs.python.org/file50480/patch-Modules___cursesmodule.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 11:12:57 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Dec 2021 16:12:57 +0000 Subject: [issue12413] make faulthandler dump traceback of child processes In-Reply-To: <1309046011.52.0.650507172396.issue12413@psf.upfronthosting.co.za> Message-ID: <1638807177.51.0.73856206709.issue12413@roundup.psfhosted.org> STINNER Victor added the comment: There is not activity for 10 years. I consider that this feature is not really needed. I reject this feature request. ---------- resolution: -> rejected stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 11:14:03 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 16:14:03 +0000 Subject: [issue45950] Reintroduce bootstrap_python for freezing In-Reply-To: <1638375997.48.0.12074215987.issue45950@roundup.psfhosted.org> Message-ID: <1638807243.48.0.304603204717.issue45950@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 612e59b53f0c730ce1b881f7c08dc6d49f02c123 by Christian Heimes in branch 'main': bpo-45950: Fix macOS framework builds of _bootstrap_python (GH-29936) https://github.com/python/cpython/commit/612e59b53f0c730ce1b881f7c08dc6d49f02c123 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 11:16:53 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Dec 2021 16:16:53 +0000 Subject: [issue44016] Enum related deprecation warnings in test_httpservers and test_faulthandler In-Reply-To: <1620029095.2.0.0849109876545.issue44016@roundup.psfhosted.org> Message-ID: <1638807413.83.0.103716200401.issue44016@roundup.psfhosted.org> STINNER Victor added the comment: test_httpservers warnings have been fixed. I cannot reproduce test_faulthandler warnings. I close the issue. If someone still gets warnnings in test_faulthandler, please provide the full command line to reproduce them. commit d3b9134ebb40bdb01ff52a37515c7c96970c9a0b Author: Shreyan Avigyan Date: Tue May 4 00:57:47 2021 +0530 Remove Enum warnings from test_httpservers (GH-25844) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 11:21:43 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Dec 2021 16:21:43 +0000 Subject: [issue21952] fnmatch.py can appear in tracemalloc diffs In-Reply-To: <1405020967.14.0.385293193823.issue21952@psf.upfronthosting.co.za> Message-ID: <1638807703.54.0.987482040922.issue21952@roundup.psfhosted.org> STINNER Victor added the comment: Exposing internal caches in tracemalloc is not a bug but a deliberate choice. It's easy to write your own filters to ignore selected files (or even specific functions if you can locate them by line nubmers). ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 11:22:11 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 16:22:11 +0000 Subject: [issue45950] Reintroduce bootstrap_python for freezing In-Reply-To: <1638375997.48.0.12074215987.issue45950@roundup.psfhosted.org> Message-ID: <1638807731.51.0.0741500433358.issue45950@roundup.psfhosted.org> Christian Heimes added the comment: Ned, I have implemented a fix for _bootstrap_python for framework builds and re-enabled --with-build-python for all builds. Previously I disabled the option for standard builds, because --with-build-python can cause build issues when a user runs ./configure --with-build-python with an older 3.11 alpha build. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 11:22:13 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Dec 2021 16:22:13 +0000 Subject: [issue31139] Improve tracemalloc demo code in docs In-Reply-To: <1502159168.93.0.181996633352.issue31139@psf.upfronthosting.co.za> Message-ID: <1638807733.45.0.758292497146.issue31139@roundup.psfhosted.org> STINNER Victor added the comment: https://github.com/python/cpython/pull/3020 is closed, I close this issue as well. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 11:26:06 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Dec 2021 16:26:06 +0000 Subject: [issue45973] Not possible to clear PyImport_Inittab after PyImport_AppendInittab In-Reply-To: <1638540674.64.0.96956184479.issue45973@roundup.psfhosted.org> Message-ID: <1638807966.62.0.215753366128.issue45973@roundup.psfhosted.org> STINNER Victor added the comment: Currently, the global variable PyImport_Inittab is used. It should be made per-interpreter and I suggest to add something like PyConfig_AppendInittab() to the PyConfig API, so the configuration change would only impact a single interpreter. It would be possible to run two interpreters with two different inittab configuration. ---------- nosy: +vstinner versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 11:27:50 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 16:27:50 +0000 Subject: [issue22815] unexpected successes are not output In-Reply-To: <1415355708.14.0.235525212407.issue22815@psf.upfronthosting.co.za> Message-ID: <1638808070.46.0.43699610501.issue22815@roundup.psfhosted.org> Irit Katriel added the comment: I think this has been fixed: % cat mm.py import unittest class TestStringMethods(unittest.TestCase): @unittest.expectedFailure def test_upper(self): self.assertEqual(2, 2) if __name__ == '__main__': unittest.main() % ./python.exe mm.py x ---------------------------------------------------------------------- Ran 1 test in 0.001s OK (expected failures=1) iritkatriel at Irits-MBP cpython % vi mm.py iritkatriel at Irits-MBP cpython % ./python.exe mm.py u ---------------------------------------------------------------------- Ran 1 test in 0.000s FAILED (unexpected successes=1) ---------- nosy: +iritkatriel resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 11:28:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 16:28:45 +0000 Subject: [issue22815] unexpected successes are not output In-Reply-To: <1415355708.14.0.235525212407.issue22815@psf.upfronthosting.co.za> Message-ID: <1638808125.61.0.0396409302192.issue22815@roundup.psfhosted.org> Irit Katriel added the comment: Or do you mean that there should be more output? ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 11:30:09 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Dec 2021 16:30:09 +0000 Subject: [issue45973] Not possible to clear PyImport_Inittab after PyImport_AppendInittab In-Reply-To: <1638540674.64.0.96956184479.issue45973@roundup.psfhosted.org> Message-ID: <1638808209.18.0.500827537443.issue45973@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-44441 (fixed). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 11:43:29 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 06 Dec 2021 16:43:29 +0000 Subject: [issue45997] asyncio.Semaphore waiters deqeueu doesn't work In-Reply-To: <1638799463.93.0.445533986487.issue45997@roundup.psfhosted.org> Message-ID: <1638809009.26.0.994587911759.issue45997@roundup.psfhosted.org> Andrew Svetlov added the comment: Good point. Currently, asyncio lock objects don't provide a strong FIFO guarantee. In a tight loop, a task can re-acquire the lock just after releasing even if there are pending waiters that were scheduled earlier. It's true also for Lock, Conditional, Event, etc. The solution requires *async* release method. Since the change is not backward compatible, a new method should be added, e.g. `await sem.release_and_wait()` for endorsing the context switch if there are pending waiters. async context manager can be modified for using the new method without backward compatibility problems easily. A hero who can help is welcome! ---------- assignee: -> asvetlov title: asyncio.Semaphore waiters deque doesn't work -> asyncio.Semaphore waiters deqeueu doesn't work type: behavior -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 11:45:46 2021 From: report at bugs.python.org (James Gerity) Date: Mon, 06 Dec 2021 16:45:46 +0000 Subject: [issue46001] JSON module documentation mentions OverflowError for case that raises RecursionError Message-ID: <1638809146.18.0.0478648187504.issue46001@roundup.psfhosted.org> New submission from James Gerity : The docstrings for `json.JSONEncoder, json.dump(), json.dumps()` all refer to `OverflowError` when describing the behavior of the `check_circular` parameter, but the module's test of this parameter catches a `RecursionError` and the documentation does make reference to recursion. Since the fix for bpo-43225 (7b78d43) the string-escaping machinery in `_json.c` is capable of raising OverflowError, but the reference in the documentation predates this addition by quite a long time. ---------- assignee: docs at python components: Documentation messages: 407837 nosy: SnoopJeDi, docs at python priority: normal severity: normal status: open title: JSON module documentation mentions OverflowError for case that raises RecursionError versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 11:45:57 2021 From: report at bugs.python.org (Ken Jin) Date: Mon, 06 Dec 2021 16:45:57 +0000 Subject: [issue45755] Specialized generic class does not return class attributes in dir In-Reply-To: <1636399849.8.0.841580145929.issue45755@roundup.psfhosted.org> Message-ID: <1638809157.51.0.931703893001.issue45755@roundup.psfhosted.org> Ken Jin added the comment: Not exactly sure if this is a bug, but the reason is that Foo[int] used to be a class, now it's a plain object. It's a change brought in 3.7 by PEP 560. 3.6: >>> isinstance(Foo[int], type) True >>> Foo[int].__dir__ >> type(Foo[int].__dir__) main: >>> isinstance(Foo[int], type) False >>> Foo[int].__dir__ >>> type(Foo[int].__dir__) The fix is just a 2-line change in either _GenericAlias or _BaseGenericAlias: + def __dir__(self): + return dir(self.__origin__) Should we go ahead with this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 11:51:58 2021 From: report at bugs.python.org (Taiga Katarao) Date: Mon, 06 Dec 2021 16:51:58 +0000 Subject: [issue45994] Add simple usage to email module In-Reply-To: <1638797453.53.0.368114444849.issue45994@roundup.psfhosted.org> Message-ID: <1638809518.8.0.370862003574.issue45994@roundup.psfhosted.org> Taiga Katarao added the comment: There are the simplest example to send text email and a little bit complicated example to an email with some files. However, beginners like me want simple example to create an email composed of the combination of multipart/alternative and multipart/mixed. There are many web sites to explain sending an email composed of multipart/alternative and multipart/mixed, but all of them use MIMEText and MIMEMultipart, which can be replaced and simplified with EmailMessage like below. ``` import smtplib from email.message import EmailMessage msg = EmailMessage() msg['From'] = 'from at example.com' msg['To'] = 'to at example.com' msg['Subject'] = 'Subject' msg.add_alternative('Hello, world.', subtype='text') msg.add_alternative('

Helo, world.

', subtype='html') with open('example.pdf', 'rb') as f: msg.add_attachment( f.read(), maintype='application', subtype='pdf', filename='example.pdf' ) with smtplib.SMTP('SMTP_HOST', 'SMTP_PORT') as smtp: smtp.starttls() smtp.login('USER', 'PASSWORD') smtp.send_message(msg) ``` Of cause I know we can obtain the code above from the combination of existing example codes, but it's a little bit difficult. I guess the reason why they cannot find simple way partially because the official documentation does not provide example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 11:54:40 2021 From: report at bugs.python.org (James Gerity) Date: Mon, 06 Dec 2021 16:54:40 +0000 Subject: [issue46001] JSON module documentation mentions OverflowError for case that raises RecursionError In-Reply-To: <1638809146.18.0.0478648187504.issue46001@roundup.psfhosted.org> Message-ID: <1638809680.9.0.876587649893.issue46001@roundup.psfhosted.org> Change by James Gerity : ---------- keywords: +patch pull_requests: +28168 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29943 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 11:56:27 2021 From: report at bugs.python.org (Tze Chian Kam) Date: Mon, 06 Dec 2021 16:56:27 +0000 Subject: [issue46002] py Launcher for Windows with MSYS2 Message-ID: <1638809787.4.0.667501971988.issue46002@roundup.psfhosted.org> New submission from Tze Chian Kam : Using "pyenv" for python installations. "py" launcher detects all installed python versions from "pyenv". When using the shebang feature, if the following shebang is specified, "#!/usr/bin/env python -V", it will detect python version of "3.9.9" from MSYS2 (where the latest version is "3.9.9"). But MSYS2 python is not in registered in registry so it should not be detecting it. ---------- components: Windows messages: 407840 nosy: Zernoxi, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: py Launcher for Windows with MSYS2 type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 11:57:06 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 06 Dec 2021 16:57:06 +0000 Subject: [issue45997] asyncio.Semaphore waiters deque doesn't work In-Reply-To: <1638799463.93.0.445533986487.issue45997@roundup.psfhosted.org> Message-ID: <1638809826.96.0.955832539408.issue45997@roundup.psfhosted.org> Andrew Svetlov added the comment: Or, maybe, there is a way to do everything without changing public API. The idea is: _wake_up_next can create a future which is set by *waked up task* on its acquiring. acquire method should wait for this future first before entering in `while self._value < 0:` loop. If the future is cancelled, `_wake_up_next` should be called again and waiting for the next future acquiring to be performed. If there is no *acquire waiting* future exists -- do everything as usual. All other lock objects should be modified also. ---------- title: asyncio.Semaphore waiters deqeueu doesn't work -> asyncio.Semaphore waiters deque doesn't work type: -> behavior versions: +Python 3.11 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 12:10:31 2021 From: report at bugs.python.org (Tze Chian Kam) Date: Mon, 06 Dec 2021 17:10:31 +0000 Subject: [issue46002] py Launcher for Windows with MSYS2 In-Reply-To: <1638809787.4.0.667501971988.issue46002@roundup.psfhosted.org> Message-ID: <1638810631.97.0.496470973015.issue46002@roundup.psfhosted.org> Tze Chian Kam added the comment: This is not in a a virtual environment by the way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 12:14:55 2021 From: report at bugs.python.org (Yevhenii Hyzyla) Date: Mon, 06 Dec 2021 17:14:55 +0000 Subject: [issue45997] asyncio.Semaphore waiters deque doesn't work In-Reply-To: <1638799463.93.0.445533986487.issue45997@roundup.psfhosted.org> Message-ID: <1638810895.14.0.0149011746274.issue45997@roundup.psfhosted.org> Yevhenii Hyzyla added the comment: Thanks for response! > A hero who can help is welcome! I will try to make PR :raising_hand ---------- type: behavior -> versions: +Python 3.8 -Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 12:15:50 2021 From: report at bugs.python.org (Julius Hamilton) Date: Mon, 06 Dec 2021 17:15:50 +0000 Subject: [issue45934] python curses newterm implementation In-Reply-To: Message-ID: <1638810950.48.0.690735496187.issue45934@roundup.psfhosted.org> Julius Hamilton added the comment: I?m currently planning on studying the C code for initscr and newterm so I can really understand how they work. I?ll post any updates about this soon. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 12:20:47 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 06 Dec 2021 17:20:47 +0000 Subject: [issue31879] Launcher fails on custom command starting with "python" In-Reply-To: <1509037268.43.0.213398074469.issue31879@psf.upfronthosting.co.za> Message-ID: <1638811247.94.0.408525801621.issue31879@roundup.psfhosted.org> Steve Dower added the comment: Not sure if Mark and Martin are part of an expert group, but neither are active in this area these days. For the original question, I have no idea why the command can't use a builtin name, so hard to say whether we'd change it. A summary of why it's broken and what the fix would be is needed before we can say whether the change would be accepted or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 12:25:33 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 06 Dec 2021 17:25:33 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638811533.58.0.433597525303.issue45582@roundup.psfhosted.org> Steve Dower added the comment: New changeset af1db4eb555e02d2bff3476f99f7a653764203b0 by neonene in branch 'main': bpo-45582: Fix getpath_isxfile() and test_embed on Windows (GH-29930) https://github.com/python/cpython/commit/af1db4eb555e02d2bff3476f99f7a653764203b0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 12:30:40 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 06 Dec 2021 17:30:40 +0000 Subject: [issue45992] distutils paths are scattered between PythonXY and PythonXY-32 on WoW64 In-Reply-To: <1638774011.75.0.410629931242.issue45992@roundup.psfhosted.org> Message-ID: <1638811840.27.0.88384836332.issue45992@roundup.psfhosted.org> Steve Dower added the comment: They should all be under "-32" when in roaming appdata, because otherwise having 32-bit and 64-bit installs side-by-side will conflict. If these fields were newly added to distutils then should probably fix them to match sysconfig. If they're old and wrong, I'd just ignore them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 12:38:56 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 06 Dec 2021 17:38:56 +0000 Subject: [issue46002] py Launcher for Windows with MSYS2 In-Reply-To: <1638809787.4.0.667501971988.issue46002@roundup.psfhosted.org> Message-ID: <1638812336.33.0.66327432764.issue46002@roundup.psfhosted.org> Steve Dower added the comment: Are you launching "py" from inside MSYS2? Or a regular prompt? What does the output of "py -0p" show? (It should list all the discovered installs) We might need someone who understands how MSYS2 works here, because I don't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 12:44:27 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 17:44:27 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638812667.28.0.366991391699.issue45582@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28170 pull_request: https://github.com/python/cpython/pull/29944 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 12:46:15 2021 From: report at bugs.python.org (James Gerity) Date: Mon, 06 Dec 2021 17:46:15 +0000 Subject: [issue46001] JSON module documentation mentions OverflowError for case that raises RecursionError In-Reply-To: <1638809146.18.0.0478648187504.issue46001@roundup.psfhosted.org> Message-ID: <1638812775.09.0.351711860257.issue46001@roundup.psfhosted.org> James Gerity added the comment: Correction: the bug whose resolution adds the OverflowError mentioned above is bpo-24522, not bpo-43255 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 12:49:32 2021 From: report at bugs.python.org (Tzu-ping Chung) Date: Mon, 06 Dec 2021 17:49:32 +0000 Subject: [issue45992] distutils paths are scattered between PythonXY and PythonXY-32 on WoW64 In-Reply-To: <1638774011.75.0.410629931242.issue45992@roundup.psfhosted.org> Message-ID: <1638812972.8.0.429614756771.issue45992@roundup.psfhosted.org> Tzu-ping Chung added the comment: They are old, but so are purelib and platlib, which were changed regardless. The problem is that distutils?s values are now half wrong and half right, neither matching pre-3.10 behaviour, nor matching post-3.10 sysconfig behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 12:59:09 2021 From: report at bugs.python.org (Zernoxi) Date: Mon, 06 Dec 2021 17:59:09 +0000 Subject: [issue46002] py Launcher for Windows with MSYS2 In-Reply-To: <1638809787.4.0.667501971988.issue46002@roundup.psfhosted.org> Message-ID: <1638813549.07.0.14915047721.issue46002@roundup.psfhosted.org> Zernoxi added the comment: I am launching "py" from a regular prompt ("powershell"). I should only have 2 registered python versions in the registry. "py -0p" shows the correct information. One thing to note is that if I "#!/usr/bin/env python3 -V", it will show the correct default python3 version and is consistence when in a virtual environment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 13:13:21 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 18:13:21 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638814401.97.0.290403711453.issue45582@roundup.psfhosted.org> Christian Heimes added the comment: New changeset f16f93e5279f957ca25dd8b91233a44833167a8a by Christian Heimes in branch 'main': bpo-45582: framework build: modPath must not be const (GH-29944) https://github.com/python/cpython/commit/f16f93e5279f957ca25dd8b91233a44833167a8a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 13:16:16 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 06 Dec 2021 18:16:16 +0000 Subject: [issue45995] string formatting: normalize negative zero In-Reply-To: <1638792226.95.0.292604366656.issue45995@roundup.psfhosted.org> Message-ID: <1638814576.58.0.767608361085.issue45995@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 13:18:28 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 18:18:28 +0000 Subject: [issue27016] BlockingIOError not raised inside function. In-Reply-To: <1463191419.08.0.084074707962.issue27016@psf.upfronthosting.co.za> Message-ID: <1638814708.04.0.129611394474.issue27016@roundup.psfhosted.org> Irit Katriel added the comment: On a Mac I get the "BlockingIOError: [Errno 35] Resource temporarily unavailable" with both version (with and without the function). ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 13:25:56 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 18:25:56 +0000 Subject: [issue41062] Advanced Debugger Support C-API is useless without HEAD_LOCK()/HEAD_UNLOCK() In-Reply-To: <1592729628.06.0.446212297946.issue41062@roundup.psfhosted.org> Message-ID: <1638815156.51.0.751876203118.issue41062@roundup.psfhosted.org> Change by Irit Katriel : ---------- type: behavior -> enhancement versions: +Python 3.11 -Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 13:36:08 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 18:36:08 +0000 Subject: [issue8161] inconsistency behavior in ctypes.c_char_p dereferencing In-Reply-To: <1268816987.2.0.0650705594073.issue8161@psf.upfronthosting.co.za> Message-ID: <1638815768.15.0.571876600403.issue8161@roundup.psfhosted.org> Irit Katriel added the comment: On 3.11 I'm not getting str for the second expression, I get an empty bytes object: >>> import ctypes >>> class T(ctypes.Structure): ... _fields_ = ( ... ('member', ctypes.c_char * 16), ... ) ... >>> print('%r'%((ctypes.c_char * 16)()[:])) b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' >>> print('%r'%(T().member[:])) b'' ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 13:43:18 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 18:43:18 +0000 Subject: [issue19864] [doc] multiprocessing Proxy docs need locking semantics explained In-Reply-To: <1386010854.42.0.669130689835.issue19864@psf.upfronthosting.co.za> Message-ID: <1638816198.1.0.388218660449.issue19864@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy title: multiprocessing Proxy docs need locking semantics explained -> [doc] multiprocessing Proxy docs need locking semantics explained type: -> enhancement versions: +Python 3.11 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 13:53:40 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 06 Dec 2021 18:53:40 +0000 Subject: [issue45436] test_tk.test_configure_type() fails with Tcl/Tk 8.6.11 In-Reply-To: <1633984027.59.0.32532195896.issue45436@roundup.psfhosted.org> Message-ID: <1638816820.22.0.226320198219.issue45436@roundup.psfhosted.org> Terry J. Reedy added the comment: import tkinter as tk tk.Menu(type='') crashes on current Windows 3.9-11 with 8.6.12 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 14:03:35 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 06 Dec 2021 19:03:35 +0000 Subject: [issue45995] string formatting: normalize negative zero In-Reply-To: <1638792226.95.0.292604366656.issue45995@roundup.psfhosted.org> Message-ID: <1638817415.88.0.383066016743.issue45995@roundup.psfhosted.org> Mark Dickinson added the comment: I'd support having this functionality available for `format` and for f-strings. (As Steven says, changing %-formatting doesn't seem viable.) It really _is_ awkward to do this in any other way, and I'm reliably informed that normal people don't expect to see negative zeros in formatted numeric output. It did take me a few minutes to get my head around the idea that `f"{-0.01:+.1f}"` would return `"+0.0"` rather than `"-0.0"` or `" 0.0"` or just plain `"0.0"` under this proposal, but I agree that it seems like the only thing that can be consistent and make sense. I'm not 100% convinced by the particular spelling proposed, but I don't have anything better to suggest. If C++ might be going with a "z", would it make sense to do the same for Python? I don't forsee any implementation difficulties for float and complex types. For Decimal, we'd need to "own" the string formatting, taking that responsibility away from mpdecimal, but there are already other reasons to do that. Once we've done that, again the implementation doesn't seem onerous. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 14:03:30 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 06 Dec 2021 19:03:30 +0000 Subject: [issue46002] py Launcher for Windows with MSYS2 In-Reply-To: <1638809787.4.0.667501971988.issue46002@roundup.psfhosted.org> Message-ID: <1638817410.75.0.534476593804.issue46002@roundup.psfhosted.org> Steve Dower added the comment: So if I've understood you, there are three Python installs on your machine. Two of them are Windows builds, which are listed in the registry and discovered by py.exe -0p. The third is the MSYS2 build, which is *not* listed in the registry and is *not* discovered by py.exe -0p. However, when you specify the shebang line "/usr/bin/env python" in a file and launch it as "py.exe myfile.py" from a non-MSYS2 prompt, it launches the MSYS2 Python. Is that correct? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 14:16:24 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 19:16:24 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638818184.61.0.154579422728.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28171 pull_request: https://github.com/python/cpython/pull/29946 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 14:35:23 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 06 Dec 2021 19:35:23 +0000 Subject: [issue46002] py Launcher for Windows with MSYS2 In-Reply-To: <1638809787.4.0.667501971988.issue46002@roundup.psfhosted.org> Message-ID: <1638819323.99.0.708108704338.issue46002@roundup.psfhosted.org> Steve Dower added the comment: ("2" and "3" are just arbitrary numbers... substitute however many Python runtimes you actually have, or "N" and "N+1" if you prefer.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 14:44:44 2021 From: report at bugs.python.org (Ali Amin-Nejad) Date: Mon, 06 Dec 2021 19:44:44 +0000 Subject: [issue45957] _tkinter.TclError: expected boolean value but got "" In-Reply-To: <1638395678.26.0.142189706167.issue45957@roundup.psfhosted.org> Message-ID: <1638819884.28.0.231167584001.issue45957@roundup.psfhosted.org> Ali Amin-Nejad added the comment: It seems like it must be a mac-specific issue just on 8.6.11 then if ned couldn't reproduce on 8.6.12. How does one go about upgrading their tkinter version? Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 15:13:33 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 06 Dec 2021 20:13:33 +0000 Subject: [issue45957] _tkinter.TclError: expected boolean value but got "" In-Reply-To: <1638395678.26.0.142189706167.issue45957@roundup.psfhosted.org> Message-ID: <1638821613.65.0.164609636447.issue45957@roundup.psfhosted.org> Ned Deily added the comment: > How does one go about upgrading their tkinter version? Since, based on your path names, you appear to be using a Python from miniconda, you should check with that project. Perhaps they have a newer version available. Good luck! ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 15:33:30 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 20:33:30 +0000 Subject: [issue38523] ignore_dangling_symlinks in shutil.copytree does not apply recursively In-Reply-To: <1571437755.03.0.462874003253.issue38523@roundup.psfhosted.org> Message-ID: <1638822810.95.0.354172254625.issue38523@roundup.psfhosted.org> Change by Irit Katriel : ---------- type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 15:43:53 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 20:43:53 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638823433.22.0.579437292679.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset fc012d801202a9ea139df143b934778060d51a60 by Christian Heimes in branch 'main': bpo-45847: Fix uuid detection on macOS (GH-29946) https://github.com/python/cpython/commit/fc012d801202a9ea139df143b934778060d51a60 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 15:53:26 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 06 Dec 2021 20:53:26 +0000 Subject: [issue46002] py Launcher for Windows with MSYS2 In-Reply-To: <1638809787.4.0.667501971988.issue46002@roundup.psfhosted.org> Message-ID: <1638824006.12.0.284984416583.issue46002@roundup.psfhosted.org> Eryk Sun added the comment: The shebang "#!/usr/bin/env python" searches PATH for "python" plus the PATHEXT file extensions. The shebang "#!/usr/bin/env python3" uses the highest version of Python 3 from the registry. It doesn't search PATH because Python installations do not necessarily include "python3.exe" or "python3.x.exe" binaries. Alternatives that also search PATH for this case have been discussed in prior issues. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 16:17:04 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 06 Dec 2021 21:17:04 +0000 Subject: [issue46000] NetBSD curses compatibility In-Reply-To: <1638807112.42.0.171377770564.issue46000@roundup.psfhosted.org> Message-ID: <1638825424.91.0.081806044929.issue46000@roundup.psfhosted.org> Christian Heimes added the comment: Could you please open a pull request on GitHub? A PR will run our CI and our bots will verify that your changeset follows our guidelines. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 16:20:05 2021 From: report at bugs.python.org (nobody) Date: Mon, 06 Dec 2021 21:20:05 +0000 Subject: [issue46003] os.replace is not cross-platform: at least improve documentation Message-ID: <1638825605.8.0.77974659196.issue46003@roundup.psfhosted.org> New submission from nobody : When using threads, os.replace gives no errors on Linux. On Windows however you get PermissionErrors like: '[WinError 5] Access is denied' for os.replace and '[Errno 13] Permission denied' when reading the os.replace file. The only way I could get this to work was to add retries with delay. At least the documentation should be improved. ---------- messages: 407864 nosy: hancos priority: normal severity: normal status: open title: os.replace is not cross-platform: at least improve documentation type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 16:24:09 2021 From: report at bugs.python.org (Roundup Robot) Date: Mon, 06 Dec 2021 21:24:09 +0000 Subject: [issue46000] NetBSD curses compatibility In-Reply-To: <1638807112.42.0.171377770564.issue46000@roundup.psfhosted.org> Message-ID: <1638825849.12.0.315794257629.issue46000@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 2.0 -> 3.0 pull_requests: +28172 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29947 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 16:24:30 2021 From: report at bugs.python.org (Thomas Klausner) Date: Mon, 06 Dec 2021 21:24:30 +0000 Subject: [issue46000] NetBSD curses compatibility In-Reply-To: <1638807112.42.0.171377770564.issue46000@roundup.psfhosted.org> Message-ID: <1638825870.08.0.993120569954.issue46000@roundup.psfhosted.org> Thomas Klausner added the comment: Done: https://github.com/python/cpython/pull/29947 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 16:37:42 2021 From: report at bugs.python.org (Brett Cannon) Date: Mon, 06 Dec 2021 21:37:42 +0000 Subject: [issue21761] [doc] language reference describes the role of module.__file__ inaccurately In-Reply-To: <1402778004.82.0.418404996295.issue21761@psf.upfronthosting.co.za> Message-ID: <1638826662.74.0.56897051489.issue21761@roundup.psfhosted.org> Brett Cannon added the comment: > "Ultimately, the loader set the values of __file__ and/or __cached__" Change it to "sets" and +1 from me! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 16:41:29 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Mon, 06 Dec 2021 21:41:29 +0000 Subject: [issue44077] IP_RECVTOS option is missing from socket module In-Reply-To: <1620485869.86.0.948839095965.issue44077@roundup.psfhosted.org> Message-ID: <1638826889.53.0.787293340905.issue44077@roundup.psfhosted.org> Change by Andrei Kulakov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 16:57:49 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Mon, 06 Dec 2021 21:57:49 +0000 Subject: [issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior In-Reply-To: <1477276611.77.0.31268131141.issue28516@psf.upfronthosting.co.za> Message-ID: <1638827869.43.0.0882162560546.issue28516@roundup.psfhosted.org> Andrei Kulakov added the comment: It's a bit more readable to start by stating what a function does rather than what it doesn't do. I also wouldn't worry about possible future minor optimizations that might be added, because if that happens, a simple ".. aside from internal optimizations, ... " would suffice. Something like this should work: The __enter__ method returns the ExitStack instance, and performs no additional operations. OR ... and does not perform any additional operations. ---------- nosy: +andrei.avk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 17:01:31 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 22:01:31 +0000 Subject: [issue21761] [doc] language reference describes the role of module.__file__ inaccurately In-Reply-To: <1402778004.82.0.418404996295.issue21761@psf.upfronthosting.co.za> Message-ID: <1638828091.88.0.562789076099.issue21761@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 17:07:52 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 22:07:52 +0000 Subject: [issue41174] asyncio.coroutine decorator returns a non-generator function when using PYTHONASYNCIODEBUG In-Reply-To: <1593537261.43.0.523552907091.issue41174@roundup.psfhosted.org> Message-ID: <1638828472.92.0.0971181222669.issue41174@roundup.psfhosted.org> Irit Katriel added the comment: asyncio.coroutine was removed in 3.11, and I don't think this will be changed in stable versions. I will close this issue unless I am corrected. ---------- nosy: +iritkatriel resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 17:12:04 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 06 Dec 2021 22:12:04 +0000 Subject: [issue13548] line number when tracing an implicit return In-Reply-To: <1323275290.33.0.837630531134.issue13548@psf.upfronthosting.co.za> Message-ID: <1638828724.69.0.803215387192.issue13548@roundup.psfhosted.org> Terry J. Reedy added the comment: This seems to be fixed. On 3.11.0a2 installed on Windows and fresh build of .0a2+, I see return on line 11, which is correct. f:\dev\3x>python ../tem/tem.py Running Debug|x64 interpreter... f:\dev\tem\tem.py 7 call f:\dev\tem\tem.py 8 line f:\dev\tem\tem.py 10 line f:\dev\tem\tem.py 11 line f:\dev\tem\tem.py 11 return Irit, please confirm (or not) on your *nix system. ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 17:13:50 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 06 Dec 2021 22:13:50 +0000 Subject: [issue45957] _tkinter.TclError: expected boolean value but got "" In-Reply-To: <1638395678.26.0.142189706167.issue45957@roundup.psfhosted.org> Message-ID: <1638828830.66.0.775477870197.issue45957@roundup.psfhosted.org> Terry J. Reedy added the comment: Or use python.org installer ;-). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 17:13:52 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 22:13:52 +0000 Subject: [issue13548] line number when tracing an implicit return In-Reply-To: <1323275290.33.0.837630531134.issue13548@psf.upfronthosting.co.za> Message-ID: <1638828832.67.0.815200158169.issue13548@roundup.psfhosted.org> Irit Katriel added the comment: Terry, I'm pretty sure I saw the problem on the mac earlier. Can you paste the contents of tem.py? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 17:20:56 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Dec 2021 22:20:56 +0000 Subject: [issue45476] [C API] PEP 674: Disallow using macros as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638829256.09.0.517533279079.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: > In the PyPI top 5000, I found two projects using PyDescr_TYPE() and PyDescr_NAME() as l-value: M2Crypto and mecab-python3. In both cases, it was code generated by SWIG I proposed a first PR for Py_TYPE(): https://github.com/swig/swig/pull/2116 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 17:38:24 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 06 Dec 2021 22:38:24 +0000 Subject: [issue13548] line number when tracing an implicit return In-Reply-To: <1323275290.33.0.837630531134.issue13548@psf.upfronthosting.co.za> Message-ID: <1638830304.92.0.58694552072.issue13548@roundup.psfhosted.org> Terry J. Reedy added the comment: The attached badlineevent.py with print updated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 17:46:24 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 06 Dec 2021 22:46:24 +0000 Subject: [issue45798] Move _decimal build setup into configure In-Reply-To: <1636794919.07.0.823304462548.issue45798@roundup.psfhosted.org> Message-ID: <1638830784.43.0.543913161422.issue45798@roundup.psfhosted.org> Ned Deily added the comment: It looks like this change broke macOS universal2 builds of libmpdec. I'm looking at it now but wanted to flag it as a "release blocker" for tagging 3.11.0a3. ---------- nosy: +ned.deily priority: normal -> release blocker resolution: fixed -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 17:48:04 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Dec 2021 22:48:04 +0000 Subject: [issue45476] [C API] PEP 674: Disallow using macros as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638830884.0.0.658397765541.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: > python-snappy-0.6.0: maybe_resize() in snappy/snappymodule.cc I proposed a fix: https://github.com/andrix/python-snappy/pull/114 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 18:14:51 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 06 Dec 2021 23:14:51 +0000 Subject: [issue46003] os.replace is not cross-platform: at least improve documentation In-Reply-To: <1638825605.8.0.77974659196.issue46003@roundup.psfhosted.org> Message-ID: <1638832491.79.0.203237790623.issue46003@roundup.psfhosted.org> Eric V. Smith added the comment: I suspect anti-virus software. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 18:16:40 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 23:16:40 +0000 Subject: [issue13548] line number when tracing an implicit return In-Reply-To: <1323275290.33.0.837630531134.issue13548@psf.upfronthosting.co.za> Message-ID: <1638832600.53.0.215160992905.issue13548@roundup.psfhosted.org> Irit Katriel added the comment: Yes, you're right. I don't know what I thought I saw before. It works on the mac as well. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 18:19:35 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 06 Dec 2021 23:19:35 +0000 Subject: [issue8161] inconsistency behavior in ctypes.c_char_p dereferencing In-Reply-To: <1268816987.2.0.0650705594073.issue8161@psf.upfronthosting.co.za> Message-ID: <1638832775.88.0.740251230414.issue8161@roundup.psfhosted.org> Eryk Sun added the comment: This appears to be misreported. The implementation in 3.1.2rc1 looks correct to me [1]. Either way, it's out of date. That said, the emulation of a simple type in an aggregate type is still incomplete nowadays. It's not implemented when a c_char or c_wchar array type is itself the type of an array. It's also inconsistent with simple types because the automatic get-set conversion isn't disabled for subclasses of c_char and c_wchar array types. For a subclass, one should have to use the `value` attribute. --- [1] https://github.com/python/cpython/blob/v3.1.2rc1/Modules/_ctypes/cfield.c#L110-L137 ---------- nosy: +eryksun resolution: -> out of date stage: needs patch -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 18:27:05 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 23:27:05 +0000 Subject: [issue38522] Py_USING_MEMORY_DEBUGGER is referenced in docs but not present in code In-Reply-To: <1571436071.95.0.156296507321.issue38522@roundup.psfhosted.org> Message-ID: <1638833225.16.0.7743115114.issue38522@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy versions: +Python 3.10, Python 3.11 -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 18:28:21 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 23:28:21 +0000 Subject: [issue36706] Python script on startup stucks at import In-Reply-To: <1556024687.06.0.0109255005812.issue36706@roundup.psfhosted.org> Message-ID: <1638833301.89.0.0449881352923.issue36706@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> out of date stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 18:29:28 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 23:29:28 +0000 Subject: [issue22684] message.as_bytes() produces recursion depth exceeded In-Reply-To: <1413894566.0.0.84714989702.issue22684@psf.upfronthosting.co.za> Message-ID: <1638833368.06.0.604461475178.issue22684@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> works for me stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 18:30:41 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 23:30:41 +0000 Subject: [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1374519103.74.0.277776306074.issue18531@psf.upfronthosting.co.za> Message-ID: <1638833441.94.0.953884456717.issue18531@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> fixed stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 18:31:14 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 23:31:14 +0000 Subject: [issue25633] The documentation for urllib.request should mention http.client.HTTPException In-Reply-To: <1447663371.73.0.839165836135.issue25633@psf.upfronthosting.co.za> Message-ID: <1638833474.49.0.123812312432.issue25633@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> out of date stage: needs patch -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 18:40:06 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 23:40:06 +0000 Subject: [issue20459] [doc] No Argument Clinic documentation on how to specify a return converter In-Reply-To: <1391185302.8.0.888255910236.issue20459@psf.upfronthosting.co.za> Message-ID: <1638834006.0.0.464355935796.issue20459@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy title: No Argument Clinic documentation on how to specify a return converter -> [doc] No Argument Clinic documentation on how to specify a return converter versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 18:40:40 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 06 Dec 2021 23:40:40 +0000 Subject: [issue23819] test_asyncio fails when run under -O In-Reply-To: <1427808695.9.0.385563565443.issue23819@psf.upfronthosting.co.za> Message-ID: <1638834040.18.0.459550846648.issue23819@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 265918bb1d782ab85c7dbc835eb62d6cfc2145b7 by Kumar Aditya in branch 'main': bpo-23819: asyncio: Replace AssertionError with TypeError where it makes sense (GH-29894) https://github.com/python/cpython/commit/265918bb1d782ab85c7dbc835eb62d6cfc2145b7 ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 18:43:09 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 06 Dec 2021 23:43:09 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638834189.53.0.122920969683.issue45582@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +28173 pull_request: https://github.com/python/cpython/pull/29948 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 18:44:20 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 23:44:20 +0000 Subject: [issue21731] Calendar Problem with Windows (XP) In-Reply-To: <1402573101.18.0.674315484569.issue21731@psf.upfronthosting.co.za> Message-ID: <1638834260.01.0.522024561419.issue21731@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 18:50:48 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 06 Dec 2021 23:50:48 +0000 Subject: [issue20936] test_strftime: enormous allocation, fails under Clang sanitizer In-Reply-To: <1394901902.95.0.363100076763.issue20936@psf.upfronthosting.co.za> Message-ID: <1638834648.91.0.403140519226.issue20936@roundup.psfhosted.org> Irit Katriel added the comment: 3.5 is no longer maintained. Please create a new issue if you see this on a current version (>= 3.(). ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 19:07:45 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 07 Dec 2021 00:07:45 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638835665.26.0.1134099455.issue45582@roundup.psfhosted.org> Steve Dower added the comment: New changeset b7ef27bc084665ce58d89fc69530c6f9d2d37754 by Steve Dower in branch 'main': bpo-45582: Ensure PYTHONHOME still overrides detected build prefixes (GH-29948) https://github.com/python/cpython/commit/b7ef27bc084665ce58d89fc69530c6f9d2d37754 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 19:10:56 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 07 Dec 2021 00:10:56 +0000 Subject: [issue28953] Use `raise from` when raising new IncompleteRead In-Reply-To: <1481578993.98.0.52471260982.issue28953@psf.upfronthosting.co.za> Message-ID: <1638835856.31.0.289750625982.issue28953@roundup.psfhosted.org> miss-islington added the comment: New changeset c5c365220ed2c867fe81078f70b827de22db2ee6 by 180909 in branch 'main': bpo-28953: Use `raise from` when raising new IncompleteRead (GH-29861) https://github.com/python/cpython/commit/c5c365220ed2c867fe81078f70b827de22db2ee6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 19:13:07 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 07 Dec 2021 00:13:07 +0000 Subject: [issue28953] Use `raise from` when raising new IncompleteRead In-Reply-To: <1481578993.98.0.52471260982.issue28953@psf.upfronthosting.co.za> Message-ID: <1638835987.61.0.378967625704.issue28953@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 19:14:25 2021 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 07 Dec 2021 00:14:25 +0000 Subject: [issue45620] A misleading url in 'Floating Point Arithmetic' page In-Reply-To: <1635313160.15.0.740336077946.issue45620@roundup.psfhosted.org> Message-ID: <1638836065.58.0.222835795555.issue45620@roundup.psfhosted.org> Eric V. Smith added the comment: I notified lahey.com, and it looks like the behavior is now normal (at least, it looks okay by testing with the curl commands). Could someone who say this problem in a browser please double-check? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 19:47:39 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 07 Dec 2021 00:47:39 +0000 Subject: [issue46003] os.replace is not cross-platform: at least improve documentation In-Reply-To: <1638825605.8.0.77974659196.issue46003@roundup.psfhosted.org> Message-ID: <1638838059.86.0.101565464072.issue46003@roundup.psfhosted.org> Eryk Sun added the comment: The os module tries to avoid documenting low-level OS behaviors. It would be unreliable and difficult to maintain. In the case of os.replace(), in Windows it calls MoveFileExW() with the flag MOVEFILE_REPLACE_EXISTING [1]. The source and destination paths must be on the same volume. The caller must have permission to delete the source path and, if it already exists, the destination path. The caller must have permission to add a file or directory to the destination directory. Existing opens of the source path must share delete access. If the source path is a directory, none of the files and directories in its tree is allowed to be open. If the destination path already exists, it cannot be a directory, a readonly file, or mapped as a process image (i.e. a data mapping is allowed, but an executing EXE or DLL is disallowed). Currently, existing opens of the destination path are not allowed, even if they share delete access. In Windows 10+, there's new support at the NT system call level (i.e. the layer beneath the Windows API) to support replacing a file that has existing opens, if the file system supports it (e.g. NTFS, ReFS). Delete access is still required, so the opens must share delete access. MoveFileExW() has not been updated yet to use this new capability. If and when it's supported, the requirement for existing opens to share delete access means it won't help in general. Most Windows programs, including Python, do not share delete access on open files. To share delete access in Python, one can use a custom opener function that calls CreateFileW() and wraps the OS handle in an fd via msvcrt.open_osfhandle(). --- [1] https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-movefileexw ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 19:49:59 2021 From: report at bugs.python.org (Eric Snow) Date: Tue, 07 Dec 2021 00:49:59 +0000 Subject: [issue21761] [doc] language reference describes the role of module.__file__ inaccurately In-Reply-To: <1402778004.82.0.418404996295.issue21761@psf.upfronthosting.co.za> Message-ID: <1638838199.42.0.482004254962.issue21761@roundup.psfhosted.org> Eric Snow added the comment: The key point is that loaders should be using the spec, not any of the module attrs (like `__file__` and `__cached__`), nor setting them. For the specific paragraph I referenced, it would look more like: It is also appropriate to set __cached__ when __file__ is not set. However, that scenario is quite atypical. Ultimately, __file__ and __cached__ are set by the import system from the module spec provided by the finder. The spec instructs the loader. If a loader can load from a cached module but otherwise does not load from a file, that atypical scenario may be appropriate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 20:38:30 2021 From: report at bugs.python.org (Zernoxi) Date: Tue, 07 Dec 2021 01:38:30 +0000 Subject: [issue46002] py Launcher for Windows with MSYS2 In-Reply-To: <1638809787.4.0.667501971988.issue46002@roundup.psfhosted.org> Message-ID: <1638841110.22.0.84845219665.issue46002@roundup.psfhosted.org> Zernoxi added the comment: I did some more testing more testing some more testing and saw that eryksun pointed out that the PATH environment variable is also being checked. I thought that it only checked for registered pythons but anyway. If I remove the "bin" folder to MSYS2 then the issue goes away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 20:56:41 2021 From: report at bugs.python.org (Zernoxi) Date: Tue, 07 Dec 2021 01:56:41 +0000 Subject: [issue46002] py Launcher for Windows with MSYS2 In-Reply-To: <1638809787.4.0.667501971988.issue46002@roundup.psfhosted.org> Message-ID: <1638842201.23.0.664434410283.issue46002@roundup.psfhosted.org> Zernoxi added the comment: Is there a way to "ignore" MSYS2 "bin" folder? Because "pyenv" is a wrapper for python versions and its python.exe is not explicitly in the PATH environment variable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 21:05:01 2021 From: report at bugs.python.org (Zernoxi) Date: Tue, 07 Dec 2021 02:05:01 +0000 Subject: [issue46002] py Launcher for Windows with MSYS2 In-Reply-To: <1638809787.4.0.667501971988.issue46002@roundup.psfhosted.org> Message-ID: <1638842701.84.0.107140014873.issue46002@roundup.psfhosted.org> Zernoxi added the comment: My bad, I guess its not a bug. Didn't read the documents correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 21:07:31 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 07 Dec 2021 02:07:31 +0000 Subject: [issue45798] Move _decimal build setup into configure In-Reply-To: <1636794919.07.0.823304462548.issue45798@roundup.psfhosted.org> Message-ID: <1638842851.94.0.756185027992.issue45798@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +28174 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29949 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 21:25:38 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 07 Dec 2021 02:25:38 +0000 Subject: [issue45950] Reintroduce bootstrap_python for freezing In-Reply-To: <1638375997.48.0.12074215987.issue45950@roundup.psfhosted.org> Message-ID: <1638843938.57.0.264401801623.issue45950@roundup.psfhosted.org> Ned Deily added the comment: I've now verified that the _bootstrap_python fix for framework builds works - removing "release blocker" status. Thanks, Christian! ---------- priority: release blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 21:35:54 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 07 Dec 2021 02:35:54 +0000 Subject: [issue45798] Move _decimal build setup into configure In-Reply-To: <1636794919.07.0.823304462548.issue45798@roundup.psfhosted.org> Message-ID: <1638844554.8.0.50575576403.issue45798@roundup.psfhosted.org> Ned Deily added the comment: New changeset ddbab69b6d44085564a9b5022b96b002a52b2f2b by Ned Deily in branch 'main': bpo-45798: Let libmpdec decide which archs to build on macOS as done previously. (GH-29949) https://github.com/python/cpython/commit/ddbab69b6d44085564a9b5022b96b002a52b2f2b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 21:43:44 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 07 Dec 2021 02:43:44 +0000 Subject: [issue45798] Move _decimal build setup into configure In-Reply-To: <1636794919.07.0.823304462548.issue45798@roundup.psfhosted.org> Message-ID: <1638845024.51.0.56896290649.issue45798@roundup.psfhosted.org> Ned Deily added the comment: The issue here turned out to be that the architecture selection code for libmpdec builds on macOS had been scrambled a bit on the move from setup.py to configure. To support universal builds correctly, libmpdec has code to decide itself which arch(s) to build with on macOS. PR 29949 restores that behavior and macOS universal2 builds (builds which have both native arm64 and x86_64 binaries in each executable or library file) now work again for 3.11. ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 22:30:19 2021 From: report at bugs.python.org (Ma Lin) Date: Tue, 07 Dec 2021 03:30:19 +0000 Subject: [issue44092] [sqlite3] Remove special rollback handling In-Reply-To: <1620596162.31.0.000417990177807.issue44092@roundup.psfhosted.org> Message-ID: <1638847819.4.0.446564936467.issue44092@roundup.psfhosted.org> Ma Lin added the comment: If the special rollback handling is removed, the behavior of Connection.rollback() and 'ON CONFLICT ROLLBACK' clause will be consistent. See attached file on_conflict_rollback.py. ---------- Added file: https://bugs.python.org/file50481/on_conflict_rollback.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 23:11:18 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 07 Dec 2021 04:11:18 +0000 Subject: [issue31879] Launcher fails on custom command starting with "python" In-Reply-To: <1509037268.43.0.213398074469.issue31879@psf.upfronthosting.co.za> Message-ID: <1638850278.72.0.620590602995.issue31879@roundup.psfhosted.org> Eryk Sun added the comment: Whether it should be this way or not, here's how it currently works. The builtin virtual paths all end with "python": static SHEBANG builtin_virtual_paths [] = { { L"/usr/bin/env python", TRUE }, { L"/usr/bin/python", FALSE }, { L"/usr/local/bin/python", FALSE }, { L"python", FALSE }, { NULL, FALSE }, }; parse_shebang() loops over this list, simply matching up to the length of each virtual path. Thus "/usr/bin/env python-xyz" is matched as a virtual path. Supporting user configured "python*" commands would require more sophisticated matching. A virtual command has to consume a suffix that looks like a version string in the form "[x[.y]][-32|-64]", as determined by validate_version(). But otherwise configured "python*" commands don't have to be matched as virtual commands. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 6 23:20:42 2021 From: report at bugs.python.org (Markus Kitsinger (he/him/his)) Date: Tue, 07 Dec 2021 04:20:42 +0000 Subject: [issue14965] super() and property inheritance behavior In-Reply-To: <1338433441.66.0.975494137492.issue14965@psf.upfronthosting.co.za> Message-ID: <1638850842.03.0.617890706615.issue14965@roundup.psfhosted.org> Change by Markus Kitsinger (he/him/his) : ---------- nosy: +SwooshyCueb nosy_count: 23.0 -> 24.0 pull_requests: +28175 pull_request: https://github.com/python/cpython/pull/29950 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 01:11:16 2021 From: report at bugs.python.org (Andre Roberge) Date: Tue, 07 Dec 2021 06:11:16 +0000 Subject: [issue46004] Incorrect bad token identified in 3.10.1 Message-ID: <1638857476.78.0.83967741356.issue46004@roundup.psfhosted.org> New submission from Andre Roberge : In Python 3.10.1, a change occurred compared with 3.10.0 so that an incorrect token is flagged for a SyntaxError. Also, in 3.11.0a2, the suggestion made about having forgotten a comma is incorrect. Python 3.10.1 for x range(4): ^ SyntaxError: invalid syntax (I no longer have 3.10.0 available but I know from my tests that it was identifying correctly the wrong token.) Python 3.11.0a2 for x range(4): ^^^^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma? Python 3.9.5 for x range(4): ^ SyntaxError: invalid syntax Python 3.8.10 for x range(4): ^ SyntaxError: invalid syntax Python 3.7.8 for x range(4): ^ SyntaxError: invalid syntax Python 3.6.8 for x range(4): ^ SyntaxError: invalid syntax ---------- components: Parser messages: 407894 nosy: aroberge, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: Incorrect bad token identified in 3.10.1 versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 01:16:04 2021 From: report at bugs.python.org (Andre Roberge) Date: Tue, 07 Dec 2021 06:16:04 +0000 Subject: [issue46004] Incorrect bad token identified in 3.10.1 In-Reply-To: <1638857476.78.0.83967741356.issue46004@roundup.psfhosted.org> Message-ID: <1638857764.69.0.409354069448.issue46004@roundup.psfhosted.org> Andre Roberge added the comment: >From (https://friendly-traceback.github.io/docs/syntax_tracebacks_en_3.10.html#for-loop-missing-in-operator), this is what was shown for Python 3.10.0 for x range(4): ^^^^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma? Same as Python 3.11.0a2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 03:08:57 2021 From: report at bugs.python.org (Elmir) Date: Tue, 07 Dec 2021 08:08:57 +0000 Subject: [issue46005] [doc] replace 'distutils' examples with 'setuptools' Message-ID: <1638864537.57.0.967787312853.issue46005@roundup.psfhosted.org> New submission from Elmir : As the distutils have been deprecated, the documentation on building C/C++ extension modules should be updated to use more future proof tool. I guess the section: 'Building C and C++ Extensions with distutils' should be replaced with: 'Building C and C++ Extensions with setuptools' Here is link to the section that needs to be updated/replaced: https://docs.python.org/3/extending/building.html#building-c-and-c-extensions-with-distutils ---------- assignee: docs at python components: Documentation messages: 407896 nosy: docs at python, elmjag priority: normal severity: normal status: open title: [doc] replace 'distutils' examples with 'setuptools' type: enhancement versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 03:12:16 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Dec 2021 08:12:16 +0000 Subject: [issue28533] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1638864736.44.0.912122873217.issue28533@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +28176 pull_request: https://github.com/python/cpython/pull/29951 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 03:13:45 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Dec 2021 08:13:45 +0000 Subject: [issue28533] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1638864825.89.0.0511227314321.issue28533@roundup.psfhosted.org> STINNER Victor added the comment: I reopen the issue: the Steering Council asked to revert the change removing the 3 modules, since the DeprecationWarning was only emitted in a single Python release (Python 3.10) and so the PEP 387 process was not respected. I created the PR 29951 to add again the 3 modules to Python 3.11. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 03:17:48 2021 From: report at bugs.python.org (Alex Waygood) Date: Tue, 07 Dec 2021 08:17:48 +0000 Subject: [issue45929] extend json.tool --json-lines to ignore empty rows In-Reply-To: <1638200958.63.0.173460715414.issue45929@roundup.psfhosted.org> Message-ID: <1638865068.91.0.63328107804.issue45929@roundup.psfhosted.org> Alex Waygood added the comment: I am changing the "version" field to 3.11, as enhancement proposals are generally only considered for unreleased versions of Python. ---------- nosy: +AlexWaygood, bob.ippolito, ezio.melotti, rhettinger versions: +Python 3.11 -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 03:20:16 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 07 Dec 2021 08:20:16 +0000 Subject: [issue41174] asyncio.coroutine decorator returns a non-generator function when using PYTHONASYNCIODEBUG In-Reply-To: <1593537261.43.0.523552907091.issue41174@roundup.psfhosted.org> Message-ID: <1638865216.05.0.291682887182.issue41174@roundup.psfhosted.org> Andrew Svetlov added the comment: Agree, thanks! ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 03:20:21 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Dec 2021 08:20:21 +0000 Subject: [issue28533] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1638865221.86.0.147368209966.issue28533@roundup.psfhosted.org> STINNER Victor added the comment: https://github.com/python/steering-council/issues/86 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 03:27:33 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 08:27:33 +0000 Subject: [issue41174] asyncio.coroutine decorator returns a non-generator function when using PYTHONASYNCIODEBUG In-Reply-To: <1593537261.43.0.523552907091.issue41174@roundup.psfhosted.org> Message-ID: <1638865653.98.0.295261099427.issue41174@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 03:45:13 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 08:45:13 +0000 Subject: [issue27016] BlockingIOError not raised inside function. In-Reply-To: <1463191419.08.0.084074707962.issue27016@psf.upfronthosting.co.za> Message-ID: <1638866713.34.0.00584919934706.issue27016@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> works for me stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 03:56:53 2021 From: report at bugs.python.org (Julien Castiaux) Date: Tue, 07 Dec 2021 08:56:53 +0000 Subject: [issue44637] Quoting issue on header Reply-To and other address headers In-Reply-To: <1626266697.4.0.946779337742.issue44637@roundup.psfhosted.org> Message-ID: <1638867413.19.0.784304613559.issue44637@roundup.psfhosted.org> Julien Castiaux added the comment: Hello there, There is a pull-request on github, had to modify `_refold_parse_tree` but I could keep the diff quite small. It is properly tested and it is waiting a review :) We have a patch at work so it is *absolutely not* urgent, feel free to review it *anytime*. Since we are using the Ubuntu LTS version of python, we might be interested by a backport till 3.7, quite honestly I'm happy it was flag as a security issue :D ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 04:19:25 2021 From: report at bugs.python.org (bendupndo) Date: Tue, 07 Dec 2021 09:19:25 +0000 Subject: [issue41210] Docs: More description(warning) about LZMA1 + BCJ with FORMAT_RAW In-Reply-To: <1593913885.93.0.828443713776.issue41210@roundup.psfhosted.org> Message-ID: <1638868765.2.0.912310914437.issue41210@roundup.psfhosted.org> bendupndo added the comment: Candy Crush Saga MOD APK If you have not yet played the legendary Candy Crush Saga, you should definitely try its MOD APK version. This cheat is a third party application that lets you have unlimited lives, moves, and collect stuff. It also allows you to purchase extra moves and boosters in the game. The main benefit of the MOD APK is that you can play the game without any limitations. So, how does it work? Well, it works just like the official version of the game. Link download: https://apksunny.com/candy-crush-saga/ In Candy Crush Saga MOD APK, you will get unlimited elixir, gold, and gems. This means that you can purchase as many boosters as you want. With this cheat, you can also have access to VIP GUI, which will give you unlimited power-ups. It's the perfect way to play without paying for anything. In addition, it will also let you play the game with an unlimited amount of time and without worrying about running out of elixir. Using the Candy Crush Saga MOD APK is simple. It will give you unlimited lives, unlimited moves, and infinite boosters. You just need to close the message asking you to buy a booster and choose one. You'll also have unlimited lollypop and hand switch boosters, plus endless owl candies. You can also use the MOD APK to get more levels and unlock extra special candies. You can also use this Candy Crush Saga MOD APK to get unlimited boosts. To buy the boosters, you simply need to click the 'buy' button in the pop-up message and then select the 'booster' you want. After this, you'll be able to have infinite lollypops, hand switches, and unlimited owl candies. You can also get endless owl candies. The MOD APK is not available in all versions of the game, but it's worth a try. In Candy Crush Saga MOD APK, you can save your progress to cloud services. This is a great feature for people who don't want to risk losing their progress. The MOD APK is free, safe, and very easy to install. It's recommended that you uninstall the PlayStore version of the game if you're using a different version of the game. Once you've uninstalled the PlayStore version of the app, simply download the MOD version of the game and restart the game. The Candy Crush Saga MOD APK gives you unlimited lives and is similar to the PlayStore version. It has the same features as the PlayStore version, but with a few exceptions. For example, you'll get a daily booster wheel and time-limited challenges. You'll have more lives than you need to complete the levels. The Bomb Counter will be set to 99 double all the time. ---------- nosy: +sakaranata _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 04:33:47 2021 From: report at bugs.python.org (Akuli) Date: Tue, 07 Dec 2021 09:33:47 +0000 Subject: [issue45620] A misleading url in 'Floating Point Arithmetic' page In-Reply-To: <1635313160.15.0.740336077946.issue45620@roundup.psfhosted.org> Message-ID: <1638869627.92.0.735331629133.issue45620@roundup.psfhosted.org> Akuli added the comment: Thanks! Works for me in browser now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 04:40:01 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Dec 2021 09:40:01 +0000 Subject: [issue45929] extend json.tool --json-lines to ignore empty rows In-Reply-To: <1638200958.63.0.173460715414.issue45929@roundup.psfhosted.org> Message-ID: <1638870001.42.0.626821635805.issue45929@roundup.psfhosted.org> Serhiy Storchaka added the comment: Both JSON Lines (https://jsonlines.org/) and Newline Delimited JSON (http://ndjson.org/) formats require that Each Line is a Valid JSON Value. If you want to ignore empty lines you can filter them out with `sed /^$/d`. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 04:43:55 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Dec 2021 09:43:55 +0000 Subject: [issue46000] NetBSD curses compatibility In-Reply-To: <1638807112.42.0.171377770564.issue46000@roundup.psfhosted.org> Message-ID: <1638870235.41.0.478525547895.issue46000@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 04:54:42 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Dec 2021 09:54:42 +0000 Subject: [issue45995] string formatting: normalize negative zero In-Reply-To: <1638792226.95.0.292604366656.issue45995@roundup.psfhosted.org> Message-ID: <1638870882.74.0.271280110061.issue45995@roundup.psfhosted.org> Serhiy Storchaka added the comment: Well, it makes sense for negative zero produced by rounding. But if we add a special support for this case, it would be useful to have some control on the type of rounding. Currently floats are rounded to the nearest decimal number, but in some cases it would be better to round up, down, toward zero or infinity (seed for example issue44884). You can round explicitly before formatting, but this solution is also applicable for this issue: >>> '%5.1f' % (round(-.00001, 1) + 0.0) ' 0.0' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 04:58:56 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Dec 2021 09:58:56 +0000 Subject: [issue46001] JSON module documentation mentions OverflowError for case that raises RecursionError In-Reply-To: <1638809146.18.0.0478648187504.issue46001@roundup.psfhosted.org> Message-ID: <1638871136.17.0.443611281435.issue46001@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 8db06528cacc94e67eb1fb2e4c2acc061a515671 by James Gerity in branch 'main': bpo-46001: Change OverflowError to RecursionError in JSON library docstrings (GH-29943) https://github.com/python/cpython/commit/8db06528cacc94e67eb1fb2e4c2acc061a515671 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 04:59:02 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 07 Dec 2021 09:59:02 +0000 Subject: [issue46001] JSON module documentation mentions OverflowError for case that raises RecursionError In-Reply-To: <1638809146.18.0.0478648187504.issue46001@roundup.psfhosted.org> Message-ID: <1638871142.72.0.564018787768.issue46001@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28177 pull_request: https://github.com/python/cpython/pull/29952 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 04:59:07 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 07 Dec 2021 09:59:07 +0000 Subject: [issue46001] JSON module documentation mentions OverflowError for case that raises RecursionError In-Reply-To: <1638809146.18.0.0478648187504.issue46001@roundup.psfhosted.org> Message-ID: <1638871147.66.0.89237540445.issue46001@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28178 pull_request: https://github.com/python/cpython/pull/29953 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 04:59:55 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Dec 2021 09:59:55 +0000 Subject: [issue46001] JSON module documentation mentions OverflowError for case that raises RecursionError In-Reply-To: <1638809146.18.0.0478648187504.issue46001@roundup.psfhosted.org> Message-ID: <1638871195.6.0.434697361883.issue46001@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you for your contribution James! ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 05:20:20 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 07 Dec 2021 10:20:20 +0000 Subject: [issue46001] JSON module documentation mentions OverflowError for case that raises RecursionError In-Reply-To: <1638809146.18.0.0478648187504.issue46001@roundup.psfhosted.org> Message-ID: <1638872420.22.0.453230767773.issue46001@roundup.psfhosted.org> miss-islington added the comment: New changeset 15da2a2723245710f1bd2c7cbd5b450532ae7728 by Miss Islington (bot) in branch '3.10': bpo-46001: Change OverflowError to RecursionError in JSON library docstrings (GH-29943) https://github.com/python/cpython/commit/15da2a2723245710f1bd2c7cbd5b450532ae7728 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 05:25:07 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 07 Dec 2021 10:25:07 +0000 Subject: [issue46001] JSON module documentation mentions OverflowError for case that raises RecursionError In-Reply-To: <1638809146.18.0.0478648187504.issue46001@roundup.psfhosted.org> Message-ID: <1638872707.15.0.287717121284.issue46001@roundup.psfhosted.org> miss-islington added the comment: New changeset 2e360832d7ed2697d715e93cb9f859a52264d60b by Miss Islington (bot) in branch '3.9': bpo-46001: Change OverflowError to RecursionError in JSON library docstrings (GH-29943) https://github.com/python/cpython/commit/2e360832d7ed2697d715e93cb9f859a52264d60b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 05:32:55 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 07 Dec 2021 10:32:55 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638873175.79.0.717386877183.issue45582@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28179 pull_request: https://github.com/python/cpython/pull/29954 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 05:41:54 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 10:41:54 +0000 Subject: [issue45963] Embed interpreter frame in generator. In-Reply-To: <1638448060.39.0.766103367856.issue45963@roundup.psfhosted.org> Message-ID: <1638873714.29.0.382994208208.issue45963@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Unfortunately, all refleak buildbots are failing after 299483c95d601ddcfdce2f96418b6499c1fc7b9f was merged. I bisected the problem to it: 299483c95d601ddcfdce2f96418b6499c1fc7b9f is the first bad commit commit 299483c95d601ddcfdce2f96418b6499c1fc7b9f Author: Mark Shannon Date: Mon Dec 6 10:13:49 2021 +0000 bpo-45963: Make space for the InterpreterFrame of a generator in that generator. (GH-29891) * Make generator, coroutine and async gen structs all the same size. * Store interpreter frame in generator (and coroutine). Reduces the number of allocations neeeded for a generator from two to one. Include/cpython/genobject.h | 23 ++--- Include/internal/pycore_ceval.h | 2 +- Include/internal/pycore_frame.h | 2 +- Lib/test/test_sys.py | 2 +- Objects/genobject.c | 183 ++++++++++++++++++++++------------------ Python/ceval.c | 41 +++------ Python/frame.c | 18 ++-- 7 files changed, 127 insertions(+), 144 deletions(-) Following out buildbot policy, the change will need to be reverted if is not fixed in 24 hours. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 05:43:25 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 10:43:25 +0000 Subject: [issue45963] Embed interpreter frame in generator. In-Reply-To: <1638448060.39.0.766103367856.issue45963@roundup.psfhosted.org> Message-ID: <1638873805.22.0.518619953277.issue45963@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: This is also unfortunately blocking the 3.11.a3 release :( ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 05:50:32 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Dec 2021 10:50:32 +0000 Subject: [issue46001] JSON module documentation mentions OverflowError for case that raises RecursionError In-Reply-To: <1638809146.18.0.0478648187504.issue46001@roundup.psfhosted.org> Message-ID: <1638874232.24.0.212055529765.issue46001@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 Dec 7 05:50:51 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 07 Dec 2021 10:50:51 +0000 Subject: [issue45890] Add tests for tracing try-except-finally blocks Message-ID: <1638874251.29.0.95185574141.issue45890@roundup.psfhosted.org> New submission from Mark Shannon : New changeset a310fd83a014484b8c680de83540c4908b344c6c by Irit Katriel in branch 'main': bpo-45890: Add tests for tracing try-except-finally blocks (GH-29746) https://github.com/python/cpython/commit/a310fd83a014484b8c680de83540c4908b344c6c ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:04:33 2021 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 07 Dec 2021 11:04:33 +0000 Subject: [issue45620] A misleading url in 'Floating Point Arithmetic' page In-Reply-To: <1635313160.15.0.740336077946.issue45620@roundup.psfhosted.org> Message-ID: <1638875073.08.0.599936590153.issue45620@roundup.psfhosted.org> Eric V. Smith added the comment: @Akuli: thanks for checking. And thanks so much for the awesome debugging with curl: that was the key to solving the problem. I didn't hear back from lahey.com what the problem was, but I'd sure be curious to know! ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:07:06 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 07 Dec 2021 11:07:06 +0000 Subject: [issue43795] Implement PEP 652 -- Maintaining the Stable ABI In-Reply-To: <1617983030.95.0.501839301811.issue43795@roundup.psfhosted.org> Message-ID: <1638875226.9.0.144205976663.issue43795@roundup.psfhosted.org> Change by Petr Viktorin : ---------- pull_requests: +28180 pull_request: https://github.com/python/cpython/pull/29956 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:15:57 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 07 Dec 2021 11:15:57 +0000 Subject: [issue35821] Clarify when logging events are propagated when propagate is true In-Reply-To: <1548360439.22.0.955979079327.issue35821@roundup.psfhosted.org> Message-ID: <1638875757.37.0.942670034842.issue35821@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +28181 pull_request: https://github.com/python/cpython/pull/29957 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:16:02 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 07 Dec 2021 11:16:02 +0000 Subject: [issue35821] Clarify when logging events are propagated when propagate is true In-Reply-To: <1548360439.22.0.955979079327.issue35821@roundup.psfhosted.org> Message-ID: <1638875762.13.0.352751454527.issue35821@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28182 pull_request: https://github.com/python/cpython/pull/29958 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:15:53 2021 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 07 Dec 2021 11:15:53 +0000 Subject: [issue35821] Clarify when logging events are propagated when propagate is true In-Reply-To: <1548360439.22.0.955979079327.issue35821@roundup.psfhosted.org> Message-ID: <1638875753.76.0.758295411045.issue35821@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 2bf551757e0a7e3cc6ce2ebed2178b82438ac6b5 by Vinay Sajip in branch 'main': bpo-35821: Add an example to Logger.propagate documentation. (GH-29841) https://github.com/python/cpython/commit/2bf551757e0a7e3cc6ce2ebed2178b82438ac6b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:23:49 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 11:23:49 +0000 Subject: [issue45890] Add tests for tracing try-except-finally blocks In-Reply-To: <1638874251.29.0.95185574141.issue45890@roundup.psfhosted.org> Message-ID: <1638876229.04.0.114479502965.issue45890@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:25:20 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 11:25:20 +0000 Subject: [issue46004] Incorrect bad token identified in 3.10.1 In-Reply-To: <1638857476.78.0.83967741356.issue46004@roundup.psfhosted.org> Message-ID: <1638876320.88.0.599737252621.issue46004@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +28183 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29959 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:25:25 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 11:25:25 +0000 Subject: [issue46004] Incorrect bad token identified in 3.10.1 In-Reply-To: <1638857476.78.0.83967741356.issue46004@roundup.psfhosted.org> Message-ID: <1638876325.23.0.18339001047.issue46004@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch, patch pull_requests: +28183, 28184 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29959 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:31:12 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Dec 2021 11:31:12 +0000 Subject: [issue28533] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1638876672.15.0.418242768281.issue28533@roundup.psfhosted.org> STINNER Victor added the comment: New changeset cf7eaa4617295747ee5646c4e2b7e7a16d7c64ab by Victor Stinner in branch 'main': Revert "bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521)" (GH-29951) https://github.com/python/cpython/commit/cf7eaa4617295747ee5646c4e2b7e7a16d7c64ab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:31:13 2021 From: report at bugs.python.org (Athanasius) Date: Tue, 07 Dec 2021 11:31:13 +0000 Subject: [issue45986] 3.10.0 ships with older tcl/tk DLLs than 3.9.9 causing Windows Installer problems In-Reply-To: <1638706009.9.0.557448740254.issue45986@roundup.psfhosted.org> Message-ID: <1638876673.04.0.653197055572.issue45986@roundup.psfhosted.org> Athanasius added the comment: I can confirm that things are now working properly for us with Python 3.10.1. This can be closed with regards to the immediate issue, but perhaps the release team might want to implement some checks/policy to avoid such an issue in future ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:38:28 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 07 Dec 2021 11:38:28 +0000 Subject: [issue33080] regen-importlib is causing build races against other regen-all targets in Makefile.pre.in In-Reply-To: <1521132370.51.0.467229070634.issue33080@psf.upfronthosting.co.za> Message-ID: <1638877108.84.0.781174450394.issue33080@roundup.psfhosted.org> Christian Heimes added the comment: May I ask why you are running the regen-all target at all? A normal end-user build of CPython does not need make regen-all. It's only used for CI and internal development. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:44:05 2021 From: report at bugs.python.org (Alexander Kanavin) Date: Tue, 07 Dec 2021 11:44:05 +0000 Subject: [issue33080] regen-importlib is causing build races against other regen-all targets in Makefile.pre.in In-Reply-To: <1521132370.51.0.467229070634.issue33080@psf.upfronthosting.co.za> Message-ID: <1638877445.06.0.253827125634.issue33080@roundup.psfhosted.org> Alexander Kanavin added the comment: We have long ago updated to a much newer python and removed the workaround, so the whatever the issue was, it is completely obsolete. Thanks! ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:45:22 2021 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 07 Dec 2021 11:45:22 +0000 Subject: [issue35821] Clarify when logging events are propagated when propagate is true In-Reply-To: <1548360439.22.0.955979079327.issue35821@roundup.psfhosted.org> Message-ID: <1638877522.03.0.509869765052.issue35821@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset f78c229b4ec8621a9b15c6396b6c91518e8975d6 by Miss Islington (bot) in branch '3.10': [3.10] bpo-35821: Add an example to Logger.propagate documentation. (GH-29841) (GH-29957) https://github.com/python/cpython/commit/f78c229b4ec8621a9b15c6396b6c91518e8975d6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:45:57 2021 From: report at bugs.python.org (Alexander Kanavin) Date: Tue, 07 Dec 2021 11:45:57 +0000 Subject: [issue33080] regen-importlib is causing build races against other regen-all targets in Makefile.pre.in In-Reply-To: <1521132370.51.0.467229070634.issue33080@psf.upfronthosting.co.za> Message-ID: <1638877557.84.0.275829897953.issue33080@roundup.psfhosted.org> Alexander Kanavin added the comment: (removed both the workaround, and regen-all itself) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:45:52 2021 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 07 Dec 2021 11:45:52 +0000 Subject: [issue35821] Clarify when logging events are propagated when propagate is true In-Reply-To: <1548360439.22.0.955979079327.issue35821@roundup.psfhosted.org> Message-ID: <1638877552.97.0.56450422184.issue35821@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset e688568cdfe758a2316ecaf0c8df868d5dde0d83 by Miss Islington (bot) in branch '3.9': [3.9] bpo-35821: Add an example to Logger.propagate documentation. (GH-29841) (GH-29958) https://github.com/python/cpython/commit/e688568cdfe758a2316ecaf0c8df868d5dde0d83 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:46:07 2021 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 07 Dec 2021 11:46:07 +0000 Subject: [issue35821] Clarify when logging events are propagated when propagate is true In-Reply-To: <1548360439.22.0.955979079327.issue35821@roundup.psfhosted.org> Message-ID: <1638877567.12.0.135642619162.issue35821@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:48:48 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 11:48:48 +0000 Subject: [issue26120] pydoc: move __future__ imports out of the DATA block In-Reply-To: <1452839500.03.0.307183465285.issue26120@psf.upfronthosting.co.za> Message-ID: <1638877728.84.0.980275361154.issue26120@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel type: -> enhancement versions: +Python 3.11 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:51:03 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 07 Dec 2021 11:51:03 +0000 Subject: [issue45963] Embed interpreter frame in generator. In-Reply-To: <1638448060.39.0.766103367856.issue45963@roundup.psfhosted.org> Message-ID: <1638877863.72.0.858989133113.issue45963@roundup.psfhosted.org> Mark Shannon added the comment: I'll look into it now, and fix or revert it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:51:40 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 11:51:40 +0000 Subject: [issue24253] pydoc for namespace packages indicates FILE as built-in In-Reply-To: <1432183058.22.0.402547757332.issue24253@psf.upfronthosting.co.za> Message-ID: <1638877900.47.0.257893115515.issue24253@roundup.psfhosted.org> Irit Katriel added the comment: Reproduce on 3.11. ---------- nosy: +iritkatriel type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 06:56:49 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 07 Dec 2021 11:56:49 +0000 Subject: [issue33080] regen-importlib is causing build races against other regen-all targets in Makefile.pre.in In-Reply-To: <1521132370.51.0.467229070634.issue33080@psf.upfronthosting.co.za> Message-ID: <1638878209.3.0.36707164864.issue33080@roundup.psfhosted.org> Christian Heimes added the comment: Fantasic! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 07:00:11 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Dec 2021 12:00:11 +0000 Subject: [issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type In-Reply-To: <1635453507.8.0.842225708276.issue45664@roundup.psfhosted.org> Message-ID: <1638878411.29.0.0163067063383.issue45664@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset bffce2cbb5543bc63a67e33ad599328a12f2b00a by Miss Islington (bot) in branch '3.9': bpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a base (GH-29298) (GH-29928) https://github.com/python/cpython/commit/bffce2cbb5543bc63a67e33ad599328a12f2b00a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 07:00:37 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Dec 2021 12:00:37 +0000 Subject: [issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type In-Reply-To: <1635453507.8.0.842225708276.issue45664@roundup.psfhosted.org> Message-ID: <1638878437.24.0.190198660693.issue45664@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 Dec 7 07:01:12 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Dec 2021 12:01:12 +0000 Subject: [issue45663] is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias In-Reply-To: <1635451831.16.0.493312475993.issue45663@roundup.psfhosted.org> Message-ID: <1638878472.41.0.20244829155.issue45663@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 Dec 7 07:10:42 2021 From: report at bugs.python.org (E. Paine) Date: Tue, 07 Dec 2021 12:10:42 +0000 Subject: [issue45436] test_tk.test_configure_type() fails with Tcl/Tk 8.6.11 In-Reply-To: <1633984027.59.0.32532195896.issue45436@roundup.psfhosted.org> Message-ID: <1638879042.59.0.683403537635.issue45436@roundup.psfhosted.org> E. Paine added the comment: Fix merged upstream: https://core.tcl-lang.org/tk/tktview/be8f5b9f Can issue be closed now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 07:22:14 2021 From: report at bugs.python.org (John Belmonte) Date: Tue, 07 Dec 2021 12:22:14 +0000 Subject: [issue45995] string formatting: normalize negative zero In-Reply-To: <1638792226.95.0.292604366656.issue45995@roundup.psfhosted.org> Message-ID: <1638879734.81.0.73384551894.issue45995@roundup.psfhosted.org> John Belmonte added the comment: > changing %-formatting doesn't seem viable I'm concerned about treating %-formatting specially. As far as float/complex, the logical and efficient place to put this change seems to be PyOS_double_to_string(), which affects all three formatting options. For example, the dtoa case is as simple as this change to format_float_short(): /* coerce negative zero to positive */ if (sign == 1 && ((digits_len == 0 && decpt == -1) || (digits_len == 1 && digits[0] == '0'))) { sign = 0; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 07:53:02 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 07 Dec 2021 12:53:02 +0000 Subject: [issue45995] string formatting: normalize negative zero In-Reply-To: <1638879734.81.0.73384551894.issue45995@roundup.psfhosted.org> Message-ID: <20211207125036.GC21647@ando.pearwood.info> Steven D'Aprano added the comment: Sorry John, I don't understand your comment about "treating %-formatting specifically". Isn't the point here not to change %-formatting at all? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 07:55:35 2021 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 07 Dec 2021 12:55:35 +0000 Subject: [issue45995] string formatting: normalize negative zero In-Reply-To: <1638792226.95.0.292604366656.issue45995@roundup.psfhosted.org> Message-ID: <1638881735.77.0.498802347903.issue45995@roundup.psfhosted.org> Eric V. Smith added the comment: %-formatting already doesn't support some formats that float.__format__ does, for example ','. So I agree we shouldn't modify %-formatting. I don't have much of an opinion on whether changing __format__ is a good idea or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 07:57:17 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 07 Dec 2021 12:57:17 +0000 Subject: [issue45963] Embed interpreter frame in generator. In-Reply-To: <1638448060.39.0.766103367856.issue45963@roundup.psfhosted.org> Message-ID: <1638881837.59.0.928635935933.issue45963@roundup.psfhosted.org> Change by Mark Shannon : ---------- pull_requests: +28185 pull_request: https://github.com/python/cpython/pull/29960 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 07:58:40 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 12:58:40 +0000 Subject: [issue28141] shutil.copystat utime lookup fails on certain Android file systems In-Reply-To: <1473833050.26.0.837055301848.issue28141@psf.upfronthosting.co.za> Message-ID: <1638881920.97.0.24303334101.issue28141@roundup.psfhosted.org> Irit Katriel added the comment: Jerry, is this still a problem with current python versions? (2.7/3.5 are no longer being maintained). ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 08:01:07 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 13:01:07 +0000 Subject: [issue38579] 'u' formatted arrays mostly prevent appends of 4 byte characters In-Reply-To: <1571913084.38.0.724512448926.issue38579@roundup.psfhosted.org> Message-ID: <1638882067.93.0.264366185879.issue38579@roundup.psfhosted.org> Irit Katriel added the comment: Can you include a code snippet to demonstrate the problem? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 08:02:33 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 13:02:33 +0000 Subject: [issue46004] Incorrect bad token identified in 3.10.1 In-Reply-To: <1638857476.78.0.83967741356.issue46004@roundup.psfhosted.org> Message-ID: <1638882153.34.0.107145985304.issue46004@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 1c7a1c3be08ee911d347fffd2716f3911ba751f9 by Pablo Galindo Salgado in branch 'main': bpo-46004: Fix error location for loops with invalid targets (GH-29959) https://github.com/python/cpython/commit/1c7a1c3be08ee911d347fffd2716f3911ba751f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 08:05:45 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 13:05:45 +0000 Subject: [issue46004] Incorrect bad token identified in 3.10.1 In-Reply-To: <1638857476.78.0.83967741356.issue46004@roundup.psfhosted.org> Message-ID: <1638882345.1.0.873204495048.issue46004@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +28186 pull_request: https://github.com/python/cpython/pull/29961 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 08:14:12 2021 From: report at bugs.python.org (John Belmonte) Date: Tue, 07 Dec 2021 13:14:12 +0000 Subject: [issue45995] string formatting: normalize negative zero In-Reply-To: <1638792226.95.0.292604366656.issue45995@roundup.psfhosted.org> Message-ID: <1638882852.7.0.90956080774.issue45995@roundup.psfhosted.org> John Belmonte added the comment: I see now. PyOS_double_to_string() could gain the extra flag to coerce negative zero but, out of the three formatting methods, only format() and f-string would use the flag. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 08:28:04 2021 From: report at bugs.python.org (Antony Lee) Date: Tue, 07 Dec 2021 13:28:04 +0000 Subject: [issue24253] pydoc for namespace packages indicates FILE as built-in In-Reply-To: <1432183058.22.0.402547757332.issue24253@psf.upfronthosting.co.za> Message-ID: <1638883684.98.0.487146000248.issue24253@roundup.psfhosted.org> Change by Antony Lee : ---------- nosy: -Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 08:28:12 2021 From: report at bugs.python.org (Antony Lee) Date: Tue, 07 Dec 2021 13:28:12 +0000 Subject: [issue26120] pydoc: move __future__ imports out of the DATA block In-Reply-To: <1452839500.03.0.307183465285.issue26120@psf.upfronthosting.co.za> Message-ID: <1638883692.37.0.0374791176771.issue26120@roundup.psfhosted.org> Change by Antony Lee : ---------- nosy: -Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 08:57:10 2021 From: report at bugs.python.org (Ken Jin) Date: Tue, 07 Dec 2021 13:57:10 +0000 Subject: [issue45755] Specialized generic class does not return class attributes in dir In-Reply-To: <1636399849.8.0.841580145929.issue45755@roundup.psfhosted.org> Message-ID: <1638885430.15.0.242263841294.issue45755@roundup.psfhosted.org> Change by Ken Jin : ---------- keywords: +patch pull_requests: +28187 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29962 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 09:03:42 2021 From: report at bugs.python.org (Ken Jin) Date: Tue, 07 Dec 2021 14:03:42 +0000 Subject: [issue35821] Clarify when logging events are propagated when propagate is true In-Reply-To: <1548360439.22.0.955979079327.issue35821@roundup.psfhosted.org> Message-ID: <1638885822.41.0.945049520345.issue35821@roundup.psfhosted.org> Change by Ken Jin : ---------- nosy: +kj nosy_count: 5.0 -> 6.0 pull_requests: +28188 pull_request: https://github.com/python/cpython/pull/29963 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 09:07:20 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 14:07:20 +0000 Subject: [issue36850] shutil.copy2 fails with even with source network filesystem not supporting extended attributes In-Reply-To: <1557301411.76.0.646767757374.issue36850@roundup.psfhosted.org> Message-ID: <1638886040.33.0.655873659602.issue36850@roundup.psfhosted.org> Irit Katriel added the comment: This seems fixed, can it be closed? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 09:45:21 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 07 Dec 2021 14:45:21 +0000 Subject: [issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache In-Reply-To: <1635938516.86.0.42328943914.issue45703@roundup.psfhosted.org> Message-ID: <1638888321.23.0.000299202374596.issue45703@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28189 pull_request: https://github.com/python/cpython/pull/29964 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 09:59:00 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 07 Dec 2021 14:59:00 +0000 Subject: [issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache In-Reply-To: <1635938516.86.0.42328943914.issue45703@roundup.psfhosted.org> Message-ID: <1638889140.5.0.889537780933.issue45703@roundup.psfhosted.org> Petr Viktorin added the comment: Sadly, the backport is non-trivial. I'm putting on my TODO list, but I doubt I'll get to it soon :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 10:09:27 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 15:09:27 +0000 Subject: [issue22910] test_pydoc test_synopsis_sourceless is a flaky test In-Reply-To: <1416553421.91.0.74824945431.issue22910@psf.upfronthosting.co.za> Message-ID: <1638889767.05.0.449773949665.issue22910@roundup.psfhosted.org> Irit Katriel added the comment: Shall we close this? It's pretty old and if the test is still flaky it will let us know. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 10:11:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 15:11:45 +0000 Subject: [issue23469] Delete Misc/*.wpr files In-Reply-To: <1424048342.99.0.00819785192711.issue23469@psf.upfronthosting.co.za> Message-ID: <1638889905.27.0.89809305343.issue23469@roundup.psfhosted.org> Irit Katriel added the comment: Closing as this seems abandoned. Feel free to reopen if not. ---------- nosy: +iritkatriel stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 10:15:32 2021 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 07 Dec 2021 15:15:32 +0000 Subject: [issue26120] pydoc: move __future__ imports out of the DATA block In-Reply-To: <1452839500.03.0.307183465285.issue26120@psf.upfronthosting.co.za> Message-ID: <1638890132.27.0.400734633698.issue26120@roundup.psfhosted.org> Vedran ?a?i? added the comment: I thought that _Feature starts with an underscore precisely to evade such listings. Do other "private" module data also get listed? ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 10:20:50 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 15:20:50 +0000 Subject: [issue24393] Test urllib2_localnet fails depending on host proxy configuration In-Reply-To: <1433594936.74.0.27552580361.issue24393@psf.upfronthosting.co.za> Message-ID: <1638890450.28.0.778563610012.issue24393@roundup.psfhosted.org> Irit Katriel added the comment: I'm closing this as there was no activity for 6 years and 3.5 is no longer maintained. Furthermore, it's not clear what problem the patch trying to solve. If this problem still exists on current versions (>= 3.9), please create a new issue and explain in more detail the scenario in which you had a problem with this test. ---------- nosy: +iritkatriel resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 10:23:41 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 15:23:41 +0000 Subject: [issue46004] Incorrect bad token identified in 3.10.1 In-Reply-To: <1638857476.78.0.83967741356.issue46004@roundup.psfhosted.org> Message-ID: <1638890621.82.0.448046333864.issue46004@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset c52141200364898818956a73b955f7c04f634dc8 by Pablo Galindo Salgado in branch '3.10': [3.10] bpo-46004: Fix error location for loops with invalid targets (GH-29959). (GH-29961) https://github.com/python/cpython/commit/c52141200364898818956a73b955f7c04f634dc8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 10:23:40 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 15:23:40 +0000 Subject: [issue46004] Incorrect bad token identified in 3.10.1 In-Reply-To: <1638857476.78.0.83967741356.issue46004@roundup.psfhosted.org> Message-ID: <1638890620.14.0.24135418222.issue46004@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 10:24:54 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 15:24:54 +0000 Subject: [issue46004] Incorrect bad token identified in 3.10.1 In-Reply-To: <1638857476.78.0.83967741356.issue46004@roundup.psfhosted.org> Message-ID: <1638890694.56.0.444722131366.issue46004@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > From (https://friendly-traceback.github.io/docs/syntax_tracebacks_en_3.10.html#for-loop-missing-in-operator), this is what was shown for Python 3.10.0 Yeah, we are not showing that anymore as we only trigger the error when it happens inside collections to avoid many of the false positives we were seeing. This PR fixes the problem to point to the correct token, but still show "syntax error" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 10:25:21 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 07 Dec 2021 15:25:21 +0000 Subject: [issue35821] Clarify when logging events are propagated when propagate is true In-Reply-To: <1548360439.22.0.955979079327.issue35821@roundup.psfhosted.org> Message-ID: <1638890721.94.0.0220129121355.issue35821@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28190 pull_request: https://github.com/python/cpython/pull/29965 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 10:25:26 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 07 Dec 2021 15:25:26 +0000 Subject: [issue35821] Clarify when logging events are propagated when propagate is true In-Reply-To: <1548360439.22.0.955979079327.issue35821@roundup.psfhosted.org> Message-ID: <1638890726.48.0.653271640861.issue35821@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28191 pull_request: https://github.com/python/cpython/pull/29966 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 10:25:22 2021 From: report at bugs.python.org (Ken Jin) Date: Tue, 07 Dec 2021 15:25:22 +0000 Subject: [issue35821] Clarify when logging events are propagated when propagate is true In-Reply-To: <1548360439.22.0.955979079327.issue35821@roundup.psfhosted.org> Message-ID: <1638890722.54.0.734700528383.issue35821@roundup.psfhosted.org> Ken Jin added the comment: New changeset c7e7a4b969b5728d4b4f3c59bf98e1e830d5c6d6 by Ken Jin in branch 'main': bpo-35821: Fix restructuredtext code formatting in logging.rst (GH-29963) https://github.com/python/cpython/commit/c7e7a4b969b5728d4b4f3c59bf98e1e830d5c6d6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 10:35:18 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 15:35:18 +0000 Subject: [issue25726] [doc] sys.setprofile / sys.getprofile asymetry In-Reply-To: <1448406267.14.0.484592445826.issue25726@psf.upfronthosting.co.za> Message-ID: <1638891318.41.0.0040905761014.issue25726@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: sys.setprofile / sys.getprofile asymetry -> [doc] sys.setprofile / sys.getprofile asymetry versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 10:47:42 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 07 Dec 2021 15:47:42 +0000 Subject: [issue35821] Clarify when logging events are propagated when propagate is true In-Reply-To: <1548360439.22.0.955979079327.issue35821@roundup.psfhosted.org> Message-ID: <1638892062.28.0.123528584392.issue35821@roundup.psfhosted.org> miss-islington added the comment: New changeset 14f03ce6e8a33cc8b45f11c4d428193fc7c4a145 by Miss Islington (bot) in branch '3.10': [3.10] bpo-35821: Fix restructuredtext code formatting in logging.rst (GH-29963) (GH-29965) https://github.com/python/cpython/commit/14f03ce6e8a33cc8b45f11c4d428193fc7c4a145 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 10:48:42 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 07 Dec 2021 15:48:42 +0000 Subject: [issue35821] Clarify when logging events are propagated when propagate is true In-Reply-To: <1548360439.22.0.955979079327.issue35821@roundup.psfhosted.org> Message-ID: <1638892122.06.0.662543543748.issue35821@roundup.psfhosted.org> miss-islington added the comment: New changeset db42809d299d1bc3a07b29fabe8f74fa02a7e59e by Miss Islington (bot) in branch '3.9': bpo-35821: Fix restructuredtext code formatting in logging.rst (GH-29963) https://github.com/python/cpython/commit/db42809d299d1bc3a07b29fabe8f74fa02a7e59e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 11:03:03 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 07 Dec 2021 16:03:03 +0000 Subject: [issue45947] Place dict (and values) pointers at a fixed (negative) offset from the base of the object. In-Reply-To: <1638365448.99.0.213832334161.issue45947@roundup.psfhosted.org> Message-ID: <1638892983.71.0.455831250223.issue45947@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 8319114feedd2a5b77378bba24eb9fb2689c5033 by Mark Shannon in branch 'main': bpo-45947: Place dict and values pointer at fixed (negative) offset just before GC header. (GH-29879) https://github.com/python/cpython/commit/8319114feedd2a5b77378bba24eb9fb2689c5033 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 11:07:12 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 16:07:12 +0000 Subject: [issue23947] Add mechanism to import stdlib package bypassing user packages In-Reply-To: <1429022719.25.0.0685276960077.issue23947@psf.upfronthosting.co.za> Message-ID: <1638893232.16.0.917300284596.issue23947@roundup.psfhosted.org> Change by Irit Katriel : ---------- type: -> enhancement versions: +Python 3.11 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 11:17:30 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 16:17:30 +0000 Subject: [issue45635] Tidy up error handling in traceback.c / python run.c In-Reply-To: <1635370026.46.0.0220648873339.issue45635@roundup.psfhosted.org> Message-ID: <1638893850.09.0.737691392061.issue45635@roundup.psfhosted.org> Irit Katriel added the comment: New changeset d596acbd3b4f6716ed98895eb0b48e9830e0b320 by Irit Katriel in branch 'main': bpo-45635: standardize error handling in traceback.c (GH-29905) https://github.com/python/cpython/commit/d596acbd3b4f6716ed98895eb0b48e9830e0b320 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 11:25:34 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 16:25:34 +0000 Subject: [issue19745] TEST_DATA_DIR for out-of-tree builds In-Reply-To: <1385260850.2.0.647023626646.issue19745@psf.upfronthosting.co.za> Message-ID: <1638894334.1.0.905736364316.issue19745@roundup.psfhosted.org> Irit Katriel added the comment: It does seem to be used here: https://github.com/python/cpython/blob/a6c3b0faa1d55e36539caf19bd3bcf1dea12df84/Lib/test/support/__init__.py#L553 ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 12:00:56 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 07 Dec 2021 17:00:56 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638896456.67.0.0521678555664.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: I just noticed that the PKG_CHECK_MODULES() fallbacks override the PKG_CONFIG environment variables. We should do something like ZLIB_CFLAGS=${ZLIB_CFLAGS:-""} ZLIB_LIBS=${ZLIB_LIBS:-"-lz"} for all env vars. I prefer the syntax over ${ZLIB_CFLAGS:=""} because it is more obvious what is happening. Env vars: LIBUUID_CFLAGS C compiler flags for LIBUUID, overriding pkg-config LIBUUID_LIBS linker flags for LIBUUID, overriding pkg-config LIBFFI_CFLAGS C compiler flags for LIBFFI, overriding pkg-config LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config LIBNSL_CFLAGS C compiler flags for LIBNSL, overriding pkg-config LIBNSL_LIBS linker flags for LIBNSL, overriding pkg-config LIBSQLITE3_CFLAGS C compiler flags for LIBSQLITE3, overriding pkg-config LIBSQLITE3_LIBS linker flags for LIBSQLITE3, overriding pkg-config GDBM_CFLAGS C compiler flags for gdbm GDBM_LIBS additional linker flags for gdbm ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config ZLIB_LIBS linker flags for ZLIB, overriding pkg-config BZIP2_CFLAGS C compiler flags for BZIP2, overriding pkg-config BZIP2_LIBS linker flags for BZIP2, overriding pkg-config LIBLZMA_CFLAGS C compiler flags for LIBLZMA, overriding pkg-config LIBLZMA_LIBS linker flags for LIBLZMA, overriding pkg-config LIBCRYPT_CFLAGS C compiler flags for LIBCRYPT, overriding pkg-config LIBCRYPT_LIBS linker flags for LIBCRYPT, overriding pkg-config ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 12:12:26 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Dec 2021 17:12:26 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters Message-ID: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> New submission from STINNER Victor : _PyUnicode_EqualToASCIIId() seems to be incompatible with subinterpreter: it makes the assumption that if direct pointer comparison fails and the string is interned, the two strings are not equal. -- super_init_without_args() of Objects/typeobject.c calls _PyUnicode_EqualToASCIIId(name, &PyId___class__) to test if the Unicode string 'name' is equal to "__class__". int _PyUnicode_EqualToASCIIId(PyObject *left, _Py_Identifier *right) { right_uni = _PyUnicode_FromId(right); ... if (left == right_uni) return 1; if (PyUnicode_CHECK_INTERNED(left)) return 0; ... return unicode_compare_eq(left, right_uni); } _PyUnicode_EqualToASCIIId() makes the assumption that left and right are not equal if left and _PyUnicode_FromId(right) pointers are not equal and left is an interned string. In the reproducer, left object is abc.ABCMeta.__new__.__code__.co_freevars[0]. Depending on how the stdlib abc.py file was loaded (in the main interpreter and in the subinterpreter), __code__.co_freevars[0] may or may not be an interned string. If __code__.co_freevars[0] is an interned string, _PyUnicode_EqualToASCIIId() fails in a subinterpreter if the direct pointer comparison fails (if left and right_uni pointers are not equal). -- Reproducer from: https://github.com/ninia/jep/issues/358#issuecomment-988090696 * Build Python 3.10 with "./configure --enable-shared --prefix /opt/py310" and install it. * Download attached reproducer.c. * Build the reproducer with: gcc -o reproducer reproducer.c $(/opt/py310/bin/python3.10-config --embed --cflags --ldflags) * Remove all stdlib .pyc files: find /opt/py310 -type d -name __pycache__|xargs rm -rf * Run the reproducer with: LD_LIBRARY_PATH=/opt/py310/lib ./reproducer Output: --- Before creating sub interpreter Traceback (most recent call last): File "/opt/py310/lib/python3.10/io.py", line 52, in File "/opt/py310/lib/python3.10/abc.py", line 184, in File "/opt/py310/lib/python3.10/abc.py", line 106, in __new__ RuntimeError: super(): __class__ cell not found Fatal Python error: _PyThreadState_Delete: tstate 0x7f9f2001c710 is still current Python runtime state: initialized Current thread 0x00007f9f27c99640 (most recent call first): Abandon (core dumped) --- py-bt command in gdb: --- (gdb) py-bt Traceback (most recent call first): File "/opt/py310/lib/python3.10/abc.py", line 106, in __new__ cls = super().__new__(mcls, name, bases, namespace, **kwargs) File "/opt/py310/lib/python3.10/abc.py", line 184, in class ABC(metaclass=ABCMeta): File "", line 241, in _call_with_frames_removed File "", line 883, in exec_module File "", line 688, in _load_unlocked File "", line 1006, in _find_and_load_unlocked File "", line 1027, in _find_and_load File "/opt/py310/lib/python3.10/io.py", line 52, in import abc File "", line 241, in _call_with_frames_removed File "", line 883, in exec_module File "", line 688, in _load_unlocked File "", line 1006, in _find_and_load_unlocked File "", line 1027, in _find_and_load --- ---------- components: C API, Subinterpreters files: reproducer.c messages: 407950 nosy: corona10, erlendaasland, vstinner priority: normal severity: normal status: open title: [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters versions: Python 3.10, Python 3.11 Added file: https://bugs.python.org/file50482/reproducer.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 12:19:22 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Dec 2021 17:19:22 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1638897562.95.0.75287594113.issue46006@roundup.psfhosted.org> STINNER Victor added the comment: In Python 3.9, the code works because the _Py_IDENTIFIER() API shares Python Unicode objects between all interpreters. _PyUnicode_FromId() was modified to be per-interpreter in bpo-39465 by: New changeset ba3d67c2fb04a7842741b1b6da5d67f22c579f33 by Victor Stinner in branch 'master': bpo-39465: Fix _PyUnicode_FromId() for subinterpreters (GH-20058) https://github.com/python/cpython/commit/ba3d67c2fb04a7842741b1b6da5d67f22c579f33 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 12:21:43 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Dec 2021 17:21:43 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1638897703.15.0.976654131705.issue46006@roundup.psfhosted.org> STINNER Victor added the comment: Serhiy: Do you recall the idea of the PyUnicode_CHECK_INTERNED() optimization? The PyUnicode_CHECK_INTERNED() test is as old as the _PyUnicode_EqualToASCIIId() function. commit f5894dd646f5e39918377b37b8c8694cebdca103 Author: Serhiy Storchaka Date: Wed Nov 16 15:40:39 2016 +0200 Issue #28701: Replace _PyUnicode_CompareWithId with _PyUnicode_EqualToASCIIId. The latter function is more readable, faster and doesn't raise exceptions. Based on patch by Xiang Zhang. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 12:27:51 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Dec 2021 17:27:51 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1638898071.09.0.351396020287.issue46006@roundup.psfhosted.org> STINNER Victor added the comment: > Depending on how the stdlib abc.py file was loaded (in the main interpreter and in the subinterpreter), __code__.co_freevars[0] may or may not be an interned string. When the bug occurs, I see that the Python stdlib abc.py file is loaded twice: the main interpreter builds a code object, and then subinterpreter builds its own code object: same content, but different Python object (at different memory addresses so inequal pointers!). I modified reproducer.c to add "Py_VerboseFlag = 1;" before the Py_Initialize() call. Truncated output: --- ... # code object from /opt/py310/lib/python3.10/abc.py ... # code object from /opt/py310/lib/python3.10/abc.py Traceback (most recent call last): File "", line 1027, in _find_and_load ... RuntimeError: super(): __class__ cell not found ... --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 12:28:23 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Dec 2021 17:28:23 +0000 Subject: [issue39465] [subinterpreters] Design a subinterpreter friendly alternative to _Py_IDENTIFIER In-Reply-To: <1580135310.72.0.978238650594.issue39465@roundup.psfhosted.org> Message-ID: <1638898103.32.0.457510140302.issue39465@roundup.psfhosted.org> STINNER Victor added the comment: This change introduced a subtle regression: bpo-46006 "[subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 12:34:25 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Dec 2021 17:34:25 +0000 Subject: [issue46007] [C API] PyUnicode_CHECK_INTERNED() doesn't work in the limited C API Message-ID: <1638898465.89.0.178243976292.issue46007@roundup.psfhosted.org> New submission from STINNER Victor : The PyUnicode_CHECK_INTERNED() macro uses the PyASCIIObject structure which is *excluded* from the limited C API: /* Use only if you know it's a string */ #define PyUnicode_CHECK_INTERNED(op) \ (((PyASCIIObject *)(op))->state.interned) Using this macro in the limited C API doesn't work. I propose to remove it from the limited C API. IMO it's not a good idea to fix the function in the limited C API by converting it to a regular function hiding the implementation details and so working at the ABI level. We should not expose such "implementation detail" (if a string is "interned or not") in the *limited* C API. ---------- components: C API messages: 407955 nosy: vstinner priority: normal severity: normal status: open title: [C API] PyUnicode_CHECK_INTERNED() doesn't work in the limited C API versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 12:34:31 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Dec 2021 17:34:31 +0000 Subject: [issue46007] [C API] PyUnicode_CHECK_INTERNED() doesn't work in the limited C API In-Reply-To: <1638898465.89.0.178243976292.issue46007@roundup.psfhosted.org> Message-ID: <1638898471.88.0.237655533596.issue46007@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 12:35:35 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Dec 2021 17:35:35 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1638898535.15.0.367121333811.issue46006@roundup.psfhosted.org> STINNER Victor added the comment: There are around 27 _PyUnicode_EqualToASCIIId() calls in the Python code base. I don't think that avoiding _PyUnicode_EqualToASCIIId() is a good solution :-) Fixing _PyUnicode_EqualToASCIIId() to make it compatible with subinterpreters sound more reasonable: remove the PyUnicode_CHECK_INTERNED() test optimization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 12:36:56 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 17:36:56 +0000 Subject: [issue17780] the test suite should use a TEMPDIR in the build directory, not the source directory In-Reply-To: <1366223766.74.0.431919060709.issue17780@psf.upfronthosting.co.za> Message-ID: <1638898616.27.0.547178824675.issue17780@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> TEST_DATA_DIR for out-of-tree builds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 12:38:53 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 07 Dec 2021 17:38:53 +0000 Subject: [issue45999] Links to packaging broken In-Reply-To: <1638806103.81.0.408526409699.issue45999@roundup.psfhosted.org> Message-ID: <1638898733.1.0.378101464593.issue45999@roundup.psfhosted.org> Ned Deily added the comment: Perhaps I'm misunderstanding to which links you are referring but I am not seeing any broken links in that section at the moment. Could you retry and, if so, list exactly which links do not work for you? ---------- nosy: +ned.deily status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 12:44:35 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 07 Dec 2021 17:44:35 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638899075.86.0.785722578076.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28192 pull_request: https://github.com/python/cpython/pull/29967 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 12:47:35 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 17:47:35 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1638899255.2.0.06968040471.issue45711@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +28193 pull_request: https://github.com/python/cpython/pull/29968 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 12:49:31 2021 From: report at bugs.python.org (Berker Peksag) Date: Tue, 07 Dec 2021 17:49:31 +0000 Subject: [issue23469] Delete Misc/*.wpr files In-Reply-To: <1424048342.99.0.00819785192711.issue23469@psf.upfronthosting.co.za> Message-ID: <1638899371.52.0.931985529087.issue23469@roundup.psfhosted.org> Change by Berker Peksag : ---------- stage: resolved -> status: closed -> open versions: +Python 3.11 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 12:51:37 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 07 Dec 2021 17:51:37 +0000 Subject: [issue45986] 3.10.0 ships with older tcl/tk DLLs than 3.9.9 causing Windows Installer problems In-Reply-To: <1638706009.9.0.557448740254.issue45986@roundup.psfhosted.org> Message-ID: <1638899497.92.0.925456468711.issue45986@roundup.psfhosted.org> Change by Ned Deily : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 13:02:20 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 18:02:20 +0000 Subject: [issue27062] `inspect` doesn't have `__all__` In-Reply-To: <1463689783.23.0.292900715898.issue27062@psf.upfronthosting.co.za> Message-ID: <1638900140.63.0.951999533292.issue27062@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy type: behavior -> enhancement versions: +Python 3.11 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 13:02:31 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 Dec 2021 18:02:31 +0000 Subject: [issue22910] test_pydoc test_synopsis_sourceless is a flaky test In-Reply-To: <1416553421.91.0.74824945431.issue22910@psf.upfronthosting.co.za> Message-ID: <1638900151.08.0.478900813276.issue22910@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 13:04:24 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 18:04:24 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638900264.94.0.928407825157.issue45847@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: After PR29747, some buildbots are failing: https://buildbot.python.org/all/#/builders/58/builds/1217 for example: ``` 0:35:41 load avg: 3.70 Re-running failed tests in verbose mode 0:35:41 load avg: 3.70 Re-running test_code in verbose mode test_bad_index (test.test_code.CoExtra) ... ok test_free_called (test.test_code.CoExtra) ... Fatal Python error: Illegal instruction Current thread 0xb7bd4700 (most recent call first): File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_code.py", line 575 in test_free_called File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/case.py", line 547 in _callTestMethod File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/case.py", line 591 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/case.py", line 646 in __call__ File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/runner.py", line 197 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/test/support/__init__.py", line 1009 in _run_suite File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/test/support/__init__.py", line 1135 in run_unittest File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/test/libregrtest/runtest.py", line 273 in _test_module File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/test/libregrtest/runtest.py", line 309 in _runtest_inner2 File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/test/libregrtest/runtest.py", line 352 in _runtest_inner File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/test/libregrtest/runtest.py", line 227 in _runtest File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/test/libregrtest/runtest.py", line 257 in runtest File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/test/libregrtest/main.py", line 715 in _main File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/test/libregrtest/main.py", line 658 in main File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/test/libregrtest/main.py", line 736 in main File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/test/__main__.py", line 2 in File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/runpy.py", line 86 in _run_code File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/runpy.py", line 196 in _run_module_as_main ``` unfortunately, this is blocking the release of Python 3.11 :( ---------- nosy: +pablogsal priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 13:04:52 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 18:04:52 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638900292.11.0.93984858505.issue45847@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I may need to revert this commit to unblock the release if no one can take a look today ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 13:10:05 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 07 Dec 2021 18:10:05 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638900605.51.0.529928080876.issue45582@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 06c4ae8b1380eec1c5f3cd8faa21102d1c940bab by Christian Heimes in branch 'main': bpo-45582: Fix framework path and bootstrap build (GH-29954) https://github.com/python/cpython/commit/06c4ae8b1380eec1c5f3cd8faa21102d1c940bab ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 13:39:05 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 07 Dec 2021 18:39:05 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638902345.69.0.785094323689.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28194 pull_request: https://github.com/python/cpython/pull/29969 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 13:46:12 2021 From: report at bugs.python.org (nobody) Date: Tue, 07 Dec 2021 18:46:12 +0000 Subject: [issue46003] os.replace is not cross-platform: at least improve documentation In-Reply-To: <1638825605.8.0.77974659196.issue46003@roundup.psfhosted.org> Message-ID: <1638902772.0.0.267522977964.issue46003@roundup.psfhosted.org> nobody added the comment: Thank you for your replies. I have been reading more and conclude that I/O programming on Windows and Linux are two different things. Python is not cross-platform in the sense that a Python program always works on different operating systems but that you can make it work on different operating systems (most of the time). My application uses the PyPi package cachelib. The file system interface is implemented in this file: https://github.com/pallets/cachelib/blob/main/src/cachelib/file.py This package uses os.replace and other file I/O methods. >From what I understand is that this package must be modified to also handle WinError 5 and Errno 13 if you want to use it on Windows, meaning more specific exception handling and adding retries and a delay for every I/O related function accessing the os.replace file. Please correct me if I am wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 14:56:55 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 07 Dec 2021 19:56:55 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638907015.2.0.0180599932822.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 91b59a3fcdcb93d74bb89cce536f11d2990f655d by Christian Heimes in branch 'main': bpo-45847: Revert Port _ctypes partly to PY_STDLIB_MOD (GH-29747) (GH-29969) https://github.com/python/cpython/commit/91b59a3fcdcb93d74bb89cce536f11d2990f655d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 15:24:16 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 07 Dec 2021 20:24:16 +0000 Subject: [issue36850] shutil.copy2 fails with even with source network filesystem not supporting extended attributes In-Reply-To: <1557301411.76.0.646767757374.issue36850@roundup.psfhosted.org> Message-ID: <1638908656.23.0.692847278117.issue36850@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 15:24:26 2021 From: report at bugs.python.org (Eric Snow) Date: Tue, 07 Dec 2021 20:24:26 +0000 Subject: [issue46008] Prepare runtime/interp/thread state and init for upcoming changes. Message-ID: <1638908666.73.0.306470014114.issue46008@roundup.psfhosted.org> New submission from Eric Snow : There are a few things in `_PyRuntimeState`, `PyInterpreterState`, `PyThreadState`, and there initialization (Python/pystate.c & Python/pylifecycle.c) that would benefit from some minor cleanup. Normally I wouldn't bother (due to the cost of churn), but such cleanup would help with other changes I'm working on. The cleanup includes: * move thread related interpreter state to `PyInterpreterState.threads` * return void from `_PyEval_InitState()` * separate Py*State initialization from creation * distinguish between initialized-to-safe-state and ready-to-use * separate init for global types/objects into phases: object state vs. global objects vs. global types ---------- assignee: eric.snow components: Interpreter Core messages: 407963 nosy: eric.snow priority: normal severity: normal stage: needs patch status: open title: Prepare runtime/interp/thread state and init for upcoming changes. versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 15:29:33 2021 From: report at bugs.python.org (Eric Snow) Date: Tue, 07 Dec 2021 20:29:33 +0000 Subject: [issue46008] Prepare runtime/interp/thread state and init for upcoming changes. In-Reply-To: <1638908666.73.0.306470014114.issue46008@roundup.psfhosted.org> Message-ID: <1638908973.49.0.74629255789.issue46008@roundup.psfhosted.org> Change by Eric Snow : ---------- keywords: +patch pull_requests: +28195 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29970 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 15:29:37 2021 From: report at bugs.python.org (Eric Snow) Date: Tue, 07 Dec 2021 20:29:37 +0000 Subject: [issue46008] Prepare runtime/interp/thread state and init for upcoming changes. In-Reply-To: <1638908666.73.0.306470014114.issue46008@roundup.psfhosted.org> Message-ID: <1638908977.65.0.685810325481.issue46008@roundup.psfhosted.org> Change by Eric Snow : ---------- pull_requests: +28196 pull_request: https://github.com/python/cpython/pull/29971 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 15:47:38 2021 From: report at bugs.python.org (Eric Snow) Date: Tue, 07 Dec 2021 20:47:38 +0000 Subject: [issue46008] Prepare runtime/interp/thread state and init for upcoming changes. In-Reply-To: <1638908666.73.0.306470014114.issue46008@roundup.psfhosted.org> Message-ID: <1638910058.89.0.389944458906.issue46008@roundup.psfhosted.org> Change by Eric Snow : ---------- pull_requests: +28197 pull_request: https://github.com/python/cpython/pull/29972 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 15:49:03 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 20:49:03 +0000 Subject: [issue33411] All console message are in the error output in bash interpretor In-Reply-To: <1525271049.22.0.682650639539.issue33411@psf.upfronthosting.co.za> Message-ID: <1638910143.83.0.086791853259.issue33411@roundup.psfhosted.org> Irit Katriel added the comment: I think the question here is why this went to stderr rather than stdout: Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 15:55:49 2021 From: report at bugs.python.org (Jan Kaliszewski) Date: Tue, 07 Dec 2021 20:55:49 +0000 Subject: [issue20751] Harmonize descriptor protocol documentation: direct call, super binding with Descriptor Howto docs In-Reply-To: <1393193636.36.0.125202538555.issue20751@psf.upfronthosting.co.za> Message-ID: <1638910549.1.0.676419673361.issue20751@roundup.psfhosted.org> Jan Kaliszewski added the comment: So the current (after the aforementioned commit) form of the description is: A dotted lookup such as ``super(A, a).x`` searches ``obj.__class__.__mro__`` for a base class ``B`` following ``A`` and then returns ``B.__dict__['x'].__get__(a, A)``. If not a descriptor, ``x`` is returned unchanged. I guess here ``obj`` was supposed to be ``a``. But is the description correct when it comes to what class is used where? I.e., shouldn't it be rather something along the lines of the following: A dotted lookup such as ``super(A, obj).x`` (where ``obj`` is an instance of ``A`` of some other subclass of ``A``) searches ``A.__mro__`` for a base class ``B`` whose `__dict__` contains name ``"x"`` and then returns ``B.__dict__['x'].__get__(obj, type(obj))``. If ``B.__dict__['x']`` is not a descriptor, it is returned unchanged. *** Ad my comment #2 -- yes, it became groundless with time... Minor explanation: when I reported this issue in 2015, the signature of `object.__get__` was documented just as "__get__(self, instance, owner)" (see: https://docs.python.org/3.5/reference/datamodel.html#implementing-descriptors); that's why I wrote about an inconsistency. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 16:00:39 2021 From: report at bugs.python.org (Eric Snow) Date: Tue, 07 Dec 2021 21:00:39 +0000 Subject: [issue46008] Prepare runtime/interp/thread state and init for upcoming changes. In-Reply-To: <1638908666.73.0.306470014114.issue46008@roundup.psfhosted.org> Message-ID: <1638910839.02.0.967633539129.issue46008@roundup.psfhosted.org> Change by Eric Snow : ---------- pull_requests: +28198 pull_request: https://github.com/python/cpython/pull/29973 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 16:01:55 2021 From: report at bugs.python.org (Jan Kaliszewski) Date: Tue, 07 Dec 2021 21:01:55 +0000 Subject: [issue20751] Harmonize descriptor protocol documentation: direct call, super binding with Descriptor Howto docs In-Reply-To: <1393193636.36.0.125202538555.issue20751@psf.upfronthosting.co.za> Message-ID: <1638910915.38.0.0704495349639.issue20751@roundup.psfhosted.org> Jan Kaliszewski added the comment: Sorry, a few mistakes distorted my proposal. It should be: A dotted lookup such as ``super(A, obj).x`` (where ``obj`` is an instance of ``A`` or of a subclass of ``A``) searches ``A.__mro__`` for a base class whose `__dict__` contains name ``"x"``, and then returns ``B.__dict__['x'].__get__(obj, type(obj))`` (where ``B`` is that base class). If ``B.__dict__['x']`` is not a descriptor, it is returned unchanged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 16:02:35 2021 From: report at bugs.python.org (Eric Snow) Date: Tue, 07 Dec 2021 21:02:35 +0000 Subject: [issue46008] Prepare runtime/interp/thread state and init for upcoming changes. In-Reply-To: <1638908666.73.0.306470014114.issue46008@roundup.psfhosted.org> Message-ID: <1638910955.36.0.365885224231.issue46008@roundup.psfhosted.org> Eric Snow added the comment: New changeset 8262c96bcc1841188866c1b022d9087e89639d98 by Eric Snow in branch 'main': bpo-46008: Return void from _PyEval_InitState(). (gh-29970) https://github.com/python/cpython/commit/8262c96bcc1841188866c1b022d9087e89639d98 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 16:02:46 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 21:02:46 +0000 Subject: [issue17975] altinstall should not install libpython3.so (conflict between multiple $VERSIONs) In-Reply-To: <1368542639.2.0.817126483539.issue17975@psf.upfronthosting.co.za> Message-ID: <1638910966.75.0.333606153133.issue17975@roundup.psfhosted.org> Irit Katriel added the comment: The discussion here seems to have been abandoned 7 years ago after Martin asked Patrick to clarify the issue. I will close this soon if nobody will explain what is left to be done. ---------- nosy: +iritkatriel resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 16:03:58 2021 From: report at bugs.python.org (Eric Snow) Date: Tue, 07 Dec 2021 21:03:58 +0000 Subject: [issue46008] Prepare runtime/interp/thread state and init for upcoming changes. In-Reply-To: <1638908666.73.0.306470014114.issue46008@roundup.psfhosted.org> Message-ID: <1638911038.99.0.013019790309.issue46008@roundup.psfhosted.org> Eric Snow added the comment: New changeset 313f92a57bc3887026ec16adb536bb2b7580ce47 by Eric Snow in branch 'main': bpo-46008: Move thread-related interpreter state into a sub-struct. (gh-29971) https://github.com/python/cpython/commit/313f92a57bc3887026ec16adb536bb2b7580ce47 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 16:10:56 2021 From: report at bugs.python.org (Jan Kaliszewski) Date: Tue, 07 Dec 2021 21:10:56 +0000 Subject: [issue20751] Harmonize descriptor protocol documentation: direct call, super binding with Descriptor Howto docs In-Reply-To: <1393193636.36.0.125202538555.issue20751@psf.upfronthosting.co.za> Message-ID: <1638911456.51.0.784585467628.issue20751@roundup.psfhosted.org> Jan Kaliszewski added the comment: I am very sorry, I just noticed another mistake. It should be: A dotted lookup such as ``super(A, obj).x`` (where ``obj`` is an instance of ``A`` or of a subclass of ``A``) searches ``type(obj).__mro__`` for such a base class ``B`` that follows ``A`` and whose :attr:`__dict__` contains the name ``"x"``; then ``B.__dict__['x'].__get__(obj, type(obj))`` is returned. If not a descriptor, ``B.__dict__['x']`` is returned unchanged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 16:18:14 2021 From: report at bugs.python.org (Val Shkolnikov) Date: Tue, 07 Dec 2021 21:18:14 +0000 Subject: [issue43098] tarfile list() method does not show file type In-Reply-To: <1612240547.16.0.611621491067.issue43098@roundup.psfhosted.org> Message-ID: <1638911894.35.0.96385374982.issue43098@roundup.psfhosted.org> Val Shkolnikov added the comment: > contributions are only now accepted in form of github PRs Done ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 16:38:01 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 07 Dec 2021 21:38:01 +0000 Subject: [issue46008] Prepare runtime/interp/thread state and init for upcoming changes. In-Reply-To: <1638908666.73.0.306470014114.issue46008@roundup.psfhosted.org> Message-ID: <1638913081.67.0.94656689206.issue46008@roundup.psfhosted.org> miss-islington added the comment: New changeset 9b577cd01f66512b503115c0fdbf0734edfd5f8a by Eric Snow in branch 'main': bpo-46008: Use PyMem_RawCalloc() to allocate PyThreadState. (GH-29972) https://github.com/python/cpython/commit/9b577cd01f66512b503115c0fdbf0734edfd5f8a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 16:42:45 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Dec 2021 21:42:45 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638913365.11.0.112795816106.issue45582@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 16:48:16 2021 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 07 Dec 2021 21:48:16 +0000 Subject: [issue45995] string formatting: normalize negative zero In-Reply-To: <1638792226.95.0.292604366656.issue45995@roundup.psfhosted.org> Message-ID: <1638913696.88.0.201725595785.issue45995@roundup.psfhosted.org> Eric V. Smith added the comment: PyOS_double_to_string is part of the stable ABI. I don't recall if we're allowed to add new bitfield flags to a stable ABI function. We'd use a new Py_DTSF_NORMALIZE_NEGATIVE_0 flag for this feature. I suspect we can't add a flag, due to comparability reasons (new code setting the flag being used in old versions of python without it), but we'd need to research. I saw a similar discussion within the last few years, but of course now I can't find it. Maybe old versions would correctly ignore the new bit being set. This proposal becomes less interesting if we'd need to add a new function to support it. Although I guess we could do something that's internal-only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 16:50:34 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 21:50:34 +0000 Subject: [issue40222] "Zero cost" exception handling In-Reply-To: <1586338863.3.0.393749013734.issue40222@roundup.psfhosted.org> Message-ID: <1638913834.79.0.769200324433.issue40222@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +iritkatriel, iritkatriel nosy_count: 16.0 -> 17.0 pull_requests: +28199, 28200 pull_request: https://github.com/python/cpython/pull/29975 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 16:50:29 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 21:50:29 +0000 Subject: [issue40222] "Zero cost" exception handling In-Reply-To: <1586338863.3.0.393749013734.issue40222@roundup.psfhosted.org> Message-ID: <1638913829.64.0.736620540557.issue40222@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +iritkatriel nosy_count: 16.0 -> 17.0 pull_requests: +28199 pull_request: https://github.com/python/cpython/pull/29975 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 16:51:42 2021 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 07 Dec 2021 21:51:42 +0000 Subject: [issue46003] os.replace is not cross-platform: at least improve documentation In-Reply-To: <1638825605.8.0.77974659196.issue46003@roundup.psfhosted.org> Message-ID: <1638913902.9.0.700381526584.issue46003@roundup.psfhosted.org> Eric V. Smith added the comment: As they say, there's no such thing as "portable software", only "software that has been ported". Especially in an area like file I/O: once you move beyond simple "one process opens, writes, and closes; and another process then opens, reads, and closes", there are a lot of platform-specific issues. Python does not try to abstract away all possible file I/O issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 16:53:29 2021 From: report at bugs.python.org (Stanislav Syekirin) Date: Tue, 07 Dec 2021 21:53:29 +0000 Subject: [issue46009] sending non-None values makes generator raise StopIteration on next access Message-ID: <1638914009.53.0.916939757704.issue46009@roundup.psfhosted.org> New submission from Stanislav Syekirin : Tested with Python 3.10.1 on Linux and Python 3.10.0 on Windows. The following code prints None in 3.9 and raises StopIteration without any additional information in 3.10: def f(): yield x = f() try: x.send(0) except TypeError as e: print(e) # can't send non-None value to a just-started generator print(next(x)) ---------- messages: 407975 nosy: Zabolekar priority: normal severity: normal status: open title: sending non-None values makes generator raise StopIteration on next access type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 17:09:40 2021 From: report at bugs.python.org (David Halter) Date: Tue, 07 Dec 2021 22:09:40 +0000 Subject: [issue31184] Fix data descriptor detection in inspect.getattr_static In-Reply-To: <1502468531.27.0.204472955702.issue31184@psf.upfronthosting.co.za> Message-ID: <1638914980.91.0.237466883149.issue31184@roundup.psfhosted.org> David Halter added the comment: This is not a duplicate. It is related to https://bugs.python.org/issue26103, because __get__ is not required anymore for an object to be a data descriptor. The current code on master (of inspect.getattr_static) still thinks a descriptor has both __get__ and __set__ set. Since issue #26103 has been fixed, it's now clear that my patch is slightly wrong, but I'm happy to fix that if someone is actually going to review it. ---------- resolution: duplicate -> status: closed -> open versions: +Python 3.10, Python 3.11, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 17:17:00 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 07 Dec 2021 22:17:00 +0000 Subject: [issue1653457] Python misbehaves when installed in / (patch attached) Message-ID: <1638915420.92.0.372145270649.issue1653457@roundup.psfhosted.org> Irit Katriel added the comment: getpath.c has been rewritten (see Issue45582). reduce is no longer there. ---------- nosy: +iritkatriel resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 17:26:42 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 07 Dec 2021 22:26:42 +0000 Subject: [issue33411] All console message are in the error output in bash interpretor In-Reply-To: <1525271049.22.0.682650639539.issue33411@psf.upfronthosting.co.za> Message-ID: <1638916002.01.0.0853059424045.issue33411@roundup.psfhosted.org> Eryk Sun added the comment: PyOS_Readline() calls PyOS_StdioReadline() if sys_stdin or sys_stdout isn't a tty file. This function always writes the prompt to stderr, as follows: if (prompt) { fprintf(stderr, "%s", prompt); } fflush(stderr); Maybe this matched the behavior of the readline module and/or GNU Readline in the past. It's definitely *not* the case in Linux with Python 2.x or 3.x with readline linked to "libreadline.so.8". In this case, the prompt gets written to stdout. For example: $ python -q 2>err.txt >>> import a >>> $ $ cat err.txt Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'a' In Windows, OTOH, the readline module isn't available in the standard library, in which case PyOS_StdioReadline() is called. For the io._WindowsConsoleIO update in 3.6, this function was modified to use ReadConsoleW() and WriteConsoleW() instead of my_fgets(). But I think modifying PyOS_StdioReadline() was a mistake. The changes should have been implemented as a new hook for PyOS_ReadlineFunctionPointer. This should have used stdout for the prompt instead of stderr, normalizing the behavior with interactive readline on other platforms. Whether or not stderr is redirected to a file or pipe should make no difference on the behavior. ---------- nosy: +eryksun versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 17:36:16 2021 From: report at bugs.python.org (Chris Webb) Date: Tue, 07 Dec 2021 22:36:16 +0000 Subject: [issue1653457] Python misbehaves when installed in / (patch attached) In-Reply-To: <1638915420.92.0.372145270649.issue1653457@roundup.psfhosted.org> Message-ID: <6CDD6671-AEB7-49D0-A990-732E7BBD07BB@arachsys.com> Chris Webb added the comment: Irit Katriel added the comment: > getpath.c has been rewritten (see Issue45582). reduce is no longer there. Gosh, this is one I originally reported back in the late 1990s and then again mid-2000s! I've carried a patch in my distribution to make python work in /bin and /lib/python for over 25 years - it'll feel like end of an era to finally be able to drop that local patch. Thanks! (Presumably this will land in Python 11 rather than get backported?) Best wishes, Chris. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 17:44:55 2021 From: report at bugs.python.org (Francisco Orozco) Date: Tue, 07 Dec 2021 22:44:55 +0000 Subject: [issue46010] Cookie cutter templates to allow variable fields and data transfer proposal before system merge Message-ID: <1638917095.16.0.187106370804.issue46010@roundup.psfhosted.org> New submission from Francisco Orozco : Not featuring templates to allow variable fields and data record creation when converting projects to new platform projects for purpose to confirm, verify record creation, might be helpful, in addition of only viewing/editing project development and structure. For purpose of data analysis, future data merging, data financial reservations or data eligibility or feasibility or recalls. ---------- components: Build messages: 407980 nosy: Francisco priority: normal severity: normal status: open title: Cookie cutter templates to allow variable fields and data transfer proposal before system merge type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 18:03:29 2021 From: report at bugs.python.org (Caleb Donovick) Date: Tue, 07 Dec 2021 23:03:29 +0000 Subject: [issue29944] Argumentless super() fails in classes constructed with type() In-Reply-To: <1490855809.89.0.267666010996.issue29944@psf.upfronthosting.co.za> Message-ID: <1638918209.17.0.3002646647.issue29944@roundup.psfhosted.org> Change by Caleb Donovick : ---------- nosy: +donovick _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 18:05:24 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 07 Dec 2021 23:05:24 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638918324.89.0.801032815948.issue45847@roundup.psfhosted.org> Erlend E. Aasland added the comment: Quoting msg407949: > [...] We should do something like > > ZLIB_CFLAGS=${ZLIB_CFLAGS:-""} > ZLIB_LIBS=${ZLIB_LIBS:-"-lz"} > > for all env vars. I think we should use ${VAR-default} instead of ${VAR:-default}; we only want to override if the variable is _not_ set: $ TEST= $ echo ${TEST-default} $ echo ${TEST:-default} default $ unset TEST $ echo ${TEST-default} default $ echo ${TEST:-default} default > I prefer the syntax over ${ZLIB_CFLAGS:=""} because it is more obvious what > is happening. I agree. I also prefer `TEST=${TEST-""}` to `TEST=${TEST-}` for empty strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 18:22:54 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 23:22:54 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638919374.17.0.290524223601.issue45847@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- priority: release blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 18:23:10 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 23:23:10 +0000 Subject: [issue45963] Embed interpreter frame in generator. In-Reply-To: <1638448060.39.0.766103367856.issue45963@roundup.psfhosted.org> Message-ID: <1638919390.78.0.165384837545.issue45963@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- priority: release blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 18:23:17 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 23:23:17 +0000 Subject: [issue45963] Embed interpreter frame in generator. In-Reply-To: <1638448060.39.0.766103367856.issue45963@roundup.psfhosted.org> Message-ID: <1638919397.83.0.875095052352.issue45963@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 18:23:25 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 23:23:25 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 In-Reply-To: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> Message-ID: <1638919405.93.0.453569535168.issue45813@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 18:24:34 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 23:24:34 +0000 Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1 In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org> Message-ID: <1638919474.46.0.773161362328.issue45618@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 18:25:23 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 23:25:23 +0000 Subject: [issue43137] webbrowser to support "gio open " In-Reply-To: <1612527994.14.0.364284995735.issue43137@roundup.psfhosted.org> Message-ID: <1638919523.79.0.571391986073.issue43137@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Christian, this is going into 3.11.0a3 unfortunately. I will make this a blocker for future alphas, so please, take any action that you think is required. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 18:26:09 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 23:26:09 +0000 Subject: [issue43683] Handle generator (and coroutine) state in the bytecode. In-Reply-To: <1617209103.34.0.926095267338.issue43683@roundup.psfhosted.org> Message-ID: <1638919569.99.0.713543155914.issue43683@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Mark, is something left in this issue? ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 18:26:56 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 23:26:56 +0000 Subject: [issue45415] Assert oparg < INSTR_OFFSET() In-Reply-To: <1633721594.06.0.212064470222.issue45415@roundup.psfhosted.org> Message-ID: <1638919616.22.0.931146384683.issue45415@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Ping. This issue is marked as release blocker, is something left here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 18:32:58 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 07 Dec 2021 23:32:58 +0000 Subject: [issue31184] Fix data descriptor detection in inspect.getattr_static In-Reply-To: <1502468531.27.0.204472955702.issue31184@psf.upfronthosting.co.za> Message-ID: <1638919978.51.0.103034919629.issue31184@roundup.psfhosted.org> Raymond Hettinger added the comment: Can you give an example of where getattr_static() is not doing what you expect? ---------- assignee: -> rhettinger components: +Library (Lib) nosy: +rhettinger type: -> behavior versions: -Python 3.10, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 18:33:56 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 07 Dec 2021 23:33:56 +0000 Subject: [issue45415] Assert oparg < INSTR_OFFSET() In-Reply-To: <1633721594.06.0.212064470222.issue45415@roundup.psfhosted.org> Message-ID: <1638920036.63.0.189913233225.issue45415@roundup.psfhosted.org> Steve Dower added the comment: Yes, it's been fixed. The debate about whether to test in CI with C assertions enabled or not can continue somewhere else. ---------- resolution: -> fixed stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 18:43:39 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Tue, 07 Dec 2021 23:43:39 +0000 Subject: [issue43683] Handle generator (and coroutine) state in the bytecode. In-Reply-To: <1617209103.34.0.926095267338.issue43683@roundup.psfhosted.org> Message-ID: <1638920619.23.0.950608863057.issue43683@roundup.psfhosted.org> Dennis Sweeney added the comment: bpo-46009 about the same behavior change ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 18:44:29 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 23:44:29 +0000 Subject: [issue46009] sending non-None values makes generator raise StopIteration on next access In-Reply-To: <1638914009.53.0.916939757704.issue46009@roundup.psfhosted.org> Message-ID: <1638920669.21.0.361313188999.issue46009@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 18:45:13 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 23:45:13 +0000 Subject: [issue46009] sending non-None values makes generator raise StopIteration on next access In-Reply-To: <1638914009.53.0.916939757704.issue46009@roundup.psfhosted.org> Message-ID: <1638920713.64.0.301674705348.issue46009@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 18:48:41 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Dec 2021 23:48:41 +0000 Subject: [issue43683] Handle generator (and coroutine) state in the bytecode. In-Reply-To: <1617209103.34.0.926095267338.issue43683@roundup.psfhosted.org> Message-ID: <1638920921.91.0.410364405857.issue43683@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Unfortunately, this has not been fixed into 3.10.1 and 3.11.0a3 as this hasn't version information and therefore has missed our automatic checks for blockers. I have marked https://bugs.python.org/issue46009? as release blocker, as well as this issue and I have marked the versions. Please, ensure this is fixed ASAP so it doesn't go into the next bugfix release or alpha release. ---------- versions: +Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 19:20:01 2021 From: report at bugs.python.org (Louis Sautier) Date: Wed, 08 Dec 2021 00:20:01 +0000 Subject: [issue34434] Removal of kwargs for built-in types not covered with "changed in Python" note in documentation In-Reply-To: <1534685830.81.0.56676864532.issue34434@psf.upfronthosting.co.za> Message-ID: <1638922801.25.0.428781441788.issue34434@roundup.psfhosted.org> Change by Louis Sautier : ---------- nosy: +sbraz nosy_count: 7.0 -> 8.0 pull_requests: +28201 pull_request: https://github.com/python/cpython/pull/29976 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 19:20:40 2021 From: report at bugs.python.org (Louis Sautier) Date: Wed, 08 Dec 2021 00:20:40 +0000 Subject: [issue42114] Documentation of ctypes.CDLL does not correspond to code In-Reply-To: <1603317735.12.0.0166150677555.issue42114@roundup.psfhosted.org> Message-ID: <1638922840.26.0.653690234336.issue42114@roundup.psfhosted.org> Change by Louis Sautier : ---------- keywords: +patch nosy: +sbraz nosy_count: 1.0 -> 2.0 pull_requests: +28202 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29976 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 19:26:39 2021 From: report at bugs.python.org (Eric Snow) Date: Wed, 08 Dec 2021 00:26:39 +0000 Subject: [issue46008] Prepare runtime/interp/thread state and init for upcoming changes. In-Reply-To: <1638908666.73.0.306470014114.issue46008@roundup.psfhosted.org> Message-ID: <1638923199.23.0.963823002345.issue46008@roundup.psfhosted.org> Eric Snow added the comment: New changeset 1f384e318481532323bb9076f4447bc02da07209 by Eric Snow in branch 'main': bpo-46008: Stop calling _PyThreadState_Init() in new_threadstate(). (gh-29973) https://github.com/python/cpython/commit/1f384e318481532323bb9076f4447bc02da07209 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 19:36:15 2021 From: report at bugs.python.org (Eric Snow) Date: Wed, 08 Dec 2021 00:36:15 +0000 Subject: [issue46008] Prepare runtime/interp/thread state and init for upcoming changes. In-Reply-To: <1638908666.73.0.306470014114.issue46008@roundup.psfhosted.org> Message-ID: <1638923775.84.0.894977637484.issue46008@roundup.psfhosted.org> Change by Eric Snow : ---------- pull_requests: +28203 pull_request: https://github.com/python/cpython/pull/29977 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 20:14:46 2021 From: report at bugs.python.org (Eric Snow) Date: Wed, 08 Dec 2021 01:14:46 +0000 Subject: [issue46008] Prepare runtime/interp/thread state and init for upcoming changes. In-Reply-To: <1638908666.73.0.306470014114.issue46008@roundup.psfhosted.org> Message-ID: <1638926086.41.0.927730815173.issue46008@roundup.psfhosted.org> Change by Eric Snow : ---------- pull_requests: +28204 pull_request: https://github.com/python/cpython/pull/29978 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 20:38:10 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 08 Dec 2021 01:38:10 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638927490.24.0.386338534962.issue45582@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +28205 pull_request: https://github.com/python/cpython/pull/29979 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 20:49:49 2021 From: report at bugs.python.org (Brett Cannon) Date: Wed, 08 Dec 2021 01:49:49 +0000 Subject: [issue21762] update the import machinery to only use __spec__ In-Reply-To: <1402781631.86.0.838758150876.issue21762@psf.upfronthosting.co.za> Message-ID: <1638928189.91.0.367370160961.issue21762@roundup.psfhosted.org> Change by Brett Cannon : ---------- assignee: -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 20:51:58 2021 From: report at bugs.python.org (John Belmonte) Date: Wed, 08 Dec 2021 01:51:58 +0000 Subject: [issue45995] string formatting: normalize negative zero In-Reply-To: <1638792226.95.0.292604366656.issue45995@roundup.psfhosted.org> Message-ID: <1638928318.97.0.611568298172.issue45995@roundup.psfhosted.org> John Belmonte added the comment: I'll share a draft PR soon (excluding Decimal), so far it's still looking straightforward. > Maybe old versions would correctly ignore the new bit being set. That's one of the benefits of using bit flags in an ABI: backward-compatible extensibility. (An implementation can defeat it by intentionally failing if unknown bits are encountered, but the code in question doesn't appear to be doing this.) > You can round explicitly before formatting > > >>> '%5.1f' % (round(-.00001, 1) + 0.0) Yes, I have experience with it. 1. even as a one-off, it's questionable. If someone accidentally changes the precision in only one of the spec string or round call, that's a bug. 2. since applications and libraries may pass around format specs, and because of (1), you'll try to make a programmatic solution. Now you're parsing format spec strings. 3. while a programmatic solution can be done for a function API like format() that takes a separate spec and value, there is no sane way to wrap f-strings ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 20:56:14 2021 From: report at bugs.python.org (Eric Snow) Date: Wed, 08 Dec 2021 01:56:14 +0000 Subject: [issue46008] Prepare runtime/interp/thread state and init for upcoming changes. In-Reply-To: <1638908666.73.0.306470014114.issue46008@roundup.psfhosted.org> Message-ID: <1638928574.53.0.487002705583.issue46008@roundup.psfhosted.org> Eric Snow added the comment: New changeset 758b74e71eb22e1e83a9eb937d1c015e461745a1 by Eric Snow in branch 'main': bpo-46008: Add _PyInterpreterState_Main(). (gh-29978) https://github.com/python/cpython/commit/758b74e71eb22e1e83a9eb937d1c015e461745a1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 20:59:55 2021 From: report at bugs.python.org (Eric Snow) Date: Wed, 08 Dec 2021 01:59:55 +0000 Subject: [issue46008] Prepare runtime/interp/thread state and init for upcoming changes. In-Reply-To: <1638908666.73.0.306470014114.issue46008@roundup.psfhosted.org> Message-ID: <1638928795.69.0.562188157146.issue46008@roundup.psfhosted.org> Eric Snow added the comment: New changeset 32a67246b0d1e08cd50fc3bfa58052cfeb515b2e by Eric Snow in branch 'main': bpo-46008: Move Py*State init into distinct functions. (gh-29977) https://github.com/python/cpython/commit/32a67246b0d1e08cd50fc3bfa58052cfeb515b2e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 21:01:39 2021 From: report at bugs.python.org (Eric Snow) Date: Wed, 08 Dec 2021 02:01:39 +0000 Subject: [issue46008] Prepare runtime/interp/thread state and init for upcoming changes. In-Reply-To: <1638908666.73.0.306470014114.issue46008@roundup.psfhosted.org> Message-ID: <1638928899.56.0.823044440262.issue46008@roundup.psfhosted.org> Eric Snow added the comment: At this point all the changes I was considering have been made, except for splitting type/object init into logical phases. That may or may not happen. Regardless, it can be done in a new issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 21:18:30 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 08 Dec 2021 02:18:30 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638929910.93.0.209209846401.issue45582@roundup.psfhosted.org> Steve Dower added the comment: New changeset b0b30862796e97b3f0ee358bcc61d21f0cc98441 by Steve Dower in branch 'main': bpo-45582: Write empty pybuilddir.txt on Windows to allow relocatable build directories (GH-29979) https://github.com/python/cpython/commit/b0b30862796e97b3f0ee358bcc61d21f0cc98441 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 22:18:11 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 08 Dec 2021 03:18:11 +0000 Subject: [issue20751] Harmonize descriptor protocol documentation: direct call, super binding with Descriptor Howto docs In-Reply-To: <1393193636.36.0.125202538555.issue20751@psf.upfronthosting.co.za> Message-ID: <1638933491.9.0.0842112487414.issue20751@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +28206 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/29980 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 22:38:39 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 08 Dec 2021 03:38:39 +0000 Subject: [issue20751] Harmonize descriptor protocol documentation: direct call, super binding with Descriptor Howto docs In-Reply-To: <1393193636.36.0.125202538555.issue20751@psf.upfronthosting.co.za> Message-ID: <1638934719.18.0.698580470997.issue20751@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 4ccccb1cfc1f30327e76a2d845cc274be56b34b1 by Raymond Hettinger in branch 'main': bpo-20751: Match variable name to the example. (GH-29980) https://github.com/python/cpython/commit/4ccccb1cfc1f30327e76a2d845cc274be56b34b1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 22:44:47 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 08 Dec 2021 03:44:47 +0000 Subject: [issue20751] Harmonize descriptor protocol documentation: direct call, super binding with Descriptor Howto docs In-Reply-To: <1393193636.36.0.125202538555.issue20751@psf.upfronthosting.co.za> Message-ID: <1638935086.99.0.932311982682.issue20751@roundup.psfhosted.org> Raymond Hettinger added the comment: > I guess here ``obj`` was supposed to be ``a``. Okay, I updated the variable name to match the rest of the example. > But is the description correct when it comes to what class is used where? It looks fine to me. It is harmonious with the other three entries in the section and every part of the wording is verified in the test code. > It should be: Sorry, I disagree with the wordsmithing. IMO, the additional proposed wording mostly makes it harder to read. Also, this section is already a bit long. The details on super() are in the main docs for super(). Here we just want to show that super() is one of the four ways to invoke a descriptor. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 23:22:58 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 08 Dec 2021 04:22:58 +0000 Subject: [issue31184] Fix data descriptor detection in inspect.getattr_static In-Reply-To: <1502468531.27.0.204472955702.issue31184@psf.upfronthosting.co.za> Message-ID: <1638937378.24.0.76727335667.issue31184@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 7 23:32:57 2021 From: report at bugs.python.org (Mark Sapiro) Date: Wed, 08 Dec 2021 04:32:57 +0000 Subject: [issue46011] Python 3.10 email returns invalid Date: header unchanged. Message-ID: <1638937977.72.0.569168452456.issue46011@roundup.psfhosted.org> New submission from Mark Sapiro : Here is an interactive Python session ``` Python 3.10.1 (main, Dec 7 2021, 15:44:39) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from email import message_from_bytes, policy >>> msg_raw = b"""Return-Path: ... Delivered-To: mailman-users at dinsdale.python.org ... From: user at example.com ... Message-Id: ... Date: Tue, 30 Nov 1999 23:56:33 -3000 (CST) ... To: mailman-users at python.org ... ... msg1 ... """ >>> message = message_from_bytes(msg_raw, policy=policy.default) >>> message.get('date') 'Tue, 30 Nov 1999 23:56:33 -3000 (CST)' >>> message.defects [] >>> ``` The same session in Python 3.9 throws ValueError: offset must be a timedelta strictly between -timedelta(hours=24) and timedelta(hours=24), not datetime.timedelta(days=-2, seconds=64800). At first I thought this was related to https://bugs.python.org/issue30681 but that seems to not be the case as utils.parsedate_to_datetime('Tue, 30 Nov 1999 23:56:33 -3000 (CST)') throws the same exception In Python 3.10.1. I think getting the Date: header which has an invalid timezone should either throw the exception as before or return None, but not return the invalid date header. ---------- components: email keywords: 3.10regression messages: 407997 nosy: barry, msapiro, r.david.murray priority: normal severity: normal status: open title: Python 3.10 email returns invalid Date: header unchanged. versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 00:25:28 2021 From: report at bugs.python.org (Zernoxi) Date: Wed, 08 Dec 2021 05:25:28 +0000 Subject: [issue46002] py Launcher for Windows with MSYS2 In-Reply-To: <1638809787.4.0.667501971988.issue46002@roundup.psfhosted.org> Message-ID: <1638941128.8.0.857012787141.issue46002@roundup.psfhosted.org> Zernoxi added the comment: Is there a way to not parse certain paths in the PATH environment variable for the shebang: "#!/usr/bin/env python". I get that it is trying to mimic Unix "env" function but is it not conflicting if there is a python install but it is not registered in registry? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 01:31:44 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 08 Dec 2021 06:31:44 +0000 Subject: [issue46002] py Launcher for Windows with MSYS2 In-Reply-To: <1638809787.4.0.667501971988.issue46002@roundup.psfhosted.org> Message-ID: <1638945104.29.0.169412364138.issue46002@roundup.psfhosted.org> Eryk Sun added the comment: You can use "#!python", or "#!/usr/bin/python", or "#!/usr/local/bin/python". They're all equivalent, and they do not search PATH. Since no wanted version is specified, the launcher will look for a version to run in the following order: an active virtual environment, a configured PY_PYTHON version, the highest registered version of 2.x, and the highest registered version of 3.x. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 01:52:00 2021 From: report at bugs.python.org (David Shiko) Date: Wed, 08 Dec 2021 06:52:00 +0000 Subject: [issue46012] unittest AsyncConnection not described Message-ID: <1638946320.75.0.503190940676.issue46012@roundup.psfhosted.org> New submission from David Shiko : AsyncConnection mentioned only one at this docs but not imported or presented somehow else. https://docs.python.org/3/library/unittest.html. ---------- components: Tests messages: 408000 nosy: dsb321mp priority: normal severity: normal status: open title: unittest AsyncConnection not described versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 03:01:17 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Dec 2021 08:01:17 +0000 Subject: [issue46012] unittest AsyncConnection not described In-Reply-To: <1638946320.75.0.503190940676.issue46012@roundup.psfhosted.org> Message-ID: <1638950477.32.0.0637217104695.issue46012@roundup.psfhosted.org> Serhiy Storchaka added the comment: There is no AsyncConnection in unittest nor anywhere in the stdlib. It is just an example illustrating the order of calling setup and teardown methods and cleanup callbacks. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 04:02:42 2021 From: report at bugs.python.org (Inada Naoki) Date: Wed, 08 Dec 2021 09:02:42 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1638954162.88.0.0470165477283.issue46006@roundup.psfhosted.org> Inada Naoki added the comment: Should `_PyUnicode_EqualToASCIIId()` support comparing two unicode from different interpreter?? ---------- nosy: +methane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 04:08:26 2021 From: report at bugs.python.org (nobody) Date: Wed, 08 Dec 2021 09:08:26 +0000 Subject: [issue46003] os.replace is not cross-platform: at least improve documentation In-Reply-To: <1638825605.8.0.77974659196.issue46003@roundup.psfhosted.org> Message-ID: <1638954506.1.0.5578008357.issue46003@roundup.psfhosted.org> nobody added the comment: Thank you again, closing this issue. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 04:41:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 09:41:45 +0000 Subject: [issue40222] "Zero cost" exception handling In-Reply-To: <1586338863.3.0.393749013734.issue40222@roundup.psfhosted.org> Message-ID: <1638956505.37.0.855965863762.issue40222@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 7989e9dff68fd681657aa9f93ac6e8fa12c534e4 by Irit Katriel in branch 'main': bpo-40222: update doc entry with respect to the change in WITH_EXCEPT_START (GH-29975) https://github.com/python/cpython/commit/7989e9dff68fd681657aa9f93ac6e8fa12c534e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 04:44:53 2021 From: report at bugs.python.org (Vito De Tullio) Date: Wed, 08 Dec 2021 09:44:53 +0000 Subject: [issue45929] extend json.tool --json-lines to ignore empty rows In-Reply-To: <1638200958.63.0.173460715414.issue45929@roundup.psfhosted.org> Message-ID: <1638956693.62.0.833450393481.issue45929@roundup.psfhosted.org> Vito De Tullio added the comment: My final goal is to preserve the empty lines - I think I can do some bash magic, but maybe something more complex that a simple sed call. FWIW on https://jsonlines.org/#line-separator-is-n I see "The last character in the file may be a line separator, and it will be treated the same as if there was no line separator present.". And on https://github.com/ndjson/ndjson-spec#32-parsing I see "The parser MAY silently ignore empty lines, e.g. \n\n. This behavior MUST be documented and SHOULD be configurable by the user of the parser.". While I get this choice can be "on a grey area", I think this is a known "dialect" of the jsonl specs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 04:46:58 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 08 Dec 2021 09:46:58 +0000 Subject: [issue46003] os.replace is not cross-platform: at least improve documentation In-Reply-To: <1638825605.8.0.77974659196.issue46003@roundup.psfhosted.org> Message-ID: <1638956818.41.0.54437289429.issue46003@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 04:51:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 09:51:45 +0000 Subject: [issue45635] Tidy up error handling in traceback.c / python run.c In-Reply-To: <1635370026.46.0.0220648873339.issue45635@roundup.psfhosted.org> Message-ID: <1638957105.96.0.212388258484.issue45635@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +28207 pull_request: https://github.com/python/cpython/pull/29981 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 04:54:22 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 08 Dec 2021 09:54:22 +0000 Subject: [issue45929] extend json.tool --json-lines to ignore empty rows In-Reply-To: <1638200958.63.0.173460715414.issue45929@roundup.psfhosted.org> Message-ID: <1638957262.4.0.399046027237.issue45929@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: -AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 05:19:38 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 08 Dec 2021 10:19:38 +0000 Subject: [issue43683] Handle generator (and coroutine) state in the bytecode. In-Reply-To: <1617209103.34.0.926095267338.issue43683@roundup.psfhosted.org> Message-ID: <1638958778.31.0.0458846978274.issue43683@roundup.psfhosted.org> Mark Shannon added the comment: Sorry about the delay; this dropped off my list. I'll fix it shortly. This is quite an obscure bug, so I'm not sure that it is worth blocking the release for. But I'm not the release manager :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 05:41:28 2021 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 08 Dec 2021 10:41:28 +0000 Subject: [issue46007] [C API] PyUnicode_CHECK_INTERNED() doesn't work in the limited C API In-Reply-To: <1638898465.89.0.178243976292.issue46007@roundup.psfhosted.org> Message-ID: <1638960088.07.0.857707703249.issue46007@roundup.psfhosted.org> Petr Viktorin added the comment: +1, PyUnicodeObject/PyASCIIObject is excluded from the limited API since Python 3.2, so it wasn't possible to use this macro. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 05:52:29 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 08 Dec 2021 10:52:29 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638960749.59.0.575786167314.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 0461c68cdff1392a5299ebd8c37ddce0b60dd6cc by Christian Heimes in branch 'main': bpo-45847: Don't override user overrides for CFLAGS/LIBS (GH-29967) https://github.com/python/cpython/commit/0461c68cdff1392a5299ebd8c37ddce0b60dd6cc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 05:53:01 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 08 Dec 2021 10:53:01 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1638960781.87.0.212982015909.issue40280@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28208 pull_request: https://github.com/python/cpython/pull/29984 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 06:01:20 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 08 Dec 2021 11:01:20 +0000 Subject: [issue46009] sending non-None values makes generator raise StopIteration on next access In-Reply-To: <1638914009.53.0.916939757704.issue46009@roundup.psfhosted.org> Message-ID: <1638961280.59.0.796497308197.issue46009@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +28209 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29986 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 06:04:03 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 08 Dec 2021 11:04:03 +0000 Subject: [issue43683] Handle generator (and coroutine) state in the bytecode. In-Reply-To: <1617209103.34.0.926095267338.issue43683@roundup.psfhosted.org> Message-ID: <1638961443.11.0.00396680878855.issue43683@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > This is quite an obscure bug, so I'm not sure that it is worth blocking the release for. But I'm not the release manager :) Well, it certainly didn't block 3.10.1 or 3.11.0a3 ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 06:18:31 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 08 Dec 2021 11:18:31 +0000 Subject: [issue45855] PyCapsule_Import still using PyImport_ImportModuleNoBlock In-Reply-To: <1637425638.46.0.745441938277.issue45855@roundup.psfhosted.org> Message-ID: <1638962310.99.0.261731735871.issue45855@roundup.psfhosted.org> Andrew Svetlov added the comment: The main branch has a dozen PyImport_ImportModuleNoBlock() usages. Would you replace them also? ---------- nosy: +asvetlov versions: +Python 3.11 -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 06:28:35 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Dec 2021 11:28:35 +0000 Subject: [issue41692] Deprecate immortal interned strings: PyUnicode_InternImmortal() In-Reply-To: <1599055165.93.0.874786911809.issue41692@roundup.psfhosted.org> Message-ID: <1638962915.31.0.256830927564.issue41692@roundup.psfhosted.org> STINNER Victor added the comment: I cannot find "PyUnicode_InternImmortal" pattern in the source code of the PyPI top 5000 projects (December 1, 2021). I only found a false positive in frozendict-2.1.1: frozendict/src/3_10/cpython_src/Include/unicodeobject.h: // PyUnicode_InternImmortal() is deprecated since Python 3.10 frozendict/src/3_10/cpython_src/Include/unicodeobject.h: Py_DEPRECATED(3.10) PyAPI_FUNC(void) PyUnicode_InternImmortal(PyObject **); frozendict/src/3_6/cpython_src/Include/unicodeobject.h: PyAPI_FUNC(void) PyUnicode_InternImmortal(PyObject **); frozendict/src/3_7/cpython_src/Include/unicodeobject.h: PyAPI_FUNC(void) PyUnicode_InternImmortal(PyObject **); frozendict/src/3_8/cpython_src/Include/unicodeobject.h: PyAPI_FUNC(void) PyUnicode_InternImmortal(PyObject **); frozendict/src/3_9/cpython_src/Include/unicodeobject.h: PyAPI_FUNC(void) PyUnicode_InternImmortal(PyObject **); These are copies of the Python unicodeobject.h header files, but the PyUnicode_InternImmortal() function is not called by frozendict. I used my download_pypi_top.py and search_pypi_top.py tools which can be found at: https://github.com/vstinner/misc/tree/main/cpython ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 06:36:17 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Dec 2021 11:36:17 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1638963377.09.0.36333009744.issue46006@roundup.psfhosted.org> STINNER Victor added the comment: > Should `_PyUnicode_EqualToASCIIId()` support comparing two unicode from different interpreter? Right now, there still many cases where objects are still shared between two interpreters: * None, True, False singletons * strings from code objects (according to what I saw when I reproduced the issue) * objects from static types: type name (str), subtypes (tuple), MRO (tuple), etc. * etc. More details in the following issues: * bpo-40533: [subinterpreters] Don't share Python objects between interpreters * bpo-40512: [subinterpreters] Meta issue: per-interpreter GIL ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 06:44:02 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Dec 2021 11:44:02 +0000 Subject: [issue46007] [C API] PyUnicode_CHECK_INTERNED() doesn't work in the limited C API In-Reply-To: <1638898465.89.0.178243976292.issue46007@roundup.psfhosted.org> Message-ID: <1638963842.33.0.125128234013.issue46007@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +28210 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29987 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 07:09:46 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 08 Dec 2021 12:09:46 +0000 Subject: [issue46009] sending non-None values makes generator raise StopIteration on next access In-Reply-To: <1638914009.53.0.916939757704.issue46009@roundup.psfhosted.org> Message-ID: <1638965386.15.0.152488725787.issue46009@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 69806b9516dbe092381f3ef884c7c64bb9b8414a by Mark Shannon in branch 'main': bpo-46009: Do not exhaust generator when send() method raises (GH-29986) https://github.com/python/cpython/commit/69806b9516dbe092381f3ef884c7c64bb9b8414a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 07:14:59 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 08 Dec 2021 12:14:59 +0000 Subject: [issue46009] sending non-None values makes generator raise StopIteration on next access In-Reply-To: <1638914009.53.0.916939757704.issue46009@roundup.psfhosted.org> Message-ID: <1638965699.98.0.320229643123.issue46009@roundup.psfhosted.org> Change by Mark Shannon : ---------- pull_requests: +28211 pull_request: https://github.com/python/cpython/pull/29988 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 07:34:49 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 08 Dec 2021 12:34:49 +0000 Subject: [issue46012] unittest AsyncConnection not described In-Reply-To: <1638946320.75.0.503190940676.issue46012@roundup.psfhosted.org> Message-ID: <1638966889.3.0.6121709058.issue46012@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 07:37:28 2021 From: report at bugs.python.org (JMcB) Date: Wed, 08 Dec 2021 12:37:28 +0000 Subject: [issue46013] Confusing period in object.__hash__ doc Message-ID: <1638967048.9.0.598691354052.issue46013@roundup.psfhosted.org> New submission from JMcB : At https://docs.python.org/3/reference/datamodel.html#object.__hash__ It says: Called by built-in function hash() and for operations on members of hashed collections including set, frozenset, and dict. __hash__() should return an integer. How it's rendered there, the kerning made it confusing to me on a first read because dict. [new sentence]__hash__() looked like dict.__hash__(). I think a line break should be added, which I'll open a pr to do. ---------- assignee: docs at python components: Documentation messages: 408014 nosy: JMcB17, docs at python priority: normal severity: normal status: open title: Confusing period in object.__hash__ doc type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 07:40:31 2021 From: report at bugs.python.org (JMcB) Date: Wed, 08 Dec 2021 12:40:31 +0000 Subject: [issue46013] Confusing period in object.__hash__ doc In-Reply-To: <1638967048.9.0.598691354052.issue46013@roundup.psfhosted.org> Message-ID: <1638967231.7.0.197433605425.issue46013@roundup.psfhosted.org> Change by JMcB : ---------- keywords: +patch pull_requests: +28212 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29989 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 07:52:02 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 12:52:02 +0000 Subject: [issue1653457] Python misbehaves when installed in / (patch attached) Message-ID: <1638967922.95.0.262695559323.issue1653457@roundup.psfhosted.org> Irit Katriel added the comment: > (Presumably this will land in Python 11 rather than get backported?) I believe so. > it'll feel like end of an era to finally be able to drop that local patch. You should mark the occasion somehow, it's not everyday you say goodbye to a 25 year old patch! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 07:55:58 2021 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 08 Dec 2021 12:55:58 +0000 Subject: [issue45459] Limited API support for Py_buffer In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org> Message-ID: <1638968158.82.0.0633798369674.issue45459@roundup.psfhosted.org> Petr Viktorin added the comment: Antoine has a good point. We can freeze the Py_buffer struct. If it needs to be extended in the future, it'll need a new set of functions and names -- and perhaps a versioning scheme. We'll know more about the problem when/if it comes up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 08:27:31 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 08 Dec 2021 13:27:31 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 In-Reply-To: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> Message-ID: <1638970051.37.0.895644660887.issue45813@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +28213 pull_request: https://github.com/python/cpython/pull/29990 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 08:29:35 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 08 Dec 2021 13:29:35 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 In-Reply-To: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> Message-ID: <1638970175.94.0.140290587051.issue45813@roundup.psfhosted.org> Andrew Svetlov added the comment: Pablo, I think https://github.com/python/cpython/pull/29990 should be merged as well before the issue closing. It covers another execution branch. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 08:34:12 2021 From: report at bugs.python.org (Dave Evans) Date: Wed, 08 Dec 2021 13:34:12 +0000 Subject: [issue46014] functools.singledispatch does not support Union types Message-ID: <1638970452.65.0.012237534186.issue46014@roundup.psfhosted.org> New submission from Dave Evans : It's not currently possible to use `singledispatch` with a function annotated with a Union type, although the desired behaviour is clear. Example: ``` from functools import singledispatch from typing import Union @singledispatch def test(arg): raise ValueError(arg) @test.register def _(arg: Union[int, float]): print(f"{arg} is a number") test(1) ``` This dies with: TypeError: Invalid annotation for 'arg'. typing.Union[int, float] is not a class. I've implemented a workaround which digs the types out of the union and registers them one-by-one: ``` from functools import singledispatch from typing import Union, get_type_hints def register_for_union_type(target_fn): def decorator(fn): arg_type = list(get_type_hints(fn).values())[0] assert arg_type.__origin__ is Union for type_ in arg_type.__args__: fn = target_fn.register(type_)(fn) return fn return decorator @singledispatch def test(arg): raise ValueError(arg) @register_for_union_type(test) def _(arg: Union[int, float]): print(f"{arg} is a number") test(1) ``` Looking at the source for `singledispatch` is doesn't look like it would *too* difficult to add support for something like this, though of course there may be subtleties I've missed. Would you be open to a patch? The only other mentions I've found of this online are: https://mail.python.org/archives/list/python-ideas at python.org/thread/HF5HDXQ2SXZHO3TWODIRQATTE4TCAWPL/ https://stackoverflow.com/questions/61721761/type-hints-and-singledispatch-how-do-i-include-union-in-an-extensible-w ---------- components: Library (Lib) messages: 408018 nosy: evansd priority: normal severity: normal status: open title: functools.singledispatch does not support Union types type: enhancement versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 08:47:08 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 08 Dec 2021 13:47:08 +0000 Subject: [issue46014] functools.singledispatch does not support Union types In-Reply-To: <1638970452.65.0.012237534186.issue46014@roundup.psfhosted.org> Message-ID: <1638971228.61.0.568239725073.issue46014@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +AlexWaygood, lukasz.langa, rhettinger versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 08:47:39 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 08 Dec 2021 13:47:39 +0000 Subject: [issue45840] Improve cross-references in the data model documentation In-Reply-To: <1637287286.96.0.846227383123.issue45840@roundup.psfhosted.org> Message-ID: <1638971259.73.0.157619485423.issue45840@roundup.psfhosted.org> Change by Alex Waygood : ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 09:02:15 2021 From: report at bugs.python.org (wyz23x2) Date: Wed, 08 Dec 2021 14:02:15 +0000 Subject: [issue45420] Python 3.10 final installation failure In-Reply-To: <1633828108.74.0.92443333438.issue45420@roundup.psfhosted.org> Message-ID: <1638972135.13.0.382409009618.issue45420@roundup.psfhosted.org> wyz23x2 added the comment: Problem solved by installing 3.10.1. (Why?) Thanks! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 09:13:00 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 08 Dec 2021 14:13:00 +0000 Subject: [issue45459] Limited API support for Py_buffer In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org> Message-ID: <1638972780.72.0.311217610653.issue45459@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28214 pull_request: https://github.com/python/cpython/pull/29991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 09:33:31 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 08 Dec 2021 14:33:31 +0000 Subject: [issue45459] Limited API support for Py_buffer In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org> Message-ID: <1638974011.9.0.431176885511.issue45459@roundup.psfhosted.org> Christian Heimes added the comment: After some consideration I also agree with Antoine. The Py_buffer API has been around for a long time without any changes to the Py_buffer struct. It is unlikely that the struct will ever change. I have created a new PR that exposes Py_buffer struct, PyBuffer_*() API functions, PyBUF_* constants, Py_bf_* type slots, and PyMemoryView_FromBuffer(). We could consider to export PyPickleBuffer*() API, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 09:46:40 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 08 Dec 2021 14:46:40 +0000 Subject: [issue46009] sending non-None values makes generator raise StopIteration on next access In-Reply-To: <1638914009.53.0.916939757704.issue46009@roundup.psfhosted.org> Message-ID: <1638974800.77.0.906991943497.issue46009@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 99c72326d245fb604609a87a51ef1ad0845467b7 by Mark Shannon in branch '3.10': [3.10] bpo-46009: Do not exhaust generator when send() method raises (GH-29986). (GH-29988) https://github.com/python/cpython/commit/99c72326d245fb604609a87a51ef1ad0845467b7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 09:47:37 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 14:47:37 +0000 Subject: [issue11385] [doc] TextTestRunner documentation improvements In-Reply-To: <1299176734.52.0.359265322214.issue11385@psf.upfronthosting.co.za> Message-ID: <1638974857.12.0.197393971921.issue11385@roundup.psfhosted.org> Irit Katriel added the comment: The run method is documented now, but most of the above points are still true. ---------- assignee: michael.foord -> keywords: +easy nosy: +iritkatriel title: TextTestRunner methods are not documented -> [doc] TextTestRunner documentation improvements versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 09:50:05 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 14:50:05 +0000 Subject: [issue10608] [doc] Add a section to Windows FAQ explaining os.symlink In-Reply-To: <1291315333.59.0.493313738075.issue10608@psf.upfronthosting.co.za> Message-ID: <1638975005.77.0.171352074155.issue10608@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: Add a section to Windows FAQ explaining os.symlink -> [doc] Add a section to Windows FAQ explaining os.symlink type: behavior -> enhancement versions: +Python 3.11 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 09:53:31 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 08 Dec 2021 14:53:31 +0000 Subject: [issue46009] sending non-None values makes generator raise StopIteration on next access In-Reply-To: <1638914009.53.0.916939757704.issue46009@roundup.psfhosted.org> Message-ID: <1638975211.27.0.0754035186021.issue46009@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 Dec 8 10:08:10 2021 From: report at bugs.python.org (Chris Webb) Date: Wed, 08 Dec 2021 15:08:10 +0000 Subject: [issue1653457] Python misbehaves when installed in / (patch attached) Message-ID: <1638976090.75.0.375010887848.issue1653457@roundup.psfhosted.org> Change by Chris Webb : Removed file: https://bugs.python.org/file17945/paths.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 10:20:10 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Dec 2021 15:20:10 +0000 Subject: [issue45459] Limited API support for Py_buffer In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org> Message-ID: <1638976810.81.0.785869827937.issue45459@roundup.psfhosted.org> STINNER Victor added the comment: Would it make sense to add a "version" member to the structure? It would allow to support an old stable structure for the stable ABI and a new structure with other changes. The problem is how to initalize the version member. On Windows, many structures have a member which is the size of the structure. I tried to implement such ABI compatibility for PEP 587 PyConfig structure, but the idea was rejected (there was no need for a stable ABI when Python is embedded in an application): https://mail.python.org/archives/list/python-dev at python.org/thread/C7Z2NA2DTM3DLOZCFQAK5A2WFYO3PHHX/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 10:22:50 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 15:22:50 +0000 Subject: [issue15735] PEP 3121, 384 Refactoring applied to ossaudio module In-Reply-To: <1345456522.27.0.354179103538.issue15735@psf.upfronthosting.co.za> Message-ID: <1638976970.99.0.272201398058.issue15735@roundup.psfhosted.org> Irit Katriel added the comment: The patch needs to be converted to a github PR. ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 10:25:16 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 15:25:16 +0000 Subject: [issue15651] PEP 3121, 384 refactoring applied to elementtree module In-Reply-To: <1344968721.44.0.689766020196.issue15651@psf.upfronthosting.co.za> Message-ID: <1638977116.72.0.729110534679.issue15651@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> duplicate status: open -> closed superseder: -> PEP 3121, 384 refactoring applied to elementtree module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 10:27:50 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 15:27:50 +0000 Subject: [issue15390] PEP 3121, 384 refactoring applied to _datetime module In-Reply-To: <1342647232.82.0.0763290244077.issue15390@psf.upfronthosting.co.za> Message-ID: <1638977270.72.0.710895458299.issue15390@roundup.psfhosted.org> Irit Katriel added the comment: The patch needs to be converted to a github PR. ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 10:29:56 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 15:29:56 +0000 Subject: [issue15389] PEP 3121, 384 refactoring applied to curses module In-Reply-To: <1342647007.31.0.0527373490627.issue15389@psf.upfronthosting.co.za> Message-ID: <1638977396.17.0.696050396524.issue15389@roundup.psfhosted.org> Irit Katriel added the comment: The patch needs to be converted to a github PR. ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 10:31:40 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 15:31:40 +0000 Subject: [issue15673] PEP 3121, 384 Refactoring applied to testcapi module In-Reply-To: <1345042709.67.0.745658134358.issue15673@psf.upfronthosting.co.za> Message-ID: <1638977500.69.0.879439488574.issue15673@roundup.psfhosted.org> Irit Katriel added the comment: The patch needs to be converted to a github PR. ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 10:32:48 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 15:32:48 +0000 Subject: [issue15708] PEP 3121, 384 Refactoring applied to socket module In-Reply-To: <1345152388.23.0.37223742756.issue15708@psf.upfronthosting.co.za> Message-ID: <1638977568.44.0.857107045589.issue15708@roundup.psfhosted.org> Irit Katriel added the comment: The patch needs to be converted to a github PR. ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 10:57:27 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 15:57:27 +0000 Subject: [issue19888] Three argument type() super call sets __name__ but not __qualname__ In-Reply-To: <1386194767.46.0.367836396475.issue19888@psf.upfronthosting.co.za> Message-ID: <1638979047.64.0.619726605958.issue19888@roundup.psfhosted.org> Irit Katriel added the comment: This is about documenting a difference between 3.2 and 3.3, so I'm assuming it's no longer relevant. ---------- nosy: +iritkatriel resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 10:59:07 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 08 Dec 2021 15:59:07 +0000 Subject: [issue45459] Limited API support for Py_buffer In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org> Message-ID: <1638979147.02.0.151936511514.issue45459@roundup.psfhosted.org> Christian Heimes added the comment: I thought of a version field, too. In the end it is going to cause more work and trouble than it would benefit us. Stack-allocated Py_buffer's are typically initialized with Py_buffer data = {NULL, NULL}; . The code initializes Py_buffer.buf and Py_buffer.obj as NULL. The remaining fields are whatever random values happens to be on the C stack. If we would append a version field to the struct, than every project would have to initialize the field properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 10:59:37 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Dec 2021 15:59:37 +0000 Subject: [issue45459] Limited API support for Py_buffer In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org> Message-ID: <1638979177.85.0.804877701758.issue45459@roundup.psfhosted.org> STINNER Victor added the comment: In Python 3.5, I decided to rename the public "PyMemAllocator" structure to PyMemAllocatorEx when I added a new "calloc" member. C extensions using "PyMemAllocator" fail to build to force developers to set the calloc member. IMO it's unfortunate to have to rename a structure to force developers to update their C code :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 11:05:12 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 08 Dec 2021 16:05:12 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 In-Reply-To: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> Message-ID: <1638979512.28.0.608672772143.issue45813@roundup.psfhosted.org> Mark Shannon added the comment: New changeset d4363d214097b3fca8b7910c2e0e91c8b0873fb2 by Andrew Svetlov in branch 'main': bpo-45813: Drop redundant assertion from frame.clear() (GH-29990) https://github.com/python/cpython/commit/d4363d214097b3fca8b7910c2e0e91c8b0873fb2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 11:08:25 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 08 Dec 2021 16:08:25 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 In-Reply-To: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> Message-ID: <1638979705.06.0.855949471545.issue45813@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 11:18:46 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 08 Dec 2021 16:18:46 +0000 Subject: [issue46015] Windows venvs do not include DLLs directory Message-ID: <1638980326.73.0.477270049092.issue46015@roundup.psfhosted.org> New submission from Steve Dower : Before, a venv would include the DLLs directory in sys.path. Since issue45582, it does not, and so anything that relies on a standard library native module cannot run. ---------- assignee: steve.dower components: Windows messages: 408033 nosy: paul.moore, steve.dower, tim.golden, vinay.sajip, zach.ware priority: release blocker severity: normal stage: needs patch status: open title: Windows venvs do not include DLLs directory type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 11:18:56 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 08 Dec 2021 16:18:56 +0000 Subject: [issue46015] Windows venvs do not include DLLs directory In-Reply-To: <1638980326.73.0.477270049092.issue46015@roundup.psfhosted.org> Message-ID: <1638980336.43.0.969028059249.issue46015@roundup.psfhosted.org> Steve Dower added the comment: +RM ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 11:21:05 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 16:21:05 +0000 Subject: [issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw() In-Reply-To: <1487341428.62.0.272190755105.issue29590@psf.upfronthosting.co.za> Message-ID: <1638980465.71.0.375374670298.issue29590@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 11:28:24 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 08 Dec 2021 16:28:24 +0000 Subject: [issue45459] Limited API support for Py_buffer In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org> Message-ID: <1638980904.62.0.528853414416.issue45459@roundup.psfhosted.org> Christian Heimes added the comment: The Py_buffer struct has stayed the same for over a decade and since Python 2.6.0 and 3.0.0. It is unlikely that it has to be changed in the near future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 11:31:10 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 08 Dec 2021 16:31:10 +0000 Subject: [issue46013] Confusing period in object.__hash__ doc In-Reply-To: <1638967048.9.0.598691354052.issue46013@roundup.psfhosted.org> Message-ID: <1638981070.58.0.801646332708.issue46013@roundup.psfhosted.org> Raymond Hettinger added the comment: A line break would look weird. Let's add plain English instead. - including set, frozenset, and dict. __hash__() should return an integer. + including set, frozenset, and dict. The __hash__() method should return an integer. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 11:34:30 2021 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 08 Dec 2021 16:34:30 +0000 Subject: [issue45459] Limited API support for Py_buffer In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org> Message-ID: <1638981270.39.0.118529650717.issue45459@roundup.psfhosted.org> Petr Viktorin added the comment: The current struct is also likely to continue covering most future uses. If we decide to add PyBufferEx functions but continue providing the current ones (with the current struct), most users won't be affected. (But it'll be a bit more work for us than throwing the old API out entirely.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 11:36:57 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 08 Dec 2021 16:36:57 +0000 Subject: [issue46015] Windows venvs do not include DLLs directory In-Reply-To: <1638980326.73.0.477270049092.issue46015@roundup.psfhosted.org> Message-ID: <1638981417.91.0.192626653149.issue46015@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +28215 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29992 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 11:39:39 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 16:39:39 +0000 Subject: [issue16223] [doc] untokenize returns a string if no encoding token is recognized In-Reply-To: <1350193751.15.0.784217855065.issue16223@psf.upfronthosting.co.za> Message-ID: <1638981579.74.0.0669291826006.issue16223@roundup.psfhosted.org> Irit Katriel added the comment: The doc has been updated by now: "It returns bytes, encoded using the ENCODING token, which is the first token sequence output by tokenize(). If there is no encoding token in the input, it returns a str instead." https://docs.python.org/3/library/tokenize.html#tokenize.untokenize The docstring doesn't say this though. ---------- components: +Documentation nosy: +iritkatriel title: untokenize returns a string if no encoding token is recognized -> [doc] untokenize returns a string if no encoding token is recognized versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 11:50:48 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Dec 2021 16:50:48 +0000 Subject: [issue45459] Limited API support for Py_buffer In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org> Message-ID: <1638982248.54.0.895344411975.issue45459@roundup.psfhosted.org> STINNER Victor added the comment: > Py_buffer data = {NULL, NULL}; > The code initializes Py_buffer.buf and Py_buffer.obj as NULL. The remaining fields are whatever random values happens to be on the C stack. The C language sets other members to 0/NULL with this syntax, no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 13:47:35 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 18:47:35 +0000 Subject: [issue45635] Tidy up error handling in traceback.c / python run.c In-Reply-To: <1635370026.46.0.0220648873339.issue45635@roundup.psfhosted.org> Message-ID: <1638989255.8.0.0553858661552.issue45635@roundup.psfhosted.org> Irit Katriel added the comment: New changeset f893bb2e01307c92ca19597f44874ecaffe7f06f by Irit Katriel in branch 'main': bpo-45635: refactor print_exception() into smaller functions (GH-29981) https://github.com/python/cpython/commit/f893bb2e01307c92ca19597f44874ecaffe7f06f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 13:53:08 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 08 Dec 2021 18:53:08 +0000 Subject: [issue45359] TopologicalSorter is not Generic at runtime (but is in typeshed) In-Reply-To: <1633299530.43.0.181161136207.issue45359@roundup.psfhosted.org> Message-ID: <1638989588.93.0.479730588374.issue45359@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 3cb9731b7e59b0df9a7a9ab6b7746a669958b693 by Jacob Hayes in branch 'main': bpo-45359: Support TopologicalSorter type subscript (GH-28714) https://github.com/python/cpython/commit/3cb9731b7e59b0df9a7a9ab6b7746a669958b693 ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 14:13:05 2021 From: report at bugs.python.org (David CARLIER) Date: Wed, 08 Dec 2021 19:13:05 +0000 Subject: [issue46016] fcntl module add F_DUP2FD_CLOEXEC Message-ID: <1638990785.71.0.738290193352.issue46016@roundup.psfhosted.org> Change by David CARLIER : ---------- components: FreeBSD nosy: devnexen, koobs priority: normal pull_requests: 28216 severity: normal status: open title: fcntl module add F_DUP2FD_CLOEXEC type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 14:26:07 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 08 Dec 2021 19:26:07 +0000 Subject: [issue46015] Windows venvs do not include DLLs directory In-Reply-To: <1638980326.73.0.477270049092.issue46015@roundup.psfhosted.org> Message-ID: <1638991567.81.0.765770232606.issue46015@roundup.psfhosted.org> Steve Dower added the comment: New changeset 7778116c2f573edf320bd55301137a968e4339d8 by Steve Dower in branch 'main': bpo-46015: Fixes calculation of sys.path in a venv on Windows (GH-29992) https://github.com/python/cpython/commit/7778116c2f573edf320bd55301137a968e4339d8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 14:36:23 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 08 Dec 2021 19:36:23 +0000 Subject: [issue46015] Windows venvs do not include DLLs directory In-Reply-To: <1638980326.73.0.477270049092.issue46015@roundup.psfhosted.org> Message-ID: <1638992183.96.0.955610259051.issue46015@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 15:08:11 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 20:08:11 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1638994091.54.0.412741803039.issue45711@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 2109f7880b65755329a877da3a7f8a362de07350 by Irit Katriel in branch 'main': bpo-45711: Remove unnecessary normalization of exc_info (GH-29922) https://github.com/python/cpython/commit/2109f7880b65755329a877da3a7f8a362de07350 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 16:01:12 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Wed, 08 Dec 2021 21:01:12 +0000 Subject: [issue44377] Truncated error message of original function while multiprocessing or multithreading In-Reply-To: <1623328035.9.0.197827548789.issue44377@roundup.psfhosted.org> Message-ID: <1638997272.84.0.119011337402.issue44377@roundup.psfhosted.org> Andrei Kulakov added the comment: Prasanth: can you provide a bit more details, are you saying that this line: https://github.com/python/cpython/blob/2109f7880b65755329a877da3a7f8a362de07350/Lib/multiprocessing/pool.py#L86 .. truncates the exception msg? What is the exact exception type that got truncated? Can you post the exact error output you got here? ---------- assignee: -> andrei.avk nosy: +andrei.avk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 16:02:12 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 08 Dec 2021 21:02:12 +0000 Subject: [issue10608] [doc] Add a section to Windows FAQ explaining os.symlink In-Reply-To: <1291315333.59.0.493313738075.issue10608@psf.upfronthosting.co.za> Message-ID: <1638997332.19.0.160002361396.issue10608@roundup.psfhosted.org> Eryk Sun added the comment: Ingrid's patch misses the requirement to log off after adding a privilege to the current account. A new access token is required, from a fresh logon. Privileges can also be added to groups, not just to individual user accounts. Thus the symlink privilege can be granted to a standard group or well-known group, such as "Users" or "Authenticated Users". Python 3.8+ supports the system's developer mode, which allows unprivileged symlink creation. This is just for developer tools, such as Git. Developer mode should not be relied on for regular scripts and applications. In POSIX, symlinks are widely used to reduce the burden of software maintenance. In Windows, however, symlinks are not reliably available, due to limited file system support (primarily NTFS, ReFs) and the requirement for a privilege that standard users lack by default. Another significant problem in Windows is the behavior of the shell API (shell32.dll), which eagerly resolves a symlink to its target and thus breaks many use cases for symlinks (e.g. virtual environments). Given these problems, using symlinks may actually increase the maintenance burden in Windows. Applications have to support a fallback path for Windows -- such as hard linking, copying, or launchers -- when symlinks either aren't available or for use cases that are unreliable (e.g. due to the way symlinks are accessed in the GUI shell). ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 16:03:19 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Wed, 08 Dec 2021 21:03:19 +0000 Subject: [issue44377] Truncated error message of original function while multiprocessing or multithreading In-Reply-To: <1623328035.9.0.197827548789.issue44377@roundup.psfhosted.org> Message-ID: <1638997399.41.0.203475400356.issue44377@roundup.psfhosted.org> Change by Andrei Kulakov : ---------- type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 16:14:38 2021 From: report at bugs.python.org (David CARLIER) Date: Wed, 08 Dec 2021 21:14:38 +0000 Subject: [issue46016] fcntl module add F_DUP2FD_CLOEXEC Message-ID: <1638998078.36.0.0492190037093.issue46016@roundup.psfhosted.org> New submission from David CARLIER : Exposing these specific freebsd constants to the module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 16:25:06 2021 From: report at bugs.python.org (Nathan Jensen) Date: Wed, 08 Dec 2021 21:25:06 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1638998706.75.0.59262115492.issue46006@roundup.psfhosted.org> Change by Nathan Jensen : ---------- nosy: +ndjensen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 16:26:34 2021 From: report at bugs.python.org (Nathan Jensen) Date: Wed, 08 Dec 2021 21:26:34 +0000 Subject: [issue22213] Make pyvenv style virtual environments easier to configure when embedding Python In-Reply-To: <1408275761.36.0.915361061447.issue22213@psf.upfronthosting.co.za> Message-ID: <1638998794.72.0.50300008824.issue22213@roundup.psfhosted.org> Change by Nathan Jensen : ---------- nosy: +ndjensen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 16:27:46 2021 From: report at bugs.python.org (Nathan Jensen) Date: Wed, 08 Dec 2021 21:27:46 +0000 Subject: [issue40512] [subinterpreters] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1638998866.6.0.438256272129.issue40512@roundup.psfhosted.org> Change by Nathan Jensen : ---------- nosy: +ndjensen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 17:06:20 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 22:06:20 +0000 Subject: [issue39694] Incorrect dictionary unpacking when calling str.format In-Reply-To: <1582193003.32.0.513659901276.issue39694@roundup.psfhosted.org> Message-ID: <1639001180.35.0.141892714159.issue39694@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. >>> x = {None: ''} >>> ''.format(**x) '' >>> '{x}'.format(**x) Traceback (most recent call last): File "", line 1, in KeyError: 'x' ---------- components: +Library (Lib) nosy: +iritkatriel versions: +Python 3.11 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 17:14:39 2021 From: report at bugs.python.org (Mark Sapiro) Date: Wed, 08 Dec 2021 22:14:39 +0000 Subject: [issue46011] Python 3.10 email returns invalid Date: header unchanged. In-Reply-To: <1638937977.72.0.569168452456.issue46011@roundup.psfhosted.org> Message-ID: <1639001679.71.0.923641486035.issue46011@roundup.psfhosted.org> Mark Sapiro added the comment: Upon further research I realized this is related to https://bugs.python.org/issue30681 and that while there are no message.defects the Date: header does have the InvalidDateDefect and its datetime attribute is None so I consider this resolved. ---------- stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 17:23:06 2021 From: report at bugs.python.org (Ben Ricketts) Date: Wed, 08 Dec 2021 22:23:06 +0000 Subject: [issue46017] Tutorial incorrectly refers to skits rather than sketches. Message-ID: <1639002186.7.0.719126864665.issue46017@roundup.psfhosted.org> New submission from Ben Ricketts : https://docs.python.org/3/tutorial/appetite.html 4th paragraph from bottom refers to "skits" where as Monty Python in fact perform sketch comedy.It is a minor but important differentiation. ---------- assignee: docs at python components: Documentation messages: 408049 nosy: benricketts77, docs at python priority: normal severity: normal status: open title: Tutorial incorrectly refers to skits rather than sketches. versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 17:28:55 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Dec 2021 22:28:55 +0000 Subject: [issue46016] fcntl module add F_DUP2FD_CLOEXEC In-Reply-To: <1638998078.36.0.0492190037093.issue46016@roundup.psfhosted.org> Message-ID: <1639002535.87.0.457690184891.issue46016@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 267539bff700c2493778c07eeb1642b9584c4826 by David CARLIER in branch 'main': bpo-46016: fcntl module add FreeBSD's F_DUP2FD_CLOEXEC flag support (GH-29993) https://github.com/python/cpython/commit/267539bff700c2493778c07eeb1642b9584c4826 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 17:29:11 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Dec 2021 22:29:11 +0000 Subject: [issue46016] fcntl module add F_DUP2FD_CLOEXEC In-Reply-To: <1638998078.36.0.0492190037093.issue46016@roundup.psfhosted.org> Message-ID: <1639002551.06.0.341016276753.issue46016@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 17:31:08 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 22:31:08 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1639002668.69.0.73607243815.issue45711@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +28217 pull_request: https://github.com/python/cpython/pull/29994 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 17:31:14 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 08 Dec 2021 22:31:14 +0000 Subject: [issue38884] __import__ is not thread-safe on Python 3 In-Reply-To: <1574363514.58.0.324753075286.issue38884@roundup.psfhosted.org> Message-ID: <1639002674.64.0.659743464854.issue38884@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 17:43:29 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Dec 2021 22:43:29 +0000 Subject: [issue39694] Incorrect dictionary unpacking when calling str.format In-Reply-To: <1582193003.32.0.513659901276.issue39694@roundup.psfhosted.org> Message-ID: <1639003409.01.0.532126904896.issue39694@roundup.psfhosted.org> Serhiy Storchaka added the comment: In most cases the test is cheap even for large dict (it has constant complexity if the dict never contained non-string keys). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 17:53:27 2021 From: report at bugs.python.org (Valentyn Tymofieiev) Date: Wed, 08 Dec 2021 22:53:27 +0000 Subject: [issue38884] __import__ is not thread-safe on Python 3 In-Reply-To: <1574363514.58.0.324753075286.issue38884@roundup.psfhosted.org> Message-ID: <1639004007.71.0.53458482303.issue38884@roundup.psfhosted.org> Valentyn Tymofieiev added the comment: Given that the behavior changes between Python 3.2 (no deadlock) and Python 3.3 (deadlock), this should be easily bisectable if someone has the right setup to build and run Python versions from sources in that range. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 18:02:01 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 08 Dec 2021 23:02:01 +0000 Subject: [issue46017] Tutorial incorrectly refers to skits rather than sketches. In-Reply-To: <1639002186.7.0.719126864665.issue46017@roundup.psfhosted.org> Message-ID: <1639004521.06.0.702766785428.issue46017@roundup.psfhosted.org> Steven D'Aprano added the comment: What difference do you believe there is between skits and sketches? Definition 1 of skit: "A short comic performance." https://en.wiktionary.org/wiki/skit#English Definition 4 of sketch: "A brief, light, or unfinished dramatic, musical, or literary work or idea; especially a short, often humorous or satirical scene or play, frequently as part of a revue or variety show. Synonym: skit" https://en.wiktionary.org/wiki/sketch#English The Pythons themselves sometimes describe their work as "skits" and sometimes as "sketches". E.g. quote: "Included are transcripts of Hollywood Bowl Skits..." http://www.montypython.com/book_Monty%20Python%20Live!/24 while of course it is always "the Dead Parrot sketch". ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 18:21:54 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Wed, 08 Dec 2021 23:21:54 +0000 Subject: [issue36048] Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__ In-Reply-To: <1550644985.32.0.26417547244.issue36048@roundup.psfhosted.org> Message-ID: <1639005714.0.0.742366428429.issue36048@roundup.psfhosted.org> Oleg Iarygin added the comment: Here is a report that this change breaks PyQt5 on Fedora: > [...] > > Why do I care? This breaks tons of existing PyQt5 code out there, for example. I wasn't aware of this change to the language until Fedora shipped Python 3.10 and everything broke. So much stuff that uses PyQt5 is broken now. Good job guys!! > > [...] Even though the rest of comment is emotional, we need to check if the problem really has place and the PR needs to be retracted until PyQt5 is ported to newer Python C API. ---------- nosy: +arhadthedev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 18:44:46 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 08 Dec 2021 23:44:46 +0000 Subject: [issue34111] python-config breaks when symlinked to another location In-Reply-To: <1531567311.02.0.56676864532.issue34111@psf.upfronthosting.co.za> Message-ID: <1639007086.59.0.605830201765.issue34111@roundup.psfhosted.org> Irit Katriel added the comment: tobik, 3.4/3.5 are no longer maintained. Do you know whether this is impacting current versions (>= 3.9)? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 19:01:49 2021 From: report at bugs.python.org (Brandt Bucher) Date: Thu, 09 Dec 2021 00:01:49 +0000 Subject: [issue45510] Specialize BINARY_SUBTRACT In-Reply-To: <1634555657.96.0.480345209598.issue45510@roundup.psfhosted.org> Message-ID: <1639008109.45.0.20044112864.issue45510@roundup.psfhosted.org> Change by Brandt Bucher : ---------- pull_requests: +28218 pull_request: https://github.com/python/cpython/pull/29995 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 19:15:16 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 00:15:16 +0000 Subject: [issue20899] Nested namespace imports do not work inside zip archives In-Reply-To: <1394656225.26.0.176386437395.issue20899@psf.upfronthosting.co.za> Message-ID: <1639008916.86.0.538586245776.issue20899@roundup.psfhosted.org> Irit Katriel added the comment: I got the same results as Jonathan. ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 19:20:27 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 00:20:27 +0000 Subject: [issue29899] zlib missing when --enable--optimizations option appended In-Reply-To: <1490419181.2.0.645690574744.issue29899@psf.upfronthosting.co.za> Message-ID: <1639009227.37.0.824475708494.issue29899@roundup.psfhosted.org> Irit Katriel added the comment: Version 3.3 is no longer supported, and it doesn't look like there is enough information here for core devs to understand what happened. I'll close this, but please create a new issue if you are still having this problem with a current version (>= 3.9). ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 19:24:12 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 00:24:12 +0000 Subject: [issue22282] ipaddress module accepts octal formatted IPv4 addresses in IPv6 addresses In-Reply-To: <1409132006.4.0.222962839937.issue22282@psf.upfronthosting.co.za> Message-ID: <1639009452.85.0.341327781501.issue22282@roundup.psfhosted.org> Irit Katriel added the comment: This is what I get now on 3.11: >>> ipaddress.ip_address("::1.0.0.00") Traceback (most recent call last): File "", line 1, in File "C:\Users\User\src\cpython\Lib\ipaddress.py", line 54, in ip_address raise ValueError('%r does not appear to be an IPv4 or IPv6 address' % ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: '::1.0.0.00' does not appear to be an IPv4 or IPv6 address ---------- nosy: +iritkatriel resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 19:27:54 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 00:27:54 +0000 Subject: [issue45635] Tidy up error handling in traceback.c / python run.c In-Reply-To: <1635370026.46.0.0220648873339.issue45635@roundup.psfhosted.org> Message-ID: <1639009674.13.0.376409409415.issue45635@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +28219 pull_request: https://github.com/python/cpython/pull/29996 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 19:43:56 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 09 Dec 2021 00:43:56 +0000 Subject: [issue46018] expm1 may incorrectly raise OverflowError on underflow Message-ID: <1639010636.16.0.465988709351.issue46018@roundup.psfhosted.org> New submission from Steve Dower : If a C runtime's math functions set errno to ERANGE, we assume it is a valid underflow if fabs(result) < 1.0. However, because expm1 includes a -1.0, it underflows towards -1.0. This fails the above check, and so if a runtime's expm1() sets ERANGE we will raise a spurious OverflowError. ---------- assignee: steve.dower components: Library (Lib) messages: 408059 nosy: steve.dower priority: normal severity: normal status: open title: expm1 may incorrectly raise OverflowError on underflow versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 19:48:05 2021 From: report at bugs.python.org (Zernoxi) Date: Thu, 09 Dec 2021 00:48:05 +0000 Subject: [issue46002] py Launcher for Windows with MSYS2 In-Reply-To: <1638809787.4.0.667501971988.issue46002@roundup.psfhosted.org> Message-ID: <1639010885.17.0.0889294492079.issue46002@roundup.psfhosted.org> Zernoxi added the comment: True, that would work but it not ideal "Unix". I'll closed this since not unintended behavior. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 19:51:00 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 09 Dec 2021 00:51:00 +0000 Subject: [issue46018] expm1 may incorrectly raise OverflowError on underflow In-Reply-To: <1639010636.16.0.465988709351.issue46018@roundup.psfhosted.org> Message-ID: <1639011060.04.0.414187877985.issue46018@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +28220 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29997 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 20:05:34 2021 From: report at bugs.python.org (Eric Snow) Date: Thu, 09 Dec 2021 01:05:34 +0000 Subject: [issue46008] Prepare runtime/interp/thread state and init for upcoming changes. In-Reply-To: <1638908666.73.0.306470014114.issue46008@roundup.psfhosted.org> Message-ID: <1639011934.45.0.0800891247154.issue46008@roundup.psfhosted.org> Change by Eric Snow : ---------- pull_requests: +28221 pull_request: https://github.com/python/cpython/pull/29998 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 20:17:24 2021 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 09 Dec 2021 01:17:24 +0000 Subject: [issue45510] Specialize BINARY_SUBTRACT In-Reply-To: <1634555657.96.0.480345209598.issue45510@roundup.psfhosted.org> Message-ID: <1639012644.04.0.0508068701782.issue45510@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 5de39f4b412ed5b0f3ed0140c83b2c1f8c707603 by Brandt Bucher in branch 'main': bpo-45510: Check both types when specializing subtraction (GH-29995) https://github.com/python/cpython/commit/5de39f4b412ed5b0f3ed0140c83b2c1f8c707603 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 20:23:31 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Thu, 09 Dec 2021 01:23:31 +0000 Subject: [issue44289] tarfile.is_tarfile() and tarfile.open() when used with file object may cause tarfile operations to fail In-Reply-To: <1622646545.23.0.614350359918.issue44289@roundup.psfhosted.org> Message-ID: <1639013011.76.0.0703908671036.issue44289@roundup.psfhosted.org> Andrei Kulakov added the comment: This affects more use cases than just is_tarfile() and getmembers() results. is_tarfile() calls open() which is the root cause of the issue. Calling open() 2+ times will also cause the same issue. In addition to getmembers(), extracting the tar will also silently fail. (and possibly other operations). I've suggested a different fix in the comment on the PR: https://github.com/python/cpython/pull/26488#issuecomment-989367707 ---------- nosy: +andrei.avk title: tarfile.is_tarfile() modifies file object's current position -> tarfile.is_tarfile() and tarfile.open() when used with file object may cause tarfile operations to fail _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 20:23:47 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Thu, 09 Dec 2021 01:23:47 +0000 Subject: [issue44289] tarfile.is_tarfile() and tarfile.open() when used with file object may cause tarfile operations to fail In-Reply-To: <1622646545.23.0.614350359918.issue44289@roundup.psfhosted.org> Message-ID: <1639013027.38.0.16519886838.issue44289@roundup.psfhosted.org> Change by Andrei Kulakov : ---------- nosy: +kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 20:52:20 2021 From: report at bugs.python.org (Rahul Gupta) Date: Thu, 09 Dec 2021 01:52:20 +0000 Subject: [issue46019] collections.Counter - Cast list of keys into set to remove iteration over duplicate elements for __le__, __ge__ and __eq__ Message-ID: <1639014740.35.0.724814360021.issue46019@roundup.psfhosted.org> New submission from Rahul Gupta : On lines 725, 737 and 749 there is the following code: '''for c in (self, other) for e in c''' which generates an iterable with all the keys in self and other - casting c to a set will remove duplicates and allow faster iteration - some minor benchmarks I ran seem to agree. ---------- components: Library (Lib) messages: 408063 nosy: argoop1728 priority: normal severity: normal status: open title: collections.Counter - Cast list of keys into set to remove iteration over duplicate elements for __le__,__ge__ and __eq__ type: performance versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 20:53:27 2021 From: report at bugs.python.org (Rahul Gupta) Date: Thu, 09 Dec 2021 01:53:27 +0000 Subject: [issue46019] collections.Counter - Cast list of keys into set to remove iteration over duplicate elements for __le__, __ge__ and __eq__ In-Reply-To: <1639014740.35.0.724814360021.issue46019@roundup.psfhosted.org> Message-ID: <1639014807.64.0.546245592722.issue46019@roundup.psfhosted.org> Change by Rahul Gupta : ---------- keywords: +patch pull_requests: +28222 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29999 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 21:19:44 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 Dec 2021 02:19:44 +0000 Subject: [issue46019] collections.Counter - Cast list of keys into set to remove iteration over duplicate elements for __le__, __ge__ and __eq__ In-Reply-To: <1639014740.35.0.724814360021.issue46019@roundup.psfhosted.org> Message-ID: <1639016384.51.0.538989482938.issue46019@roundup.psfhosted.org> Raymond Hettinger added the comment: > casting c to a set will remove duplicates and allow faster iteration Sorry, but this doesn't make any sense. The *c* is either *self* or *other*, both of which are instances of Counter which is itself a subclass of dict. So, the input cannot have duplicates keys. > some minor benchmarks I ran seem to agree. I'm dubious about the minor benchmarks. If in fact the effect is real, it is merely exploiting an implementation quirk which is tenuous and subject to change (the premise would be that converting to a set and looping over a set is faster than the native dict iterator for a dict subclass). Conceptually, it is always worse to spend the time and space for first converting to a set. Besides a speed consideration, there is also a space consideration. The existing code does not use any auxiliary memory. The proposed code unnecessarily builds two new sets and then throws them away. Thanks for the suggestion, but I am going to decline. The timings seem dubious. Conceptually, the PR makes the methods do more work. To the extent some timing difference can be observed, it is likely an implementation quirk. The PR does not make the code cleaner or clearer, and it loops over a dict subclass in an unconventional way. Also, the PR would have a negative impact on memory usage. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 21:20:27 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 Dec 2021 02:20:27 +0000 Subject: [issue46019] collections.Counter - Cast list of keys into set to remove iteration over duplicate elements for __le__, __ge__ and __eq__ In-Reply-To: <1639014740.35.0.724814360021.issue46019@roundup.psfhosted.org> Message-ID: <1639016427.67.0.675076110234.issue46019@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 21:27:54 2021 From: report at bugs.python.org (Rahul Gupta) Date: Thu, 09 Dec 2021 02:27:54 +0000 Subject: [issue46019] collections.Counter - Cast list of keys into set to remove iteration over duplicate elements for __le__, __ge__ and __eq__ In-Reply-To: <1639014740.35.0.724814360021.issue46019@roundup.psfhosted.org> Message-ID: <1639016874.39.0.35429463995.issue46019@roundup.psfhosted.org> Rahul Gupta added the comment: After looking at this again, I agree with you - the key duplication issue seems to have gone. Thank you for providing this feedback, it is very helpful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 21:39:14 2021 From: report at bugs.python.org (tobik) Date: Thu, 09 Dec 2021 02:39:14 +0000 Subject: [issue34111] python-config breaks when symlinked to another location In-Reply-To: <1531567311.02.0.56676864532.issue34111@psf.upfronthosting.co.za> Message-ID: <1639017554.34.0.96337005126.issue34111@roundup.psfhosted.org> tobik added the comment: Yes, the bug still exists and all Python versions are affected. We patch them all in FreeBSD Ports: https://cgit.freebsd.org/ports/tree/lang/python36/files/patch-Misc__python-config.sh.in https://cgit.freebsd.org/ports/tree/lang/python37/files/patch-Misc__python-config.sh.in https://cgit.freebsd.org/ports/tree/lang/python38/files/patch-Misc__python-config.sh.in https://cgit.freebsd.org/ports/tree/lang/python39/files/patch-Misc__python-config.sh.in https://cgit.freebsd.org/ports/tree/lang/python310/files/patch-Misc__python-config.sh.in https://cgit.freebsd.org/ports/tree/lang/python311/files/patch-Misc__python-config.sh.in ---------- status: pending -> open versions: +Python 3.10, Python 3.11, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 21:41:39 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 Dec 2021 02:41:39 +0000 Subject: [issue39694] Incorrect dictionary unpacking when calling str.format In-Reply-To: <1582193003.32.0.513659901276.issue39694@roundup.psfhosted.org> Message-ID: <1639017699.23.0.8568072489.issue39694@roundup.psfhosted.org> Raymond Hettinger added the comment: IMO, there is no actual problem being solved here. Instead there is just a concern that something doesn't feel right. Given that there is no problem in practice, I recommend closing this rather than cluttering docs, tests, or the C code for a non-issue. The format() method looksup keywords on demand and it can only lookup strings. Anything not looked up is ignored. We have a long history of that working out just fine: >>> 'The answer is %(answer)s.' % \ {'answer': 'correct', 10: 'never used'} 'The answer is correct.' >>> 'The answer is {answer}.'.format( **{'answer': 'correct', 10: 'never used'}) 'The answer is correct.' >>> 'The answer is {answer}.'.format_map( {'answer': 'correct', 10: 'never used'}) 'The answer is correct. One could argue that making any of the above raise an error for a non-string in a dict is backwards incompatible and would only serve to break code that is already working fine. I'm going to close this one. If another core dev feels strongly that this is a problem in practice, go ahead and reopen it. There was a similar change to SimpleNamespace but arguably that shouldn't have been done either, but at least it had much less risk of breaking existing code that has worked fine for over a decade. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 21:55:45 2021 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 09 Dec 2021 02:55:45 +0000 Subject: [issue39694] Incorrect dictionary unpacking when calling str.format In-Reply-To: <1582193003.32.0.513659901276.issue39694@roundup.psfhosted.org> Message-ID: <1639018545.73.0.31356610814.issue39694@roundup.psfhosted.org> Eric V. Smith added the comment: I concur with Raymond. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 21:59:23 2021 From: report at bugs.python.org (Inada Naoki) Date: Thu, 09 Dec 2021 02:59:23 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639018763.49.0.992807413088.issue46006@roundup.psfhosted.org> Inada Naoki added the comment: That's too bad. We can not compare two Unicode by pointer even if both are interned anymore... It was a nice optimization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 22:06:20 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 Dec 2021 03:06:20 +0000 Subject: [issue14965] super() and property inheritance behavior In-Reply-To: <1338433441.66.0.975494137492.issue14965@psf.upfronthosting.co.za> Message-ID: <1639019180.25.0.938805759603.issue14965@roundup.psfhosted.org> Raymond Hettinger added the comment: -0 from me as well. I don't think this is common or something that should be encouraged. As Andrew points out, "del super().x" doesn't have an obvious meaning and it could be regarded as a code smell. The OP's first example would be an unpleasant API to debug -- it exhibits tight coupling between the parent and child class, it has Liskov issues, and it has implicit forwarding and indirection through descriptors. The tight coupling is especially problematic because Python's super() isn't guaranteed to call the parent class; rather, it can call a sibling class as determined by the MRO which cannot be known at the time the class is written. Another thought is that super() is intentionally not a completely transparent proxy. While an explicit call super().__getitem__(k) works, we've denied support for super()[k]. To me, "super().x = 10" and "del super().x" fall in the same category. Looking at the OP's Fortunately, it doesn't seem to be a common need to use super() in a property setter or deleter to bypass the current class and call setter or deleter in a parent class property. Arguably, this kind of tight coupling isn't good design. The OP's first example would be an unpleasant API to debug. FWIW, ---------- nosy: +rhettinger versions: -Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 22:08:37 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 Dec 2021 03:08:37 +0000 Subject: [issue14965] super() and property inheritance behavior In-Reply-To: <1338433441.66.0.975494137492.issue14965@psf.upfronthosting.co.za> Message-ID: <1639019317.69.0.0506859156333.issue14965@roundup.psfhosted.org> Raymond Hettinger added the comment: Another thought: Given that this tracker issue has been open for a decade without resolution, we have evidence that this isn't an important problem in practice. Arguably, people have been better off being nudged in another direction toward better design or having been forced to be explicit about what method is called and when. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 8 22:10:46 2021 From: report at bugs.python.org (Aaron Gallagher) Date: Thu, 09 Dec 2021 03:10:46 +0000 Subject: [issue14965] super() and property inheritance behavior In-Reply-To: <1639019317.69.0.0506859156333.issue14965@roundup.psfhosted.org> Message-ID: Aaron Gallagher <_ at habnab.it> added the comment: I will note, Raymond, that I?ve wanted this for years before discovering this bpo issue, and I found it because you linked it on Twitter. ;) On Wed, Dec 8, 2021 at 19:08 Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > Another thought: Given that this tracker issue has been open for a decade > without resolution, we have evidence that this isn't an important problem > in practice. > > Arguably, people have been better off being nudged in another direction > toward better design or having been forced to be explicit about what method > is called and when. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 00:40:50 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 09 Dec 2021 05:40:50 +0000 Subject: [issue44540] venv: activate.bat fails for venv with special characters in PATH In-Reply-To: <1625057041.78.0.250792490415.issue44540@roundup.psfhosted.org> Message-ID: <1639028450.69.0.263769048084.issue44540@roundup.psfhosted.org> Eryk Sun added the comment: There's no parsing problem with delayed expansion (e.g. "!VAR!" instead of %VAR%) and for loop variables (e.g. "%%a"). The solution is thus to execute in a local scope that enables delayed expansion and command extensions [1]. That's easy enough, but then there's the problem of how to evaluate the `set` commands in the global scope, without the help of delayed expansion to prevent parsing errors. I did some research, and apparently the common trick is to end the local scope inside of a `for /f` loop. Then subsequent `set "%%a"` statements in iterations of the loop execute in the global scope. The final problem is building the command to execute in the local scope, for which the `for /f` loop iterates the output lines. `set var` returns a line with "var=value", which can be passed back into `set "%%a"`. So I decided to build up a sequence of `&` concatenated `set var` and `echo var=` (clear) statements in an EXPORTS variable. I added default values for PROMPT ($P$G) and PATH (%SystemRoot%;%SystemRoot%\System32), for when they're not defined. I made sure that deactivate.bat does not leave these defaults in place. The original values, whether defined or not, should be restored exactly as they were. All of this adds to the length of the scripts. They're roughly doubled in size. But there should be no more problems with an odd number of quotes and/or special characters in any of the variables that get set. --- [1] The activate.bat and deactivate.bat scripts have been naively relying on the default enabled state of command extensions, e.g. `for /f` loops and `if defined` statements. ---------- nosy: +eryksun Added file: https://bugs.python.org/file50483/activate.bat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 00:41:07 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 09 Dec 2021 05:41:07 +0000 Subject: [issue44540] venv: activate.bat fails for venv with special characters in PATH In-Reply-To: <1625057041.78.0.250792490415.issue44540@roundup.psfhosted.org> Message-ID: <1639028467.97.0.669087010775.issue44540@roundup.psfhosted.org> Change by Eryk Sun : Added file: https://bugs.python.org/file50484/deactivate.bat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 01:19:17 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Thu, 09 Dec 2021 06:19:17 +0000 Subject: [issue44170] ShareableList cannot safely handle multibyte utf-8 characters In-Reply-To: <1621336329.38.0.49764469303.issue44170@roundup.psfhosted.org> Message-ID: <1639030757.29.0.0760855136114.issue44170@roundup.psfhosted.org> Andrei Kulakov added the comment: We classify 'crash' type as seg faults etc, so changing this to 'behavior' type. ---------- nosy: +andrei.avk type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 01:21:18 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Thu, 09 Dec 2021 06:21:18 +0000 Subject: [issue44170] ShareableList cannot safely handle multibyte utf-8 characters In-Reply-To: <1621336329.38.0.49764469303.issue44170@roundup.psfhosted.org> Message-ID: <1639030878.65.0.697225466923.issue44170@roundup.psfhosted.org> Andrei Kulakov added the comment: I've confirmed this issue is still present in 3.11. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 01:32:23 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 Dec 2021 06:32:23 +0000 Subject: [issue46020] Optimize long_pow for the common case Message-ID: <1639031543.32.0.0830001202943.issue46020@roundup.psfhosted.org> New submission from Raymond Hettinger : The expression 'x * x' is faster than 'x ** 2'. In Python3.10, the speed difference was enormous. Due to ceval optimizations, the difference in Python3.11 is tighter; however, there is still room for improvement. The code for long_pow() doesn't currently have a fast path for squaring which is by far the most important case. $ python3.10 -m timeit -r 11 -s 'x = 10' 'x ** 2' 1000000 loops, best of 11: 201 nsec per loop $ python3.10 -m timeit -r 11 -s 'x = 10' 'x * x' 10000000 loops, best of 11: 21.9 nsec per loop $ python3.11 -m timeit -r 11 -s 'x = 10' 'x ** 2' 10000000 loops, best of 11: 32 nsec per loop $ python3.11 -m timeit -r 11 -s 'x = 10' 'x * x' 20000000 loops, best of 11: 17.6 nsec per loop ---------- components: Interpreter Core messages: 408076 nosy: rhettinger priority: normal severity: normal status: open title: Optimize long_pow for the common case type: performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 02:32:08 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Thu, 09 Dec 2021 07:32:08 +0000 Subject: [issue36048] Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__ In-Reply-To: <1550644985.32.0.26417547244.issue36048@roundup.psfhosted.org> Message-ID: <1639035128.8.0.138839423689.issue36048@roundup.psfhosted.org> Oleg Iarygin added the comment: The reporter gave more details (): > Literally this is ok in C++ with Qt: > > float x = 2.3, y = 1.1; > auto p = QPoint(x, y); // QPoint only takes 2 int params.. this works in C++; floats can be always be implicitly converted to int > > Same code, more or less, in Python3.10 is now broken: > > x = 2.3 > y = 1.1 > p = QPoint(x, y) # This fails, where previously it worked on every Python version since the age of the dinosaurs... > > Note that most of the API for PyQt5 is auto-generated from the function signatures of the C++. So in this case QPoint takes 2 ints for its c'tor (just like in C++).. and breaks on Python 3.10 if given floats, when previously it worked just fine with either ints or floats. This is just 1 example. But many codebases that use PyQt5 are hit by breakages like this one now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 03:00:42 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 09 Dec 2021 08:00:42 +0000 Subject: [issue45459] Limited API support for Py_buffer In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org> Message-ID: <1639036842.97.0.148279630291.issue45459@roundup.psfhosted.org> Christian Heimes added the comment: > The C language sets other members to 0/NULL with this syntax, no? No, they are not set to 0/NULL. https://en.wikipedia.org/wiki/Uninitialized_variable ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 03:01:11 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Thu, 09 Dec 2021 08:01:11 +0000 Subject: [issue46020] Optimize long_pow for the common case In-Reply-To: <1639031543.32.0.0830001202943.issue46020@roundup.psfhosted.org> Message-ID: <1639036871.98.0.42062015452.issue46020@roundup.psfhosted.org> Dennis Sweeney added the comment: I believe https://bugs.python.org/issue44376 added a special case for 2nd and 3rd powers, and that's the 3.10/3.11 difference in the speed of x**2, not ceval optimizations. ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 03:02:36 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 09 Dec 2021 08:02:36 +0000 Subject: [issue34111] python-config breaks when symlinked to another location In-Reply-To: <1531567311.02.0.56676864532.issue34111@psf.upfronthosting.co.za> Message-ID: <1639036956.06.0.503010547345.issue34111@roundup.psfhosted.org> Christian Heimes added the comment: Could you open a PR, please? The fix looks trivial. ---------- components: +Build nosy: +christian.heimes stage: -> needs patch versions: -Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 03:03:33 2021 From: report at bugs.python.org (Bar Harel) Date: Thu, 09 Dec 2021 08:03:33 +0000 Subject: [issue10850] inconsistent behavior concerning multiprocessing.manager.BaseManager._Server In-Reply-To: <1294360374.53.0.588595674921.issue10850@psf.upfronthosting.co.za> Message-ID: <1639037013.2.0.883731321627.issue10850@roundup.psfhosted.org> Bar Harel added the comment: It's technically not a bug as it is not exposed externally, but I concur with the OP that it shouldn't happen. I'll send a fix either way, and from there we will continue asking if _Server should be exposed or not. ---------- nosy: +bar.harel versions: +Python 3.10, Python 3.11, Python 3.8, Python 3.9 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 03:06:03 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 09 Dec 2021 08:06:03 +0000 Subject: [issue46018] expm1 may incorrectly raise OverflowError on underflow In-Reply-To: <1639010636.16.0.465988709351.issue46018@roundup.psfhosted.org> Message-ID: <1639037163.14.0.61381076487.issue46018@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 03:12:33 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 09 Dec 2021 08:12:33 +0000 Subject: [issue46018] expm1 may incorrectly raise OverflowError on underflow In-Reply-To: <1639010636.16.0.465988709351.issue46018@roundup.psfhosted.org> Message-ID: <1639037553.87.0.862378591675.issue46018@roundup.psfhosted.org> Mark Dickinson added the comment: It's a bit cheap and nasty, but I think we could simply replace the line: if (fabs(x) < 1.0) in is_error with if (fabs(x) < 2.0) perhaps with an explanatory comment. All we need to do is distinguish underflow from overflow, and 2.0 is still clearly a _long_ way away from any overflow boundary. It would be good to have a test that would trigger the behaviour, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 03:19:39 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 09 Dec 2021 08:19:39 +0000 Subject: [issue46018] expm1 may incorrectly raise OverflowError on underflow In-Reply-To: <1639010636.16.0.465988709351.issue46018@roundup.psfhosted.org> Message-ID: <1639037979.32.0.705217888603.issue46018@roundup.psfhosted.org> Mark Dickinson added the comment: I presume this is also worth an upstream report? Setting ERANGE on a result that's close to -1.0 is rather questionable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 03:38:22 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 09 Dec 2021 08:38:22 +0000 Subject: [issue46020] Optimize long_pow for the common case In-Reply-To: <1639031543.32.0.0830001202943.issue46020@roundup.psfhosted.org> Message-ID: <1639039102.68.0.47543465254.issue46020@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 03:46:22 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 Dec 2021 08:46:22 +0000 Subject: [issue45459] Limited API support for Py_buffer In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org> Message-ID: <1639039582.57.0.151188424716.issue45459@roundup.psfhosted.org> STINNER Victor added the comment: Example: --- struct Point { int x; int y; int z; }; int main() { struct Point p = {1}; return p.y; } --- gcc -O0 produces this machine code which sets p.y to 0 and p.z to 0: --- Dump of assembler code for function main: 0x0000000000401106 <+0>: push rbp 0x0000000000401107 <+1>: mov rbp,rsp 0x000000000040110a <+4>: mov QWORD PTR [rbp-0xc],0x0 0x0000000000401112 <+12>: mov DWORD PTR [rbp-0x4],0x0 0x0000000000401119 <+19>: mov DWORD PTR [rbp-0xc],0x1 0x0000000000401120 <+26>: mov eax,DWORD PTR [rbp-0x8] 0x0000000000401123 <+29>: pop rbp 0x0000000000401124 <+30>: ret --- gcc -O3 heavily optimize the code, it always return 0, it doesn't return a random value from the stack: --- (gdb) disassemble main Dump of assembler code for function main: 0x0000000000401020 <+0>: xor eax,eax 0x0000000000401022 <+2>: ret --- The "C99 Standard 6.7.8.21" says: If there are fewer initializers in a brace-enclosed list than there are elements or members of an aggregate, or fewer characters in a string literal used to initialize an array of known size than there are elements in the array, the remainder of the aggregate shall be initialized implicitly the same as objects that have static storage duration. The C99 standard says that p.y and p.z must be set to 0. I'm talking about the specific C syntax of a structure static initialization: "struct MyStruct x = {...};". If "Py_buffer data = {NULL, NULL};" is allocated on the stack, all "data" Py_buffer members are set to 0 or NULL: typedef struct bufferinfo { void *buf; PyObject *obj; /* owned reference */ Py_ssize_t len; Py_ssize_t itemsize; /* This is Py_ssize_t so it can be pointed to by strides in simple case.*/ int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; If we want to add a version member to this structure, I would suggest to enforce the usage of a static initialization macro or an initialization function, like: "Py_buffer data; PyBuffer_Init(&data);" or "Py_buffer data = PyBuffer_STATIC_INIT;" The problem of the macro is that it is not usable on Python extensions was are not written in C or C++ (or more generally to extensions which cannot use macros). -- A different approach is to use an API which allocates a Py_buffer on the heap memory, so if the structure becomes larger tomorrow, an old built C extensions continues to work: Py_buffer *data = PyBuffer_New(); // ... use *data ... PyBuffer_Free(data); PyBuffer_New() can initialize the version member and allocates the proper memory block size. The best is if the "... use *data ..." part is only done with function calls :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 03:57:57 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 Dec 2021 08:57:57 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639040277.01.0.293010260755.issue46006@roundup.psfhosted.org> STINNER Victor added the comment: > We can not compare two Unicode by pointer even if both are interned anymore... It was a nice optimization. If two strings are interned and part of the same interpreter, the "ptr1 == ptr2" comparison continues to work. What is not compatible with subinterpreters, which have other interned string objects, is the assumption that two interned strings are not equal if both strings are interned and pointeres are not equal. _PyUnicode_EqualToASCIIId() is the only function making this assumption. * dictkeys_stringlookup(): if pointers are not equal, compare the hash: if the two hashes are equal, compare the strings content with unicode_eq() * PyUnicode_Compare(): if pointers are not equal, compare the strings content with unicode_compare() * _PyUnicode_EQ(): always compare the strings content * PyUnicode_RichCompare(): if pointers are not equal, compare the strings content None of these functions have a fast path for interned strings. Well, _PyUnicode_EqualToASCIIId() is different since right is always an interned string. Note: unicode_compare() is strange, it requires both strings to be equal, but it does not consider that two strings are not equal if their kinds are not equal. If both strings are ready and their kinds are not equal, the two strings cannot be equal... unicode_compare_eq() returns 0 if the two kinds are not equal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 03:58:21 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 09 Dec 2021 08:58:21 +0000 Subject: [issue46007] [C API] PyUnicode_CHECK_INTERNED() doesn't work in the limited C API In-Reply-To: <1638898465.89.0.178243976292.issue46007@roundup.psfhosted.org> Message-ID: <1639040301.22.0.0477202540743.issue46007@roundup.psfhosted.org> miss-islington added the comment: New changeset 73325bbe774b16891f999fb557177206470676b1 by Victor Stinner in branch 'main': bpo-46007: Exclude PyUnicode_CHECK_INTERNED() from limited C API (GH-29987) https://github.com/python/cpython/commit/73325bbe774b16891f999fb557177206470676b1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:00:19 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 Dec 2021 09:00:19 +0000 Subject: [issue46007] [C API] PyUnicode_CHECK_INTERNED() doesn't work in the limited C API In-Reply-To: <1638898465.89.0.178243976292.issue46007@roundup.psfhosted.org> Message-ID: <1639040419.23.0.113274665042.issue46007@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 Dec 9 04:06:53 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 09 Dec 2021 09:06:53 +0000 Subject: [issue36048] Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__ In-Reply-To: <1550644985.32.0.26417547244.issue36048@roundup.psfhosted.org> Message-ID: <1639040813.31.0.906108105254.issue36048@roundup.psfhosted.org> Mark Dickinson added the comment: @arhadthedev: Thanks for highlighting the issue. > we need to check if the problem really has place and the PR needs to be retracted until PyQt5 is ported to newer Python C API I'm not particularly impressed by the arguments from cculianu. This was the right change to make: this is very general machinery, and we've seen many real issues over the years resulting from implicit acceptance of floats or Decimal objects where an integer is expected. It may well be that for some *specific* libraries like PyQt5 it makes sense to make a different choice. And indeed, PySide6 has done exactly that: Python 3.10.0 (default, Nov 12 2021, 12:32:57) [Clang 12.0.5 (clang-1205.0.22.11)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from PySide6.QtCore import QPoint >>> QPoint(2, 3) PySide6.QtCore.QPoint(2, 3) >>> QPoint(2.1, 3.3) PySide6.QtCore.QPoint(2, 3) So no, I don't believe this change should be reverted. At best, we could re-introduce the deprecation warnings and delay the full implementation of the change. But the deprecation warnings were present since Python 3.8, and so either the PyQt5 developers noticed them but didn't want to make the change, or didn't notice them. Either way, it's difficult to see what difference extending the deprecation warning period would make. Moreover, the new behaviour is already released, in Python 3.10.0 and 3.10.1, and the code churn would likely be more annoying than helpful. I would suggest to cculianu that they take this up with the PyQt5 developers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:11:35 2021 From: report at bugs.python.org (David CARLIER) Date: Thu, 09 Dec 2021 09:11:35 +0000 Subject: [issue46021] fcntl module update supports FreeBSD F_KINFO flag Message-ID: <1639041095.56.0.579209436021.issue46021@roundup.psfhosted.org> New submission from David CARLIER : - Enabling new F_KINFO flag. - Returning a subset of practical data from it. ---------- components: FreeBSD messages: 408088 nosy: devnexen, koobs priority: normal pull_requests: 28224 severity: normal status: open title: fcntl module update supports FreeBSD F_KINFO flag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:14:00 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 09 Dec 2021 09:14:00 +0000 Subject: [issue45459] Limited API support for Py_buffer In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org> Message-ID: <1639041240.21.0.742057147006.issue45459@roundup.psfhosted.org> Christian Heimes added the comment: Thanks for the investigation. I didn't know about C99 Standard 6.7.8.21. That's a useful and sensible extension to the language. In my opinion it is neither useful to extend the Py_buffer struct with a version tag nor to force users to allocate the struct on the heap. The current design has worked for over 13 years. Any deviation from the established design poses a risk to break 3rd party software. I could be convinced to add PyBuffer_New() and PyBuffer_Free() as additional feature, but their use should be optional. The function were part of my first PR GH-29035. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:19:49 2021 From: report at bugs.python.org (Bar Harel) Date: Thu, 09 Dec 2021 09:19:49 +0000 Subject: [issue46022] Multiprocessing.Server.serve_forever runs sys.exit() Message-ID: <1639041589.61.0.824516720423.issue46022@roundup.psfhosted.org> New submission from Bar Harel : The Python docs recommends using `.serve_forever()` for running a multiprocessing manager. The problem is, that unlike any equivalent `.serve_forever()`, this specific one calls `sys.exit()` and exits the program. This in turn may cause issues if that's not the only use of the Python program, as seen here: https://stackoverflow.com/questions/70284538/overriding-a-built-in-class-method-that-another-class-i-want-to-inherit-from-rel 3 possible solutions: 1. Remove `sys.exit()`: This will cause `shutdown()` to not actually shut down. The function counts on the `.accepter()` daemon thread to close, but if other code is preventing that process from closing, it will continue uninterrupted. 2. Remove `sys.exit()` and check the `stop_event` inside the `.accepter()` daemon thread: This will only partially shut down. The socket will still listen and will only close when the listener receives a command. An option to solve it would be to dispatch a shutdown command, or close the Listener forcibly using `.close()`. All in all, I believe this is the best option. 3. Discourage the use of `serve_forever()`: Right now the way it looks, server is not implemented too well. Its `serve_forever()` function is endorsed by the docs, but the class itself is completely undocumented, with no documentation on any of its functions, and it shuts down the process calling the function when it finishes which is dubious at best. There are plenty more issues scattered around the bug tracker, one of them about its finalization due to the use of daemon threads. Everything can be implemented using start() together with an event. The only reason I don't like this option, is because `serve_forever()` does seem convenient and can be fixed per option 2. I'll start implementing option 2 in the background, together with adding documentation, but I would enjoy gathering more feedback. ---------- messages: 408090 nosy: bar.harel, davin, pitrou priority: normal severity: normal status: open title: Multiprocessing.Server.serve_forever runs sys.exit() versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:23:50 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 09 Dec 2021 09:23:50 +0000 Subject: [issue46023] Modules/makesetup generated rules ignore *disabled* Message-ID: <1639041830.9.0.701619101169.issue46023@roundup.psfhosted.org> New submission from Christian Heimes : Modules/Setup can disable a module. However makesetup does not take *disabled* into account when it generated Makefile. Example: ---Modules/Setup.local *disabled* pwd --- makesetup generates a Makefile with "pwd" in MODDISABLED_NAMES and MODBUILT_NAMES. Because "pwd" is in MODBUILT_NAMES the module is built and included in python binary. Expected result: "pwd" module should not be built. ---------- components: Build messages: 408091 nosy: christian.heimes priority: normal severity: normal status: open title: Modules/makesetup generated rules ignore *disabled* versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:27:32 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 09 Dec 2021 09:27:32 +0000 Subject: [issue46023] Modules/makesetup generated rules ignore *disabled* In-Reply-To: <1639041830.9.0.701619101169.issue46023@roundup.psfhosted.org> Message-ID: <1639042052.11.0.579866742861.issue46023@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +28225 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30001 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:33:37 2021 From: report at bugs.python.org (Bar Harel) Date: Thu, 09 Dec 2021 09:33:37 +0000 Subject: [issue46022] Multiprocessing.Server.serve_forever runs sys.exit() In-Reply-To: <1639041589.61.0.824516720423.issue46022@roundup.psfhosted.org> Message-ID: <1639042417.76.0.187050348285.issue46022@roundup.psfhosted.org> Bar Harel added the comment: Regarding backwards compatibility, the only issue that can arise from solutions 1 or 2, is if someone uses a bare `except` statement for finalization around `serve_forever` instead of using `finally`. Keep in mind the function is not documented and there is no good solution for the breakage as you're generally not supposed to catch SystemExit either way. We can make a small search for open source usage of `serve_forever` and see if catching SystemExit is a common idiom. Even if it's common, I still believe this breakage is acceptable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:36:25 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 09 Dec 2021 09:36:25 +0000 Subject: [issue46021] fcntl module update supports FreeBSD F_KINFO flag In-Reply-To: <1639041095.56.0.579209436021.issue46021@roundup.psfhosted.org> Message-ID: <1639042585.47.0.917055909133.issue46021@roundup.psfhosted.org> Christian Heimes added the comment: Please update the ticket with more information - What does the flag F_KINFO do? - Which platforms support the F_KINFO flag? - link to a man page or platform documentation A ticket should contain enough information so that a reviewer can understand the purpose of a feature request. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:37:00 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 Dec 2021 09:37:00 +0000 Subject: [issue46020] Optimize long_pow for the common case In-Reply-To: <1639031543.32.0.0830001202943.issue46020@roundup.psfhosted.org> Message-ID: <1639042620.65.0.398711039534.issue46020@roundup.psfhosted.org> Raymond Hettinger added the comment: Hmm, I had just looked at that code and it wasn't at all obvious that an optimization had been added. I expected something like: if (exp==2) return PyNumber_Multiply(x, x); I wonder where the extra clock cycles are going. Looking at the ceval.c dispatch and the bodies of PyNumber_Multiply(), _PyNumber_PowerNoMod(), and PyNumber_Power(), it looks like the power dispatch code should be about the same as or slightly cheaper than the multiply dispatch. I'm surprised there is still almost a two to one speed difference. ISTM there is still too much overhead for squaring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:39:01 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 09:39:01 +0000 Subject: [issue32917] ConfigParser writes a superfluous final blank line In-Reply-To: <1519349390.35.0.467229070634.issue32917@psf.upfronthosting.co.za> Message-ID: <1639042741.32.0.200173244033.issue32917@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: patch review -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:42:03 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Dec 2021 09:42:03 +0000 Subject: [issue36048] Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__ In-Reply-To: <1550644985.32.0.26417547244.issue36048@roundup.psfhosted.org> Message-ID: <1639042923.75.0.376820695366.issue36048@roundup.psfhosted.org> Serhiy Storchaka added the comment: This issue was closed more than 2.5 years ago. The changes were made in 3.8, not in 3.10. BTW, 3.8 only accepts security fixes now. Please open a new issue for new discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:42:35 2021 From: report at bugs.python.org (David CARLIER) Date: Thu, 09 Dec 2021 09:42:35 +0000 Subject: [issue46021] fcntl module update supports FreeBSD F_KINFO flag In-Reply-To: <1639041095.56.0.579209436021.issue46021@roundup.psfhosted.org> Message-ID: <1639042955.82.0.711798605232.issue46021@roundup.psfhosted.org> David CARLIER added the comment: - The F_KINFO flag returns the related kinfo_file from the file descriptor. - While F_KINFO is, at the moment, FreeBSD's specific however other BSD has kinfo_file data as well thus the possibility they support a similar feature (F_KINFO appears only around the 5th of December). - Does not appear yet on the man page most likely due to its very recent appareance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:44:03 2021 From: report at bugs.python.org (David CARLIER) Date: Thu, 09 Dec 2021 09:44:03 +0000 Subject: [issue46021] fcntl module update supports FreeBSD F_KINFO flag In-Reply-To: <1639041095.56.0.579209436021.issue46021@roundup.psfhosted.org> Message-ID: <1639043043.35.0.399993424016.issue46021@roundup.psfhosted.org> David CARLIER added the comment: - Got clues mostly from source code and header https://github.com/freebsd/freebsd-src/blob/794d3e8e63f4a6ebc8926030b6c937109ddc5485/sys/sys/fcntl.h#L273 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:45:02 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 09:45:02 +0000 Subject: [issue38145] Fix short option 'd' in 'distutils' command 'bdist_dumb' In-Reply-To: <1568313123.54.0.58284352566.issue38145@roundup.psfhosted.org> Message-ID: <1639043102.82.0.0579856484142.issue38145@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:46:50 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 09 Dec 2021 09:46:50 +0000 Subject: [issue36048] Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__ In-Reply-To: <1550644985.32.0.26417547244.issue36048@roundup.psfhosted.org> Message-ID: <1639043210.76.0.169342042747.issue36048@roundup.psfhosted.org> Mark Dickinson added the comment: For the record, #37999 is the issue that turned the deprecation warnings into errors for Python 3.10. (But as Serhiy says, please open a new issue, or start a discussion on one of the mailing lists.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:48:06 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 09:48:06 +0000 Subject: [issue15082] [httplib] httplib.BadStatusLine on any HTTPS connection in certain unknown cases. In-Reply-To: <1339811528.79.0.0690651710917.issue15082@psf.upfronthosting.co.za> Message-ID: <1639043286.81.0.912414418882.issue15082@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: test needed -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:50:28 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 Dec 2021 09:50:28 +0000 Subject: [issue46020] Optimize long_pow for the common case In-Reply-To: <1639031543.32.0.0830001202943.issue46020@roundup.psfhosted.org> Message-ID: <1639043428.06.0.0260325754136.issue46020@roundup.psfhosted.org> Raymond Hettinger added the comment: The situation for floats is also disappointing: $ python3.11 -m timeit -s 'x=1.1' 'x ** 2' 5000000 loops, best of 5: 60.8 nsec per loop $ python3.11 -m timeit -s 'x=1.1' 'x ** 2.0' 5000000 loops, best of 5: 51.5 nsec per loop $ python3.11 -m timeit -s 'x=1.1' 'x * x' 20000000 loops, best of 5: 17.7 nsec per loop Complex numbers are more balanced. Surprisingly, some of the complex cases are faster than their float counterparts: $ python3.11 -m timeit -s 'x=1.1+2.2j' 'x ** 2' 5000000 loops, best of 5: 42.4 nsec per loop $ python3.11 -m timeit -s 'x=1.1+2.2j' 'x ** 2.0' 5000000 loops, best of 5: 43.3 nsec per loop $ python3.11 -m timeit -s 'x=1.1+2.2j' 'x ** 2.0j' 2000000 loops, best of 5: 107 nsec per loop $ python3.11 -m timeit -s 'x=1.1+2.2j' 'x * x' 10000000 loops, best of 5: 30.6 nsec per loop Decimal still shows a large difference: $ python3.11 -m timeit -s 'from decimal import Decimal' -s 'x=Decimal("1.1")' 'x ** 2' 1000000 loops, best of 5: 206 nsec per loop $ python3.11 -m timeit -s 'from decimal import Decimal' -s 'x=Decimal("1.1")' 'x ** Decimal(2)' 1000000 loops, best of 5: 281 nsec per loop $ python3.11 -m timeit -s 'from decimal import Decimal' -s 'x=Decimal("1.1")' 'x * x' 5000000 loops, best of 5: 60.9 nsec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:55:02 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 09:55:02 +0000 Subject: [issue10336] test_xmlrpc fails if gzip is not supported by client In-Reply-To: <1289041038.52.0.266218953067.issue10336@psf.upfronthosting.co.za> Message-ID: <1639043702.23.0.567184105372.issue10336@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: test needed -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:56:20 2021 From: report at bugs.python.org (Bar Harel) Date: Thu, 09 Dec 2021 09:56:20 +0000 Subject: [issue46022] Multiprocessing.Server.serve_forever runs sys.exit() In-Reply-To: <1639041589.61.0.824516720423.issue46022@roundup.psfhosted.org> Message-ID: <1639043780.69.0.138453341623.issue46022@roundup.psfhosted.org> Change by Bar Harel : ---------- components: +Library (Lib) type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:56:52 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 09 Dec 2021 09:56:52 +0000 Subject: [issue46021] fcntl module update supports FreeBSD F_KINFO flag In-Reply-To: <1639041095.56.0.579209436021.issue46021@roundup.psfhosted.org> Message-ID: <1639043812.5.0.340774831011.issue46021@roundup.psfhosted.org> Christian Heimes added the comment: I still have no clue what the flag is doing. Could you please describe the purpose and meaning of kinfo_file so that somebody without FreeBSD Kernel insight can understand it? Much appreciated. The feature is not available in FreeBSD 13.0. Is it scheduled for 14.0? We typically do not wrap new Kernel or OS features until they are available in stable OS releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 04:59:08 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 09:59:08 +0000 Subject: [issue1295179] termios.c in qnx4.25 Message-ID: <1639043948.53.0.0865891453943.issue1295179@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: test needed -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 05:07:38 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Dec 2021 10:07:38 +0000 Subject: [issue39694] Incorrect dictionary unpacking when calling str.format In-Reply-To: <1582193003.32.0.513659901276.issue39694@roundup.psfhosted.org> Message-ID: <1639044458.06.0.786683878784.issue39694@roundup.psfhosted.org> Serhiy Storchaka added the comment: I disagree, but does not insists if other core developers have other opinion. This is a special case which breaks the rules. The Python language specification does not support non-string keywords. You cannot implement this "feature" in Python. And it is not compatible with other implementations (PyPy): >>>> ''.format(**{1:2}) Traceback (most recent call last): File "", line 1, in TypeError: format() keywords must be strings, not 'int' It would be understandable to not enforce this limitation if it has significant costs. But in this case it costs almost nothing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 05:07:58 2021 From: report at bugs.python.org (David CARLIER) Date: Thu, 09 Dec 2021 10:07:58 +0000 Subject: [issue46021] fcntl module update supports FreeBSD F_KINFO flag In-Reply-To: <1639041095.56.0.579209436021.issue46021@roundup.psfhosted.org> Message-ID: <1639044478.29.0.632494906167.issue46021@roundup.psfhosted.org> David CARLIER added the comment: Ah right then no point then if there is no support for upcoming feature, indeed it s only FreeBSD 14 scheduled next year :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 05:14:42 2021 From: report at bugs.python.org (David CARLIER) Date: Thu, 09 Dec 2021 10:14:42 +0000 Subject: [issue46021] fcntl module update supports FreeBSD F_KINFO flag In-Reply-To: <1639041095.56.0.579209436021.issue46021@roundup.psfhosted.org> Message-ID: <1639044882.77.0.376260160784.issue46021@roundup.psfhosted.org> David CARLIER added the comment: - A kinfo_file data holds file information from the kernel's perspective (like the path or the current offset), more info here https://github.com/freebsd/freebsd-src/blob/main/sys/sys/user.h#L342 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 05:19:15 2021 From: report at bugs.python.org (flvn.dev) Date: Thu, 09 Dec 2021 10:19:15 +0000 Subject: [issue46024] Different behaviour with zipfile Message-ID: <1639045155.54.0.671926991121.issue46024@roundup.psfhosted.org> New submission from flvn.dev : Given the this directory structure: ``` logs ??? 2020 ? ??? 2020101.zip | ??? ... ??? 2021 ? ??? 2021101.zip | ??? ... ``` The following piece of code: ```python from pathlib import Path from zipfile import Path as ZipPath for item in Path("logs").iterdir(): if item.is_dir(): path = next(item.iterdir()) print(ZipPath(path).name) ``` gives different results between Python 3.9.7 (empty strings) and 3.10.0 (the zip files name) ---------- messages: 408104 nosy: flvn.dev priority: normal severity: normal status: open title: Different behaviour with zipfile type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 06:06:51 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 09 Dec 2021 11:06:51 +0000 Subject: [issue46016] fcntl module add F_DUP2FD_CLOEXEC In-Reply-To: <1638998078.36.0.0492190037093.issue46016@roundup.psfhosted.org> Message-ID: <1639048011.44.0.395163358159.issue46016@roundup.psfhosted.org> Christian Heimes added the comment: GH-29993 broke docs: python tools/rstlint.py -i tools -i ./venv -i README.rst [2] whatsnew/3.11.rst:335: default role used 1 problem with severity 2 found. make: *** [Makefile:216: check] Error 1 ---------- nosy: +christian.heimes resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 06:14:04 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 09 Dec 2021 11:14:04 +0000 Subject: [issue46016] fcntl module add F_DUP2FD_CLOEXEC In-Reply-To: <1638998078.36.0.0492190037093.issue46016@roundup.psfhosted.org> Message-ID: <1639048444.1.0.965581641614.issue46016@roundup.psfhosted.org> Change by Christian Heimes : ---------- assignee: -> vstinner priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 06:17:27 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 11:17:27 +0000 Subject: [issue10048] urllib.request documentation confusing In-Reply-To: <1286535990.46.0.129844190964.issue10048@psf.upfronthosting.co.za> Message-ID: <1639048647.21.0.936925869627.issue10048@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: needs patch -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 06:20:52 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 09 Dec 2021 11:20:52 +0000 Subject: [issue46025] Raising in an atexit function in dev mode crashes Message-ID: <1639048852.81.0.201272717703.issue46025@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : Issue found by Matt Wozniski: Running this with python3.10 -X dev segfaults: import atexit def func(): atexit.unregister(func) 1/0 atexit.register(func) ---------- keywords: 3.10regression, 3.11regression messages: 408106 nosy: pablogsal priority: normal severity: normal status: open title: Raising in an atexit function in dev mode crashes versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 06:22:12 2021 From: report at bugs.python.org (Zac Hatfield-Dodds) Date: Thu, 09 Dec 2021 11:22:12 +0000 Subject: [issue46026] importlib.resources.read_text() raises FileNotFound Message-ID: <1639048932.34.0.580414106772.issue46026@roundup.psfhosted.org> New submission from Zac Hatfield-Dodds : Testing Hypothesis with Python 3.11.0a3, I've triggered a frustrating regression in importlib.resources: # Both work in Python 3.9 and 3.10, but both fail in 3.11.0a3 from importlib.resources import files, read_text read_text("hypothesis.vendor", "tlds-alpha-by-domain.txt") files("hypothesis.vendor").joinpath("tlds-alpha-by-domain.txt").read_text() Traceback (most recent call last): ... File "example.py", line 4, in read_text("hypothesis.vendor", "tlds-alpha-by-domain.txt") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "python3.11/importlib/_legacy.py", line 25, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "python3.11/importlib/_legacy.py", line 67, in read_text with open_text(package, resource, encoding, errors) as fp: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "python3.11/importlib/_legacy.py", line 25, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "python3.11/importlib/_legacy.py", line 50, in open_text return (_common.files(package) / _common.normalize_path(resource)).open( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "python3.11/importlib/_adapters.py", line 141, in open raise FileNotFoundError("Can't open orphan path") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: Can't open orphan path At first I thought this was just a problem with the _legacy shims, but since it also affects the new files() API it might be more serious. ---------- components: Library (Lib) messages: 408107 nosy: Zac Hatfield-Dodds, barry priority: normal severity: normal status: open title: importlib.resources.read_text() raises FileNotFound type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 06:22:57 2021 From: report at bugs.python.org (Zac Hatfield-Dodds) Date: Thu, 09 Dec 2021 11:22:57 +0000 Subject: [issue46026] importlib.resources.read_text() raises FileNotFound In-Reply-To: <1639048932.34.0.580414106772.issue46026@roundup.psfhosted.org> Message-ID: <1639048977.86.0.23498520067.issue46026@roundup.psfhosted.org> Change by Zac Hatfield-Dodds : ---------- nosy: +brett.cannon, jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 06:23:27 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 09 Dec 2021 11:23:27 +0000 Subject: [issue46025] Raising in an atexit function in dev mode crashes In-Reply-To: <1639048852.81.0.201272717703.issue46025@roundup.psfhosted.org> Message-ID: <1639049007.16.0.604697021033.issue46025@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 06:23:59 2021 From: report at bugs.python.org (Zac Hatfield-Dodds) Date: Thu, 09 Dec 2021 11:23:59 +0000 Subject: [issue46026] importlib.resources.read_text() raises FileNotFound In-Reply-To: <1639048932.34.0.580414106772.issue46026@roundup.psfhosted.org> Message-ID: <1639049039.7.0.274950796025.issue46026@roundup.psfhosted.org> Zac Hatfield-Dodds added the comment: This may have appeared in the wild, via the backport, in https://github.com/Nuitka/Nuitka/issues/1274 and https://github.com/Nuitka/Nuitka/commit/ffe861cfe972c6bf19f9eea1ff95e35d0e4240b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 06:36:14 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 09 Dec 2021 11:36:14 +0000 Subject: [issue45359] TopologicalSorter is not Generic at runtime (but is in typeshed) In-Reply-To: <1633299530.43.0.181161136207.issue45359@roundup.psfhosted.org> Message-ID: <1639049774.34.0.0412569776741.issue45359@roundup.psfhosted.org> Andrew Svetlov added the comment: The new feature is applied to Python 3.11 only ---------- 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 Dec 9 06:42:59 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 09 Dec 2021 11:42:59 +0000 Subject: [issue46025] Raising in an atexit function in dev mode crashes In-Reply-To: <1639048852.81.0.201272717703.issue46025@roundup.psfhosted.org> Message-ID: <1639050179.12.0.0626085128968.issue46025@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +28226 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30002 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 06:49:09 2021 From: report at bugs.python.org (Kumar Aditya) Date: Thu, 09 Dec 2021 11:49:09 +0000 Subject: [issue27062] `inspect` doesn't have `__all__` In-Reply-To: <1463689783.23.0.292900715898.issue27062@psf.upfronthosting.co.za> Message-ID: <1639050549.04.0.835224887286.issue27062@roundup.psfhosted.org> Change by Kumar Aditya : ---------- keywords: +patch nosy: +kumaraditya303 nosy_count: 2.0 -> 3.0 pull_requests: +28227 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30003 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 06:53:54 2021 From: report at bugs.python.org (Jacob Hayes) Date: Thu, 09 Dec 2021 11:53:54 +0000 Subject: [issue45359] TopologicalSorter is not Generic at runtime (but is in typeshed) In-Reply-To: <1633299530.43.0.181161136207.issue45359@roundup.psfhosted.org> Message-ID: <1639050834.3.0.598214317029.issue45359@roundup.psfhosted.org> Jacob Hayes added the comment: Thanks for merging! Should typeshed be updated for <3.11 in the meantime or do you suggest `if TYPE_CHECKING` blocks on user side? Perhaps it's a non-issue if no one else has noticed this. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 07:17:03 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 12:17:03 +0000 Subject: [issue12142] Reference cycle when importing ctypes In-Reply-To: <1306017588.73.0.650837416325.issue12142@psf.upfronthosting.co.za> Message-ID: <1639052223.69.0.309717341157.issue12142@roundup.psfhosted.org> Irit Katriel added the comment: Looks like the long double issue is still there in 3.11 >>> import gc >>> gc.set_debug(gc.DEBUG_LEAK) >>> import ctypes gc: collectable gc: collectable gc: collectable gc: collectable gc: collectable gc: collectable gc: collectable gc: collectable gc: collectable <_ctypes.PyCSimpleType 0x0000026417AE4E10> gc: collectable gc: collectable gc: collectable gc: collectable >>> gc.garbage [, (,), {'__module__': 'types', '_m': , '__dict__': , '__weakref__': , '__doc__': None}, , (, ), , , (,), , (, , , ), , , {'__module__': 'ctypes', '_type_': 'g', '__dict__': , '__weakref__': , '__doc__': None}] ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 07:20:07 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 12:20:07 +0000 Subject: [issue23104] [Windows x86-64] ctypes: Incorrect function call In-Reply-To: <1419334423.22.0.551057120801.issue23104@psf.upfronthosting.co.za> Message-ID: <1639052407.79.0.431009903194.issue23104@roundup.psfhosted.org> Irit Katriel added the comment: I'm closing as there was no reply to Victor's suggestion and this is 7 years old. Please create a new issue if you are still having a problem with this in a supported python version (>= 3.9). ---------- nosy: +iritkatriel stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 07:43:39 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 09 Dec 2021 12:43:39 +0000 Subject: [issue23104] [Windows x86-64] ctypes: Incorrect function call In-Reply-To: <1419334423.22.0.551057120801.issue23104@psf.upfronthosting.co.za> Message-ID: <1639053819.5.0.0997641055691.issue23104@roundup.psfhosted.org> Eryk Sun added the comment: Victor's comment wasn't relevant. objid() stays referenced during the call. Anyway, I just built testlib.c and verified that this ctypes example works correctly in both 64-bit 3.4.4 and 3.10, so the issue is out of date. ---------- nosy: +eryksun resolution: -> out of date _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 07:44:09 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 09 Dec 2021 12:44:09 +0000 Subject: [issue23104] [Windows x86-64] ctypes: Incorrect function call In-Reply-To: <1419334423.22.0.551057120801.issue23104@psf.upfronthosting.co.za> Message-ID: <1639053849.21.0.113701478404.issue23104@roundup.psfhosted.org> Change by Eryk Sun : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 07:44:06 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 09 Dec 2021 12:44:06 +0000 Subject: [issue15673] PEP 3121, 384 Refactoring applied to testcapi module In-Reply-To: <1345042709.67.0.745658134358.issue15673@psf.upfronthosting.co.za> Message-ID: <1639053846.57.0.34529141758.issue15673@roundup.psfhosted.org> Erlend E. Aasland added the comment: The _testcapi modules should stay as it is, ref. msg384272 on bpo-40077: Yes, please keep _testcapimodule.c as it is. Static types are still supported and need to be tested. ---------- nosy: +erlendaasland resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 07:56:24 2021 From: report at bugs.python.org (Ken Jin) Date: Thu, 09 Dec 2021 12:56:24 +0000 Subject: [issue45391] 3.10 objects.inv classifies UnionType as data In-Reply-To: <1633522850.1.0.516575372895.issue45391@roundup.psfhosted.org> Message-ID: <1639054584.53.0.540182873993.issue45391@roundup.psfhosted.org> Ken Jin added the comment: New changeset e2cfc89e099b8fad5d8d5bd7f59dadffb6078778 by Bern?t G?bor in branch 'main': bpo-45391: mark UnionType as a class in documentation (GH-28757) https://github.com/python/cpython/commit/e2cfc89e099b8fad5d8d5bd7f59dadffb6078778 ---------- nosy: +kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 07:56:40 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 09 Dec 2021 12:56:40 +0000 Subject: [issue45391] 3.10 objects.inv classifies UnionType as data In-Reply-To: <1633522850.1.0.516575372895.issue45391@roundup.psfhosted.org> Message-ID: <1639054600.29.0.475676248005.issue45391@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +28228 pull_request: https://github.com/python/cpython/pull/30004 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 08:12:12 2021 From: report at bugs.python.org (Ken Jin) Date: Thu, 09 Dec 2021 13:12:12 +0000 Subject: [issue46020] Optimize long_pow for the common case In-Reply-To: <1639031543.32.0.0830001202943.issue46020@roundup.psfhosted.org> Message-ID: <1639055532.68.0.336433919684.issue46020@roundup.psfhosted.org> Ken Jin added the comment: I'm not sure about the original 10:1 difference in 3.10, but in 3.11, the 2:1 difference might be due to the PEP 659 machinery optimizing for int * int, and float * float cases (see BINARY_OP_MULTIPLY_INT and BINARY_OP_MULTIPLY_FLOAT in ceval). Last I recall, these were slightly faster than their unspecialized counterparts as they have less overhead in C function calls. Meanwhile, none of the power operations are optimized via PEP 659 machinery at the moment. ---------- nosy: +kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 08:14:49 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 09 Dec 2021 13:14:49 +0000 Subject: [issue45359] TopologicalSorter is not Generic at runtime (but is in typeshed) In-Reply-To: <1633299530.43.0.181161136207.issue45359@roundup.psfhosted.org> Message-ID: <1639055689.16.0.0964611538744.issue45359@roundup.psfhosted.org> Andrew Svetlov added the comment: `if TYPE_CHECKING:` is a good choice, it works fine just now. `from __future__ import annotations` is another alternative. I don't see a reason for REMOVING already existing and correct annotations from typeshed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 08:16:49 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 09 Dec 2021 13:16:49 +0000 Subject: [issue25066] Better repr for multiprocessing.synchronize objects In-Reply-To: <1441945512.28.0.268911334925.issue25066@psf.upfronthosting.co.za> Message-ID: <1639055809.68.0.611096907817.issue25066@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset af6b4068859a5d0c8afd696f3c0c0155660211a4 by Kumar Aditya in branch 'main': bpo-25066: Added repr for multiprocessing.Event (GH-29749) https://github.com/python/cpython/commit/af6b4068859a5d0c8afd696f3c0c0155660211a4 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 08:17:44 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 09 Dec 2021 13:17:44 +0000 Subject: [issue45391] 3.10 objects.inv classifies UnionType as data In-Reply-To: <1633522850.1.0.516575372895.issue45391@roundup.psfhosted.org> Message-ID: <1639055864.58.0.972354321711.issue45391@roundup.psfhosted.org> miss-islington added the comment: New changeset 2c2ee83c4db4dbd54017dc364bbefc70fa75ea5d by Miss Islington (bot) in branch '3.10': bpo-45391: mark UnionType as a class in documentation (GH-28757) https://github.com/python/cpython/commit/2c2ee83c4db4dbd54017dc364bbefc70fa75ea5d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 08:22:02 2021 From: report at bugs.python.org (Ken Jin) Date: Thu, 09 Dec 2021 13:22:02 +0000 Subject: [issue45391] 3.10 objects.inv classifies many types as data In-Reply-To: <1633522850.1.0.516575372895.issue45391@roundup.psfhosted.org> Message-ID: <1639056122.38.0.879488842102.issue45391@roundup.psfhosted.org> Ken Jin added the comment: As a start, I merged the types.UnionType fix because it's straightforward, but the rest are a little dubious so I'll leave this issue open for now. ---------- title: 3.10 objects.inv classifies UnionType as data -> 3.10 objects.inv classifies many types as data _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 08:37:57 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 09 Dec 2021 13:37:57 +0000 Subject: [issue12142] Reference cycle when importing ctypes In-Reply-To: <1306017588.73.0.650837416325.issue12142@psf.upfronthosting.co.za> Message-ID: <1639057077.71.0.934547041652.issue12142@roundup.psfhosted.org> Eryk Sun added the comment: The _ctypes extension module could have a dict that maps each format code to its (size, alignment), based on `formattable`. Then direct size comparisons wouldn't be limited to types defined by the struct module, and it wouldn't be necessary to create c_longdouble just to check its size and throw it away. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 08:38:48 2021 From: report at bugs.python.org (Gabriele N Tornetta) Date: Thu, 09 Dec 2021 13:38:48 +0000 Subject: [issue32683] isinstance is calling ob.__getattribute__ as a fallback instead of object.__class__.__get__ In-Reply-To: <1517001040.56.0.467229070634.issue32683@psf.upfronthosting.co.za> Message-ID: <1639057128.52.0.964175073948.issue32683@roundup.psfhosted.org> Gabriele N Tornetta added the comment: The following example shows isinstance causing a side effect class Side: class Effect(Exception): pass def __getattribute__(self, name): raise Side.Effect() isinstance(Side(), str) I'd be inclined to see this as a bug as I wouldn't expect isinstance to cause any side effects. ---------- nosy: +Gabriele Tornetta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 08:53:54 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 09 Dec 2021 13:53:54 +0000 Subject: [issue46025] Raising in an atexit function in dev mode crashes In-Reply-To: <1639048852.81.0.201272717703.issue46025@roundup.psfhosted.org> Message-ID: <1639058034.9.0.435977363525.issue46025@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset f0d290d25cad66e615ada68ba190b8a23ac1deaa by Pablo Galindo Salgado in branch 'main': bpo-46025: Fix a crash in the atexit module for auto-unregistering functions (GH-30002) https://github.com/python/cpython/commit/f0d290d25cad66e615ada68ba190b8a23ac1deaa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 08:53:57 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 09 Dec 2021 13:53:57 +0000 Subject: [issue46025] Raising in an atexit function in dev mode crashes In-Reply-To: <1639048852.81.0.201272717703.issue46025@roundup.psfhosted.org> Message-ID: <1639058037.53.0.090857058078.issue46025@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +28229 pull_request: https://github.com/python/cpython/pull/30005 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 08:54:47 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 13:54:47 +0000 Subject: [issue28276] test_loading.py - false positive result for "def test_find" when find_library() is not functional or the (shared) library does not exist In-Reply-To: <1474887883.6.0.275550575314.issue28276@psf.upfronthosting.co.za> Message-ID: <1639058087.46.0.778823790732.issue28276@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11 -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 09:04:11 2021 From: report at bugs.python.org (Douglas Wright) Date: Thu, 09 Dec 2021 14:04:11 +0000 Subject: [issue45999] Links to packaging broken In-Reply-To: <1638806103.81.0.408526409699.issue45999@roundup.psfhosted.org> Message-ID: <1639058651.35.0.972833160294.issue45999@roundup.psfhosted.org> Douglas Wright added the comment: The links are working now. I recall that all of the links in that section pointed to different URLs on 3.9 and newer than they did on 3.8. On 3.9 and newer, you would land on "page not found" on readthedocs.org. They all seem to match up now though. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 09:04:59 2021 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 09 Dec 2021 14:04:59 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639058699.07.0.804214455151.issue46006@roundup.psfhosted.org> Dong-hee Na added the comment: > If two strings are interned and part of the same interpreter, the "ptr1 == ptr2" comparison continues to work. Yeah, AFAIK Comparing two interned strings from different interpreters are not the available use-case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 09:19:35 2021 From: report at bugs.python.org (Ned Deily) Date: Thu, 09 Dec 2021 14:19:35 +0000 Subject: [issue45999] Links to packaging broken In-Reply-To: <1638806103.81.0.408526409699.issue45999@roundup.psfhosted.org> Message-ID: <1639059575.08.0.160184952422.issue45999@roundup.psfhosted.org> Change by Ned Deily : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 09:23:17 2021 From: report at bugs.python.org (Kumar Aditya) Date: Thu, 09 Dec 2021 14:23:17 +0000 Subject: [issue46016] fcntl module add F_DUP2FD_CLOEXEC In-Reply-To: <1638998078.36.0.0492190037093.issue46016@roundup.psfhosted.org> Message-ID: <1639059797.94.0.234374320414.issue46016@roundup.psfhosted.org> Change by Kumar Aditya : ---------- keywords: +patch nosy: +kumaraditya303 nosy_count: 4.0 -> 5.0 pull_requests: +28230 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30006 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 09:24:42 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 09 Dec 2021 14:24:42 +0000 Subject: [issue46016] fcntl module add F_DUP2FD_CLOEXEC In-Reply-To: <1638998078.36.0.0492190037093.issue46016@roundup.psfhosted.org> Message-ID: <1639059882.53.0.536524738413.issue46016@roundup.psfhosted.org> Christian Heimes added the comment: New changeset b123ad8030a4ad15c8dbb7cb3638caf625943878 by Kumar Aditya in branch 'main': bpo-46016: Fix rest syntax of GH-29993 (GH-30006) https://github.com/python/cpython/commit/b123ad8030a4ad15c8dbb7cb3638caf625943878 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 09:27:19 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 09 Dec 2021 14:27:19 +0000 Subject: [issue46016] fcntl module add F_DUP2FD_CLOEXEC In-Reply-To: <1638998078.36.0.0492190037093.issue46016@roundup.psfhosted.org> Message-ID: <1639060039.88.0.454821370295.issue46016@roundup.psfhosted.org> Change by Christian Heimes : ---------- priority: release blocker -> normal resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 09:33:36 2021 From: report at bugs.python.org (Charles Coulombe) Date: Thu, 09 Dec 2021 14:33:36 +0000 Subject: [issue21042] ctypes.util.find_library() should return full pathname instead of filename in linux In-Reply-To: <1395614835.79.0.900137034576.issue21042@psf.upfronthosting.co.za> Message-ID: <1639060416.74.0.233595551518.issue21042@roundup.psfhosted.org> Charles Coulombe added the comment: Any update on this issue? This would be helpful to HPC systems that don't have libraries installed in standard place, and to standardize find_library as well! ---------- nosy: +Charles Coulombe versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 09:34:26 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 09 Dec 2021 14:34:26 +0000 Subject: [issue32683] isinstance is calling ob.__getattribute__ as a fallback instead of object.__class__.__get__ In-Reply-To: <1517001040.56.0.467229070634.issue32683@psf.upfronthosting.co.za> Message-ID: <1639060466.06.0.0890010719351.issue32683@roundup.psfhosted.org> Steven D'Aprano added the comment: I'd be inclined to see this as a bug in your code, if you are causing side-effects from `__getattribute__`. If you don't want attribute access to cause side-effects, then don't put code in `__getattribute__` that causes side-effects :-) isinstance has to check the object's `__class__`, if it has one. To do that it has to look at obj.__class__, which your class intercepts using `__getattribute__` and causes a side-effect. Overloading `__getattribute__` is perilous, because it intercepts *all* instance attribute lookups. In my opinion, one should (almost?) never overload the `__getattribute__` method, it is safer to overload `__getattr__`. In any case, I don't think there is anything to fix here. Dan has not responded since his initial bug report nearly four years ago, so I'm inclined to close this as "Not A Bug". Unless somebody gives a more convincing reason why the current behaviour is wrong, I think we should close it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 09:38:09 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 14:38:09 +0000 Subject: [issue45635] Tidy up error handling in traceback.c / python run.c In-Reply-To: <1635370026.46.0.0220648873339.issue45635@roundup.psfhosted.org> Message-ID: <1639060689.42.0.681577114427.issue45635@roundup.psfhosted.org> Irit Katriel added the comment: New changeset dc4a212bd305831cb4b187a2e0cc82666fcb15ca by Irit Katriel in branch 'main': bpo-45635: continue refactor of print_exception() to standardize error handling (GH-29996) https://github.com/python/cpython/commit/dc4a212bd305831cb4b187a2e0cc82666fcb15ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 09:58:06 2021 From: report at bugs.python.org (R. David Murray) Date: Thu, 09 Dec 2021 14:58:06 +0000 Subject: [issue46011] Python 3.10 email returns invalid Date: header unchanged. In-Reply-To: <1638937977.72.0.569168452456.issue46011@roundup.psfhosted.org> Message-ID: <1639061886.63.0.383883808421.issue46011@roundup.psfhosted.org> R. David Murray added the comment: Yeah, I think there may be a general issue with getting header defects reflected somehow in message.defects, but that's a separate issue :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 10:02:37 2021 From: report at bugs.python.org (Gabriele N Tornetta) Date: Thu, 09 Dec 2021 15:02:37 +0000 Subject: [issue32683] isinstance is calling ob.__getattribute__ as a fallback instead of object.__class__.__get__ In-Reply-To: <1517001040.56.0.467229070634.issue32683@psf.upfronthosting.co.za> Message-ID: <1639062157.18.0.257697415684.issue32683@roundup.psfhosted.org> Gabriele N Tornetta added the comment: I think the issue on display here is that isinstance could cause a side effect, which I dare say it's unexpected (and not documented AFAIK). Are there any reasons why __class__ cannot be retrieved with object.__getattribute__ instead? In fact, considering that __getattribute__ could be overridden, this would be the right thing to do imho, else isinstance would break spectacularly, like in my previous example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 10:08:54 2021 From: report at bugs.python.org (Dave Shawley) Date: Thu, 09 Dec 2021 15:08:54 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1639062534.72.0.0694456095835.issue43112@roundup.psfhosted.org> Change by Dave Shawley : ---------- nosy: +dave-shawley _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 10:14:16 2021 From: report at bugs.python.org (hongweipeng) Date: Thu, 09 Dec 2021 15:14:16 +0000 Subject: [issue42943] singledispatchmethod should expose registry of all known overloads In-Reply-To: <1610833579.12.0.993134178442.issue42943@roundup.psfhosted.org> Message-ID: <1639062856.58.0.0686319669469.issue42943@roundup.psfhosted.org> Change by hongweipeng : ---------- keywords: +patch nosy: +hongweipeng nosy_count: 5.0 -> 6.0 pull_requests: +28231 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30007 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 10:15:34 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 09 Dec 2021 15:15:34 +0000 Subject: [issue46025] Raising in an atexit function in dev mode crashes In-Reply-To: <1639048852.81.0.201272717703.issue46025@roundup.psfhosted.org> Message-ID: <1639062934.31.0.624050364088.issue46025@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 Dec 9 10:16:19 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 09 Dec 2021 15:16:19 +0000 Subject: [issue46025] Raising in an atexit function in dev mode crashes In-Reply-To: <1639048852.81.0.201272717703.issue46025@roundup.psfhosted.org> Message-ID: <1639062979.89.0.688884102344.issue46025@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 934a24c641da5bc4bdb724e901adc20f9a5dff40 by Miss Islington (bot) in branch '3.10': bpo-46025: Fix a crash in the atexit module for auto-unregistering functions (GH-30002) (GH-30005) https://github.com/python/cpython/commit/934a24c641da5bc4bdb724e901adc20f9a5dff40 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 10:34:56 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 09 Dec 2021 15:34:56 +0000 Subject: [issue32683] isinstance is calling ob.__getattribute__ as a fallback instead of object.__class__.__get__ In-Reply-To: <1639062157.18.0.257697415684.issue32683@roundup.psfhosted.org> Message-ID: <20211209153221.GP21647@ando.pearwood.info> Steven D'Aprano added the comment: If you don't want to customise attribute access, don't overload `__getattribute__`. The documentation for `__getattribute__` is clear about what it does: "Called unconditionally to implement attribute accesses for instances of the class." https://docs.python.org/3/reference/datamodel.html#object.__getattribute__ That includes lookups for `__class__`, regardless of whether the function doing the lookup is isinstance or some other function. You ask: "Are there any reasons why __class__ cannot be retrieved with object.__getattribute__ instead?" Yes, that would ignore overloaded attribute access, which would be a bug in my opinion. Being able to dynamically generate computed attributes by overloading `__getattr__` and `__getattribute__` is not a bug. It is part of Python's data model. See the documentation above. And that includes `__class__`. I don't believe that it is an accident or a bug that isinstance uses ordinary attribute lookup, which goes through the standard mechanism including the class' own `__getattribute__` method. But I will ask on the Python-Dev mailing list in case Guido or other core developers think that it is wrong to do so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 10:45:22 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 09 Dec 2021 15:45:22 +0000 Subject: [issue45949] Provide pure-Python implementation of Programs/_freeze_module for cross building In-Reply-To: <1638372868.47.0.982140813893.issue45949@roundup.psfhosted.org> Message-ID: <1639064722.09.0.631962181063.issue45949@roundup.psfhosted.org> Christian Heimes added the comment: Eric, could you review my PR, please? It simplifies cross building to other platforms. I took a look at Tools/freeze/freeze.py. The freeze tool creates different output than Program/_freeze_module.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 10:59:22 2021 From: report at bugs.python.org (Paul Moore) Date: Thu, 09 Dec 2021 15:59:22 +0000 Subject: [issue32683] isinstance is calling ob.__getattribute__ as a fallback instead of object.__class__.__get__ In-Reply-To: <1517001040.56.0.467229070634.issue32683@psf.upfronthosting.co.za> Message-ID: <1639065562.72.0.786888947874.issue32683@roundup.psfhosted.org> Paul Moore added the comment: I tend to agree with Steven and David here. You define __getattribute__ and so that's the behaviour you get when an attribute of the class is requested (whether by the system or by your code). The documentation (here: https://docs.python.org/3/reference/datamodel.html#object.__getattribute__) seems to support this view as well. Do you have a real-world example of code that is broken by this behaviour, or is this just a theoretical problem? Is it particularly hard to make the code work the way you want it to with the current behaviour? For example, # Don't intercept __class__ if attr == "__class__": return object.__getattribute__(self, attr) ---------- nosy: +paul.moore _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 11:18:41 2021 From: report at bugs.python.org (Gabriele N Tornetta) Date: Thu, 09 Dec 2021 16:18:41 +0000 Subject: [issue32683] isinstance is calling ob.__getattribute__ as a fallback instead of object.__class__.__get__ In-Reply-To: <1517001040.56.0.467229070634.issue32683@psf.upfronthosting.co.za> Message-ID: <1639066721.22.0.721643276169.issue32683@roundup.psfhosted.org> Gabriele N Tornetta added the comment: > I tend to agree with Steven and David here. You define __getattribute__ and so that's the behaviour you get when an attribute of the class is requested (whether by the system or by your code). I would agree if it was obvious or explicitly stated that isinstance looks up __class__ using the object's __getattribute__, and thus prone to cause side-effects. It wasn't obvious to me that isinstance would access any attributes from the object, but that it would rather get the object's type in a more direct way (at the C level for CPython). > Do you have a real-world example of code that is broken by this behaviour, or is this just a theoretical problem? I was looking at some profiling data for a real-life project (observability) that I'm working on. I was using a simple Django application as a target and noticed calls to a __getattribute__ (implemented by a Django class) that I wasn't expecting. All my code was doing was to check that a certain object was not of "callable" type using isinstance. Whilst I believe no side effects were caused by this particular instance of __getattribute__, it should be noted that "Django" is a variable here: any other target framework or library might have caused side effects in theory. The code that I want to execute must have guarantees of being side-effects-free, so using isinstance does not give me that. Currently, I have worked around this by using a custom, pure Python implementation of isinstance that gets __mro__ (via object.__getattribute__) and checks that type(obj) is an element of it (plus caching, for performance reasons). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 11:28:06 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 Dec 2021 16:28:06 +0000 Subject: [issue46016] fcntl module add F_DUP2FD_CLOEXEC In-Reply-To: <1638998078.36.0.0492190037093.issue46016@roundup.psfhosted.org> Message-ID: <1639067286.3.0.0209864866784.issue46016@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +28232 pull_request: https://github.com/python/cpython/pull/30009 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 11:37:56 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 09 Dec 2021 16:37:56 +0000 Subject: [issue46018] expm1 may incorrectly raise OverflowError on underflow In-Reply-To: <1639010636.16.0.465988709351.issue46018@roundup.psfhosted.org> Message-ID: <1639067876.07.0.133539744076.issue46018@roundup.psfhosted.org> Steve Dower added the comment: I considered just switching to <2.0, but wasn't sure if I would be breaking some other unspoken behaviour there. But you're right, it's really just detecting underflow vs. overflow, so that's a much simpler way to check. I've filed the upstream report. I suspect the errno is coming from the exp() call within the expm1() implementation, so it's underflowing towards 0.0 and then subtracting 1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 11:41:28 2021 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 09 Dec 2021 16:41:28 +0000 Subject: [issue46024] Different behaviour with zipfile In-Reply-To: <1639045155.54.0.671926991121.issue46024@roundup.psfhosted.org> Message-ID: <1639068088.94.0.0268671939783.issue46024@roundup.psfhosted.org> Eric V. Smith added the comment: What does "path" (the input to ZipPath) look like? Please change your print statement to: print(repr(path), ZipPath(path).name) Then send us the output from each version of python. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 11:46:38 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 09 Dec 2021 16:46:38 +0000 Subject: [issue46018] expm1 may incorrectly raise OverflowError on underflow In-Reply-To: <1639010636.16.0.465988709351.issue46018@roundup.psfhosted.org> Message-ID: <1639068398.59.0.412321002255.issue46018@roundup.psfhosted.org> Steve Dower added the comment: I've also got no idea how to write a test for this, given that it's a very thin wrapper around a platform's C runtime library. Our existing test discovered when the library changed behaviour to start setting errno, which is probably the best we can do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 11:51:17 2021 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 09 Dec 2021 16:51:17 +0000 Subject: [issue45654] Freeze the runpy module. In-Reply-To: <1635444830.43.0.574749380857.issue45654@roundup.psfhosted.org> Message-ID: <1639068677.2.0.854807237051.issue45654@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 44b0e76f2a80c9a78242b7542b8b1218d244af07 by Kumar Aditya in branch 'main': bpo-45654: Freeze the runpy module and stuff it imports (GH-29903) https://github.com/python/cpython/commit/44b0e76f2a80c9a78242b7542b8b1218d244af07 ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 11:52:22 2021 From: report at bugs.python.org (Ethan Furman) Date: Thu, 09 Dec 2021 16:52:22 +0000 Subject: [issue32683] isinstance is calling ob.__getattribute__ as a fallback instead of object.__class__.__get__ In-Reply-To: <1517001040.56.0.467229070634.issue32683@psf.upfronthosting.co.za> Message-ID: <1639068742.13.0.876096878607.issue32683@roundup.psfhosted.org> Ethan Furman added the comment: $ python3 Python 3.8.10 (default, Sep 28 2021, 16:10:42) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> object >>> import builtins >>> builtins.object >>> builtins.object = int >>> object Python is very much a language about responsibility. If Django is overriding `__getattribute__` then it is their responsibility to ensure that everything still works properly. If something doesn't, we file a bug report and/or implement a work-around. As for side-effect free -- I'm not sure than anything in Python is guaranteed to be side-effect free, except maybe `is`. There is no bug here, everything is working as intended. ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 11:55:11 2021 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 09 Dec 2021 16:55:11 +0000 Subject: [issue45654] Freeze the runpy module. In-Reply-To: <1635444830.43.0.574749380857.issue45654@roundup.psfhosted.org> Message-ID: <1639068911.81.0.915492633117.issue45654@roundup.psfhosted.org> Guido van Rossum added the comment: Thanks Kumar! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 12:01:17 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 Dec 2021 17:01:17 +0000 Subject: [issue46025] Raising in an atexit function in dev mode crashes In-Reply-To: <1639048852.81.0.201272717703.issue46025@roundup.psfhosted.org> Message-ID: <1639069277.52.0.013002144372.issue46025@roundup.psfhosted.org> STINNER Victor added the comment: Interesting bug report! Thanks for the fix ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 12:03:09 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 Dec 2021 17:03:09 +0000 Subject: [issue46025] Raising in an atexit function in dev mode crashes In-Reply-To: <1639048852.81.0.201272717703.issue46025@roundup.psfhosted.org> Message-ID: <1639069389.08.0.94374009748.issue46025@roundup.psfhosted.org> STINNER Victor added the comment: For me, the question is why would anyone call atexit.unregister() inside an atexit callback. Is it useful? atexit._run_exitfuncs() removes all registered callbacks. Py_Finalize() calls _PyAtExit_Call() which also removes all registered callbacks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 12:04:32 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 09 Dec 2021 17:04:32 +0000 Subject: [issue46018] expm1 may incorrectly raise OverflowError on underflow In-Reply-To: <1639010636.16.0.465988709351.issue46018@roundup.psfhosted.org> Message-ID: <1639069472.52.0.822458782345.issue46018@roundup.psfhosted.org> Mark Dickinson added the comment: > I've also got no idea how to write a test for this Yep, that's fine. All I want is that at least one particular value that caused the spurious OverflowError is in the test suite somewhere, but it sounds as though that's already the case. I'd imagine that one of these two testcases should be enough to trigger it: https://github.com/python/cpython/blob/44b0e76f2a80c9a78242b7542b8b1218d244af07/Lib/test/math_testcases.txt#L495-L496 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 12:05:26 2021 From: report at bugs.python.org (Calin Culianu) Date: Thu, 09 Dec 2021 17:05:26 +0000 Subject: [issue36048] Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__ In-Reply-To: <1550644985.32.0.26417547244.issue36048@roundup.psfhosted.org> Message-ID: <1639069526.13.0.173222082528.issue36048@roundup.psfhosted.org> Calin Culianu added the comment: Hi, I'm cculianu, the reporting user. May I get a link or some background for the motivation for this change? It seems to me that there are vague allusions to "Decimal -> int cause problems in past", or some such, and I'd like to read the arguments presented as to what problems in particular, and how this change fixes those problems. Mathematically, and by convention in computer science, conversions from float-like types -> int are always well defined. It seems strangely un-Pythonic to restrict things in such a way. I am very surprised by this change, quite frankly. It's the wrong direction to go in, for this language, is my intuitive feeling. Anyway, very curious about what the rationale was for this. Thanks. ---------- nosy: +calin.culianu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 12:06:29 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 09 Dec 2021 17:06:29 +0000 Subject: [issue46025] Raising in an atexit function in dev mode crashes In-Reply-To: <1639048852.81.0.201272717703.issue46025@roundup.psfhosted.org> Message-ID: <1639069589.89.0.313013608679.issue46025@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: >For me, the question is why would anyone call atexit.unregister() inside an atexit callback. Is it useful? Is not useful, is just an edge case ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 12:14:04 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 09 Dec 2021 17:14:04 +0000 Subject: [issue46018] expm1 may incorrectly raise OverflowError on underflow In-Reply-To: <1639010636.16.0.465988709351.issue46018@roundup.psfhosted.org> Message-ID: <1639070044.2.0.319680616642.issue46018@roundup.psfhosted.org> Steve Dower added the comment: Lines 500-504 are the ones that trigger it. Apparently there are no tests in that file for straight exp(), but the equivalent tests for those would return 0.0 and suppress ERANGE too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 13:12:26 2021 From: report at bugs.python.org (Fred Drake) Date: Thu, 09 Dec 2021 18:12:26 +0000 Subject: [issue46027] email.utils.parsedate_to_datetime() handling of -0000 offset Message-ID: <1639073545.99.0.633545342091.issue46027@roundup.psfhosted.org> New submission from Fred Drake : A local time offset of '-0000' is not handled the same way as an offset of '+0000', but I'd expect it would be: >>> import email.utils >>> >>> email.utils.parsedate_to_datetime('9 Dec 2021 08:52:04 -0000') datetime.datetime(2021, 12, 9, 8, 52, 4) >>> email.utils.parsedate_to_datetime('9 Dec 2021 08:52:04 +0000') datetime.datetime(2021, 12, 9, 8, 52, 4, tzinfo=datetime.timezone.utc) I observe the same behavior on Python 3.9.9 and 3.10.1. ---------- components: email messages: 408149 nosy: barry, fdrake, r.david.murray priority: normal severity: normal status: open title: email.utils.parsedate_to_datetime() handling of -0000 offset type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 13:21:24 2021 From: report at bugs.python.org (Mark Shannon) Date: Thu, 09 Dec 2021 18:21:24 +0000 Subject: [issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations In-Reply-To: <1624890138.2.0.824780513801.issue44525@roundup.psfhosted.org> Message-ID: <1639074083.99.0.414134956107.issue44525@roundup.psfhosted.org> Change by Mark Shannon : ---------- pull_requests: +28233 pull_request: https://github.com/python/cpython/pull/30011 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 13:25:58 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Dec 2021 18:25:58 +0000 Subject: [issue36048] Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__ In-Reply-To: <1550644985.32.0.26417547244.issue36048@roundup.psfhosted.org> Message-ID: <1639074358.36.0.652397068377.issue36048@roundup.psfhosted.org> Serhiy Storchaka added the comment: See issue660144 which made float values be rejected in most cases where an integer is expected rather of silently truncating them. It was at 2003. Guido mentioned that is an age-old problem, so perhaps you can find older discussions on the tracker or mailing lists. It was a partial solution. It caught unexpected floats, but not other non-integer numbers. Later, the __index__ special method was introduced specially to distinguish objects which can be implicitly converted to integer from these which can be explicitly converted to integer. And finally we fixed that age-old problem. If you have other questions, please ask them on mailing lists, forums or other resources. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 13:30:35 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 09 Dec 2021 18:30:35 +0000 Subject: [issue46018] expm1 may incorrectly raise OverflowError on underflow In-Reply-To: <1639010636.16.0.465988709351.issue46018@roundup.psfhosted.org> Message-ID: <1639074635.57.0.923215939158.issue46018@roundup.psfhosted.org> Mark Dickinson added the comment: > Lines 500-504 are the ones that trigger it. Ah, right. Thanks. > Apparently there are no tests in that file for straight exp() Yes - that file was mostly written to give good coverage for places where we'd written our own implementations rather than simply wrapping an existing libm function, though I think we've now reverted to using the libm expm1 in all cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 13:32:08 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 09 Dec 2021 18:32:08 +0000 Subject: [issue46018] expm1 may incorrectly raise OverflowError on underflow In-Reply-To: <1639010636.16.0.465988709351.issue46018@roundup.psfhosted.org> Message-ID: <1639074728.67.0.245753213926.issue46018@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +28234 pull_request: https://github.com/python/cpython/pull/30012 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 13:32:13 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 09 Dec 2021 18:32:13 +0000 Subject: [issue46018] expm1 may incorrectly raise OverflowError on underflow In-Reply-To: <1639010636.16.0.465988709351.issue46018@roundup.psfhosted.org> Message-ID: <1639074733.32.0.973487115158.issue46018@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington, miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +28234, 28235 pull_request: https://github.com/python/cpython/pull/30012 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 13:32:13 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 09 Dec 2021 18:32:13 +0000 Subject: [issue46018] expm1 may incorrectly raise OverflowError on underflow In-Reply-To: <1639010636.16.0.465988709351.issue46018@roundup.psfhosted.org> Message-ID: <1639074733.49.0.664986034226.issue46018@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington, miss-islington, miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +28234, 28235, 28236 pull_request: https://github.com/python/cpython/pull/30012 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 13:32:15 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 09 Dec 2021 18:32:15 +0000 Subject: [issue46018] expm1 may incorrectly raise OverflowError on underflow In-Reply-To: <1639010636.16.0.465988709351.issue46018@roundup.psfhosted.org> Message-ID: <1639074735.71.0.191018516375.issue46018@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28237 pull_request: https://github.com/python/cpython/pull/30013 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 13:32:03 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 09 Dec 2021 18:32:03 +0000 Subject: [issue46018] expm1 may incorrectly raise OverflowError on underflow In-Reply-To: <1639010636.16.0.465988709351.issue46018@roundup.psfhosted.org> Message-ID: <1639074723.49.0.757389726626.issue46018@roundup.psfhosted.org> Steve Dower added the comment: New changeset 3363e1cb05d0d19ed172ea63606d8cb6268747fc by Steve Dower in branch 'main': bpo-46018: Ensure that math.expm1 does not raise on underflow (GH-29997) https://github.com/python/cpython/commit/3363e1cb05d0d19ed172ea63606d8cb6268747fc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 13:32:24 2021 From: report at bugs.python.org (neonene) Date: Thu, 09 Dec 2021 18:32:24 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1639074744.71.0.407609710739.issue45582@roundup.psfhosted.org> Change by neonene : ---------- pull_requests: +28238 pull_request: https://github.com/python/cpython/pull/30014 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 13:45:23 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 18:45:23 +0000 Subject: [issue27315] pydoc: prefer the pager command in favor of the specifc less command In-Reply-To: <1465885673.67.0.270326980861.issue27315@psf.upfronthosting.co.za> Message-ID: <1639075523.52.0.31239980776.issue27315@roundup.psfhosted.org> Change by Irit Katriel : ---------- type: -> enhancement versions: +Python 3.11 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 13:48:37 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 18:48:37 +0000 Subject: [issue45635] Tidy up error handling in traceback.c / python run.c In-Reply-To: <1635370026.46.0.0220648873339.issue45635@roundup.psfhosted.org> Message-ID: <1639075717.91.0.874293879172.issue45635@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +28239 pull_request: https://github.com/python/cpython/pull/30015 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 13:51:59 2021 From: report at bugs.python.org (Calin Culianu) Date: Thu, 09 Dec 2021 18:51:59 +0000 Subject: [issue36048] Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__ In-Reply-To: <1550644985.32.0.26417547244.issue36048@roundup.psfhosted.org> Message-ID: <1639075919.64.0.665666609967.issue36048@roundup.psfhosted.org> Calin Culianu added the comment: Ok, well I found this in that issue you linked to: This is the original "problem": ``` type __mul__ is wierd: >> 'a'.__mul__(3.4) 'aaa' >>> [1].__mul__(3.4) [1, 1, 1] ``` And this is Guido's response: > The problem is that on the one hand you want "i" to accept other int-ish types that have an __int__ method. But on the other hand you don't want it to accept float, which also has an __int__ method. Or other float-ish types. --- You have to understand -- I don't see a problem here! Not once is there any discussion as to *why* this is really a problem. So what? Your float gets truncated and treated as an int. So? If you are calling into a C api -- why is this a problem exactly when **in the C Language itself** by convention and by compiler rules anyway -- this is **perfectly ok**. Restricting Python in this way -- why? What is the benefit? What problem is being solved? I did all the digging in the world here and cannot at all discern what, exactly, is being solved at all. It seems like some bizarre aesthetic thing, at best. Sorry.. maybe I am wrong. Please point me to where the real problem is... Again, I reiterate **mathematically**, by convention in computer science, the conversion from float -> int is well defined. Moreover, you have the legacy __int__ method already that *can define it* for specific types. And Python has worked this way since the age of the dinosaurs (2002!!). So.. in python this conversion is well defined. And has always been, by __int__. I think the introduction of __index__ versus __int__ may be a mistake, especially if it is designed to "solve" just this problem -- which as yet, has to be clearly argued for as to **why** it's a problem! This boggles my mind, guys. I.. am speechless. Please tell me I'm wrong. To me it seems you guys imagined a problem that doesn't exist, then "solved" it with extra API stuff, and the actual end result was -- real-world problems created ex-nihilo for real-world programs, manifesting themselves finally in 2021. You have to understand that .. to me as a C++ programmer.. I see no problem. I just see Python all of a sudden becoming less nice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 13:56:04 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 09 Dec 2021 18:56:04 +0000 Subject: [issue46018] expm1 may incorrectly raise OverflowError on underflow In-Reply-To: <1639010636.16.0.465988709351.issue46018@roundup.psfhosted.org> Message-ID: <1639076164.03.0.811573716755.issue46018@roundup.psfhosted.org> miss-islington added the comment: New changeset 5ae4265b8c8042c496e569b6dbf9ef107e1d5b31 by Miss Islington (bot) in branch '3.9': bpo-46018: Ensure that math.expm1 does not raise on underflow (GH-29997) https://github.com/python/cpython/commit/5ae4265b8c8042c496e569b6dbf9ef107e1d5b31 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 14:16:56 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 09 Dec 2021 19:16:56 +0000 Subject: [issue46018] expm1 may incorrectly raise OverflowError on underflow In-Reply-To: <1639010636.16.0.465988709351.issue46018@roundup.psfhosted.org> Message-ID: <1639077416.1.0.888163430848.issue46018@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 14:32:05 2021 From: report at bugs.python.org (Ronny Pfannschmidt) Date: Thu, 09 Dec 2021 19:32:05 +0000 Subject: [issue14965] super() and property inheritance behavior In-Reply-To: <1338433441.66.0.975494137492.issue14965@psf.upfronthosting.co.za> Message-ID: <1639078325.46.0.527941669106.issue14965@roundup.psfhosted.org> Ronny Pfannschmidt added the comment: im on the noisy list because i faced this first in 2012 a key problem where i ran into this was mixins, - depending on whether a mixin was added or not one would get errors or not from my pov a super object should look like the "next class" so properties of the next base should behave as such, special methods as well ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 14:34:00 2021 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 09 Dec 2021 19:34:00 +0000 Subject: [issue36048] Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__ In-Reply-To: <1550644985.32.0.26417547244.issue36048@roundup.psfhosted.org> Message-ID: <1639078440.55.0.0321461653557.issue36048@roundup.psfhosted.org> Guido van Rossum added the comment: Claim, you need to tone down the rhetoric. Python is not C++ and user expectations are different. You are the one who is fighting windmills here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 14:37:18 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 09 Dec 2021 19:37:18 +0000 Subject: [issue46018] expm1 may incorrectly raise OverflowError on underflow In-Reply-To: <1639010636.16.0.465988709351.issue46018@roundup.psfhosted.org> Message-ID: <1639078638.08.0.424113888794.issue46018@roundup.psfhosted.org> miss-islington added the comment: New changeset ca08655b808aed2e3abeb64cb67d98a79a661dda by Miss Islington (bot) in branch '3.10': bpo-46018: Ensure that math.expm1 does not raise on underflow (GH-29997) https://github.com/python/cpython/commit/ca08655b808aed2e3abeb64cb67d98a79a661dda ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 14:59:37 2021 From: report at bugs.python.org (Eric Snow) Date: Thu, 09 Dec 2021 19:59:37 +0000 Subject: [issue46008] Prepare runtime/interp/thread state and init for upcoming changes. In-Reply-To: <1638908666.73.0.306470014114.issue46008@roundup.psfhosted.org> Message-ID: <1639079977.48.0.917639733985.issue46008@roundup.psfhosted.org> Eric Snow added the comment: New changeset c8749b578324ad4089c8d014d9136bc42b065343 by Eric Snow in branch 'main': bpo-46008: Make runtime-global object/type lifecycle functions and state consistent. (gh-29998) https://github.com/python/cpython/commit/c8749b578324ad4089c8d014d9136bc42b065343 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 15:32:01 2021 From: report at bugs.python.org (Calin Culianu) Date: Thu, 09 Dec 2021 20:32:01 +0000 Subject: [issue36048] Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__ In-Reply-To: <1550644985.32.0.26417547244.issue36048@roundup.psfhosted.org> Message-ID: <1639081921.24.0.900912154216.issue36048@roundup.psfhosted.org> Calin Culianu added the comment: Ok, Guido, thanks. Fair enough. So regardless: what is the problem exactly if a C function expects an int but gets given a float? Why does such strictness matter, in that it required a whole other set of __index__ etc to be added? I am having trouble seeing the actual problem, which was taken as a given in all the archaeology I have done on this ancient "issue" -- but is it a given? There is no problem... only the one created by this change, really. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 16:45:16 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 21:45:16 +0000 Subject: [issue12038] assertEqual doesn't display newline differences quite well In-Reply-To: <1304959012.21.0.957539258305.issue12038@psf.upfronthosting.co.za> Message-ID: <1639086316.1.0.589229532189.issue12038@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 17:10:24 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 22:10:24 +0000 Subject: [issue20420] BufferedIncrementalEncoder violates IncrementalEncoder interface In-Reply-To: <1390926885.67.0.351173619746.issue20420@psf.upfronthosting.co.za> Message-ID: <1639087824.94.0.717581862241.issue20420@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Library (Lib) versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 17:33:03 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 09 Dec 2021 22:33:03 +0000 Subject: [issue45774] Detect SQLite in configure.ac In-Reply-To: <1636496806.29.0.76332999648.issue45774@roundup.psfhosted.org> Message-ID: <1639089183.3.0.361287910414.issue45774@roundup.psfhosted.org> Erlend E. Aasland added the comment: Reopening: the current detection is a little bit weak; many SQLite API's may be disabled at SQLite compile time using SQLITE_OMIT_* defines. We must make sure we've got all vital functions in place before marking the sqlite3 module as present and usable. The following API's can be omitted using compile time defines: - sqlite3_column_decltype (SQLITE_OMIT_DECLTYPE) - sqlite3_complete (SQLITE_OMIT_COMPLETE) - sqlite3_enable_shared_cache (SQLITE_OMIT_SHARED_CACHE) - sqlite3_progress_handler (SQLITE_OMIT_PROGRESS_CALLBACK) - sqlite3_set_authorizer (SQLITE_OMIT_AUTHORIZATION) - sqlite3_trace_v2 (SQLITE_OMIT_TRACE) - sqlite3_trace (SQLITE_OMIT_TRACE, SQLITE_OMIT_DEPRECATED) The following API's _may_ be disabled in the future using SQLITE_OMIT_FLOATING_POINT: - sqlite3_bind_double - sqlite3_column_double - sqlite3_result_double - sqlite3_value_double ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 17:36:18 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 22:36:18 +0000 Subject: [issue26159] Unsafe to BaseEventLoop.set_debug(False) when PYTHONASYNCIODEBUG=1 In-Reply-To: <1453220098.77.0.244617474798.issue26159@psf.upfronthosting.co.za> Message-ID: <1639089378.58.0.667009867184.issue26159@roundup.psfhosted.org> Irit Katriel added the comment: asyncio.coroutine was removed in 3.10, so this is no longer relevant. ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 17:37:37 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 09 Dec 2021 22:37:37 +0000 Subject: [issue45774] Detect SQLite in configure.ac In-Reply-To: <1636496806.29.0.76332999648.issue45774@roundup.psfhosted.org> Message-ID: <1639089457.65.0.0315654185899.issue45774@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +28240 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/30016 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 17:58:38 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 22:58:38 +0000 Subject: [issue7262] [doc] codecs.open() + eol (windows) In-Reply-To: <1257344010.52.0.739143662559.issue7262@psf.upfronthosting.co.za> Message-ID: <1639090718.4.0.658065741664.issue7262@roundup.psfhosted.org> Irit Katriel added the comment: That paragraph was edited here: https://github.com/python/cpython/commit/b9fdb7a452c2b6f7a628118b5f695bd061b62cc8 but this point was not added. ---------- nosy: +iritkatriel title: codecs.open() + eol (windows) -> [doc] codecs.open() + eol (windows) versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 18:02:30 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 Dec 2021 23:02:30 +0000 Subject: [issue46016] fcntl module add F_DUP2FD_CLOEXEC In-Reply-To: <1638998078.36.0.0492190037093.issue46016@roundup.psfhosted.org> Message-ID: <1639090950.71.0.376319666929.issue46016@roundup.psfhosted.org> STINNER Victor added the comment: New changeset da3cf4304f6dd530533bbd2c0913b674cd803744 by Victor Stinner in branch 'main': bpo-46016: GHA Doc job now also runs "make check" (GH-30009) https://github.com/python/cpython/commit/da3cf4304f6dd530533bbd2c0913b674cd803744 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 18:09:23 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 23:09:23 +0000 Subject: [issue17108] [doc] import silently prefers package over module when both available In-Reply-To: <1359844868.64.0.586214844711.issue17108@psf.upfronthosting.co.za> Message-ID: <1639091363.12.0.873347972028.issue17108@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy title: import silently prefers package over module when both available -> [doc] import silently prefers package over module when both available versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 18:26:15 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 23:26:15 +0000 Subject: [issue20823] [doc] Clarify copyreg.pickle() documentation In-Reply-To: <1393749966.08.0.529137298895.issue20823@psf.upfronthosting.co.za> Message-ID: <1639092375.4.0.0195433464333.issue20823@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy -patch title: Clarify copyreg.pickle() documentation -> [doc] Clarify copyreg.pickle() documentation versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 18:38:35 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 09 Dec 2021 23:38:35 +0000 Subject: [issue27583] [doc ] configparser: modifying default_section at runtime In-Reply-To: <1469105653.63.0.572086425799.issue27583@psf.upfronthosting.co.za> Message-ID: <1639093115.14.0.170935913673.issue27583@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy title: configparser: modifying default_section at runtime -> [doc ] configparser: modifying default_section at runtime versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 19:03:15 2021 From: report at bugs.python.org (Gabriele N Tornetta) Date: Fri, 10 Dec 2021 00:03:15 +0000 Subject: [issue32683] isinstance is calling ob.__getattribute__ as a fallback instead of object.__class__.__get__ In-Reply-To: <1517001040.56.0.467229070634.issue32683@psf.upfronthosting.co.za> Message-ID: <1639094595.1.0.361239052716.issue32683@roundup.psfhosted.org> Gabriele N Tornetta added the comment: > Python is very much a language about responsibility. If Django is overriding `__getattribute__` then it is their responsibility to ensure that everything still works properly. Perhaps I didn't stress observability enough. A tool like a tracer or a profiler, in the ideal world, is not supposed to perturb the tracee in any way. The current implementation of isinstance, when used by an observability tool, may cause side effects as well as overheads, so it is not safe to use in such tools. Working around it may solve the side-effects issue, but leaves the problem of overheads. Changing the way isinstance works internally might prove beneficial for such tools. En passant, I think it should be noted that the built-in "type" doesn't suffer from the same problem, i.e. ~~~ class Side(object): def __getattribute__(self, name): ValueError(name) type(Side()) ~~~ works as expected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 19:24:21 2021 From: report at bugs.python.org (Ned Batchelder) Date: Fri, 10 Dec 2021 00:24:21 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong Message-ID: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> New submission from Ned Batchelder : Under tox, sys._base_executable is not an actual file for 3.11.0a3. It was fine in 3.11.0a2. To reproduce: --- 8< -------------------- # tox.ini [tox] envlist = py{310,311a2,311} skipsdist = True [testenv] commands = python -c "import sys,os.path; print(e := sys._base_executable); print(os.path.exists(e))" [testenv:py311a2] # This is the path to 3.11.0a2 if you have it. basepython = /usr/local/pyenv/pyenv/versions/3.11.0a2/bin/python3 ---------------------------- Create a new Python 3.8 virtualenv, and install latest tox (3.24.4 for me). Then run "tox". I see: -------------------------------------------------------------------------------- py310 create: /Users/nedbatchelder/coverage/lab/fix-3.11a3/.tox/py310 py310 run-test-pre: PYTHONHASHSEED='534434199' py310 run-test: commands[0] | python -c 'import sys,os.path; print(e := sys._base_executable); print(os.path.exists(e))' /Users/nedbatchelder/coverage/lab/fix-3.11a3/.tox/py310/bin/python True py311a2 create: /Users/nedbatchelder/coverage/lab/fix-3.11a3/.tox/py311a2 py311a2 run-test-pre: PYTHONHASHSEED='534434199' py311a2 run-test: commands[0] | python -c 'import sys,os.path; print(e := sys._base_executable); print(os.path.exists(e))' /Users/nedbatchelder/coverage/lab/fix-3.11a3/.tox/py311a2/bin/python True py311 create: /Users/nedbatchelder/coverage/lab/fix-3.11a3/.tox/py311 py311 run-test-pre: PYTHONHASHSEED='534434199' py311 run-test: commands[0] | python -c 'import sys,os.path; print(e := sys._base_executable); print(os.path.exists(e))' /usr/local/pyenv/pyenv/versions/3.11.0a3/python False _________________________________________________________ summary _________________________________________________________ py310: commands succeeded py311a2: commands succeeded py311: commands succeeded congratulations :) -------------------------------------------------------------------------------- This came to my attention because the coverage.py test suite uses "python -m venv" to create environments. They worked under 3.11.0a2, but failed under a3. I tracked it down to a difference in sys._base_executable. I couldn't see a difference in those values without tox, but I'm not sure why it changes the results. ---------- keywords: 3.11regression messages: 408166 nosy: nedbat, pablogsal priority: normal severity: normal status: open title: 3.11.0a3: under tox, sys._base_executable is wrong versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 20:16:22 2021 From: report at bugs.python.org (Yurii Karabas) Date: Fri, 10 Dec 2021 01:16:22 +0000 Subject: [issue46014] functools.singledispatch does not support Union types In-Reply-To: <1638970452.65.0.012237534186.issue46014@roundup.psfhosted.org> Message-ID: <1639098982.26.0.795612078932.issue46014@roundup.psfhosted.org> Change by Yurii Karabas <1998uriyyo at gmail.com>: ---------- keywords: +patch nosy: +uriyyo nosy_count: 4.0 -> 5.0 pull_requests: +28241 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30017 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 20:18:18 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 10 Dec 2021 01:18:18 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639099098.14.0.210331162788.issue46028@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Steve, could this be related to the changes in getpath? ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 20:19:03 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 10 Dec 2021 01:19:03 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639099143.26.0.701486523932.issue46028@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 20:22:36 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 10 Dec 2021 01:22:36 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639099356.68.0.452926635393.issue46028@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Ned, are you able to bisect this or provide a simpler reproducer that doesn't involve tox? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 20:52:19 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 10 Dec 2021 01:52:19 +0000 Subject: [issue43931] Add the Python version to the API data. In-Reply-To: <1619275074.12.0.00901483534926.issue43931@roundup.psfhosted.org> Message-ID: <1639101139.94.0.225315616112.issue43931@roundup.psfhosted.org> miss-islington added the comment: New changeset 50669083fe16a42cba90b5dd8c1a017751f69fd8 by Gabriele N. Tornetta in branch 'main': bpo-43931: Export Python version as API data (GH-25577) https://github.com/python/cpython/commit/50669083fe16a42cba90b5dd8c1a017751f69fd8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 21:22:42 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 10 Dec 2021 02:22:42 +0000 Subject: [issue32683] isinstance is calling ob.__getattribute__ as a fallback instead of object.__class__.__get__ In-Reply-To: <1517001040.56.0.467229070634.issue32683@psf.upfronthosting.co.za> Message-ID: <1639102962.67.0.342389862191.issue32683@roundup.psfhosted.org> Raymond Hettinger added the comment: > Changing the way isinstance works internally might prove > beneficial for such tools. ISTM you're advocating a design change rather than discussing a bug report. The python-ideas mail list would be a better forum than the tracker. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 21:30:22 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 10 Dec 2021 02:30:22 +0000 Subject: [issue32683] isinstance is calling ob.__getattribute__ as a fallback instead of object.__class__.__get__ In-Reply-To: <1639066721.22.0.721643276169.issue32683@roundup.psfhosted.org> Message-ID: <20211210022746.GV21647@ando.pearwood.info> Steven D'Aprano added the comment: I agree that the rules regarding type and `__class__` and isinstance are not clear or well documented. We have: https://docs.python.org/3/library/stdtypes.html#instance.__class__ https://docs.python.org/3/library/functions.html#isinstance but neither discuss the interaction between a class' "real" type and it's "fake" type. To be honest, I'm not even sure I fully understand the interaction myself, or how they combine with virtual subclasses. A lot of my information comes from this Stackoverflow post: https://stackoverflow.com/questions/1060499/difference-between-typeobj-and-obj-class and in particular this comment: "Some code does this deliberately to lie about the type of objects, such as weakref.proxy. Some people think obj.__class__ should be preferred, because it believes the lie, while some people think type(obj) should be preferred because it ignores the lie. isinstance will return true if an object's real class or its lie class is an instance of the second argument." So I think that the behaviour here is correct, but it is not documented well and we should fix that. What I think happens: * type(obj) always and only returns the actual internal (C-level) type of the object, guaranteed to be a type object. * isinstance(obj, classinfo) returns True if any of the following hold: - the type() of object is a subclass of any of the classes in the classinfo object (a class, a Union of classes, or a tuple of classes); - obj.__class__ is a subclass of any of the classes in classinfo; - or obj is registered as a virtual subclass of any of the classes in classinfo, by calling type(ob).__subclasshook__; * obj.__class__ is determined using the normal attribute lookup mechanism, which means it does not have to be a static attribute but can be dynamically generated using properties, __getattr__, __getattribute__ or any other similar mechanism. And for the avoidance of doubt, a class is always considered a subclass of itself. I'm really not sure about the interaction with virtual subclasses, I probably have that bit wrong. And it is not clear to me what happens if __class__ is a non-type object. It seems to be permitted. Improving the documentation would be excellent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 21:36:15 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 10 Dec 2021 02:36:15 +0000 Subject: [issue32683] isinstance is calling ob.__getattribute__ as a fallback instead of object.__class__.__get__ In-Reply-To: <1639094595.1.0.361239052716.issue32683@roundup.psfhosted.org> Message-ID: <20211210023339.GW21647@ando.pearwood.info> Steven D'Aprano added the comment: On Fri, Dec 10, 2021 at 12:03:15AM +0000, Gabriele N Tornetta wrote: > class Side(object): > def __getattribute__(self, name): > ValueError(name) You forgot to actually *raise* the exception. That will just instantiate the ValueError instance, and then immediately garbage collect it. In any case, type() and isinstance() do not work the same way. type() does not inspect the `__class__` attribute. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 9 21:42:16 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 10 Dec 2021 02:42:16 +0000 Subject: [issue43931] Add the Python version to the API data. In-Reply-To: <1619275074.12.0.00901483534926.issue43931@roundup.psfhosted.org> Message-ID: <1639104136.64.0.406301351929.issue43931@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 Dec 9 22:01:19 2021 From: report at bugs.python.org (oittaa) Date: Fri, 10 Dec 2021 03:01:19 +0000 Subject: [issue46029] "ValueError: Invalid isoformat string" from a valid string Message-ID: <1639105279.05.0.259148747281.issue46029@roundup.psfhosted.org> New submission from oittaa : Test case: >>> import datetime >>> datetime.datetime.fromisoformat('2021-12-10T01:00:00Z') Traceback (most recent call last): File "", line 1, in ValueError: Invalid isoformat string: '2021-12-10T01:00:00Z' Basically every other programming language I tested correctly accepted this ISO/RFC3339 string as a date. ---------- messages: 408173 nosy: oittaa priority: normal severity: normal status: open title: "ValueError: Invalid isoformat string" from a valid string type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 00:02:34 2021 From: report at bugs.python.org (Lasse Kantola) Date: Fri, 10 Dec 2021 05:02:34 +0000 Subject: [issue39327] shutil.rmtree using vagrant synched folder fails In-Reply-To: <1578995152.92.0.0617677010821.issue39327@roundup.psfhosted.org> Message-ID: <1639112554.64.0.557800103408.issue39327@roundup.psfhosted.org> Lasse Kantola added the comment: I have encountered the same problem with vboxsf mounted folders when using Debian guest on VirtualBox 6.1 hosted by Windows 10. The general VirtualBox issue of vboxsf not supporting rmdir when there are open file descriptors is difficult to solve, and out of scope for Python. However, it looks like the shutil.rmtree implementation can be easily modified to change the order of operations so that the rmdir is performed after the directory file descriptor is closed, which makes shutil.rmtree work under vboxsf shared folders. Example of the change against Python 3.7 is inlined below. The changed order matches the behavior of "rm -r" and to my understanding should not change the security implications of the code, but as the code is related to the prevention of a symlink attack https://bugs.python.org/issue4489 careful review would be needed. --- /usr/lib/python3.7/shutil.py--orig 2021-01-23 05:04:44.000000000 +0900 +++ /usr/lib/python3.7/shutil.py 2021-12-09 20:42:36.795338346 +0900 @@ -427,10 +427,6 @@ try: if os.path.samestat(orig_st, os.fstat(dirfd)): _rmtree_safe_fd(dirfd, fullname, onerror) - try: - os.rmdir(entry.name, dir_fd=topfd) - except OSError: - onerror(os.rmdir, fullname, sys.exc_info()) else: try: # This can only happen if someone replaces @@ -442,6 +438,10 @@ onerror(os.path.islink, fullname, sys.exc_info()) finally: os.close(dirfd) + try: + os.rmdir(entry.name, dir_fd=topfd) + except OSError: + onerror(os.rmdir, fullname, sys.exc_info()) else: try: os.unlink(entry.name, dir_fd=topfd) @@ -489,10 +489,6 @@ try: if os.path.samestat(orig_st, os.fstat(fd)): _rmtree_safe_fd(fd, path, onerror) - try: - os.rmdir(path) - except OSError: - onerror(os.rmdir, path, sys.exc_info()) else: try: # symlinks to directories are forbidden, see bug #1669 @@ -501,6 +497,10 @@ onerror(os.path.islink, path, sys.exc_info()) finally: os.close(fd) + try: + os.rmdir(path) + except OSError: + onerror(os.rmdir, path, sys.exc_info()) else: try: if os.path.islink(path): ---------- nosy: +lkantola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 02:06:11 2021 From: report at bugs.python.org (David Carlier) Date: Fri, 10 Dec 2021 07:06:11 +0000 Subject: [issue46030] socket module add couple of FreeBSD constants Message-ID: <1639119971.08.0.15845075802.issue46030@roundup.psfhosted.org> New submission from David Carlier : - adding LOCAL_CREDS then LOCAL_CREDS_PERSISTENT and SCM_CREDS2 which would be used as msg type for the latter. ---------- components: FreeBSD messages: 408175 nosy: dcarlier, koobs priority: normal pull_requests: 28242 severity: normal status: open title: socket module add couple of FreeBSD constants versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 02:29:40 2021 From: report at bugs.python.org (penguin_wwy) Date: Fri, 10 Dec 2021 07:29:40 +0000 Subject: [issue45630] Dump CodeObject API for debugging In-Reply-To: <1635349665.14.0.891838928636.issue45630@roundup.psfhosted.org> Message-ID: <1639121380.78.0.970725716982.issue45630@roundup.psfhosted.org> penguin_wwy <940375606 at qq.com> added the comment: Recently, we have used this function to troubleshoot problems with online applications. We have implemented the PEP659(Specializing) to the 3.6 version which is used by online services, and this function allows us to dump the current function's code in the case of an unhandled exception to determine if the problem was caused by an optimization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 03:54:02 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 10 Dec 2021 08:54:02 +0000 Subject: [issue45359] TopologicalSorter is not Generic at runtime (but is in typeshed) In-Reply-To: <1633299530.43.0.181161136207.issue45359@roundup.psfhosted.org> Message-ID: <1639126442.18.0.994276022795.issue45359@roundup.psfhosted.org> Alex Waygood added the comment: Another option for code using Python <3.11, that will work without the `from __future__ import annotations` import, is to do something like this: ``` from graphlib import TopologicalSorter x: 'TopologicalSorter[str]' = TopologicalSorter({"a": {}, "b": {"a"}}) ``` By using a string as the annotation, we give mypy the specificity it needs, but the expression will never need to be resolved at runtime. ---------- nosy: +AlexWaygood type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:02:08 2021 From: report at bugs.python.org (penguin_wwy) Date: Fri, 10 Dec 2021 09:02:08 +0000 Subject: [issue46031] add POP_JUMP_IF_NOT_NONE and POP_JUMP_IF_NONE Message-ID: <1639126928.63.0.63808958692.issue46031@roundup.psfhosted.org> New submission from penguin_wwy <940375606 at qq.com>: https://github.com/faster-cpython/ideas/discussions/154 ---------- components: Interpreter Core messages: 408178 nosy: penguin_wwy priority: normal severity: normal status: open title: add POP_JUMP_IF_NOT_NONE and POP_JUMP_IF_NONE type: performance versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:04:09 2021 From: report at bugs.python.org (penguin_wwy) Date: Fri, 10 Dec 2021 09:04:09 +0000 Subject: [issue46031] add POP_JUMP_IF_NOT_NONE and POP_JUMP_IF_NONE In-Reply-To: <1639126928.63.0.63808958692.issue46031@roundup.psfhosted.org> Message-ID: <1639127049.0.0.732608089309.issue46031@roundup.psfhosted.org> Change by penguin_wwy <940375606 at qq.com>: ---------- keywords: +patch pull_requests: +28243 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30019 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:04:56 2021 From: report at bugs.python.org (Kumar Aditya) Date: Fri, 10 Dec 2021 09:04:56 +0000 Subject: [issue46032] functools' singledispatch does not support GenericAlias Message-ID: <1639127096.15.0.258621113418.issue46032@roundup.psfhosted.org> New submission from Kumar Aditya : functools' singledispatch does not support GenericAlias ```py from functools import singledispatch @singledispatch def func(x): print("any") @func.register def _(x: list[str]): print("list[str]") func(["a", "b"]) ``` ---------- components: Library (Lib) messages: 408179 nosy: kumaraditya303, rhettinger priority: normal severity: normal status: open title: functools' singledispatch does not support GenericAlias type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:14:08 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 10 Dec 2021 09:14:08 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639127648.86.0.525828877082.issue46028@roundup.psfhosted.org> Christian Heimes added the comment: Commit 9f2f7e42269db74a89fc8cd74d82a875787f01d7 has correct _base_executable $ venv/bin/python Python 3.11.0a2+ (heads/bpo-45847-simple-115-g9f2f7e42269:9f2f7e42269, Dec 10 2021, 10:09:54) [GCC 11.2.1 20211203 (Red Hat 11.2.1-7)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys._base_executable '/home/heimes/dev/python/cpython/venv/bin/python' _base_executable in commit 99fcf1505218464c489d419d4500f126b6d6dc28 is wrong $ venv/bin/python Python 3.11.0a2+ (heads/bpo-45847-simple-116-g99fcf150521:99fcf150521, Dec 10 2021, 10:12:35) [GCC 11.2.1 20211203 (Red Hat 11.2.1-7)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys._base_executable '/home/heimes/dev/python/cpython/python' ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:21:40 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 10 Dec 2021 09:21:40 +0000 Subject: [issue46032] functools' singledispatch does not support GenericAlias In-Reply-To: <1639127096.15.0.258621113418.issue46032@roundup.psfhosted.org> Message-ID: <1639128100.59.0.73198755555.issue46032@roundup.psfhosted.org> Alex Waygood added the comment: My opinion is that supporting `GenericAlias` here would be a bad idea. Associating an implementation of the function with the argument type `list[str]` is ambiguous. Would this implementation be called if any argument of type `list` was supplied, or would it only be called if all elements in the list were of type `str`? The first option would be efficient, simple, and similar to the way singledispatch treats most other argument-types. However, it would be unintuitive. The second option would be more intuitive, but could be extremely inefficient if a very long list was passed in. It would also make the code more complicated. ---------- nosy: +AlexWaygood, lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:39:14 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 09:39:14 +0000 Subject: [issue45773] Compiler hangs during jump elimination In-Reply-To: <1636487782.5.0.379047434297.issue45773@roundup.psfhosted.org> Message-ID: <1639129154.59.0.663262272677.issue45773@roundup.psfhosted.org> Change by Irit Katriel : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:40:14 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Dec 2021 09:40:14 +0000 Subject: [issue42182] 3.10 Documentation Not Hyperlinking Some Methods In-Reply-To: <1603898907.29.0.300729601022.issue42182@roundup.psfhosted.org> Message-ID: <1639129214.57.0.986685441804.issue42182@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 8c74713d0e349c27518080945d5f040dfd52a56e by andrei kulakov in branch 'main': bpo-42182: stdtypes doc - update and fix links to several dunder methods (GH-27384) https://github.com/python/cpython/commit/8c74713d0e349c27518080945d5f040dfd52a56e ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:40:25 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 10 Dec 2021 09:40:25 +0000 Subject: [issue42182] 3.10 Documentation Not Hyperlinking Some Methods In-Reply-To: <1603898907.29.0.300729601022.issue42182@roundup.psfhosted.org> Message-ID: <1639129224.99.0.629226899469.issue42182@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +28244 pull_request: https://github.com/python/cpython/pull/30020 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:40:28 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 10 Dec 2021 09:40:28 +0000 Subject: [issue42182] 3.10 Documentation Not Hyperlinking Some Methods In-Reply-To: <1603898907.29.0.300729601022.issue42182@roundup.psfhosted.org> Message-ID: <1639129228.61.0.428937239161.issue42182@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28245 pull_request: https://github.com/python/cpython/pull/30021 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:41:02 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 09:41:02 +0000 Subject: [issue45779] multiprocessing initializer error with CPython 3.9.6 on Apple Silicon In-Reply-To: <1636562874.34.0.208720566335.issue45779@roundup.psfhosted.org> Message-ID: <1639129262.06.0.4393403892.issue45779@roundup.psfhosted.org> Change by Irit Katriel : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:41:52 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Dec 2021 09:41:52 +0000 Subject: [issue46000] NetBSD curses compatibility In-Reply-To: <1638807112.42.0.171377770564.issue46000@roundup.psfhosted.org> Message-ID: <1639129312.64.0.0651810230707.issue46000@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 2fb797e93c6bbd44dfcbe23f63acfa240a87e48a by Thomas Klausner in branch 'main': bpo-46000: Improve NetBSD curses compatibility (GH-29947) https://github.com/python/cpython/commit/2fb797e93c6bbd44dfcbe23f63acfa240a87e48a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:41:55 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 10 Dec 2021 09:41:55 +0000 Subject: [issue46000] NetBSD curses compatibility In-Reply-To: <1638807112.42.0.171377770564.issue46000@roundup.psfhosted.org> Message-ID: <1639129315.21.0.162927877137.issue46000@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +28246 pull_request: https://github.com/python/cpython/pull/30022 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:41:59 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 10 Dec 2021 09:41:59 +0000 Subject: [issue46000] NetBSD curses compatibility In-Reply-To: <1638807112.42.0.171377770564.issue46000@roundup.psfhosted.org> Message-ID: <1639129319.0.0.736935359406.issue46000@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28247 pull_request: https://github.com/python/cpython/pull/30023 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:42:24 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 09:42:24 +0000 Subject: [issue15757] ./configure --with-pydebug on FreeBSD results in -O2 -pipe eventually ending up in CFLAGS. In-Reply-To: <1345584581.07.0.102502771699.issue15757@psf.upfronthosting.co.za> Message-ID: <1639129344.49.0.867088089884.issue15757@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:42:52 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Dec 2021 09:42:52 +0000 Subject: [issue45662] Incorrect repr of InitVar of a type alias In-Reply-To: <1635450363.22.0.969198768309.issue45662@roundup.psfhosted.org> Message-ID: <1639129372.92.0.80378721221.issue45662@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset fb8aad16401e081a6a9059c7b428f7e8aae85d58 by Miss Islington (bot) in branch '3.9': [3.9] bpo-45662: Fix the repr of InitVar with a type alias to the built-in class (GH-29291) (GH-29924) https://github.com/python/cpython/commit/fb8aad16401e081a6a9059c7b428f7e8aae85d58 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:43:47 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 09:43:47 +0000 Subject: [issue13473] Add tests for files byte-compiled by distutils In-Reply-To: <1322145911.61.0.528651769931.issue13473@psf.upfronthosting.co.za> Message-ID: <1639129427.21.0.753983850256.issue13473@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:47:23 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Dec 2021 09:47:23 +0000 Subject: [issue45662] Incorrect repr of InitVar of a type alias In-Reply-To: <1635450363.22.0.969198768309.issue45662@roundup.psfhosted.org> Message-ID: <1639129643.66.0.934810225346.issue45662@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:48:17 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 09:48:17 +0000 Subject: [issue14336] Difference between pickle implementations for function objects In-Reply-To: <1331924619.34.0.890923032137.issue14336@psf.upfronthosting.co.za> Message-ID: <1639129697.8.0.980042445187.issue14336@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> wont fix stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:50:22 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 09:50:22 +0000 Subject: [issue28559] Unclear error message when raising wrong type of exceptions In-Reply-To: <1477764991.61.0.67228056749.issue28559@psf.upfronthosting.co.za> Message-ID: <1639129822.7.0.296874862806.issue28559@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> rejected stage: patch review -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:51:57 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 09:51:57 +0000 Subject: [issue41702] Inconsistent behaviour in strftime In-Reply-To: <1599133552.94.0.223502406334.issue41702@roundup.psfhosted.org> Message-ID: <1639129917.0.0.781704724277.issue41702@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 04:53:20 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 09:53:20 +0000 Subject: [issue22293] unittest.mock: use slots in MagicMock to reduce memory footprint In-Reply-To: <1409223925.36.0.353064472257.issue22293@psf.upfronthosting.co.za> Message-ID: <1639130000.93.0.148002627508.issue22293@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: needs patch -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 05:02:19 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 10 Dec 2021 10:02:19 +0000 Subject: [issue42182] 3.10 Documentation Not Hyperlinking Some Methods In-Reply-To: <1603898907.29.0.300729601022.issue42182@roundup.psfhosted.org> Message-ID: <1639130539.35.0.506618568859.issue42182@roundup.psfhosted.org> miss-islington added the comment: New changeset 64c2788f42c49c7094d3b6e5404fe8386a2b4779 by Miss Islington (bot) in branch '3.10': bpo-42182: stdtypes doc - update and fix links to several dunder methods (GH-27384) https://github.com/python/cpython/commit/64c2788f42c49c7094d3b6e5404fe8386a2b4779 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 05:04:58 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 10 Dec 2021 10:04:58 +0000 Subject: [issue42182] 3.10 Documentation Not Hyperlinking Some Methods In-Reply-To: <1603898907.29.0.300729601022.issue42182@roundup.psfhosted.org> Message-ID: <1639130698.86.0.347225268278.issue42182@roundup.psfhosted.org> miss-islington added the comment: New changeset 40d765260ae08d152ee89ed9c1c621f4a0024fa6 by Miss Islington (bot) in branch '3.9': bpo-42182: stdtypes doc - update and fix links to several dunder methods (GH-27384) https://github.com/python/cpython/commit/40d765260ae08d152ee89ed9c1c621f4a0024fa6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 05:29:30 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 10 Dec 2021 10:29:30 +0000 Subject: [issue46000] NetBSD curses compatibility In-Reply-To: <1638807112.42.0.171377770564.issue46000@roundup.psfhosted.org> Message-ID: <1639132170.34.0.642305627076.issue46000@roundup.psfhosted.org> miss-islington added the comment: New changeset bb76410824e526ee075eac22812a577cca7583cf by Miss Islington (bot) in branch '3.10': bpo-46000: Improve NetBSD curses compatibility (GH-29947) https://github.com/python/cpython/commit/bb76410824e526ee075eac22812a577cca7583cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 05:33:02 2021 From: report at bugs.python.org (Gabriele N Tornetta) Date: Fri, 10 Dec 2021 10:33:02 +0000 Subject: [issue32683] isinstance is calling ob.__getattribute__ as a fallback instead of object.__class__.__get__ In-Reply-To: <1517001040.56.0.467229070634.issue32683@psf.upfronthosting.co.za> Message-ID: <1639132382.38.0.663406039855.issue32683@roundup.psfhosted.org> Gabriele N Tornetta added the comment: @rhettinger Apologies. You're totally right but I wasn't expecting this to become a lengthy conversation. So, to get closer to the initial issue, I believe that this ticket could be closed provided that the documentation is improved by making developers aware of the potential side effects of isinstance. I was doing some more experiments and it looks like def _isinstance(obj, classinfo): return issubclass(type(obj), classinfo) might be considered a "side-effects-free" version of isinstance. So perhaps one thing to mention in the documentation is that `isinstance(obj, classinfo) != issubclass(type(obj), classinfo)` in general. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 05:42:42 2021 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBE?=) Date: Fri, 10 Dec 2021 10:42:42 +0000 Subject: [issue46033] Duplicated sentence in for statement documentation Message-ID: <1639132962.13.0.2847255275.issue46033@roundup.psfhosted.org> New submission from Micha? D : In for statement description, there seem to be two sentences meant to mean the same: > The suite is then executed once for each item provided by the iterator, in the order returned by the iterator. Each item in turn is assigned to the target list using the standard rules for assignments (see Assignment statements), and then the suite is executed. (from https://docs.python.org/3/reference/compound_stmts.html#the-for-statement) I believe only one of these sentences should be kept (probably the second one). If I am wrong, and the current version is actually correct, then it is unclear - to me it sounds like the iterator is iterated through twice, and suite is executed twice for each item. ---------- assignee: docs at python components: Documentation messages: 408189 nosy: docs at python, michcio1234 priority: normal severity: normal status: open title: Duplicated sentence in for statement documentation versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 05:59:42 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Fri, 10 Dec 2021 10:59:42 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1639133982.86.0.110741785002.issue45723@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +28248 pull_request: https://github.com/python/cpython/pull/30024 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 06:05:16 2021 From: report at bugs.python.org (Roundup Robot) Date: Fri, 10 Dec 2021 11:05:16 +0000 Subject: [issue46033] Duplicated sentence in for statement documentation In-Reply-To: <1639132962.13.0.2847255275.issue46033@roundup.psfhosted.org> Message-ID: <1639134316.66.0.336949094663.issue46033@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 2.0 -> 3.0 pull_requests: +28249 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30025 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 06:18:26 2021 From: report at bugs.python.org (David CARLIER) Date: Fri, 10 Dec 2021 11:18:26 +0000 Subject: [issue46030] socket module add couple of FreeBSD constants In-Reply-To: <1639119971.08.0.15845075802.issue46030@roundup.psfhosted.org> Message-ID: <1639135106.44.0.981449145847.issue46030@roundup.psfhosted.org> Change by David CARLIER : ---------- nosy: +devnexen -dcarlier _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 06:21:24 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Dec 2021 11:21:24 +0000 Subject: [issue46000] NetBSD curses compatibility In-Reply-To: <1638807112.42.0.171377770564.issue46000@roundup.psfhosted.org> Message-ID: <1639135284.07.0.563869488555.issue46000@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 040f9f9c48f4e74e851d850275aa9e050a04d0c6 by Miss Islington (bot) in branch '3.9': bpo-46000: Improve NetBSD curses compatibility (GH-29947) (GH-30023) https://github.com/python/cpython/commit/040f9f9c48f4e74e851d850275aa9e050a04d0c6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 06:27:43 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 10 Dec 2021 11:27:43 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1639135663.17.0.620886877528.issue45723@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 74b23c97cd5e178970a199066795cf0561f46b72 by Erlend Egeberg Aasland in branch 'main': bpo-45723: Normalise configure user communication (GH-30024) https://github.com/python/cpython/commit/74b23c97cd5e178970a199066795cf0561f46b72 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 06:41:23 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 10 Dec 2021 11:41:23 +0000 Subject: [issue32683] isinstance is calling ob.__getattribute__ as a fallback instead of object.__class__.__get__ In-Reply-To: <1517001040.56.0.467229070634.issue32683@psf.upfronthosting.co.za> Message-ID: <1639136483.47.0.941159479942.issue32683@roundup.psfhosted.org> Steven D'Aprano added the comment: The plot thickens. I was wrong to say that type() always and only looks at the "real" underlying type of the instance. type() does look at __class__ as well. But only sometimes. >>> class A: ... __class__ = int ... >>> type(A()) >>> a = A() >>> a.__class__ = int >>> type(a) So from A, we might think that type() ignores __class__ >>> class B: ... pass ... >>> type(B()) # no __class__ to inspect >>> b = B() >>> b.__class__ = int Traceback (most recent call last): File "", line 1, in TypeError: __class__ assignment only supported for mutable types or ModuleType subclasses How very odd. But okay, let's try something else: >>> b.__class__ = A # lie that this is an A not a B >>> type(b) So now type() *does* inspect __class__, and believes it. If we generate the __class__ attribute dynamically with __getattr__, the method doesn't even get called. But if we use __getattribute__: >>> class C: ... def __getattribute__(self, name): ... print('C getattribute:', name) ... if name == '__class__': ... return int ... raise AttributeError ... >>> C().__class__ C getattribute: __class__ >>> type(C()) type() ignores the dynamically generated __class__. But isinstance does not: >>> isinstance(C(), int) C getattribute: __class__ True The same applies if we use property: >>> class D: ... @property ... def __class__(self): ... return int ... >>> type(D()) >>> isinstance(D(), int) True So the rules appear to be: - you can set __class__, but only sometimes; - type() will believe __class__, but only sometimes; - you can generate __class__ dynamically, but not with __getattr__; - isinstance() will believe __class__ (always?); - and there is no indication of how much of this is deliberate language feature and how much is an accident of implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 06:44:18 2021 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Fri, 10 Dec 2021 11:44:18 +0000 Subject: [issue46033] Duplicated sentence in for statement documentation In-Reply-To: <1639132962.13.0.2847255275.issue46033@roundup.psfhosted.org> Message-ID: <1639136658.64.0.0224808395551.issue46033@roundup.psfhosted.org> Vedran ?a?i? added the comment: How about adding the words "More precisely," at the beginning of the second sentence? ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 06:46:01 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Dec 2021 11:46:01 +0000 Subject: [issue46000] NetBSD curses compatibility In-Reply-To: <1638807112.42.0.171377770564.issue46000@roundup.psfhosted.org> Message-ID: <1639136761.03.0.17279189694.issue46000@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you Thomas for your contribution. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 06:51:25 2021 From: report at bugs.python.org (Ned Batchelder) Date: Fri, 10 Dec 2021 11:51:25 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639137085.69.0.0691354628939.issue46028@roundup.psfhosted.org> Ned Batchelder added the comment: git bisect also identifies that commit as the first bad: 99fcf1505218464c489d419d4500f126b6d6dc28 is the first bad commit commit 99fcf1505218464c489d419d4500f126b6d6dc28 Author: Steve Dower Date: Fri Dec 3 00:08:42 2021 +0000 bpo-45582: Port getpath[p].c to Python (GH-29041) The getpath.py file is frozen at build time and executed as code over a namespace. It is never imported, nor is it meant to be importable or reusable. However, it should be easier to read, modify, and patch than the previous code. This commit attempts to preserve every previously tested quirk, but these may be changed in the future to better align platforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 06:54:44 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 11:54:44 +0000 Subject: [issue40821] os.getlogin() not working In-Reply-To: <1590784290.42.0.113469889536.issue40821@roundup.psfhosted.org> Message-ID: <1639137284.25.0.687709615264.issue40821@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 07:01:00 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Fri, 10 Dec 2021 12:01:00 +0000 Subject: [issue46034] Patch-adding __init__ in a class takes no effect when called from a subinterpreter Message-ID: <1639137660.32.0.636703165427.issue46034@roundup.psfhosted.org> New submission from Miro Hron?ok : Hello, based on some bug reports reported in: - https://github.com/GrahamDumpleton/mod_wsgi/issues/729 - https://github.com/poljar/weechat-matrix/issues/293 - https://bugzilla.redhat.com/show_bug.cgi?id=2030621 I have isolated the following reproducer that shows a regression in Python 3.10+. It happens at least with 3.10.0, 3.10.1 and 3.11.0a2. It works as expected in Python 3.9. The following code is valid and works on 3.9, 3.10, 3.11: ========================================= class Greeting(): pass def new_init(inst, name): inst.text = f"Hello, {name}\n" Greeting.__init__ = new_init Greeting("Miro") ========================================= But if we run it via a subinterpreter, it breaks on 3.10+: ========================================= import _testcapi code = r"""class Greeting(): pass def new_init(inst, name): inst.text = f"Hello, {name}\n" Greeting.__init__ = new_init Greeting("Miro")""" _testcapi.run_in_subinterp(code) ========================================= $ python3.9 reproducer.py (exits cleanly) $ python3.10 reproducer.py Traceback (most recent call last): File "", line 9, in TypeError: Greeting() takes no arguments $ python3.11 reproducer.py Traceback (most recent call last): File "", line 9, in TypeError: Greeting() takes no arguments My observation also shows that if the Greeting class already had (any) __init__: ========================================= class Greeting(): __init__ = ... ========================================= It works as expected on 3.9, 3.10, 3.11. In reality, this is most likely to affect classes with decorators, like: ========================================= import attr @attr.s class TestClass: foo = attr.ib() TestClass("Miro") ========================================= This works standalone, but fails in a subinterpreter: $ python3.10 reproducer.py Traceback (most recent call last): File "", line 7, in TypeError: TestClass() takes no arguments ---------- components: Subinterpreters messages: 408196 nosy: eric.snow, hroncok, vstinner priority: normal severity: normal status: open title: Patch-adding __init__ in a class takes no effect when called from a subinterpreter type: behavior versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 07:10:59 2021 From: report at bugs.python.org (milahu) Date: Fri, 10 Dec 2021 12:10:59 +0000 Subject: [issue46035] mimetypes.guess_type returns deprecated mimetype application/x-javascript Message-ID: <1639138259.47.0.962118215101.issue46035@roundup.psfhosted.org> New submission from milahu : deprecated mimetype? per rfc4329, the technical term is "unregistered media type" https://datatracker.ietf.org/doc/html/rfc4329#section-3 related https://stackoverflow.com/a/9664327/10440128 https://github.com/danny0838/PyWebScrapBook/issues/53 quick fix ```py # python/Lib/mimetypes.py class MimeTypes: # ... def guess_type(self, url, strict=True): # ... if ext in _types_map_default: # prefer the python-internal values over /etc/mime.types return _types_map_default[ext], encoding if ext in types_map: return types_map[ext], encoding ``` why is `application/x-javascript` returned? on linux, mimetypes.init() loads /etc/mime.types source: https://mirrors.kernel.org/gentoo/distfiles/mime-types-9.tar.bz2 /etc/mime.types is sorted by alphabet, so ``` cat /etc/mime.types | grep javascript application/javascript js application/x-javascript js ``` apparently, the last entry application/x-javascript will overwrite the previous entry application/javascript ---------- components: Library (Lib) messages: 408197 nosy: milahu priority: normal severity: normal status: open title: mimetypes.guess_type returns deprecated mimetype application/x-javascript type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 07:16:07 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Fri, 10 Dec 2021 12:16:07 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1639138567.22.0.126204122271.issue45723@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +28251 pull_request: https://github.com/python/cpython/pull/30026 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 07:20:41 2021 From: report at bugs.python.org (milahu) Date: Fri, 10 Dec 2021 12:20:41 +0000 Subject: [issue46035] mimetypes.guess_type returns deprecated mimetype application/x-javascript In-Reply-To: <1639138259.47.0.962118215101.issue46035@roundup.psfhosted.org> Message-ID: <1639138841.5.0.112482668838.issue46035@roundup.psfhosted.org> milahu added the comment: patch https://github.com/milahu/cpython/commit/8a50633bb1b0c3e39fbe2cd467bb34a839ad068f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 07:22:25 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Fri, 10 Dec 2021 12:22:25 +0000 Subject: [issue46034] Patch-adding __init__ in a class takes no effect when called from a subinterpreter In-Reply-To: <1639137660.32.0.636703165427.issue46034@roundup.psfhosted.org> Message-ID: <1639138945.91.0.929329507417.issue46034@roundup.psfhosted.org> Miro Hron?ok added the comment: git bisect gives: https://github.com/python/cpython/commit/ea251806b8dffff11b30d2182af1e589caf88acf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 07:29:40 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Dec 2021 12:29:40 +0000 Subject: [issue46034] Patch-adding __init__ in a class takes no effect when called from a subinterpreter In-Reply-To: <1639137660.32.0.636703165427.issue46034@roundup.psfhosted.org> Message-ID: <1639139380.64.0.193707484212.issue46034@roundup.psfhosted.org> STINNER Victor added the comment: I mark this issue as a duplicate of bpo-46006. It's not exactly the same issue, but the root cause is the same: in some functions, Python use fast pointer comparisons when two strings are interned, but this now fails if two interned strings belong to two different interpreters. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 07:32:58 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Dec 2021 12:32:58 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639139578.68.0.798803058491.issue46006@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-46034 as a duplicate: setting a class "__init__" attribute doesn't update properly its tp_init slot. update_slot() of Objects/typeobject.c only uses a fast pointer comparison since both strings are interned, but the test fails if the two strings are part of two different Python interpreters. In bpo-46034 case, the problem is that the "slotdefs" array uses interned strings created in the main interpreter, whereas the update_slot() name parameter (Python string) was created in a sub-interpreter. Reproducer: ========================================= import _testcapi code = r"""class Greeting(): pass def new_init(inst, name): inst.text = f"Hello, {name}\n" Greeting.__init__ = new_init Greeting("Miro")""" _testcapi.run_in_subinterp(code) ========================================= ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 07:35:11 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Dec 2021 12:35:11 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639139711.37.0.407629406007.issue46006@roundup.psfhosted.org> STINNER Victor added the comment: Attachd cmp_interned_strings.patch fix _PyUnicode_EqualToASCIIId() and update_slot() for subinterpreters. I will create a PR once we agree if it's required to support subinterpreters there, and if there is no better (faster) option. For update_slot(), one option to avoid adding a "slow" _PyUnicode_EQ() call would be to have per-interpreter interned strings for the slotdefs array. ---------- keywords: +patch Added file: https://bugs.python.org/file50485/cmp_interned_strings.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 07:35:44 2021 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Fri, 10 Dec 2021 12:35:44 +0000 Subject: [issue37971] Wrong trace with multiple decorators (linenumber wrong in frame) In-Reply-To: <1567017172.25.0.486267767179.issue37971@roundup.psfhosted.org> Message-ID: <1639139744.07.0.708052578993.issue37971@roundup.psfhosted.org> Carl Friedrich Bolz-Tereick added the comment: I ran into this problem in PyPy today, preparing a patch for CPython too (without looking at the old one). ---------- nosy: +Carl.Friedrich.Bolz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 07:38:43 2021 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Fri, 10 Dec 2021 12:38:43 +0000 Subject: [issue37971] Wrong trace with multiple decorators (linenumber wrong in frame) In-Reply-To: <1567017172.25.0.486267767179.issue37971@roundup.psfhosted.org> Message-ID: <1639139923.28.0.967513619602.issue37971@roundup.psfhosted.org> Change by Carl Friedrich Bolz-Tereick : ---------- pull_requests: +28252 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30027 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 07:44:06 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Dec 2021 12:44:06 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639140246.06.0.660831815967.issue46006@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +3.10regression nosy: +pablogsal priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 07:58:17 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 10 Dec 2021 12:58:17 +0000 Subject: [issue46032] functools' singledispatch does not support GenericAlias In-Reply-To: <1639127096.15.0.258621113418.issue46032@roundup.psfhosted.org> Message-ID: <1639141097.7.0.713117836142.issue46032@roundup.psfhosted.org> Alex Waygood added the comment: It would be well worth it to improve the error message, however: ``` >>> from functools import singledispatch >>> @singledispatch ... def func(arg): ... raise NotImplementedError ... >>> @func.register ... def _(arg: list[str]): ... print('Got a list of strings') ... >>> func(1) Traceback (most recent call last): File "/usr/local/lib/python3.9/functools.py", line 830, in dispatch impl = dispatch_cache[cls] File "/usr/local/lib/python3.9/weakref.py", line 405, in __getitem__ return self.data[ref(key)] KeyError: During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.9/functools.py", line 833, in dispatch impl = registry[cls] KeyError: During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.9/functools.py", line 877, in wrapper return dispatch(args[0].__class__)(*args, **kw) return dispatch(args[0].__class__)(*args, **kw) File "/usr/local/lib/python3.9/functools.py", line 835, in dispatch impl = _find_impl(cls, registry) File "/usr/local/lib/python3.9/functools.py", line 782, in _find_impl mro = _compose_mro(cls, registry.keys()) File "/usr/local/lib/python3.9/functools.py", line 743, in _compose_mro types = [n for n in types if is_related(n)] File "/usr/local/lib/python3.9/functools.py", line 743, in types = [n for n in types if is_related(n)] File "/usr/local/lib/python3.9/functools.py", line 742, in is_related and issubclass(cls, typ)) TypeError: issubclass() argument 2 cannot be a parameterized generic ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 08:05:13 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 10 Dec 2021 13:05:13 +0000 Subject: [issue46032] functools' singledispatch does not support GenericAlias In-Reply-To: <1639127096.15.0.258621113418.issue46032@roundup.psfhosted.org> Message-ID: <1639141513.95.0.0225857807514.issue46032@roundup.psfhosted.org> Alex Waygood added the comment: The above traceback is because the `isinstance(list[str], type)` check at Lib/functools.py:848 evaluates to `True`. Related: #45665. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 08:05:52 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 10 Dec 2021 13:05:52 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639141552.45.0.807673163188.issue46028@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Indeed, seems my original hunch is correct. Steve, could you take a look when you have some time? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 08:05:56 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 10 Dec 2021 13:05:56 +0000 Subject: [issue45665] Problems caused by isinstance(list[int], type) returning True In-Reply-To: <1635496063.98.0.5366836652.issue45665@roundup.psfhosted.org> Message-ID: <1639141556.02.0.235396687209.issue45665@roundup.psfhosted.org> Alex Waygood added the comment: #46032 is related to this issue. ---------- nosy: +AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 08:12:06 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 10 Dec 2021 13:12:06 +0000 Subject: [issue46023] Modules/makesetup generated rules ignore *disabled* In-Reply-To: <1639041830.9.0.701619101169.issue46023@roundup.psfhosted.org> Message-ID: <1639141926.74.0.270338785724.issue46023@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 036bbb1d1b6156a1a72c40e9f907f302505085bc by Christian Heimes in branch 'main': bpo-46023: Fix makesetup handling of disabled rule (GH-30001) https://github.com/python/cpython/commit/036bbb1d1b6156a1a72c40e9f907f302505085bc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 08:32:42 2021 From: report at bugs.python.org (Daniel) Date: Fri, 10 Dec 2021 13:32:42 +0000 Subject: [issue46036] Single-phase initialized modules gets initialized multiple times in 3.10.0 Message-ID: <1639143162.4.0.670333199133.issue46036@roundup.psfhosted.org> New submission from Daniel : The documentation (https://docs.python.org/3/c-api/init.html#c.Py_NewInterpreter) states: For modules using single-phase initialization, e.g. PyModule_Create(), the 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. Objects in the module?s dictionary thus end up shared across (sub-)interpreters, which might cause unwanted behavior (see Bugs and caveats below). This does however seem to have changed (sometime between 3.6.9 and 3.10.0). Consider the following code: #include /* * Create a module "my_spam" that uses single-phase initialization */ static PyModuleDef EmbModule = { PyModuleDef_HEAD_INIT, "my_spam", NULL, -1, NULL, NULL, NULL, NULL, NULL }; /* * According to the docs this function is only called once when dealing with * subinterpreters, the next time a shallow copy of the initial state is * returned. This does however not seem to be the case in Python 3.10.0.. */ static PyObject* PyInit_emb(void) { PyObject *module = PyModule_Create(&EmbModule); PyModule_AddObject(module, "test", PyDict_New()); printf("Init my_spam module %p\n", module); return module; } /* * Main program */ int main(int argc, char *argv[]) { PyImport_AppendInittab("my_spam", &PyInit_emb); Py_Initialize(); // Save the main state PyThreadState *mainstate = PyThreadState_Get(); // Create two new interpreters PyThreadState *inter1 = Py_NewInterpreter(); PyThreadState *inter2 = Py_NewInterpreter(); // Import the my_spam module into the first subinterpreter // and change the global variable of it PyThreadState_Swap(inter1); PyRun_SimpleString("import sys; print(sys.version_info)"); PyRun_SimpleString("import my_spam; print('my_spam.test: ', my_spam.test)"); PyRun_SimpleString("my_spam.test[1]=1; print('my_spam.test: ', my_spam.test)"); // Import the my_spam module into the second subinterpreter // and change the global variable of it PyThreadState_Swap(inter2); PyRun_SimpleString("import sys; print(sys.version_info)"); PyRun_SimpleString("import my_spam; print('my_spam.test: ', my_spam.test)"); PyRun_SimpleString("my_spam.test[2]=2; print('my_spam.test: ', my_spam.test)"); // Close the subinterpreters Py_EndInterpreter(inter2); PyThreadState_Swap(inter1); Py_EndInterpreter(inter1); // Swap back to the main state and finalize python PyThreadState_Swap(mainstate); if (Py_FinalizeEx() < 0) { exit(120); } return 0; } Compiled with python 3.6.9 this does act according to the documentation: $ gcc test_subinterpreters.c -I/home/daniel/.pyenv/versions/3.6.9/include/python3.6m -L/home/daniel/.pyenv/versions/3.6.9/lib -lpython3.6m && LD_LIBRARY_PATH=/home/daniel/.pyenv/versions/3.6.9/lib ./a.out sys.version_info(major=3, minor=6, micro=9, releaselevel='final', serial=0) Init my_spam module 0x7ff7a63d1ef8 my_spam.test: {} my_spam.test: {1: 1} sys.version_info(major=3, minor=6, micro=9, releaselevel='final', serial=0) my_spam.test: {1: 1} my_spam.test: {1: 1, 2: 2} But compiled with 3.10.0 the module is reinitialized and thus objects in the module are not shared between the subinterpreters: $ gcc test_subinterpreters.c -I/home/daniel/.pyenv/versions/3.10.0/include/python3.10 -L/home/daniel/.pyenv/versions/3.10.0/lib -lpython3.10 && LD_LIBRARY_PATH=/home/daniel/.pyenv/versions/3.10.0/lib ./a.out sys.version_info(major=3, minor=10, micro=0, releaselevel='final', serial=0) Init my_spam module 0x7f338a9a9530 my_spam.test: {} my_spam.test: {1: 1} sys.version_info(major=3, minor=10, micro=0, releaselevel='final', serial=0) Init my_spam module 0x7f338a9a96c0 my_spam.test: {} my_spam.test: {2: 2} To me the new behavior seems nicer, but at the very least the documentation should be updated. It also seems like if this could break integrations, albeit it is an unlikely "feature" to rely on. ---------- components: C API messages: 408209 nosy: daniel-falk priority: normal severity: normal status: open title: Single-phase initialized modules gets initialized multiple times in 3.10.0 type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 08:39:45 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 10 Dec 2021 13:39:45 +0000 Subject: [issue45654] Freeze the runpy module. In-Reply-To: <1635444830.43.0.574749380857.issue45654@roundup.psfhosted.org> Message-ID: <1639143585.25.0.735516012937.issue45654@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +christian.heimes nosy_count: 4.0 -> 5.0 pull_requests: +28253 pull_request: https://github.com/python/cpython/pull/30028 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 08:42:49 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 10 Dec 2021 13:42:49 +0000 Subject: [issue45654] Freeze the runpy module. In-Reply-To: <1635444830.43.0.574749380857.issue45654@roundup.psfhosted.org> Message-ID: <1639143769.61.0.19577101417.issue45654@roundup.psfhosted.org> Christian Heimes added the comment: I noticed that the types module is only used for ModuleType. PR GH-30028 gets rid of 205 kB object code: 205K Python/deepfreeze/types.o ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 09:31:36 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Fri, 10 Dec 2021 14:31:36 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1639146696.25.0.949840921451.issue45723@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +28254 pull_request: https://github.com/python/cpython/pull/30029 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 09:47:26 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Dec 2021 14:47:26 +0000 Subject: [issue45665] Problems caused by isinstance(list[int], type) returning True In-Reply-To: <1635496063.98.0.5366836652.issue45665@roundup.psfhosted.org> Message-ID: <1639147646.23.0.208488393761.issue45665@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- dependencies: +functools' singledispatch does not support GenericAlias _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 09:50:20 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Dec 2021 14:50:20 +0000 Subject: [issue45665] Problems caused by isinstance(list[int], type) returning True In-Reply-To: <1635496063.98.0.5366836652.issue45665@roundup.psfhosted.org> Message-ID: <1639147820.9.0.529503038659.issue45665@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- dependencies: -functools' singledispatch does not support GenericAlias _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 09:59:57 2021 From: report at bugs.python.org (Jacob Hayes) Date: Fri, 10 Dec 2021 14:59:57 +0000 Subject: [issue45359] TopologicalSorter is not Generic at runtime (but is in typeshed) In-Reply-To: <1633299530.43.0.181161136207.issue45359@roundup.psfhosted.org> Message-ID: <1639148397.7.0.317122018787.issue45359@roundup.psfhosted.org> Jacob Hayes added the comment: Thanks for the tips! I've been using this patch in my own code in a early imported `__init__.py`: ``` from graphlib import TopologicalSorter from types import GenericAlias if not hasattr(TopologicalSorter, "__class_getitem__"): # pragma: no cover TopologicalSorter.__class_getitem__ = classmethod(GenericAlias) # type: ignore ``` Certainly a bit hacky, but aside from no-op on >=3.11 and satisfying mypy, it supports runtime type inspection via `get_type_hints` before 3.11 (which otherwise still errors for stringized versions). The stringized versions are probably a bit simpler/safer for most folks though :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 10:11:47 2021 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 10 Dec 2021 15:11:47 +0000 Subject: [issue46029] "ValueError: Invalid isoformat string" from a valid string In-Reply-To: <1639105279.05.0.259148747281.issue46029@roundup.psfhosted.org> Message-ID: <1639149107.74.0.997195277766.issue46029@roundup.psfhosted.org> Eric V. Smith added the comment: fromisoformat() is only designed to parse the output of isformat(). See issue 35829 for further discussion. I'm going to close this issue as a duplicate. ---------- nosy: +eric.smith resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> datetime: parse "Z" timezone suffix in fromisoformat() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 10:12:38 2021 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 10 Dec 2021 15:12:38 +0000 Subject: [issue46024] Different behaviour with zipfile In-Reply-To: <1639045155.54.0.671926991121.issue46024@roundup.psfhosted.org> Message-ID: <1639149158.86.0.808624206901.issue46024@roundup.psfhosted.org> Change by Eric V. Smith : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 10:17:20 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Fri, 10 Dec 2021 15:17:20 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639149440.47.0.131314929125.issue46006@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 10:19:09 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 15:19:09 +0000 Subject: [issue30718] [doc] open builtin function: specifying the size of buffer has no effect for text files In-Reply-To: <1497989929.05.0.713607879185.issue30718@psf.upfronthosting.co.za> Message-ID: <1639149549.78.0.497643113546.issue30718@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: -> docs at python components: +Documentation -Interpreter Core keywords: +easy nosy: +docs at python title: open builtin function: specifying the size of buffer has no effect for text files -> [doc] open builtin function: specifying the size of buffer has no effect for text files versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 10:19:58 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Dec 2021 15:19:58 +0000 Subject: [issue46032] functools' singledispatch does not support GenericAlias In-Reply-To: <1639127096.15.0.258621113418.issue46032@roundup.psfhosted.org> Message-ID: <1639149598.49.0.887669826225.issue46032@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 10:26:47 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 10 Dec 2021 15:26:47 +0000 Subject: [issue45653] Freeze the encodings module. In-Reply-To: <1635444712.46.0.923300343963.issue45653@roundup.psfhosted.org> Message-ID: <1639150007.92.0.0271988064796.issue45653@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +christian.heimes nosy_count: 5.0 -> 6.0 pull_requests: +28255 pull_request: https://github.com/python/cpython/pull/30030 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 10:38:13 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 15:38:13 +0000 Subject: [issue16977] argparse: mismatch between choices parsing and usage/error message In-Reply-To: <1358303407.58.0.0453921356618.issue16977@psf.upfronthosting.co.za> Message-ID: <1639150693.27.0.214299319867.issue16977@roundup.psfhosted.org> Irit Katriel added the comment: We could make the error message less wrong: >>> p.parse_args(['d']) usage: [-h] {a,b,c} : error: argument a: invalid choice: 'd' (choose a value in 'abc') % git diff diff --git a/Lib/argparse.py b/Lib/argparse.py index b44fa4f0f6..f03cc1f110 100644 --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -2499,8 +2499,8 @@ def _check_value(self, action, value): # converted value must be one of the choices (if specified) if action.choices is not None and value not in action.choices: args = {'value': value, - 'choices': ', '.join(map(repr, action.choices))} - msg = _('invalid choice: %(value)r (choose from %(choices)s)') + 'choices': repr(action.choices)} + msg = _('invalid choice: %(value)r (choose a value in %(choices)s)') raise ArgumentError(action, msg % args) # ======================= ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 10:48:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 15:48:45 +0000 Subject: [issue18349] argparse usage should preserve () in metavars such as range(20) In-Reply-To: <1372832211.16.0.544648995095.issue18349@psf.upfronthosting.co.za> Message-ID: <1639151325.73.0.166144511686.issue18349@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11: >>> import argparse >>> parser = argparse.ArgumentParser() >>> parser.add_argument('foo', type=int, choices=range(20), metavar='range(0,20)') _StoreAction(option_strings=[], dest='foo', nargs=None, const=None, default=None, type=, choices=range(0, 20), help=None, metavar='range(0,20)') >>> parser.format_usage() 'usage: [-h] range0,20\n' ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 10:50:50 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 15:50:50 +0000 Subject: [issue11708] argparse: suggestion for formatting optional positional args In-Reply-To: <1301372470.63.0.394832292121.issue11708@psf.upfronthosting.co.za> Message-ID: <1639151450.35.0.460320254231.issue11708@roundup.psfhosted.org> Change by Irit Katriel : ---------- type: -> enhancement versions: +Python 3.11 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 10:55:25 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 15:55:25 +0000 Subject: [issue23994] argparse fails to detect program name when there is a slash at the end of the program's path In-Reply-To: <1429379283.39.0.0511547854084.issue23994@psf.upfronthosting.co.za> Message-ID: <1639151725.88.0.785355650002.issue23994@roundup.psfhosted.org> Irit Katriel added the comment: I am unable to reproduce this problem on 3.11 on a Mac. ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 10:58:08 2021 From: report at bugs.python.org (vladmihaisima) Date: Fri, 10 Dec 2021 15:58:08 +0000 Subject: [issue46037] logging.config.dictConfig with disable_existing_loggers set, also disables loggers in configuration Message-ID: <1639151888.32.0.171616624845.issue46037@roundup.psfhosted.org> New submission from vladmihaisima : When invoking logging.config.dictConfig - if a logger was previously disabled (for example by a call to "logging.config.dictConfig({'version': 1})") - the loggers specified in the dictionary will not be enabled. Documentation at https://docs.python.org/3/library/logging.config.html specifies for disable_existing_loggers that "... behaviour is to disable any existing non-root loggers unless they or their ancestors are explicitly named in the logging configuration.". There is no explicit mention for what happens when a logger exists and is already disabled. I would have assumed that if present it will be enabled, but that does not seem to be the case. So I think that if a logger is disabled invoking dictConfig cannot re-enable it. See attached code for a reproducible case. ---------- files: bug.py messages: 408216 nosy: vladmihaisima priority: normal severity: normal status: open title: logging.config.dictConfig with disable_existing_loggers set, also disables loggers in configuration versions: Python 3.10, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file50486/bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 11:06:27 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 16:06:27 +0000 Subject: [issue17890] argparse: mutually exclusive groups full of help-suppressed args can cause AssertionErrors In-Reply-To: <1367455382.45.0.0611766927148.issue17890@psf.upfronthosting.co.za> Message-ID: <1639152387.63.0.696592092574.issue17890@roundup.psfhosted.org> Irit Katriel added the comment: I'm unable to reproduce this problem on 3.11: >>> import argparse >>> parser = argparse.ArgumentParser() >>> group = parser.add_mutually_exclusive_group() >>> group.add_argument('--spam', help=argparse.SUPPRESS) _StoreAction(option_strings=['--spam'], dest='spam', nargs=None, const=None, default=None, type=None, choices=None, help='==SUPPRESS==', metavar=None) >>> parser.add_argument('--' + 'eggs' * 20, dest='eggs') _StoreAction(option_strings=['--eggseggseggseggseggseggseggseggseggseggseggseggseggseggseggseggseggseggseggseggs'], dest='eggs', nargs=None, const=None, default=None, type=None, choices=None, help=None, metavar=None) >>> parser.print_usage() usage: [-h] [--eggseggseggseggseggseggseggseggseggseggseggseggseggseggseggseggseggseggseggseggs EGGS] >>> ---------- nosy: +iritkatriel resolution: -> fixed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 11:19:15 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Fri, 10 Dec 2021 16:19:15 +0000 Subject: [issue46038] Mark /configure file as generated in .gitattributes Message-ID: <1639153155.2.0.704018156223.issue46038@roundup.psfhosted.org> New submission from Oleg Iarygin : configure is regenerated from configure.ac using a custom container with appropriate version of tools (quay.io/tiran/cpython_autoconf by Christian Heimes). As a result, configure falls into the same category as files generated by Argument Clinic, Freeze and Parser/asdl_c.py. Due to size and churn of these artifacts, they are marked in .gitattributes as generated so GitHub Pull Request Diff Viewer collapses them into a short notification. The pull request associated with this issue does the same for configure. Actually, configure diff is so large that sometimes it crosses a threshold and GitHub collapses it by force with "Large diffs are not rendered by default" or even "xxx additions, yyy deletions not shown because the diff is too large. Please use a local Git client to view these changes". See GH-29756 as an extreme example (15,430 insertions and deletions) and for an average. ---------- components: Build messages: 408218 nosy: arhadthedev priority: normal severity: normal status: open title: Mark /configure file as generated in .gitattributes type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 11:19:27 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Fri, 10 Dec 2021 16:19:27 +0000 Subject: [issue46038] Mark /configure file as generated in .gitattributes In-Reply-To: <1639153155.2.0.704018156223.issue46038@roundup.psfhosted.org> Message-ID: <1639153167.95.0.54025785754.issue46038@roundup.psfhosted.org> Change by Oleg Iarygin : ---------- keywords: +patch pull_requests: +28256 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30031 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 11:22:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 16:22:55 +0000 Subject: [issue28841] urlparse.urlparse() parses invalid URI without generating an error (examples provided) In-Reply-To: <1480521425.85.0.782501279738.issue28841@psf.upfronthosting.co.za> Message-ID: <1639153375.45.0.426166069919.issue28841@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11: >>> urllib.parse.urlparse('http://www.google.com:/abc') ParseResult(scheme='http', netloc='www.google.com:', path='/abc', params='', query='', fragment='') The discussion above was mostly leaning towards won't fix, except for the suggestion to > Based on the RFC, one could argue that urlunsplit should omit the colon. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 11:26:16 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 16:26:16 +0000 Subject: [issue22047] argparse improperly prints mutually exclusive options when they are in a group In-Reply-To: <1406131424.14.0.0235697032218.issue22047@psf.upfronthosting.co.za> Message-ID: <1639153576.6.0.541595454089.issue22047@roundup.psfhosted.org> Irit Katriel added the comment: I am unable to reproduce this on 3.11: % ./python.exe tt.py -h usage: tt.py [-h] [[-hello]] options: -h, --help show this help message and exit -hello A flag ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 11:33:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 16:33:55 +0000 Subject: [issue31768] argparse drops '|'s when the arguments are too long In-Reply-To: <1507758565.64.0.213398074469.issue31768@psf.upfronthosting.co.za> Message-ID: <1639154035.08.0.952817015224.issue31768@roundup.psfhosted.org> Irit Katriel added the comment: In 3.11 the problem is still there, but the cutoff to make Eric's script show it is now 26 rather than 8: % ./python.exe tt.py 25 usage: tt.py [-h] [-v | -q | -x [X] | -y [Y] | Z | Z | Z | Z | Z | Z | Z | Z | Z | Z | Z | Z | Z | Z | Z | Z | Z | Z | Z | Z | Z | Z | Z | Z | Z] % ./python.exe tt.py 26 usage: tt.py [-h] [-v] [-q] [-x [X]] [-y [Y]] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z] ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 11:43:46 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 16:43:46 +0000 Subject: [issue34628] urllib.request.urlopen fails when userinfo is present in URL In-Reply-To: <1536683596.21.0.0269046726804.issue34628@psf.upfronthosting.co.za> Message-ID: <1639154626.81.0.338007769835.issue34628@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 11:54:57 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 16:54:57 +0000 Subject: [issue16807] argparse group nesting lost on inheritance In-Reply-To: <1356745167.13.0.671311915058.issue16807@psf.upfronthosting.co.za> Message-ID: <1639155297.11.0.314250978876.issue16807@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11: >>> argparse.ArgumentParser(add_help=False, parents=[parent]).print_help() usage: [--foo FOO] [-a | -b] options: -a -b the group: --foo FOO ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 12:00:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 17:00:45 +0000 Subject: [issue17113] argparse.RawDescriptionHelpFormatter should not delete blank lines In-Reply-To: <1359899140.94.0.20575006786.issue17113@psf.upfronthosting.co.za> Message-ID: <1639155645.95.0.132136872771.issue17113@roundup.psfhosted.org> Irit Katriel added the comment: Adding a space as Paul suggests works. I'll close this soon if nobody objects. ---------- nosy: +iritkatriel resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 12:04:32 2021 From: report at bugs.python.org (Mitchell Hentges) Date: Fri, 10 Dec 2021 17:04:32 +0000 Subject: [issue43749] venv module does not copy the correct python exe In-Reply-To: <1617715625.46.0.74507922397.issue43749@roundup.psfhosted.org> Message-ID: <1639155872.41.0.483523206096.issue43749@roundup.psfhosted.org> Mitchell Hentges added the comment: Hey, can I request a backport of this change? For my use case, 3.9+ would be great, but going back to 3.7 should be viable? I trust your judgement :) I'll happily create the PRs for the backport, but it looks like the bug has to be indicated as "needs backport to X.Y" by Python maintainers first (https://devguide.python.org/gitbootcamp/?highlight=backport#backporting-merged-changes) ---------- nosy: +mitchhentges _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 12:05:07 2021 From: report at bugs.python.org (Thomas Klausner) Date: Fri, 10 Dec 2021 17:05:07 +0000 Subject: [issue21461] Recognize -pthread In-Reply-To: <1399626963.64.0.665177402844.issue21461@psf.upfronthosting.co.za> Message-ID: <1639155907.4.0.642302380806.issue21461@roundup.psfhosted.org> Change by Thomas Klausner : ---------- pull_requests: +28257 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30032 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 12:07:21 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 17:07:21 +0000 Subject: [issue28609] argparse claims '*' positional argument is required in error output In-Reply-To: <1478272763.12.0.609109547521.issue28609@psf.upfronthosting.co.za> Message-ID: <1639156041.77.0.421243720547.issue28609@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. >>> parser.parse_args([]) usage: [-h] [-V] COMMAND [ARGUMENT ...] : error: the following arguments are required: COMMAND, ARGUMENT ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 12:14:07 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 10 Dec 2021 17:14:07 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1639156447.06.0.130777361022.issue45582@roundup.psfhosted.org> Steve Dower added the comment: New changeset 3f398a77d37b5dfd51dabbc362d482a482fa885a by neonene in branch 'main': bpo-45582: Fix test_embed failure during a PGO build on Windows (GH-30014) https://github.com/python/cpython/commit/3f398a77d37b5dfd51dabbc362d482a482fa885a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 12:15:56 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 17:15:56 +0000 Subject: [issue15125] argparse: positional arguments containing - in name not handled well In-Reply-To: <1340292847.64.0.123942573403.issue15125@psf.upfronthosting.co.za> Message-ID: <1639156556.01.0.947516124158.issue15125@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 12:17:09 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 17:17:09 +0000 Subject: [issue24338] In argparse adding wrong arguments makes malformed namespace In-Reply-To: <1433070096.48.0.744562806973.issue24338@psf.upfronthosting.co.za> Message-ID: <1639156629.05.0.384461951198.issue24338@roundup.psfhosted.org> Irit Katriel added the comment: >From the discussion and "rejected" resolution it looks like the intention was to close this issue. I will do that soon if nobody objects. ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 12:26:23 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 10 Dec 2021 17:26:23 +0000 Subject: [issue43749] venv module does not copy the correct python exe In-Reply-To: <1617715625.46.0.74507922397.issue43749@roundup.psfhosted.org> Message-ID: <1639157183.2.0.863606904213.issue43749@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +28258 pull_request: https://github.com/python/cpython/pull/30033 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 12:26:27 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 10 Dec 2021 17:26:27 +0000 Subject: [issue43749] venv module does not copy the correct python exe In-Reply-To: <1617715625.46.0.74507922397.issue43749@roundup.psfhosted.org> Message-ID: <1639157187.39.0.884591071267.issue43749@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28259 pull_request: https://github.com/python/cpython/pull/30034 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 12:27:21 2021 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 10 Dec 2021 17:27:21 +0000 Subject: [issue43749] venv module does not copy the correct python exe In-Reply-To: <1617715625.46.0.74507922397.issue43749@roundup.psfhosted.org> Message-ID: <1639157241.67.0.726891220676.issue43749@roundup.psfhosted.org> Vinay Sajip added the comment: 3.10 and 3.9 - OK, but 3. is security fixes only, I'm afraid. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 12:27:35 2021 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 10 Dec 2021 17:27:35 +0000 Subject: [issue43749] venv module does not copy the correct python exe In-Reply-To: <1617715625.46.0.74507922397.issue43749@roundup.psfhosted.org> Message-ID: <1639157255.1.0.338599575269.issue43749@roundup.psfhosted.org> Vinay Sajip added the comment: *3.8, I meant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 12:29:34 2021 From: report at bugs.python.org (Roy Smith) Date: Fri, 10 Dec 2021 17:29:34 +0000 Subject: [issue17113] argparse.RawDescriptionHelpFormatter should not delete blank lines In-Reply-To: <1359899140.94.0.20575006786.issue17113@psf.upfronthosting.co.za> Message-ID: <1639157374.86.0.00383519239467.issue17113@roundup.psfhosted.org> Roy Smith added the comment: It's nice to see this is still being worked on after all these years :-) I'm not actually convinced the proposed fix makes sense. It swaps out one incorrect behavior for a different incorrect behavior. If it really is more effort than it's worth to fix this (and given msg223371, I agree it probably is), then at least the original behavior makes more sense, as it's got years of history behind it and dropping an extra blank line is less arbitrary than adding an extra space. I've long since forgotten what real-world issue led me to open this, but it seems like it be easier to just document that extra trailing whitespace may not be honored. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 12:31:17 2021 From: report at bugs.python.org (Mitchell Hentges) Date: Fri, 10 Dec 2021 17:31:17 +0000 Subject: [issue43749] venv module does not copy the correct python exe In-Reply-To: <1617715625.46.0.74507922397.issue43749@roundup.psfhosted.org> Message-ID: <1639157477.84.0.357166433492.issue43749@roundup.psfhosted.org> Mitchell Hentges added the comment: That's great, thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 12:37:50 2021 From: report at bugs.python.org (Mark Shannon) Date: Fri, 10 Dec 2021 17:37:50 +0000 Subject: [issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds In-Reply-To: <1491349378.03.0.0671954460373.issue29988@psf.upfronthosting.co.za> Message-ID: <1639157870.64.0.915188889719.issue29988@roundup.psfhosted.org> Change by Mark Shannon : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 12:48:52 2021 From: report at bugs.python.org (Mark Shannon) Date: Fri, 10 Dec 2021 17:48:52 +0000 Subject: [issue46039] Break up the YIELD_FROM instruction. Message-ID: <1639158532.51.0.938199888812.issue46039@roundup.psfhosted.org> New submission from Mark Shannon : The YIELD_FROM instruction does three things: * It sends a value to the sub-iterator * It yields the value from the sub-iterator back up to its caller * Loops back on itself So we should implement this as: SEND <--+ YIELD_VALUE | JUMP_ABSOLUTE -+ Doing so would allow us to simplify gen.send and gen.throw as they wouldn't need all the special cases for 'yield from'. Zero cost exception handling allows us to handle throw in the bytecode with no runtime overhead: while True: SEND -> exit try: YIELD_VALUE except BaseException as ex: sub_iterator.throw(ex) exit: ---------- assignee: Mark.Shannon components: Interpreter Core messages: 408232 nosy: Mark.Shannon priority: normal severity: normal status: open title: Break up the YIELD_FROM instruction. versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 12:51:50 2021 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 10 Dec 2021 17:51:50 +0000 Subject: [issue43749] venv module does not copy the correct python exe In-Reply-To: <1617715625.46.0.74507922397.issue43749@roundup.psfhosted.org> Message-ID: <1639158710.8.0.746104925057.issue43749@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset bb8d645f3a09645686cf8f66bd46dcfa4efac713 by Miss Islington (bot) in branch '3.10': [3.10] bpo-43749: Ensure current exe is copied when using venv on windows (GH-25216) (GH-30034) https://github.com/python/cpython/commit/bb8d645f3a09645686cf8f66bd46dcfa4efac713 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 12:53:12 2021 From: report at bugs.python.org (Mark Shannon) Date: Fri, 10 Dec 2021 17:53:12 +0000 Subject: [issue46039] Break up the YIELD_FROM instruction. In-Reply-To: <1639158532.51.0.938199888812.issue46039@roundup.psfhosted.org> Message-ID: <1639158792.16.0.652252888646.issue46039@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +28260 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30035 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 12:55:37 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 17:55:37 +0000 Subject: [issue17113] argparse.RawDescriptionHelpFormatter should not delete blank lines In-Reply-To: <1359899140.94.0.20575006786.issue17113@psf.upfronthosting.co.za> Message-ID: <1639158937.53.0.893281705116.issue17113@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 13:06:14 2021 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 10 Dec 2021 18:06:14 +0000 Subject: [issue43749] venv module does not copy the correct python exe In-Reply-To: <1617715625.46.0.74507922397.issue43749@roundup.psfhosted.org> Message-ID: <1639159574.61.0.7803478305.issue43749@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset bad16f0cf71a6b11ef62f86be6b3d3567cd70a16 by Miss Islington (bot) in branch '3.9': [3.9] bpo-43749: Ensure current exe is copied when using venv on windows (GH-25216) (GH-30033) https://github.com/python/cpython/commit/bad16f0cf71a6b11ef62f86be6b3d3567cd70a16 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 13:09:15 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 10 Dec 2021 18:09:15 +0000 Subject: [issue45654] Freeze the runpy module. In-Reply-To: <1635444830.43.0.574749380857.issue45654@roundup.psfhosted.org> Message-ID: <1639159755.72.0.282717370614.issue45654@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 16638a4bdb802ae52d386a39d2dbef14de3fbc92 by Christian Heimes in branch 'main': bpo-45654: No need to freeze types (GH-30028) https://github.com/python/cpython/commit/16638a4bdb802ae52d386a39d2dbef14de3fbc92 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 13:10:36 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 10 Dec 2021 18:10:36 +0000 Subject: [issue21461] Recognize -pthread In-Reply-To: <1399626963.64.0.665177402844.issue21461@psf.upfronthosting.co.za> Message-ID: <1639159836.99.0.441678062504.issue21461@roundup.psfhosted.org> Christian Heimes added the comment: Which platforms or compilers use -pthread? ---------- components: +Build -Extension Modules nosy: +christian.heimes versions: +Python 3.11 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 13:12:57 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 18:12:57 +0000 Subject: [issue17024] cElementTree calls end() on parser taget even if start() fails In-Reply-To: <1359040208.76.0.707549580683.issue17024@psf.upfronthosting.co.za> Message-ID: <1639159977.35.0.913654664455.issue17024@roundup.psfhosted.org> Irit Katriel added the comment: This test passes on 3.11 (on a Mac). ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 13:13:59 2021 From: report at bugs.python.org (Thomas Klausner) Date: Fri, 10 Dec 2021 18:13:59 +0000 Subject: [issue21461] Recognize -pthread In-Reply-To: <1399626963.64.0.665177402844.issue21461@psf.upfronthosting.co.za> Message-ID: <1639160039.76.0.573425504564.issue21461@roundup.psfhosted.org> Thomas Klausner added the comment: gcc supports this flag. According to the man page: This option consistently for both compilation and linking. This option is supported on GNU/Linux targets, most other Unix derivatives, and also on x86 Cygwin and MinGW targets. On NetBSD, using -pthread is the recommended method to enable thread support. clang on NetBSD also supports this flag. I don't have access to clang on other systems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 13:23:29 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 18:23:29 +0000 Subject: [issue21178] doctest cause warnings in tests using generators In-Reply-To: <1396954146.87.0.0393521418681.issue21178@psf.upfronthosting.co.za> Message-ID: <1639160609.81.0.790144420079.issue21178@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 13:28:22 2021 From: report at bugs.python.org (Stanislav Syekirin) Date: Fri, 10 Dec 2021 18:28:22 +0000 Subject: [issue46040] asyncio.coroutine documented as removed in 3.10 Message-ID: <1639160902.02.0.980259307717.issue46040@roundup.psfhosted.org> New submission from Stanislav Syekirin : https://docs.python.org/3.10/library/asyncio-task.html#generator-based-coroutines This page says about asyncio.coroutine: Deprecated since version 3.8, removed in version 3.10 However, asyncio.coroutine is still working in 3.10 and has been removed, as far as I can see, here: https://bugs.python.org/issue43216. ---------- assignee: docs at python components: Documentation messages: 408240 nosy: Zabolekar, docs at python priority: normal severity: normal status: open title: asyncio.coroutine documented as removed in 3.10 versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 13:32:57 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 10 Dec 2021 18:32:57 +0000 Subject: [issue21461] Recognize -pthread In-Reply-To: <1399626963.64.0.665177402844.issue21461@psf.upfronthosting.co.za> Message-ID: <1639161177.76.0.404620916744.issue21461@roundup.psfhosted.org> Christian Heimes added the comment: Python's configure script should detect when a platform needs -pthread and automatically include the flags for linking and compiling of all files. Under which circumstances do you need -pthread in a Setup file? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 13:34:10 2021 From: report at bugs.python.org (Maxwell Bernstein) Date: Fri, 10 Dec 2021 18:34:10 +0000 Subject: [issue46041] Add reference counting micro-optimizations to listobject.c Message-ID: <1639161250.42.0.698258533036.issue46041@roundup.psfhosted.org> New submission from Maxwell Bernstein : Avoid reference counting in the fast path of list.contains and list.index ---------- messages: 408242 nosy: tekknolagi priority: normal severity: normal status: open title: Add reference counting micro-optimizations to listobject.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 13:34:29 2021 From: report at bugs.python.org (Maxwell Bernstein) Date: Fri, 10 Dec 2021 18:34:29 +0000 Subject: [issue46041] Add reference counting micro-optimizations to listobject.c In-Reply-To: <1639161250.42.0.698258533036.issue46041@roundup.psfhosted.org> Message-ID: <1639161269.12.0.260808272056.issue46041@roundup.psfhosted.org> Change by Maxwell Bernstein : ---------- keywords: +patch pull_requests: +28261 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30036 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 13:34:29 2021 From: report at bugs.python.org (Maxwell Bernstein) Date: Fri, 10 Dec 2021 18:34:29 +0000 Subject: [issue39425] list.count performance regression In-Reply-To: <1579713363.79.0.989493842853.issue39425@roundup.psfhosted.org> Message-ID: <1639161269.21.0.126154148849.issue39425@roundup.psfhosted.org> Change by Maxwell Bernstein : ---------- nosy: +tekknolagi nosy_count: 5.0 -> 6.0 pull_requests: +28262 pull_request: https://github.com/python/cpython/pull/30036 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 13:42:21 2021 From: report at bugs.python.org (Brett Cannon) Date: Fri, 10 Dec 2021 18:42:21 +0000 Subject: [issue31370] Remove support for threads-less builds In-Reply-To: <1504732249.83.0.180664230366.issue31370@psf.upfronthosting.co.za> Message-ID: <1639161741.04.0.961202545964.issue31370@roundup.psfhosted.org> Brett Cannon added the comment: This has unfortunately turned out to be a blocker on getting WASI support as there's not direct threading support in WebAssembly. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 14:00:06 2021 From: report at bugs.python.org (Mischiew Rithe) Date: Fri, 10 Dec 2021 19:00:06 +0000 Subject: [issue41248] Python manual forced in maximized window In-Reply-To: <1594235851.53.0.79291256825.issue41248@roundup.psfhosted.org> Message-ID: <1639162806.72.0.163226179923.issue41248@roundup.psfhosted.org> Mischiew Rithe added the comment: The problem still exists in version 3.10.1, in Windows. When the user wants to get the documentation, the whole screen is hidden by it, which is very inconvenient. If the user does not want this behaviour, they have to change the shortcut, for instance in: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Python 3.10 This is not possible if the user doesn't have the admin rights. There is no reason to force a maximized window for the documentation, but there are reasons not to: it's invasive, now monitors are often too large to make it a comfortable reading format for a single window, the OS is multi-tasking and the user will most likely read the documentation while editing code on an IDE and needs to see both. ---------- versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 14:07:14 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 10 Dec 2021 19:07:14 +0000 Subject: [issue44938] Expose PyErr_ChainExceptions in the stable API In-Reply-To: <1629222263.76.0.471437987741.issue44938@roundup.psfhosted.org> Message-ID: <1639163234.67.0.709497313534.issue44938@roundup.psfhosted.org> Gregory P. Smith added the comment: related: https://www.python.org/dev/peps/pep-0490/ (rejected pep to auto-chain from C API calls) I don't come across it often, but I did just review some code at work today where the chain might have been nice (though not a big deal). ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 14:29:51 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 19:29:51 +0000 Subject: [issue22714] target of 'import statement' entry in general index for 'i' is wrong In-Reply-To: <1414125308.24.0.874909264609.issue22714@psf.upfronthosting.co.za> Message-ID: <1639164591.61.0.549947468717.issue22714@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> wont fix stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 14:31:57 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 19:31:57 +0000 Subject: [issue18636] mingw: setup _ssl module In-Reply-To: <1375472116.92.0.328904140064.issue18636@psf.upfronthosting.co.za> Message-ID: <1639164717.75.0.679344494442.issue18636@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 14:52:51 2021 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 10 Dec 2021 19:52:51 +0000 Subject: [issue4733] Add a "decode to declared encoding" version of urlopen to urllib In-Reply-To: <1230068654.82.0.881542673607.issue4733@psf.upfronthosting.co.za> Message-ID: <1639165971.56.0.445544265589.issue4733@roundup.psfhosted.org> Daniel Diniz added the comment: As Victor notes, this is a controversial issue. And I'll add that the need for this feature seems not to have been brought up up in over a decade. So I'm closing this. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 14:57:33 2021 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 10 Dec 2021 19:57:33 +0000 Subject: [issue1182143] making builtin exceptions more informative Message-ID: <1639166253.24.0.360902817684.issue1182143@roundup.psfhosted.org> Change by Daniel Diniz : ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 15:38:21 2021 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 10 Dec 2021 20:38:21 +0000 Subject: [issue766910] fix one or two bugs in trace.py Message-ID: <1639168701.75.0.382301402384.issue766910@roundup.psfhosted.org> Change by Daniel Diniz : ---------- nosy: +ajaksu2 versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 16:21:59 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 10 Dec 2021 21:21:59 +0000 Subject: [issue43749] venv module does not copy the correct python exe In-Reply-To: <1617715625.46.0.74507922397.issue43749@roundup.psfhosted.org> Message-ID: <1639171319.92.0.219813444834.issue43749@roundup.psfhosted.org> Eryk Sun added the comment: The Windows implementation of symlink_or_copy() actually copies "python.exe" and "pythonw.exe" launchers from "Lib/venv/scripts/nt". One cannot simply copy the "python3.exe" executable because the required DLLs aren't copied. If this seemed to work when testing, it was only because the installation directory was in PATH. The solution that actually works is to copy the launcher as "python3.exe". ---------- nosy: +eryksun resolution: fixed -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 16:24:21 2021 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Fri, 10 Dec 2021 21:24:21 +0000 Subject: [issue46042] Error range of "duplicate argument" SyntaxErrors is too big Message-ID: <1639171461.19.0.894286110082.issue46042@roundup.psfhosted.org> New submission from Carl Friedrich Bolz-Tereick : The error range for the "duplicate argument in function definition" SyntaxError is too large: $ cat x.py def f(a, b, c, d, e, f, g, a): pass $ python x.py File "/home/cfbolz/projects/cpython/x.py", line 1 def f(a, b, c, d, e, f, g, a): pass ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: duplicate argument 'a' in function definition I would expect only the second 'a' to be underlined. I can try to fix this. ---------- messages: 408248 nosy: Carl.Friedrich.Bolz, pablogsal priority: normal severity: normal status: open title: Error range of "duplicate argument" SyntaxErrors is too big _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 16:36:06 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 10 Dec 2021 21:36:06 +0000 Subject: [issue43749] venv module does not copy the correct python exe In-Reply-To: <1617715625.46.0.74507922397.issue43749@roundup.psfhosted.org> Message-ID: <1639172166.23.0.53594521356.issue43749@roundup.psfhosted.org> Change by Eryk Sun : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.11 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 16:44:00 2021 From: report at bugs.python.org (C.A.M. Gerlach) Date: Fri, 10 Dec 2021 21:44:00 +0000 Subject: [issue40358] pathlib's relative_to should behave like os.path.relpath In-Reply-To: <1587513783.17.0.6950267733.issue40358@roundup.psfhosted.org> Message-ID: <1639172640.55.0.466941287699.issue40358@roundup.psfhosted.org> C.A.M. Gerlach added the comment: For the record, requested [on Discourse](https://discuss.python.org/t/how-to-go-on-with-a-tiny-improvement-idea-for-pathlib/12472) as well, with a fairly similar proposal. ---------- nosy: +CAM-Gerlach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 16:44:50 2021 From: report at bugs.python.org (Andre Roberge) Date: Fri, 10 Dec 2021 21:44:50 +0000 Subject: [issue46042] Error range of "duplicate argument" SyntaxErrors is too big In-Reply-To: <1639171461.19.0.894286110082.issue46042@roundup.psfhosted.org> Message-ID: <1639172690.22.0.0246687413168.issue46042@roundup.psfhosted.org> Change by Andre Roberge : ---------- nosy: +aroberge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 17:27:14 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 10 Dec 2021 22:27:14 +0000 Subject: [issue46042] Error range of "duplicate argument" SyntaxErrors is too big In-Reply-To: <1639171461.19.0.894286110082.issue46042@roundup.psfhosted.org> Message-ID: <1639175234.13.0.103000555832.issue46042@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks for the catch Carl! > I can try to fix this. Awesome, I will wait for the PR! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 17:59:11 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 22:59:11 +0000 Subject: [issue21964] inconsistency in list-generator comprehension with yield(-from) In-Reply-To: <1405119987.38.0.925003339613.issue21964@psf.upfronthosting.co.za> Message-ID: <1639177151.32.0.308492734104.issue21964@roundup.psfhosted.org> Irit Katriel added the comment: I think this issue was resolved by now. This is what happens on 3.11: >>> l = ["abc", range(3)] >>> g = [(yield from i) for i in l] File "", line 1 SyntaxError: 'yield' inside list comprehension >>> g2 = ((yield from i) for i in l) File "", line 1 SyntaxError: 'yield' inside generator expression ---------- nosy: +iritkatriel resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:00:24 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 10 Dec 2021 23:00:24 +0000 Subject: [issue42114] Documentation of ctypes.CDLL does not correspond to code In-Reply-To: <1603317735.12.0.0166150677555.issue42114@roundup.psfhosted.org> Message-ID: <1639177224.12.0.56480826518.issue42114@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset c1051e08b3c6d9045322763876a4b0aea98d79f9 by Louis Sautier in branch 'main': bpo-42114: ctypes documentation: fix winmode parameter default value (GH-29976) https://github.com/python/cpython/commit/c1051e08b3c6d9045322763876a4b0aea98d79f9 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:00:44 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 10 Dec 2021 23:00:44 +0000 Subject: [issue42114] Documentation of ctypes.CDLL does not correspond to code In-Reply-To: <1603317735.12.0.0166150677555.issue42114@roundup.psfhosted.org> Message-ID: <1639177244.65.0.184005456772.issue42114@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28263 pull_request: https://github.com/python/cpython/pull/30037 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:00:51 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 10 Dec 2021 23:00:51 +0000 Subject: [issue42114] Documentation of ctypes.CDLL does not correspond to code In-Reply-To: <1603317735.12.0.0166150677555.issue42114@roundup.psfhosted.org> Message-ID: <1639177251.74.0.343061733626.issue42114@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28264 pull_request: https://github.com/python/cpython/pull/30038 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:02:15 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 23:02:15 +0000 Subject: [issue45635] Tidy up error handling in traceback.c / python run.c In-Reply-To: <1635370026.46.0.0220648873339.issue45635@roundup.psfhosted.org> Message-ID: <1639177335.19.0.891898110569.issue45635@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 0fe104fce7da709edddb701baa2249e3275db1fd by Irit Katriel in branch 'main': bpo-45635: refactor print_exception_recursive into smaller functions to standardize error handling (GH-30015) https://github.com/python/cpython/commit/0fe104fce7da709edddb701baa2249e3275db1fd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:05:31 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 10 Dec 2021 23:05:31 +0000 Subject: [issue27062] `inspect` doesn't have `__all__` In-Reply-To: <1463689783.23.0.292900715898.issue27062@psf.upfronthosting.co.za> Message-ID: <1639177531.24.0.942557715985.issue27062@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 810c1769f1c24ed907bdf3cc1086db4e602a28ae by Kumar Aditya in branch 'main': bpo-27062: add `__all__` to inspect module (GH-30003) https://github.com/python/cpython/commit/810c1769f1c24ed907bdf3cc1086db4e602a28ae ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:06:48 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 10 Dec 2021 23:06:48 +0000 Subject: [issue27062] `inspect` doesn't have `__all__` In-Reply-To: <1463689783.23.0.292900715898.issue27062@psf.upfronthosting.co.za> Message-ID: <1639177608.14.0.765538839078.issue27062@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:08:50 2021 From: report at bugs.python.org (Thomas Klausner) Date: Fri, 10 Dec 2021 23:08:50 +0000 Subject: [issue21461] Recognize -pthread In-Reply-To: <1399626963.64.0.665177402844.issue21461@psf.upfronthosting.co.za> Message-ID: <1639177730.49.0.644765193316.issue21461@roundup.psfhosted.org> Thomas Klausner added the comment: I must confess, I don't know. This patch has been in pkgsrc since at least the import of the first python 2.7 package in 2011, and I haven't dug deeper. If you think it is unnecessary, I'll trust you. I've just removed it from the python 3.10 package in pkgsrc. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:14:14 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 10 Dec 2021 23:14:14 +0000 Subject: [issue31370] Remove support for threads-less builds In-Reply-To: <1504732249.83.0.180664230366.issue31370@psf.upfronthosting.co.za> Message-ID: <1639178054.5.0.265519135744.issue31370@roundup.psfhosted.org> Gregory P. Smith added the comment: https://web.dev/webassembly-threads/ suggests otherwise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:15:20 2021 From: report at bugs.python.org (Thomas Klausner) Date: Fri, 10 Dec 2021 23:15:20 +0000 Subject: [issue21459] DragonFlyBSD support In-Reply-To: <1399626494.21.0.91219272779.issue21459@psf.upfronthosting.co.za> Message-ID: <1639178120.85.0.874104484838.issue21459@roundup.psfhosted.org> Thomas Klausner added the comment: Not interested in this any longer, and Dragonfly's Dports doesn't carry this patch, so it's probably not needed any longer. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:20:56 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 23:20:56 +0000 Subject: [issue9504] signal.signal/signal.alarm not working as expected In-Reply-To: <1280910836.88.0.645209486589.issue9504@psf.upfronthosting.co.za> Message-ID: <1639178456.89.0.904198092453.issue9504@roundup.psfhosted.org> Irit Katriel added the comment: I'm unable to reproduce this on 3.11 on a Mac. Has it been fixed? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:22:33 2021 From: report at bugs.python.org (Nicholas Bond) Date: Fri, 10 Dec 2021 23:22:33 +0000 Subject: [issue46043] Python Launcher Not Opening Files. Message-ID: <1639178553.87.0.850014051129.issue46043@roundup.psfhosted.org> New submission from Nicholas Bond : Python launcher opens its preferences and no terminal or Tkinter application opens. It appears as something was launched because for a fraction of a second, I see a window and then the icon glides back to its position on the desktop. However, python files and Tkinter GUIs work when run through the IDLE and through other text editors, e.g. when I build the program in sublime text, the python launcher application opens and launches the Tkinter window. Even the simplest of programs don't work. I tried opening this: number = input("Type in a number:") I ran this outside of the text editor(dragging the .py file onto the python launcher) and it still did not work. ---------- components: macOS messages: 408260 nosy: ned.deily, nicholasjbond2020, ronaldoussoren priority: normal severity: normal status: open title: Python Launcher Not Opening Files. type: crash versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:28:07 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 10 Dec 2021 23:28:07 +0000 Subject: [issue46014] functools.singledispatch does not support Union types In-Reply-To: <1638970452.65.0.012237534186.issue46014@roundup.psfhosted.org> Message-ID: <1639178887.16.0.971404459225.issue46014@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 3cb357a2e6ac18ee98db5d450414e773744e3c76 by Yurii Karabas in branch 'main': bpo-46014: Add ability to use typing.Union with singledispatch (GH-30017) https://github.com/python/cpython/commit/3cb357a2e6ac18ee98db5d450414e773744e3c76 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:29:02 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 10 Dec 2021 23:29:02 +0000 Subject: [issue46014] functools.singledispatch does not support Union types In-Reply-To: <1638970452.65.0.012237534186.issue46014@roundup.psfhosted.org> Message-ID: <1639178942.79.0.610695449623.issue46014@roundup.psfhosted.org> ?ukasz Langa added the comment: Support added as an enhancement in Python 3.11. Thanks, Yurii! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:29:38 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 10 Dec 2021 23:29:38 +0000 Subject: [issue42114] Documentation of ctypes.CDLL does not correspond to code In-Reply-To: <1603317735.12.0.0166150677555.issue42114@roundup.psfhosted.org> Message-ID: <1639178978.52.0.303964972522.issue42114@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset f8eebb0db720cd81fb736d9cbfd16faf2ec68b53 by Miss Islington (bot) in branch '3.9': bpo-42114: ctypes documentation: fix winmode parameter default value (GH-29976) (GH-30038) https://github.com/python/cpython/commit/f8eebb0db720cd81fb736d9cbfd16faf2ec68b53 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:29:50 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 10 Dec 2021 23:29:50 +0000 Subject: [issue42114] Documentation of ctypes.CDLL does not correspond to code In-Reply-To: <1603317735.12.0.0166150677555.issue42114@roundup.psfhosted.org> Message-ID: <1639178990.73.0.0746727682066.issue42114@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 8f3728edcbc205913772f8dc04cccd8bdc476ff4 by Miss Islington (bot) in branch '3.10': bpo-42114: ctypes documentation: fix winmode parameter default value (GH-29976) (GH-30037) https://github.com/python/cpython/commit/8f3728edcbc205913772f8dc04cccd8bdc476ff4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:30:28 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 10 Dec 2021 23:30:28 +0000 Subject: [issue42114] Documentation of ctypes.CDLL does not correspond to code In-Reply-To: <1603317735.12.0.0166150677555.issue42114@roundup.psfhosted.org> Message-ID: <1639179028.68.0.822210534862.issue42114@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks! ? ? ? ---------- assignee: -> docs at python components: +Documentation -ctypes nosy: +docs at python resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.11 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:34:36 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 23:34:36 +0000 Subject: [issue25834] getpass falls back when sys.stdin is changed In-Reply-To: <1449774081.69.0.580172668816.issue25834@psf.upfronthosting.co.za> Message-ID: <1639179276.8.0.894890055826.issue25834@roundup.psfhosted.org> Irit Katriel added the comment: Adam, do you have a suggestion what the check should be? ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:34:50 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 10 Dec 2021 23:34:50 +0000 Subject: [issue43795] Implement PEP 652 -- Maintaining the Stable ABI In-Reply-To: <1617983030.95.0.501839301811.issue43795@roundup.psfhosted.org> Message-ID: <1639179290.99.0.360842159525.issue43795@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 98e506ae8a7997658a08fbf77ac016d200588cb3 by Petr Viktorin in branch 'main': bpo-43795: Document stable_abi.txt format and contents (GH-29956) https://github.com/python/cpython/commit/98e506ae8a7997658a08fbf77ac016d200588cb3 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:36:19 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 10 Dec 2021 23:36:19 +0000 Subject: [issue13236] unittest needs more flush calls In-Reply-To: <1319137324.16.0.266090134048.issue13236@psf.upfronthosting.co.za> Message-ID: <1639179379.31.0.180601324208.issue13236@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 83fa1291fd0a25216a4a9e990f423682fda67cbe by Serhiy Storchaka in branch '3.10': [3.10] bpo-13236: Flush the output stream more often in unittest (GH-29864) (GH-29929) https://github.com/python/cpython/commit/83fa1291fd0a25216a4a9e990f423682fda67cbe ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:36:24 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 10 Dec 2021 23:36:24 +0000 Subject: [issue13236] unittest needs more flush calls In-Reply-To: <1319137324.16.0.266090134048.issue13236@psf.upfronthosting.co.za> Message-ID: <1639179384.35.0.359901301694.issue13236@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +28265 pull_request: https://github.com/python/cpython/pull/30039 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:44:34 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 10 Dec 2021 23:44:34 +0000 Subject: [issue42918] Nested multi-line expression will lead to "compile()" fails In-Reply-To: <1610517717.73.0.740461753555.issue42918@roundup.psfhosted.org> Message-ID: <1639179874.41.0.743417350184.issue42918@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 28179aac796ed1debdce336c4b8ca18e8475d40d by Weipeng Hong in branch 'main': bpo-42918: Improve build-in function compile() in mode 'single' (GH-29934) https://github.com/python/cpython/commit/28179aac796ed1debdce336c4b8ca18e8475d40d ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:44:38 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 10 Dec 2021 23:44:38 +0000 Subject: [issue42918] Nested multi-line expression will lead to "compile()" fails In-Reply-To: <1610517717.73.0.740461753555.issue42918@roundup.psfhosted.org> Message-ID: <1639179878.2.0.00787635219133.issue42918@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +28266 pull_request: https://github.com/python/cpython/pull/30040 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:44:54 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 10 Dec 2021 23:44:54 +0000 Subject: [issue20559] urllib/http fail to sanitize a non-ascii url In-Reply-To: <1391834064.13.0.416589140445.issue20559@psf.upfronthosting.co.za> Message-ID: <1639179894.17.0.332993923949.issue20559@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:45:06 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 10 Dec 2021 23:45:06 +0000 Subject: [issue37971] Wrong trace with multiple decorators (linenumber wrong in frame) In-Reply-To: <1567017172.25.0.486267767179.issue37971@roundup.psfhosted.org> Message-ID: <1639179906.85.0.31654732688.issue37971@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset b593bdc7803cc75461f6f8888ad03cb7d8dfc416 by Carl Friedrich Bolz-Tereick in branch 'main': bpo-37971: fix the position of decorator application (GH-30027) https://github.com/python/cpython/commit/b593bdc7803cc75461f6f8888ad03cb7d8dfc416 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:53:30 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 10 Dec 2021 23:53:30 +0000 Subject: [issue46014] functools.singledispatch does not support Union types In-Reply-To: <1638970452.65.0.012237534186.issue46014@roundup.psfhosted.org> Message-ID: <1639180410.15.0.871954786048.issue46014@roundup.psfhosted.org> Alex Waygood added the comment: This is awesome! Should a note be added to the functools documentation mentioning the new feature? (Genuine question ? I'm not sure whether it's necessary myself.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 18:59:03 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 10 Dec 2021 23:59:03 +0000 Subject: [issue45929] extend json.tool --json-lines to ignore empty rows In-Reply-To: <1638200958.63.0.173460715414.issue45929@roundup.psfhosted.org> Message-ID: <1639180743.41.0.10735023968.issue45929@roundup.psfhosted.org> ?ukasz Langa added the comment: I agree with Serhiy that in general the fact that json.tool crashes here is useful: similarly to an exception in Python code, it can inform the user that some data they feed to json.tool is invalid. At the same time, I find it a bit obnoxious that the current implementation doesn't allow for the *final character* of the input to be a newline (or "characters" in case of \r\n... but it should still only ignore *a single effective newline*). I mean, if the user starts spewing newlines in the middle of the file... that might easily be an error. If the file ends with 5 empty lines, that might easily be an error. But, if the file really is: {'line': 1, 'data': ...}\n {'line': 2, 'data': ...}\n {'line': 3, 'data': ...}\n I think that should be pragmatically accepted by json.tool, especially since many text editors now add newline characters at file ends. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:02:04 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 11 Dec 2021 00:02:04 +0000 Subject: [issue45859] test_collections has a wrong test in case _itemgetter is not available In-Reply-To: <1637527591.49.0.376717916242.issue45859@roundup.psfhosted.org> Message-ID: <1639180924.05.0.108662208494.issue45859@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 7c5b01b5101923fc38274c491bd55239ee9f0416 by Miss Islington (bot) in branch '3.8': bpo-45859: Mark test_field_descriptor in test_collections as CPython-only (GH-29691) (GH-29710) https://github.com/python/cpython/commit/7c5b01b5101923fc38274c491bd55239ee9f0416 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:03:00 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 11 Dec 2021 00:03:00 +0000 Subject: [issue45822] Py_CompileString does not respect the coding cookie with the new parser if flags are empty In-Reply-To: <1637091566.73.0.796016842609.issue45822@roundup.psfhosted.org> Message-ID: <1639180980.66.0.949153213483.issue45822@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset e1e3f648ad6ab467356d2d14e1d208583c1a76c6 by Miss Islington (bot) in branch '3.10': bpo-45822: Minor cleanups to the test_Py_CompileString test (GH-29750) (GH-29758) https://github.com/python/cpython/commit/e1e3f648ad6ab467356d2d14e1d208583c1a76c6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:03:19 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 11 Dec 2021 00:03:19 +0000 Subject: [issue45822] Py_CompileString does not respect the coding cookie with the new parser if flags are empty In-Reply-To: <1637091566.73.0.796016842609.issue45822@roundup.psfhosted.org> Message-ID: <1639180999.98.0.253297344118.issue45822@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 5f622f1d5c5425ed1e992da6611edfb486a9bf7c by Miss Islington (bot) in branch '3.9': bpo-45822: Minor cleanups to the test_Py_CompileString test (GH-29750) (GH-29759) https://github.com/python/cpython/commit/5f622f1d5c5425ed1e992da6611edfb486a9bf7c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:04:24 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 11 Dec 2021 00:04:24 +0000 Subject: [issue19737] Documentation of globals() and locals() should be improved In-Reply-To: <1385225461.09.0.671908077084.issue19737@psf.upfronthosting.co.za> Message-ID: <1639181064.97.0.0896775877219.issue19737@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 4fe5585240f64c3d14eb635ff82b163f92074b3a by 180909 in branch 'main': bpo-19737: Improved the documentation for globals (GH-29823) https://github.com/python/cpython/commit/4fe5585240f64c3d14eb635ff82b163f92074b3a ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:04:32 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 11 Dec 2021 00:04:32 +0000 Subject: [issue19737] Documentation of globals() and locals() should be improved In-Reply-To: <1385225461.09.0.671908077084.issue19737@psf.upfronthosting.co.za> Message-ID: <1639181072.66.0.428549796099.issue19737@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +28267 pull_request: https://github.com/python/cpython/pull/30041 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:04:39 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 11 Dec 2021 00:04:39 +0000 Subject: [issue19737] Documentation of globals() and locals() should be improved In-Reply-To: <1385225461.09.0.671908077084.issue19737@psf.upfronthosting.co.za> Message-ID: <1639181079.16.0.957892016193.issue19737@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28268 pull_request: https://github.com/python/cpython/pull/30042 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:10:22 2021 From: report at bugs.python.org (Steve Dower) Date: Sat, 11 Dec 2021 00:10:22 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639181422.46.0.049994516776.issue46028@roundup.psfhosted.org> Steve Dower added the comment: I'm going to need a decent amount of time to learn all of these components, because I never use this OS, Tox, nor virtualenv :) I'll try and get to it, but don't hold your breath. Luckily, Modules/getpath.py is much easier to follow and modify than the old systems. If there's a pyvenv.cfg involved, base_executable should be calculated based on the "home" key in it. Previously, I don't think we calculated it at all on Linux - it was just sys.executable before site.py changes anything. On Windows, it was always intended to be "the executable that new venvs should be created with" so that venvs created from venvs would be based off the same install, rather than trying to chain. I have no idea what the correct path for that is in this context, so could do with some help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:12:26 2021 From: report at bugs.python.org (Steve Dower) Date: Sat, 11 Dec 2021 00:12:26 +0000 Subject: [issue43749] venv module does not copy the correct python exe In-Reply-To: <1617715625.46.0.74507922397.issue43749@roundup.psfhosted.org> Message-ID: <1639181546.02.0.638543214279.issue43749@roundup.psfhosted.org> Steve Dower added the comment: We'd also need to update the launcher to launch the executable with its name, which it currently doesn't do. I was looking at this recently for some other reason. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:30:23 2021 From: report at bugs.python.org (STINNER Victor) Date: Sat, 11 Dec 2021 00:30:23 +0000 Subject: [issue9504] signal.signal/signal.alarm not working as expected In-Reply-To: <1280910836.88.0.645209486589.issue9504@psf.upfronthosting.co.za> Message-ID: <1639182623.75.0.445380350686.issue9504@roundup.psfhosted.org> STINNER Victor added the comment: https://www.python.org/dev/peps/pep-0475/ changed deeply how Python handles signals. Python now tries to restart syscalls interrupted by signals (EINTR). A Python function only raises an exception if the Python signal handler raises an exception. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:31:42 2021 From: report at bugs.python.org (STINNER Victor) Date: Sat, 11 Dec 2021 00:31:42 +0000 Subject: [issue20559] urllib/http fail to sanitize a non-ascii url In-Reply-To: <1391834064.13.0.416589140445.issue20559@psf.upfronthosting.co.za> Message-ID: <1639182702.11.0.561064189547.issue20559@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:32:28 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 11 Dec 2021 00:32:28 +0000 Subject: [issue19737] Documentation of globals() and locals() should be improved In-Reply-To: <1385225461.09.0.671908077084.issue19737@psf.upfronthosting.co.za> Message-ID: <1639182748.41.0.832024434671.issue19737@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 1f7000808e8385e2a29ffd0ef6aac9a6139d3d92 by Miss Islington (bot) in branch '3.10': bpo-19737: Improved the documentation for globals (GH-29823) (GH-30041) https://github.com/python/cpython/commit/1f7000808e8385e2a29ffd0ef6aac9a6139d3d92 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:32:33 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 11 Dec 2021 00:32:33 +0000 Subject: [issue19737] Documentation of globals() and locals() should be improved In-Reply-To: <1385225461.09.0.671908077084.issue19737@psf.upfronthosting.co.za> Message-ID: <1639182753.23.0.129235612296.issue19737@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 9299e3a39c3b1dd7d5db0d88080249c2dab3070f by Miss Islington (bot) in branch '3.9': bpo-19737: Improved the documentation for globals (GH-29823) (GH-30042) https://github.com/python/cpython/commit/9299e3a39c3b1dd7d5db0d88080249c2dab3070f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:33:08 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 11 Dec 2021 00:33:08 +0000 Subject: [issue19737] Documentation of globals() and locals() should be improved In-Reply-To: <1385225461.09.0.671908077084.issue19737@psf.upfronthosting.co.za> Message-ID: <1639182788.01.0.13524336812.issue19737@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:34:50 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 11 Dec 2021 00:34:50 +0000 Subject: [issue13236] unittest needs more flush calls In-Reply-To: <1319137324.16.0.266090134048.issue13236@psf.upfronthosting.co.za> Message-ID: <1639182890.12.0.766491600105.issue13236@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset d55a03e02e69fb7f639998de71ed3f44c2f4f999 by Miss Islington (bot) in branch '3.9': [3.10] bpo-13236: Flush the output stream more often in unittest (GH-29929) (GH-30039) https://github.com/python/cpython/commit/d55a03e02e69fb7f639998de71ed3f44c2f4f999 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:36:03 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 11 Dec 2021 00:36:03 +0000 Subject: [issue13236] unittest needs more flush calls In-Reply-To: <1319137324.16.0.266090134048.issue13236@psf.upfronthosting.co.za> Message-ID: <1639182963.41.0.219496655503.issue13236@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks, Serhiy! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:40:12 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 11 Dec 2021 00:40:12 +0000 Subject: [issue23469] Delete Misc/*.wpr files In-Reply-To: <1424048342.99.0.00819785192711.issue23469@psf.upfronthosting.co.za> Message-ID: <1639183212.56.0.0959211894319.issue23469@roundup.psfhosted.org> Terry J. Reedy added the comment: Since the files have effectively been abandoned, I think removing them should be considered now. The three files in /Misc, for wing-3, 4, and 5, are python-wing3.wpr python-wing4.wpr python-wing5.wpr The current version of Wing is 8.1.1. The files were last edited in March 2011, a decade ago, by M. Foord. The last contains #!wing #!version=5.0 ################################################################## # Wing IDE project file # ################################################################## [project attributes] proj.directory-list = [{'dirloc': loc('..'), 'excludes': [u'.hg', u'Lib/unittest/__pycache__', u'Lib/unittest/test/__pycache__', u'Lib/__pycache__', u'build', u'Doc/build'], 'filter': '*', 'include_hidden': False, 'recursive': True, 'watch_for_changes': True}] proj.file-type = 'shared' *4.* is the same except for the version comment. Both are specialized for working with Lib/unittest, failing to exclude most of the other __pycache__ directories. I wonder whether current Wing now knows that it should ignore __cache__ directories. (I considered emailing support at wingware.com, but decided to wait.) In the absence of more comments, we could inquire on python-dev. In 2019, these .ini-format configuration data files were marked as executable scripts. I believe that this was a mistake. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:40:48 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 11 Dec 2021 00:40:48 +0000 Subject: [issue23469] Delete Misc/*.wpr files In-Reply-To: <1424048342.99.0.00819785192711.issue23469@psf.upfronthosting.co.za> Message-ID: <1639183248.9.0.900947695279.issue23469@roundup.psfhosted.org> Terry J. Reedy added the comment: url: https://github.com/python/cpython/blob/main/Misc/python-wing5.wpr ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:42:01 2021 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 11 Dec 2021 00:42:01 +0000 Subject: [issue46044] Update distutils documentation to say PyPI only accepts tar.gz and zip. Message-ID: <1639183321.87.0.60010365673.issue46044@roundup.psfhosted.org> New submission from Matthias Bussonnier : This page: https://docs.python.org/3/distutils/sourcedist.html Is the first result on google for "python sdist", but does not mention that all but tar.gz and zip are supported by PyPI. ---------- assignee: docs at python components: Documentation messages: 408288 nosy: docs at python, mbussonn priority: normal severity: normal status: open title: Update distutils documentation to say PyPI only accepts tar.gz and zip. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:43:03 2021 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 11 Dec 2021 00:43:03 +0000 Subject: [issue46044] Update distutils documentation to say PyPI only accepts tar.gz and zip. In-Reply-To: <1639183321.87.0.60010365673.issue46044@roundup.psfhosted.org> Message-ID: <1639183383.92.0.103426970031.issue46044@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +28269 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30043 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 19:44:12 2021 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 11 Dec 2021 00:44:12 +0000 Subject: [issue46044] Update distutils documentation to say PyPI only accepts tar.gz and zip. In-Reply-To: <1639183321.87.0.60010365673.issue46044@roundup.psfhosted.org> Message-ID: <1639183452.56.0.604694307057.issue46044@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 20:12:04 2021 From: report at bugs.python.org (Alex Waygood) Date: Sat, 11 Dec 2021 01:12:04 +0000 Subject: [issue46013] Confusing period in object.__hash__ doc In-Reply-To: <1638967048.9.0.598691354052.issue46013@roundup.psfhosted.org> Message-ID: <1639185124.45.0.4259623383.issue46013@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 22:21:25 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 11 Dec 2021 03:21:25 +0000 Subject: [issue43749] venv module does not copy the correct python exe In-Reply-To: <1617715625.46.0.74507922397.issue43749@roundup.psfhosted.org> Message-ID: <1639192885.21.0.319526541302.issue43749@roundup.psfhosted.org> Eryk Sun added the comment: The code to copy a file could be rewritten to use a regex match. For example: # Copy src to dst. If src is a base executable, copy a launcher. dirname, filename = os.path.split(src) m = re.match(r'(pythonw?)[0-9._]*((?:_d)?(?:\.exe|\.pdb))$', filename.lower()) if m is not None: src = os.path.join(os.path.dirname(__file__), 'scripts', 'nt', m.group(1) + m.group(2)) # If the base environment is a Python source build, use # the launcher in the build directory instead of # "Lib/venv/scripts/nt". if sysconfig.is_python_build(True) or not os.path.isfile(src): basename = ('venvlauncher' if m.group(1) == 'python' else 'venvwlauncher') src = os.path.join(dirname, basename + m.group(2)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 22:56:45 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sat, 11 Dec 2021 03:56:45 +0000 Subject: [issue44289] tarfile.is_tarfile() and tarfile.open() when used with file object may cause tarfile operations to fail In-Reply-To: <1622646545.23.0.614350359918.issue44289@roundup.psfhosted.org> Message-ID: <1639195005.6.0.755081436657.issue44289@roundup.psfhosted.org> Change by Andrei Kulakov : ---------- nosy: +lars.gustaebel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 23:39:53 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 11 Dec 2021 04:39:53 +0000 Subject: [issue46041] Add reference counting micro-optimizations to listobject.c In-Reply-To: <1639161250.42.0.698258533036.issue46041@roundup.psfhosted.org> Message-ID: <1639197593.0.0.383171152413.issue46041@roundup.psfhosted.org> Raymond Hettinger added the comment: The OP self-closed the PR. ---------- nosy: +rhettinger resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 10 23:39:53 2021 From: report at bugs.python.org (Xinhang Xu) Date: Sat, 11 Dec 2021 04:39:53 +0000 Subject: [issue44946] Integer operations are inefficient for "medium" integers. In-Reply-To: <1629282332.14.0.448234766884.issue44946@roundup.psfhosted.org> Message-ID: <1639197593.23.0.508192140253.issue44946@roundup.psfhosted.org> Change by Xinhang Xu : ---------- nosy: +xuxinhang nosy_count: 3.0 -> 4.0 pull_requests: +28270 pull_request: https://github.com/python/cpython/pull/30044 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 02:40:23 2021 From: report at bugs.python.org (Kumar Aditya) Date: Sat, 11 Dec 2021 07:40:23 +0000 Subject: [issue22239] asyncio: nested event loop In-Reply-To: <1408557830.66.0.604610139339.issue22239@psf.upfronthosting.co.za> Message-ID: <1639208423.18.0.762669153578.issue22239@roundup.psfhosted.org> Change by Kumar Aditya : ---------- nosy: +kumaraditya303 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 03:38:24 2021 From: report at bugs.python.org (Kumar Aditya) Date: Sat, 11 Dec 2021 08:38:24 +0000 Subject: [issue45855] PyCapsule_Import still using PyImport_ImportModuleNoBlock In-Reply-To: <1637425638.46.0.745441938277.issue45855@roundup.psfhosted.org> Message-ID: <1639211904.63.0.157334332236.issue45855@roundup.psfhosted.org> Change by Kumar Aditya : ---------- nosy: +kumaraditya303 nosy_count: 2.0 -> 3.0 pull_requests: +28271 pull_request: https://github.com/python/cpython/pull/30046 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 05:31:04 2021 From: report at bugs.python.org (Thomas Klausner) Date: Sat, 11 Dec 2021 10:31:04 +0000 Subject: [issue46045] NetBSD: do not use POSIX semaphores Message-ID: <1639218664.63.0.969239482314.issue46045@roundup.psfhosted.org> New submission from Thomas Klausner : On NetBSD by default, the following tests do not finish in > 1h: 1:07:13 load avg: 0.00 running: test_compileall (1 hour 7 min), test_multiprocessing_fork (1 hour 7 min), test_concurrent_futures (1 hour 6 min) Defining HAVE_BROKEN_POSIX_SEMAPHORES fixes this, and they finish: 0:00:32 load avg: 10.63 [408/427/17] test_compileall passed ... ... 0:02:37 load avg: 3.04 [427/427/22] test_concurrent_futures passed (2 min 33 sec) The last one fails: test_multiprocessing_fork with most of the subtests failing like this: ERROR: test_shared_memory_SharedMemoryServer_ignores_sigint (test.test_multiprocessing_fork.WithProcessesTestSharedMemory) ---------------------------------------------------------------------- Traceback (most recent call last): File "/scratch/lang/python310/work/Python-3.10.1/Lib/test/_test_multiprocessing.py", line 4006, in test_shared_memory_SharedMemoryServer_ignores_sigint sl = smm.ShareableList(range(10)) File "/scratch/lang/python310/work/Python-3.10.1/Lib/multiprocessing/managers.py", line 1372, in ShareableList sl = shared_memory.ShareableList(sequence) File "/scratch/lang/python310/work/Python-3.10.1/Lib/multiprocessing/shared_memory.py", line 327, in __init__ self.shm = SharedMemory(name, create=True, size=requested_size) File "/scratch/lang/python310/work/Python-3.10.1/Lib/multiprocessing/shared_memory.py", line 92, in __init__ self._fd = _posixshmem.shm_open( OSError: [Errno 86] Not supported: '/psm_b1ec903a' I think this is a separate issue, so I'd like to define HAVE_BROKEN_POSIX_SEMAPHORES for now. This has been done in pkgsrc since at least python 2.7 (in 2011), I haven't dug deeper. ---------- components: Interpreter Core messages: 408291 nosy: wiz priority: normal severity: normal status: open title: NetBSD: do not use POSIX semaphores type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 05:37:46 2021 From: report at bugs.python.org (Thomas Klausner) Date: Sat, 11 Dec 2021 10:37:46 +0000 Subject: [issue46045] NetBSD: do not use POSIX semaphores In-Reply-To: <1639218664.63.0.969239482314.issue46045@roundup.psfhosted.org> Message-ID: <1639219066.82.0.270679973538.issue46045@roundup.psfhosted.org> Change by Thomas Klausner : ---------- keywords: +patch pull_requests: +28272 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30047 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 05:56:19 2021 From: report at bugs.python.org (Souvik Ghosh) Date: Sat, 11 Dec 2021 10:56:19 +0000 Subject: [issue46046] I/O bound threads got to no chance to run with small CPU bound threads with new GIL Message-ID: <1639220179.27.0.659005921662.issue46046@roundup.psfhosted.org> New submission from Souvik Ghosh : According to David Beazley' talk in PyCon'2010 in Atlanta Georgia, he demonstrated about a new GIL with running CPU bound and I/O bound threads together. He said the talk that the threads which are forced to timeout of 5ms, will have the lower priority(which is CPU bound) and the thread which suspends the GIL within 5ms will have higher priority (which is I/O bound). What happens in the following code is if I set args=(10000000,) (seven zero after 1) then only I/O bound runs and returns when CPU bound takes much time to execute. But if I decrease that args to args=(1000,) then I/O bound got no chance to reaquire the GIL in the meantime even though the sys.getswitchinterval() is equal to 5ms(By default). If I/O bound doesn't reacquire GIL with args=(10000,) then the time to execute to run only the CPU bound takes 0.42777760000035414 seconds. Thats means almost ticks 0.42777760000035414/0.005=85 (approx) times to set the priority in between the two threads. In that case if the I/O got more priority within that time, it should have returned the value within that ticks. But I didn't happen. import threading from queue import Queue from timeit import default_timer as timer import urllib.request q = Queue() # Queue technique to pass returns among threads while running def decrement(numbers): # CPU bound while numbers > 0: numbers -= 1 if not q.empty(): """I added this method because this thread will run most of the time because it's mostly cpu bound""" print(numbers) print(q.get(block=False)) print(timer() - start) # It tell after when exactly I/O bound returns value after both the threads started to run def get_data(): # I/O bound with urllib.request.urlopen("https://www.google.com") as dt: q.put(dt.read(), block=False) if __name__ == "__main__": start = timer() t1 = threading.Thread(target=get_data) #t2 = threading.Thread(target=decrement, args=(10000000,)) #For this I/O responds and returns t2 = threading.Thread(target=decrement, args=(100000,)) # I/O doesn't responds at all t1.start() t2.start() t1.join() t2.join() print(timer() - start) Look at the second code... import threading from queue import Queue from timeit import default_timer as timer import urllib.request import sys q = Queue() # Queue technique to pass returns among threads while running def decrement(numbers): # CPU bound while numbers > 0: numbers -= 1 if not q.empty(): """I added this method because this thread will run most of the time because it's mostly cpu bound""" print(numbers) print(q.get(block=False)) print(timer() - start) # It tell after when exactly I/O bound returns value after both the threads started to run def get_data(): # I/O bound with urllib.request.urlopen("https://www.google.com") as dt: q.put(dt.read(), block=False) if __name__ == "__main__": sys.setswitchinterval(0.0000000000000000000000000001) start = timer() t1 = threading.Thread(target=get_data) #t2 = threading.Thread(target=decrement, args=(1000000,)) #I/O responds with this t2 = threading.Thread(target=decrement, args=(10000,)) # I/O doesn't responds at all even with this 0.0000000000000000000000000001 seconds of threads switching interval t1.start() t2.start() t1.join() t2.join() print(timer() - start) Can't we have a more better version of GIL to set I/O threads(overall) priorities even more better and not to degrade the CPU bound and better callbacks in response? Or, try to remove the GIL? Thank you so much, great future of Python! ---------- components: Interpreter Core files: GIL9.py messages: 408292 nosy: souvikghosh priority: normal severity: normal status: open title: I/O bound threads got to no chance to run with small CPU bound threads with new GIL type: performance versions: Python 3.10 Added file: https://bugs.python.org/file50487/GIL9.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 05:59:28 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Dec 2021 10:59:28 +0000 Subject: [issue45929] extend json.tool --json-lines to ignore empty rows In-Reply-To: <1638200958.63.0.173460715414.issue45929@roundup.psfhosted.org> Message-ID: <1639220368.51.0.305452481571.issue45929@roundup.psfhosted.org> Serhiy Storchaka added the comment: The current implementation allows for the final character of the input to be a newline. It does not allow double newlines. In the original example echo -e '{"foo":1}\n{"bar":2}\n' the echo command adds a newline to the output (which already contains the trailing newline), so the result ends with two newlines. Use option -n to disable adding newline in echo. I afraid that if we add support of empty lines, soon we will get requests for supporting comments, encoding cookies, single-quote strings, non-quoted keys, hexadecimal integers and other possible JSON extensions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 06:04:09 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Dec 2021 11:04:09 +0000 Subject: [issue21964] inconsistency in list-generator comprehension with yield(-from) In-Reply-To: <1405119987.38.0.925003339613.issue21964@psf.upfronthosting.co.za> Message-ID: <1639220649.09.0.982438568125.issue21964@roundup.psfhosted.org> Serhiy Storchaka added the comment: Resolved in issue10544. ---------- nosy: +serhiy.storchaka resolution: out of date -> duplicate stage: test needed -> resolved status: pending -> closed superseder: -> yield expression inside generator expression does nothing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 07:12:05 2021 From: report at bugs.python.org (Jonas Witschel) Date: Sat, 11 Dec 2021 12:12:05 +0000 Subject: [issue46047] When using Py_NewInterpreter, some modules fail to import in Python 3.10 Message-ID: <1639224725.06.0.440012701527.issue46047@roundup.psfhosted.org> New submission from Jonas Witschel : Consider the following minimal example C code which is trying to import jsonschema (https://python-jsonschema.readthedocs.io/en/stable/), compiled using "gcc test_newinterpreter.c -I /usr/include/python3.10 -lpython3.10 -o test_newinterpreter" or similar: #include int main(void) { Py_Initialize(); PyThreadState *interpreter = Py_NewInterpreter(); PyRun_SimpleString("import jsonschema"); Py_Finalize(); } In Python 3.9.9, this works as expected. However in Python 3.10.0, the following error is produced: Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.10/site-packages/jsonschema/__init__.py", line 21, in from jsonschema._types import TypeChecker File "/usr/lib/python3.10/site-packages/jsonschema/_types.py", line 168, in draft3_type_checker = TypeChecker( TypeError: TypeChecker() takes no arguments Removing the Py_NewInterpreter() call makes the example work as expected in Python 3.10.0. This might be related to the enhancements to the type cache from bpo-42745. Another recent bug report I found that might possibly be related is bpo-46036. This bug breaks some WeeChat plugins that try to import one of the affected modules, e.g. weechat-matrix (https://github.com/poljar/weechat-matrix). ---------- components: C API, Subinterpreters messages: 408295 nosy: diabonas priority: normal severity: normal status: open title: When using Py_NewInterpreter, some modules fail to import in Python 3.10 type: compile error versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 07:13:26 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 11 Dec 2021 12:13:26 +0000 Subject: [issue46043] Python Launcher Not Opening Files. In-Reply-To: <1639178553.87.0.850014051129.issue46043@roundup.psfhosted.org> Message-ID: <1639224806.18.0.220279237753.issue46043@roundup.psfhosted.org> Ronald Oussoren added the comment: Are you on macOS 10.15 or later? If so, this is a duplicate of issue40477. A workaround mentioned in that issue is to make sure that Terminal.app is open. ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 07:26:32 2021 From: report at bugs.python.org (Jonas Witschel) Date: Sat, 11 Dec 2021 12:26:32 +0000 Subject: [issue46047] When using Py_NewInterpreter, some modules fail to import in Python 3.10 In-Reply-To: <1639224725.06.0.440012701527.issue46047@roundup.psfhosted.org> Message-ID: <1639225592.47.0.739457138653.issue46047@roundup.psfhosted.org> Jonas Witschel added the comment: Downstream bug report in Arch Linux: https://bugs.archlinux.org/task/72979 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 07:46:23 2021 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Sat, 11 Dec 2021 12:46:23 +0000 Subject: [issue46042] Error range of "duplicate argument" SyntaxErrors is too big In-Reply-To: <1639171461.19.0.894286110082.issue46042@roundup.psfhosted.org> Message-ID: <1639226783.49.0.625960267044.issue46042@roundup.psfhosted.org> Carl Friedrich Bolz-Tereick added the comment: let's see whether I promised too much, I don't know CPython's symtable.c too well yet ;-). Will shout for help when I get stuck. Anyway, here is a related bug, coming from the same symtable function symtable_add_def_helper, also with an imprecise error location: $ cat x.py {i for i in range(5) if (j := 0) for j in range(5)} $ ./python x.py File "/home/cfbolz/projects/cpython/x.py", line 1 {i for i in range(5) ^^^^^^^^^^^^^^^^^^^^ SyntaxError: comprehension inner loop cannot rebind assignment expression target 'j' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 08:05:13 2021 From: report at bugs.python.org (Jonas Witschel) Date: Sat, 11 Dec 2021 13:05:13 +0000 Subject: [issue46047] When using Py_NewInterpreter, some modules fail to import in Python 3.10 In-Reply-To: <1639224725.06.0.440012701527.issue46047@roundup.psfhosted.org> Message-ID: <1639227913.2.0.261865450753.issue46047@roundup.psfhosted.org> Jonas Witschel added the comment: I notice this has already been reported as bpo-46006 and bpo-46034, so closing in favour of these. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 08:08:09 2021 From: report at bugs.python.org (Jonas Witschel) Date: Sat, 11 Dec 2021 13:08:09 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639228089.37.0.645411497522.issue46006@roundup.psfhosted.org> Change by Jonas Witschel : ---------- nosy: +diabonas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 08:13:55 2021 From: report at bugs.python.org (Steve Dower) Date: Sat, 11 Dec 2021 13:13:55 +0000 Subject: [issue46048] embeddable distro cannot import modules Message-ID: <1639228435.55.0.0507692076358.issue46048@roundup.psfhosted.org> New submission from Steve Dower : The embeddable distro cannot import native modules. This is because the '.' entry in the ._pth file is incorrect parsed by the new getpath module (issue45582). ---------- assignee: steve.dower components: Interpreter Core messages: 408300 nosy: lukasz.langa, steve.dower priority: normal severity: normal stage: needs patch status: open title: embeddable distro cannot import modules type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 08:15:27 2021 From: report at bugs.python.org (Steve Dower) Date: Sat, 11 Dec 2021 13:15:27 +0000 Subject: [issue46048] embeddable distro cannot import modules In-Reply-To: <1639228435.55.0.0507692076358.issue46048@roundup.psfhosted.org> Message-ID: <1639228527.73.0.93982316946.issue46048@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +28273 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30048 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 08:24:12 2021 From: report at bugs.python.org (John Belmonte) Date: Sat, 11 Dec 2021 13:24:12 +0000 Subject: [issue45995] string formatting: normalize negative zero In-Reply-To: <1638792226.95.0.292604366656.issue45995@roundup.psfhosted.org> Message-ID: <1639229052.3.0.492776333187.issue45995@roundup.psfhosted.org> Change by John Belmonte : ---------- keywords: +patch nosy: +jbelmonte nosy_count: 5.0 -> 6.0 pull_requests: +28274 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30049 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 08:29:31 2021 From: report at bugs.python.org (=?utf-8?q?Adam_Barto=C5=A1?=) Date: Sat, 11 Dec 2021 13:29:31 +0000 Subject: [issue25834] getpass falls back when sys.stdin is changed In-Reply-To: <1449774081.69.0.580172668816.issue25834@psf.upfronthosting.co.za> Message-ID: <1639229371.24.0.987228200147.issue25834@roundup.psfhosted.org> Adam Barto? added the comment: Sorry, I don't. But my use case is not relevant any more since my package was a workround for problems with entering Unicode interactively on Windows, and these problems were resolved in Python since then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 08:38:21 2021 From: report at bugs.python.org (Souvik Ghosh) Date: Sat, 11 Dec 2021 13:38:21 +0000 Subject: [issue46046] I/O bound threads got to no chance to run with small CPU bound threads with new GIL In-Reply-To: <1639220179.27.0.659005921662.issue46046@roundup.psfhosted.org> Message-ID: <1639229901.56.0.369299496218.issue46046@roundup.psfhosted.org> Souvik Ghosh added the comment: Python-ideas link in here:- https://mail.python.org/archives/list/python-ideas at python.org/message/A5MX6SQUHP65JC6V5ZFCCHMMJURM4KHB/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 08:43:48 2021 From: report at bugs.python.org (Steve Dower) Date: Sat, 11 Dec 2021 13:43:48 +0000 Subject: [issue46048] embeddable distro cannot import modules In-Reply-To: <1639228435.55.0.0507692076358.issue46048@roundup.psfhosted.org> Message-ID: <1639230228.06.0.656099903118.issue46048@roundup.psfhosted.org> Steve Dower added the comment: New changeset 971ece8e1738b1107dda692cc44c6d8ddce384cd by Steve Dower in branch 'main': bpo-46048: Fix parsing of single character lines in getpath readlines() (GH-30048) https://github.com/python/cpython/commit/971ece8e1738b1107dda692cc44c6d8ddce384cd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 08:46:56 2021 From: report at bugs.python.org (Steve Dower) Date: Sat, 11 Dec 2021 13:46:56 +0000 Subject: [issue46048] embeddable distro cannot import modules In-Reply-To: <1639228435.55.0.0507692076358.issue46048@roundup.psfhosted.org> Message-ID: <1639230416.51.0.0758195625549.issue46048@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 08:48:47 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Dec 2021 13:48:47 +0000 Subject: [issue46032] functools' singledispatch does not support GenericAlias In-Reply-To: <1639127096.15.0.258621113418.issue46032@roundup.psfhosted.org> Message-ID: <1639230527.59.0.33227897308.issue46032@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +28275 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30050 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 08:48:48 2021 From: report at bugs.python.org (Steve Dower) Date: Sat, 11 Dec 2021 13:48:48 +0000 Subject: [issue46049] ._pth files untested on Linux Message-ID: <1639230528.94.0.623170663642.issue46049@roundup.psfhosted.org> New submission from Steve Dower : Currently ._pth files are "enabled" for all platforms, but are only tested on Windows. Extend the tests in test_site to work on all platforms. ---------- assignee: steve.dower components: Interpreter Core messages: 408304 nosy: steve.dower priority: normal severity: normal stage: patch review status: open title: ._pth files untested on Linux type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 08:59:20 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 11 Dec 2021 13:59:20 +0000 Subject: [issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes In-Reply-To: <1536622594.77.0.0269046726804.issue34624@psf.upfronthosting.co.za> Message-ID: <1639231160.5.0.0404216894156.issue34624@roundup.psfhosted.org> Christian Heimes added the comment: Adding regular expression support to -W and PYTHONWARNINGS env var turns the options into potential attack vectors. It can introduce REDOS vulnerability. ---------- keywords: +security_issue nosy: +christian.heimes type: -> enhancement versions: +Python 3.11 -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 09:00:00 2021 From: report at bugs.python.org (Steve Dower) Date: Sat, 11 Dec 2021 14:00:00 +0000 Subject: [issue46049] ._pth files untested on Linux In-Reply-To: <1639230528.94.0.623170663642.issue46049@roundup.psfhosted.org> Message-ID: <1639231200.52.0.78245794269.issue46049@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +28276 pull_request: https://github.com/python/cpython/pull/30051 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 09:13:32 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Dec 2021 14:13:32 +0000 Subject: [issue46032] functools' singledispatch does not support GenericAlias In-Reply-To: <1639127096.15.0.258621113418.issue46032@roundup.psfhosted.org> Message-ID: <1639232012.5.0.575825911453.issue46032@roundup.psfhosted.org> Serhiy Storchaka added the comment: Yes, it is related to issue45665. It is a complicated case due to coincidence of several circumstances. 1. isinstance(list[int], type) is True, while isinstance(typing.List[int], type) is False. list[int] is considered a type in this check. 2. list[int].__mro__ == list.__mro__, while typing.List[int] does not have the __mro__ attribute. list[int] is considered a type in this check. 3. issubclass(cls, list[int]) raises a TypeError (the same for typing.List[int]). list[int] cannot be used as a type here. 4. 2-argument registry() does not check the type of its first argument. f.registry(42, ...) is silently passed. In 2-argument registry() typing.List[int] is passed due to (4) and ignored in dispatch() due to (2). list[int] is passed due to (4), but caused error due to (3). In other uses of registry() (1-argument decorator factory and decorator with annotations) typing.List[int] is not passed due to 1. list[int] is passed due to (1) and caused error due to (3). The proposed PR makes list[int] be treated the same way as typing.List[int]. It also makes 2-argument registry() rejecting invalid first argument, so all three forms of registry() accept and reject now the same types. ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 09:14:36 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Dec 2021 14:14:36 +0000 Subject: [issue45665] Problems caused by isinstance(list[int], type) returning True In-Reply-To: <1635496063.98.0.5366836652.issue45665@roundup.psfhosted.org> Message-ID: <1639232076.54.0.432789513124.issue45665@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- dependencies: +functools' singledispatch does not support GenericAlias _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 09:34:42 2021 From: report at bugs.python.org (Matt Bogosian) Date: Sat, 11 Dec 2021 14:34:42 +0000 Subject: [issue34798] pprint ignores the compact parameter for dicts In-Reply-To: <1537886741.82.0.545547206417.issue34798@psf.upfronthosting.co.za> Message-ID: <1639233282.9.0.261984697193.issue34798@roundup.psfhosted.org> Matt Bogosian added the comment: Please consider highlighting that dicts are not included in the documentation. While *technically* true, this ... > compact impacts the way that long sequences (lists, tuples, sets, etc) are formatted. If compact is false (the default) then each item of a sequence will be formatted on a separate line. If compact is true, as many items as will fit within the width will be formatted on each output line. ... has several problems. First, sequence is a term of art that also has a common meaning. This creates a potential ambiguity in the understanding of the reader. Resolving that ambiguity in this context requires that readers have already internalized that dicts are not Python sequences. Those new to Python may not understand the (to them, subtle) differences between Python's iterables and sequences. Second, the "etc" only expands that ambiguity and invites confusion. Third, the term "items" is strongly associated with dicts and is used several times throughout the paragraph. This ... > According to https://docs.python.org/3/library/pprint.html compact impacts the way that sequences are displayed, and a dict is not a sequence. ... is unhelpfully pedantic, and ignorant of the needs of the newcomer (a key demographic of documentation). Documentation is a core product surface with a diverse audience. Rather than focus on technical correctness, documentation authors should focus on accessibility. Redundancy is a feature, not a bug. You can't predict how your reader got to that slice of the documentation. Imagine this as an opportunity to educate or reinforce concepts for readers, not as an opportunity to argue from a position of technical superiority. The fact that there are now four developers who have taken their time to file patches, bugs, and comments is pretty strong signal that confusion exists among the audience and that the documentation is insufficient. ---------- nosy: +posita _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 09:39:09 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 14:39:09 +0000 Subject: [issue25834] getpass falls back when sys.stdin is changed In-Reply-To: <1449774081.69.0.580172668816.issue25834@psf.upfronthosting.co.za> Message-ID: <1639233549.21.0.739604281991.issue25834@roundup.psfhosted.org> Irit Katriel added the comment: Thanks, I'll close this and we can revisit if a new use case turns up. ---------- resolution: -> later stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 09:42:18 2021 From: report at bugs.python.org (Roundup Robot) Date: Sat, 11 Dec 2021 14:42:18 +0000 Subject: [issue45997] asyncio.Semaphore waiters deque doesn't work In-Reply-To: <1638799463.93.0.445533986487.issue45997@roundup.psfhosted.org> Message-ID: <1639233738.44.0.669345220104.issue45997@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 3.0 -> 4.0 pull_requests: +28277 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30052 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 10:06:21 2021 From: report at bugs.python.org (Steve Dower) Date: Sat, 11 Dec 2021 15:06:21 +0000 Subject: [issue46049] ._pth files untested on Linux In-Reply-To: <1639230528.94.0.623170663642.issue46049@roundup.psfhosted.org> Message-ID: <1639235181.13.0.546648829063.issue46049@roundup.psfhosted.org> Steve Dower added the comment: New changeset bfc59ed0a00106f5ba4a32a0c5b3dbe71d12665d by Steve Dower in branch 'main': bpo-46049: Fixes ._pth support on non-Windows (GH-30051) https://github.com/python/cpython/commit/bfc59ed0a00106f5ba4a32a0c5b3dbe71d12665d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 10:36:50 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 15:36:50 +0000 Subject: [issue18861] Problems with recursive automatic exception chaining In-Reply-To: <1377657727.9.0.627993776621.issue18861@psf.upfronthosting.co.za> Message-ID: <1639237010.79.0.24342157039.issue18861@roundup.psfhosted.org> Irit Katriel added the comment: I think this problem is actually simpler than what we've been discussing. First, note that by-and-large our current system works: >>> try: ... raise VE(1) ... except VE as e1: ... try: ... raise VE(2) ... except VE as e2: ... raise VE(3) from e2 ... Traceback (most recent call last): File "", line 2, in ValueError: 1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 5, in ValueError: 2 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 7, in ValueError: 3 ---------------------------- Here VE(2) is the cause of VE(3) and VE(1) is the context of VE(2), so VE(1) is not hidden by the fact that VE(3) has a cause. The reason that Nick's example didn't work is because he is doing raise VE(3) from VE(2) i.e., creating a new exception VE(2) that doesn't have VE(1) as a context. I'm not sure there is a use case for this, so I don't think we need to worry about it. The case of None does need fixing. We use None to indicate that there was no cause (while suppressing context). But None can't have a context, so VE(1) gets lost. We could, instead of None, use a NoException(Exception) class. This exception would be chained with the current exc_info() as context so that it works like VE(1) as above, and the traceback printing logic will know that it needs to be omitted from the output. This proposal involves no changes to the exception propagation mechanism of the interpreter. It would require these changes: 1. Define the new exception type 2. in do_raise, in the case of raise-from the None case changes 3. traceback display code needs to be updated to omit NoExceptions ---------- versions: +Python 3.11 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 10:44:25 2021 From: report at bugs.python.org (Steve Dower) Date: Sat, 11 Dec 2021 15:44:25 +0000 Subject: [issue46049] ._pth files untested on Linux In-Reply-To: <1639230528.94.0.623170663642.issue46049@roundup.psfhosted.org> Message-ID: <1639237465.9.0.00471891151182.issue46049@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 10:45:36 2021 From: report at bugs.python.org (Ned Batchelder) Date: Sat, 11 Dec 2021 15:45:36 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639237536.45.0.58385990214.issue46028@roundup.psfhosted.org> Ned Batchelder added the comment: Tox isn't needed, just venv from the stdlib: $ python3.11.0a2 -m venv venv_a2 $ venv_a2/bin/python -c "import sys,os.path; print(e := sys._base_executable); print(os.path.exists(e))" /private/tmp/venv_a2/bin/python True $ python3.11.0a3 -m venv venv_a3 $ venv_a3/bin/python -c "import sys,os.path; print(e := sys._base_executable); print(os.path.exists(e))" /usr/local/bin/python False ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 10:47:47 2021 From: report at bugs.python.org (Steve Dower) Date: Sat, 11 Dec 2021 15:47:47 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639237536.45.0.58385990214.issue46028@roundup.psfhosted.org> Message-ID: Steve Dower added the comment: What's the contents of the pyvenv.cfg in these cases? It looks like the first case is definitely wrong, because the base executable should not be in "venv_a2" (that's sys.executable), but I don't know where it should be on your system. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 10:52:41 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 15:52:41 +0000 Subject: [issue23469] Delete Misc/*.wpr files In-Reply-To: <1424048342.99.0.00819785192711.issue23469@psf.upfronthosting.co.za> Message-ID: <1639237961.13.0.153884453347.issue23469@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 11:12:52 2021 From: report at bugs.python.org (Yevhenii Hyzyla) Date: Sat, 11 Dec 2021 16:12:52 +0000 Subject: [issue45997] asyncio.Semaphore waiters deque doesn't work In-Reply-To: <1638799463.93.0.445533986487.issue45997@roundup.psfhosted.org> Message-ID: <1639239172.44.0.513560840794.issue45997@roundup.psfhosted.org> Change by Yevhenii Hyzyla : ---------- versions: +Python 3.11 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 11:15:21 2021 From: report at bugs.python.org (Ned Batchelder) Date: Sat, 11 Dec 2021 16:15:21 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639239321.44.0.127212050883.issue46028@roundup.psfhosted.org> Ned Batchelder added the comment: The two venvs seem analogous: $ cat venv_a2/pyvenv.cfg home = /usr/local/bin include-system-site-packages = false version = 3.11.0 $ ls -al venv_a2/bin total 72 drwxr-xr-x 13 nedbatchelder wheel 416 Dec 11 10:43 ./ drwxr-xr-x 6 nedbatchelder wheel 192 Dec 11 10:43 ../ -rw-r--r-- 1 nedbatchelder wheel 9033 Dec 11 10:43 Activate.ps1 -rw-r--r-- 1 nedbatchelder wheel 1993 Dec 11 10:43 activate -rw-r--r-- 1 nedbatchelder wheel 919 Dec 11 10:43 activate.csh -rw-r--r-- 1 nedbatchelder wheel 2061 Dec 11 10:43 activate.fish -rwxr-xr-x 1 nedbatchelder wheel 244 Dec 11 10:43 pip* -rwxr-xr-x 1 nedbatchelder wheel 244 Dec 11 10:43 pip3* -rwxr-xr-x 1 nedbatchelder wheel 244 Dec 11 10:43 pip3.11* lrwxr-xr-x 1 nedbatchelder wheel 14 Dec 11 10:43 python@ -> python3.11.0a2 lrwxr-xr-x 1 nedbatchelder wheel 14 Dec 11 10:43 python3@ -> python3.11.0a2 lrwxr-xr-x 1 nedbatchelder wheel 14 Dec 11 10:43 python3.11@ -> python3.11.0a2 lrwxr-xr-x 1 nedbatchelder wheel 29 Dec 11 10:43 python3.11.0a2@ -> /usr/local/bin/python3.11.0a2 $ cat venv_a3/pyvenv.cfg home = /usr/local/bin include-system-site-packages = false version = 3.11.0 $ ls -al venv_a3/bin total 72 drwxr-xr-x 13 nedbatchelder wheel 416 Dec 11 10:43 ./ drwxr-xr-x 6 nedbatchelder wheel 192 Dec 11 10:43 ../ -rw-r--r-- 1 nedbatchelder wheel 9033 Dec 11 10:43 Activate.ps1 -rw-r--r-- 1 nedbatchelder wheel 1993 Dec 11 10:43 activate -rw-r--r-- 1 nedbatchelder wheel 919 Dec 11 10:43 activate.csh -rw-r--r-- 1 nedbatchelder wheel 2061 Dec 11 10:43 activate.fish -rwxr-xr-x 1 nedbatchelder wheel 244 Dec 11 10:43 pip* -rwxr-xr-x 1 nedbatchelder wheel 244 Dec 11 10:43 pip3* -rwxr-xr-x 1 nedbatchelder wheel 244 Dec 11 10:43 pip3.11* lrwxr-xr-x 1 nedbatchelder wheel 14 Dec 11 10:43 python@ -> python3.11.0a3 lrwxr-xr-x 1 nedbatchelder wheel 14 Dec 11 10:43 python3@ -> python3.11.0a3 lrwxr-xr-x 1 nedbatchelder wheel 14 Dec 11 10:43 python3.11@ -> python3.11.0a3 lrwxr-xr-x 1 nedbatchelder wheel 29 Dec 11 10:43 python3.11.0a3@ -> /usr/local/bin/python3.11.0a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 11:15:38 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Sat, 11 Dec 2021 16:15:38 +0000 Subject: [issue45578] Missing tests for the dis module In-Reply-To: <1634926558.7.0.911953252083.issue45578@roundup.psfhosted.org> Message-ID: <1639239338.4.0.693149887389.issue45578@roundup.psfhosted.org> Change by Nikita Sobolev : ---------- pull_requests: +28278 pull_request: https://github.com/python/cpython/pull/30058 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 11:25:35 2021 From: report at bugs.python.org (matt) Date: Sat, 11 Dec 2021 16:25:35 +0000 Subject: [issue46050] [pathlib] Option so that OSError does not block glob in pathlib library Message-ID: <1639239935.56.0.723240753411.issue46050@roundup.psfhosted.org> New submission from matt : Hi there, ISSUE DESCRIPTION when I browse starting from the linux root ('/') path = pathlib.Path('/') _glob = '**/*' for p in path.glob(_glob): The program stops on my machine because of OSError. File "/usr/lib/python3.8/pathlib.py", line 535, in _select_from entries = list(scandir_it) OSError: [Errno 22] Invalid argument: '/proc/5916/task/5916/net' **************************************** Entering post mortem debugging... **************************************** > /usr/lib/python3.8/pathlib.py(535)_select_from() 533 try: 534 with scandir(parent_path) as scandir_it: --> 535 entries = list(scandir_it) 536 for entry in entries: 537 if self.dironly: I also another case is if a cloud drive is disconnected. QUICK SOLUTION I solved both issues for me by adding an adding an except OSError: return at the end of the two function below: class _WildcardSelector(_Selector): def _select_from(self, parent_path, is_dir, exists, scandir): (...) except OSError: return class _RecursiveWildcardSelector(_Selector): def _iterate_directories(self, parent_path, is_dir, scandir): (...) except OSError: return FEATURE REQUEST I don't know the consequences of those 2 modifications so perhaps they could follow an option when calling glob with an optional parameter ignoreOSerror = false by default?! ---------- components: Library (Lib) messages: 408314 nosy: matt32106 priority: normal severity: normal status: open title: [pathlib] Option so that OSError does not block glob in pathlib library type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 11:28:40 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 16:28:40 +0000 Subject: [issue46040] asyncio.coroutine documented as removed in 3.10 In-Reply-To: <1639160902.02.0.980259307717.issue46040@roundup.psfhosted.org> Message-ID: <1639240120.76.0.666296911485.issue46040@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +asyncio nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 11:29:01 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 11 Dec 2021 16:29:01 +0000 Subject: [issue45949] Provide pure-Python implementation of Programs/_freeze_module for cross building In-Reply-To: <1638372868.47.0.982140813893.issue45949@roundup.psfhosted.org> Message-ID: <1639240141.07.0.562790564851.issue45949@roundup.psfhosted.org> Christian Heimes added the comment: In his code review Eric made a point that the relationship of variables and their impact on normal and cross builds are not obvious. I'm going to introduce new variables for freezing and freezing dependencies. Bonus: Cross builds no longer build non-functional _bootstrap_python and Programs/_freeze_module. Normal build: PYTHON_FOR_FREEZE=./_bootstrap_python FREEZE_MODULE_BOOTSTRAP=./Programs/_freeze_module FREEZE_MODULE_BOOTSTRAP_DEPS=Programs/_freeze_module FREEZE_MODULE=$(PYTHON_FOR_FREEZE) $(srcdir)/Programs/_freeze_module.py FREEZE_MODULE_DEPS=_bootstrap_python $(srcdir)/Programs/_freeze_module.py Cross build: PYTHON_FOR_FREEZE=/path/to/build/python FREEZE_MODULE_BOOTSTRAP=$(PYTHON_FOR_FREEZE) $(srcdir)/Programs/_freeze_module.py FREEZE_MODULE_BOOTSTRAP_DEPS=$(srcdir)/Programs/_freeze_module.py FREEZE_MODULE=$(FREEZE_MODULE_BOOTSTRAP) FREEZE_MODULE_DEPS=$(FREEZE_MODULE_BOOTSTRAP_DEPS) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 11:38:25 2021 From: report at bugs.python.org (Martin Reboredo) Date: Sat, 11 Dec 2021 16:38:25 +0000 Subject: [issue40059] Provide a toml module in the standard library In-Reply-To: <1585119261.47.0.818238682424.issue40059@roundup.psfhosted.org> Message-ID: <1639240705.16.0.620905847493.issue40059@roundup.psfhosted.org> Martin Reboredo added the comment: A new python-ideas mail thread was created for this, you can check it out at https://mail.python.org/archives/list/python-ideas at python.org/thread/IWJ3I32A4TY6CIVQ6ONPEBPWP4TOV2V7/. ---------- nosy: +YakoYakoYokuYoku _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 11:41:58 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 16:41:58 +0000 Subject: [issue34798] pprint ignores the compact parameter for dicts In-Reply-To: <1537886741.82.0.545547206417.issue34798@psf.upfronthosting.co.za> Message-ID: <1639240918.49.0.727717529391.issue34798@roundup.psfhosted.org> Irit Katriel added the comment: Don't discuss on a closed issue. Create a new one if there is still a problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 11:58:12 2021 From: report at bugs.python.org (Ken Jin) Date: Sat, 11 Dec 2021 16:58:12 +0000 Subject: [issue46040] asyncio.coroutine documented as removed in 3.10 In-Reply-To: <1639160902.02.0.980259307717.issue46040@roundup.psfhosted.org> Message-ID: <1639241892.25.0.491261530665.issue46040@roundup.psfhosted.org> Change by Ken Jin : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 12:04:58 2021 From: report at bugs.python.org (Saaket Prakash) Date: Sat, 11 Dec 2021 17:04:58 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639242298.35.0.426055896126.issue46028@roundup.psfhosted.org> Saaket Prakash added the comment: I tried the same stuff as nedbat on WSL2, and I see similar change in the path of sys._base_executable (though I get a different "base" path on a3, so the path exists even there). $ ~/.pyenv/versions/3.11.0a2/bin/python -m venv venv_a2 $ ~/.pyenv/versions/3.11.0a3/bin/python -m venv venv_a3 $ venv_a2/bin/python -c "import sys,os.path; print(e := sys._base_executable); print(os.path.exists(e))" /home/ss/venv_a2/bin/python True $ venv_a3/bin/python -c "import sys,os.path; print(e := sys._base_executable); print(os.path.exists(e))" /home/ss/.pyenv/versions/3.11.0a3/bin/python True $ cat venv_a2/pyvenv.cfg home = /home/ss/.pyenv/versions/3.11.0a2/bin include-system-site-packages = false version = 3.11.0 $ cat venv_a3/pyvenv.cfg home = /home/ss/.pyenv/versions/3.11.0a3/bin include-system-site-packages = false version = 3.11.0 ---------- nosy: +saaketp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 12:14:12 2021 From: report at bugs.python.org (Saaket Prakash) Date: Sat, 11 Dec 2021 17:14:12 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639242852.94.0.613690453963.issue46028@roundup.psfhosted.org> Saaket Prakash added the comment: But on windows with the python.org installer, the behavior is same for both both a2 and a3. # With a3 installed > py -m venv venv_a3 > venv_a3/Scripts/python -c "import sys,os.path; print(e := sys._base_executable); print(os.path.exists(e))" C:\Users\ss\AppData\Local\Programs\Python\Python311\python.exe True > cat venv_a3/pyvenv.cfg home = C:\Users\ss\AppData\Local\Programs\Python\Python311 include-system-site-packages = false version = 3.11.0 # With a2 installed > py -m venv venv_a2 > venv_a2/Scripts/python -c "import sys,os.path; print(e := sys._base_executable); print(os.path.exists(e))" C:\Users\ss\AppData\Local\Programs\Python\Python311\python.exe True > cat venv_a2/pyvenv.cfg home = C:\Users\ss\AppData\Local\Programs\Python\Python311 include-system-site-packages = false version = 3.11.0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 12:21:14 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 11 Dec 2021 17:21:14 +0000 Subject: [issue40059] Provide a toml module in the standard library In-Reply-To: <1585119261.47.0.818238682424.issue40059@roundup.psfhosted.org> Message-ID: <1639243274.6.0.384135220315.issue40059@roundup.psfhosted.org> Christian Heimes added the comment: I just noticed that tomli has dropped support for Python 3.6. That's a road block for general adoption of the package in the Python ecosystem. Python 3.6 is the default Python interpreter in CentOS 8, C8S, RHEL 8, and Ubuntu 18.04 LTS. https://github.com/hukkin/tomli/pull/134 ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 12:27:01 2021 From: report at bugs.python.org (quapka) Date: Sat, 11 Dec 2021 17:27:01 +0000 Subject: [issue46051] Make @atexit.register work for functions with arguments Message-ID: <1639243621.71.0.144294694671.issue46051@roundup.psfhosted.org> New submission from quapka : Hi folks! Let me first present an example that motivated this issue. Imagine a script that builds Docker images and later starts them as Docker containers. To avoid having to stop the containers "manually" (in code and potentially forgot) I had an idea to register each container when started and stop each using atexit module. I chose to encapsulate this behavior inside a class. A much simplified example looks like this: import atexit class Program: # keep a class level list of started containers running_containers = [] @atexit.register @classmethod def clean_up(cls, *args, **kwargs): for container in cls.running_containers: print(f'stopping {container}') def start_container(self, container): print(f'starting {container}') self.__class__.running_containers.append(container) prog = Program() a.start_container('container_A') a.start_container('container_B') And I'd expect this to produce: starting container_A starting container_B stopping container_A stopping container_B To me, this reads rather nicely: the Program.clean_up method can be called by the user, but if he forgets it will be handled for him using atexit. However, this code does not work. :) I've spent some time debugging and what follows are my observations: 1) If the order of decorators is @atexit.register and then @classmethod then the code throws 'TypeError: the first argument must be callable'. I believe it is because classmethod and staticmethod are descriptors without the __call__ method implemented. atexit.register does not check this and instead of func.__func__ (which resolves to Program.clean_up) gets func (a classmethod) which is not callable (https://github.com/python/cpython/blob/main/Modules/atexitmodule.c#L147). 2) If the order of decorators is swapped (@classmethod and @atexit.register) then the code throws "Error in atexit._run_exitfuncs:\nTypeError: clean_up() missing 1 required positional argument: 'cls'". From my limited understanding of CPython and atexitmodule.c I think what happens is that the @atexit.register returns (https://github.com/python/cpython/blob/main/Modules/atexitmodule.c#L180) the func without the args and kwargs (since this issue https://bugs.python.org/issue1597824). 3) However, if I step away from decorating using @atexit.register and instead use [...] atexit.register(Program.clean_up) # <-- register post definition prog = Program() a.start_container('container_A') a.start_container('container_B') then the code works as expected and outputs: starting container_A starting container_B stopping container_A stopping container_B To summarize, I don't like 3) as it puts the responsibility in a bit awkward place (good enough if I'm the only user, but I wonder about the more general library-like cases). My decorating skills are a bit dull now and it's my first time seriously looking into CPython internals - I've tried to encapsulate atexit.register in my custom decorator, to check whether that could be a workaround but overall was unsuccessful. In short, I'd say that in both 1) and 2) the cls arg is lost when atexit calls the function. I've tried to dig it up from the func passed to atexit.register def my_atexit_decorator(func, *args, **kwargs): cls = # some magic with under attrs and methods register.atexit(func, cls=cls, *args, **kwargs) [...] , but failed (it also felt like a fragile approach). I was not able to understand why @atexit.register does not work when the function's signature is not empty. Also, if fixable I'm happy to actually put the effort into fixing it myself (looks like a nice first CPython PR), but I'd like to have someone else's opinion before I start marching in the wrong direction. Also, let me know if you'd like more details or code/tests I've produced while debugging this. Cheers! ---------- messages: 408321 nosy: quapka priority: normal severity: normal status: open title: Make @atexit.register work for functions with arguments type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 12:41:06 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 Dec 2021 17:41:06 +0000 Subject: [issue46042] Error range of "duplicate argument" SyntaxErrors is too big In-Reply-To: <1639171461.19.0.894286110082.issue46042@roundup.psfhosted.org> Message-ID: <1639244466.88.0.00107020569143.issue46042@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +28279 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30059 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 12:41:42 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 17:41:42 +0000 Subject: [issue28816] [doc] Clarify that zipimport does not invoke import hooks to load custom files from zip. In-Reply-To: <1480326340.52.0.39566018579.issue28816@psf.upfronthosting.co.za> Message-ID: <1639244502.56.0.673908923692.issue28816@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +28280 status: pending -> open pull_request: https://github.com/python/cpython/pull/30060 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 12:41:53 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 Dec 2021 17:41:53 +0000 Subject: [issue46042] Error range of "duplicate argument" SyntaxErrors is too big In-Reply-To: <1639171461.19.0.894286110082.issue46042@roundup.psfhosted.org> Message-ID: <1639244513.42.0.0110531842363.issue46042@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Don't worry, turns out it was a bit messier than I thought, so I prepared the PR. If you have some time, it would be great if you can take a quick look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 12:45:57 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 17:45:57 +0000 Subject: [issue12833] Document the need to pass the prompt to raw_input() with readline In-Reply-To: <1314205212.4.0.313319940132.issue12833@psf.upfronthosting.co.za> Message-ID: <1639244757.44.0.790928409727.issue12833@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: needs patch -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 12:47:21 2021 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Sat, 11 Dec 2021 17:47:21 +0000 Subject: [issue46042] Error range of "duplicate argument" SyntaxErrors is too big In-Reply-To: <1639171461.19.0.894286110082.issue46042@roundup.psfhosted.org> Message-ID: <1639244841.04.0.291817762237.issue46042@roundup.psfhosted.org> Carl Friedrich Bolz-Tereick added the comment: Oh no, I was about to open mine ;-) https://github.com/python/cpython/compare/main...cfbolz:bpo-46042-syntax-error-range-duplicate-argument?expand=1 Basically equivalent, but I fixed the second bug too (would be very easy to add to yours) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 12:48:13 2021 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Sat, 11 Dec 2021 17:48:13 +0000 Subject: [issue46042] Error range of "duplicate argument" SyntaxErrors is too big In-Reply-To: <1639171461.19.0.894286110082.issue46042@roundup.psfhosted.org> Message-ID: <1639244893.75.0.615800366972.issue46042@roundup.psfhosted.org> Carl Friedrich Bolz-Tereick added the comment: ah, confused, seems you fixed them both too. will take a closer look! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 12:54:46 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 17:54:46 +0000 Subject: [issue24012] Add error checks to PyInit_pyexpat() In-Reply-To: <1429471995.2.0.707709004529.issue24012@psf.upfronthosting.co.za> Message-ID: <1639245286.42.0.674562343993.issue24012@roundup.psfhosted.org> Irit Katriel added the comment: This is all sorted now: iritkatriel at Irits-MBP cpython % grep "PyModule_AddObject(" Modules/pyexpat.c if (PyModule_AddObject(mod, name, submodule) < 0) { if (PyModule_AddObject(errors_module, "codes", codes_dict) < 0) { if (PyModule_AddObject(errors_module, "messages", rev_codes_dict) < 0) { if (PyModule_AddObject(mod, "features", list) < 0) { if (PyModule_AddObject(mod, "version_info", versionInfo) < 0) { if (PyModule_AddObject(mod, "expat_CAPI", capi_object) < 0) { iritkatriel at Irits-MBP cpython % grep "PyDict_SetItem(" Modules/pyexpat.c PyDict_SetItem(self->intern, result, result) == 0) else if (PyDict_SetItem(container, n, v)) { int res = PyDict_SetItem(rev_codes_dict, num, str); iritkatriel at Irits-MBP cpython % grep "PySys_GetObject(" Modules/pyexpat.c iritkatriel at Irits-MBP cpython % ---------- nosy: +iritkatriel resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 12:56:22 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 17:56:22 +0000 Subject: [issue24010] Add error checks to PyInit__locale() In-Reply-To: <1429471599.85.0.679825670624.issue24010@psf.upfronthosting.co.za> Message-ID: <1639245382.9.0.135957763485.issue24010@roundup.psfhosted.org> Irit Katriel added the comment: This function now looks like this: PyMODINIT_FUNC PyInit__locale(void) { return PyModuleDef_Init(&_localemodule); } ---------- nosy: +iritkatriel resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 13:03:46 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 11 Dec 2021 18:03:46 +0000 Subject: [issue46040] asyncio.coroutine documented as removed in 3.10 In-Reply-To: <1639160902.02.0.980259307717.issue46040@roundup.psfhosted.org> Message-ID: <1639245826.87.0.296544224388.issue46040@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +28281 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30061 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 13:15:59 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 18:15:59 +0000 Subject: [issue35999] multpirocessing.Process alive after SIGTERM on parent In-Reply-To: <1550231724.21.0.67060075553.issue35999@roundup.psfhosted.org> Message-ID: <1639246559.38.0.0600725342692.issue35999@roundup.psfhosted.org> Irit Katriel added the comment: This example is not working for me on 3.11: >>> from multiprocessing import Process >>> from time import sleep >>> from os import getpid >>> >>> def log(daemon_mode): ... while True: ... print('worker %i %s' % (getpid(), daemon_mode)) ... sleep(3) ... >>> >>> print('parent pid %i' % getpid()) parent pid 77378 >>> >>> a = Process(target=log, args=(0,), daemon=False) >>> a.start() >>> :744: DeprecationWarning: BuiltinImporter.module_repr() is deprecated and slated for removal in Python 3.12 Traceback (most recent call last): File "", line 1, in File "/Users/iritkatriel/src/cpython-654/Lib/multiprocessing/spawn.py", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/iritkatriel/src/cpython-654/Lib/multiprocessing/spawn.py", line 126, in _main self = reduction.pickle.load(from_parent) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: Can't get attribute 'log' on ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 13:24:31 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 18:24:31 +0000 Subject: [issue14484] missing return in win32_kill? In-Reply-To: <1333462226.23.0.725280599354.issue14484@psf.upfronthosting.co.za> Message-ID: <1639247071.01.0.591146738679.issue14484@roundup.psfhosted.org> Irit Katriel added the comment: That piece of code is still there, the function is now called os_kill_impl. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 13:28:07 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 11 Dec 2021 18:28:07 +0000 Subject: [issue46040] asyncio.coroutine documented as removed in 3.10 In-Reply-To: <1639160902.02.0.980259307717.issue46040@roundup.psfhosted.org> Message-ID: <1639247287.25.0.0547355974448.issue46040@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 991736697dff693b6c9f8964bb7540081bbf4ddb by Andrew Svetlov in branch '3.10': [3.10] bpo-46040: Fix removal text for @asyncio.coroutine (GH-30061) https://github.com/python/cpython/commit/991736697dff693b6c9f8964bb7540081bbf4ddb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 13:28:26 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 11 Dec 2021 18:28:26 +0000 Subject: [issue46040] asyncio.coroutine documented as removed in 3.10 In-Reply-To: <1639160902.02.0.980259307717.issue46040@roundup.psfhosted.org> Message-ID: <1639247306.54.0.880856068797.issue46040@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 13:35:18 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 18:35:18 +0000 Subject: [issue27227] argparse fails to parse [] when using choices and nargs='*' In-Reply-To: <1465117156.8.0.428303445441.issue27227@psf.upfronthosting.co.za> Message-ID: <1639247718.48.0.565682555747.issue27227@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 13:39:08 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 18:39:08 +0000 Subject: [issue27718] help('signal') incomplete (e.g: signal.signal not visible) In-Reply-To: <1470746479.88.0.0919609545752.issue27718@psf.upfronthosting.co.za> Message-ID: <1639247948.25.0.576528904357.issue27718@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 13:41:20 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 18:41:20 +0000 Subject: [issue37700] shutil.copyfile does not raise SpecialFileError for socket files In-Reply-To: <1564374136.89.0.594392746042.issue37700@roundup.psfhosted.org> Message-ID: <1639248080.12.0.837820918579.issue37700@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 13:43:57 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 18:43:57 +0000 Subject: [issue37701] shutil.copyfile raises SpecialFileError for symlink to fifo In-Reply-To: <1564375011.26.0.591034083368.issue37701@roundup.psfhosted.org> Message-ID: <1639248237.47.0.758469580444.issue37701@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 13:49:54 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 18:49:54 +0000 Subject: [issue27257] get_addresses results in traceback with an addrspec with an empty local part. In-Reply-To: <1465327493.81.0.354921385455.issue27257@psf.upfronthosting.co.za> Message-ID: <1639248594.07.0.434453779693.issue27257@roundup.psfhosted.org> Irit Katriel added the comment: I am unable to reproduce this on 3.11: >>> with open(b'lkml-exception.mail', mode = 'r') as f: ... msg = email.message_from_file(f, policy=email.policy.SMTP) ... Traceback (most recent call last): File "", line 2, in AttributeError: module 'email' has no attribute 'policy' >>> import email.policy >>> with open(b'lkml-exception.mail', mode = 'r') as f: ... msg = email.message_from_file(f, policy=email.policy.SMTP) ... >>> msg.get_all('to') ['unlisted-recipients:;, @pop.kundenserver.de'] >>> ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 13:52:23 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 18:52:23 +0000 Subject: [issue26571] turtle regression in 3.5 In-Reply-To: <1458104355.45.0.620158354917.issue26571@psf.upfronthosting.co.za> Message-ID: <1639248743.29.0.64334799751.issue26571@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 13:55:14 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 18:55:14 +0000 Subject: [issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals In-Reply-To: <1279881989.28.0.725806934086.issue9338@psf.upfronthosting.co.za> Message-ID: <1639248914.56.0.60619859031.issue9338@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11: >>> import argparse >>> parser = argparse.ArgumentParser(prog='PROG') >>> >>> parser.add_argument('--badger', nargs='+') _StoreAction(option_strings=['--badger'], dest='badger', nargs='+', const=None, default=None, type=None, choices=None, help=None, metavar=None) >>> parser.add_argument('spam') _StoreAction(option_strings=[], dest='spam', nargs=None, const=None, default=None, type=None, choices=None, help=None, metavar=None) >>> parser.parse_args('--badger A B C D'.split()) usage: PROG [-h] [--badger BADGER [BADGER ...]] spam PROG: error: the following arguments are required: spam ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 14:06:37 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 19:06:37 +0000 Subject: [issue34557] When sending binary file to a Microsoft FTP server over FTP TLS, the SSL unwind method hangs In-Reply-To: <1535738453.08.0.56676864532.issue34557@psf.upfronthosting.co.za> Message-ID: <1639249597.1.0.309939094563.issue34557@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 14:08:53 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 19:08:53 +0000 Subject: [issue9504] signal.signal/signal.alarm not working as expected In-Reply-To: <1280910836.88.0.645209486589.issue9504@psf.upfronthosting.co.za> Message-ID: <1639249733.46.0.607519976366.issue9504@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 14:10:38 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 19:10:38 +0000 Subject: [issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth In-Reply-To: <1484021927.49.0.387886726852.issue29221@psf.upfronthosting.co.za> Message-ID: <1639249838.7.0.876376305702.issue29221@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 14:13:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 19:13:45 +0000 Subject: [issue19459] Python does not support the GEORGIAN-PS charset In-Reply-To: <1383216779.28.0.251946690468.issue19459@psf.upfronthosting.co.za> Message-ID: <1639250025.69.0.65832550053.issue19459@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 14:14:50 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 19:14:50 +0000 Subject: [issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC In-Reply-To: <1540110172.83.0.788709270274.issue35037@psf.upfronthosting.co.za> Message-ID: <1639250090.48.0.971795214865.issue35037@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 14:21:24 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Sat, 11 Dec 2021 19:21:24 +0000 Subject: [issue46005] [doc] replace 'distutils' examples with 'setuptools' In-Reply-To: <1638864537.57.0.967787312853.issue46005@roundup.psfhosted.org> Message-ID: <1639250484.05.0.0582366998705.issue46005@roundup.psfhosted.org> Nikita Sobolev added the comment: Or maybe we should just include https://github.com/python/cpython/blob/main/Doc/distutils/_setuptools_disclaimer.rst as others do? I will send my proposal :) ---------- nosy: +sobolevn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 14:23:23 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Sat, 11 Dec 2021 19:23:23 +0000 Subject: [issue46005] [doc] replace 'distutils' examples with 'setuptools' In-Reply-To: <1638864537.57.0.967787312853.issue46005@roundup.psfhosted.org> Message-ID: <1639250603.87.0.836315017771.issue46005@roundup.psfhosted.org> Change by Nikita Sobolev : ---------- keywords: +patch pull_requests: +28282 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30062 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 15:11:37 2021 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sat, 11 Dec 2021 20:11:37 +0000 Subject: [issue40059] Provide a toml module in the standard library In-Reply-To: <1585119261.47.0.818238682424.issue40059@roundup.psfhosted.org> Message-ID: <1639253497.9.0.54393932818.issue40059@roundup.psfhosted.org> Change by Chih-Hsuan Yen : ---------- nosy: -yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 15:22:30 2021 From: report at bugs.python.org (Nicholas Bond) Date: Sat, 11 Dec 2021 20:22:30 +0000 Subject: [issue46043] Python Launcher Not Opening Files. In-Reply-To: <1639178553.87.0.850014051129.issue46043@roundup.psfhosted.org> Message-ID: <1639254150.04.0.235890703167.issue46043@roundup.psfhosted.org> Nicholas Bond added the comment: I am on macOS 12 and it still doesn't work when Terminal.app is open. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 16:00:22 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 11 Dec 2021 21:00:22 +0000 Subject: [issue23948] Deprecate os.kill() on Windows In-Reply-To: <1429025061.32.0.415018485708.issue23948@psf.upfronthosting.co.za> Message-ID: <1639256422.68.0.869111090411.issue23948@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> rejected stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 16:00:33 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 11 Dec 2021 21:00:33 +0000 Subject: [issue42962] Windows: SystemError during os.kill(..., signal.CTRL_C_EVENT) In-Reply-To: <1611007954.59.0.488720921329.issue42962@roundup.psfhosted.org> Message-ID: <1639256433.31.0.592057769711.issue42962@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> missing return in win32_kill? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 16:12:25 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 11 Dec 2021 21:12:25 +0000 Subject: [issue44674] dataclasses should allow frozendict default value In-Reply-To: <1626703592.29.0.0154308260517.issue44674@roundup.psfhosted.org> Message-ID: <1639257145.29.0.231563738084.issue44674@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset e029c53e1a408b89a4e3edf30a9b38b094f9c880 by Eric V. Smith in branch 'main': bpo-44674: Use unhashability as a proxy for mutability for default dataclass __init__ arguments. (GH-29867) https://github.com/python/cpython/commit/e029c53e1a408b89a4e3edf30a9b38b094f9c880 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 16:13:04 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 11 Dec 2021 21:13:04 +0000 Subject: [issue44674] dataclasses should allow frozendict default value In-Reply-To: <1626703592.29.0.0154308260517.issue44674@roundup.psfhosted.org> Message-ID: <1639257184.11.0.392311960155.issue44674@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 Sat Dec 11 16:15:13 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 11 Dec 2021 21:15:13 +0000 Subject: [issue14484] missing return in win32_kill? In-Reply-To: <1333462226.23.0.725280599354.issue14484@psf.upfronthosting.co.za> Message-ID: <1639257313.53.0.492485821398.issue14484@roundup.psfhosted.org> Eryk Sun added the comment: The details of os.kill() on Windows have been discussed extensively for years in various issues such as bpo-26350, bp-23948, and bp42962. But the problem of the missing return statement is always overwhelmed by discussion of the egregiously bad design of this function and its misuse, which depends on bugs in WinAPI GenerateConsoleCtrlEvent() when passed a PID that is not a process group ID and/or not attached to the console. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 16:15:52 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 11 Dec 2021 21:15:52 +0000 Subject: [issue14484] missing return in win32_kill? In-Reply-To: <1333462226.23.0.725280599354.issue14484@psf.upfronthosting.co.za> Message-ID: <1639257352.39.0.150262084403.issue14484@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg408336 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 16:16:15 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 11 Dec 2021 21:16:15 +0000 Subject: [issue14484] missing return in win32_kill? In-Reply-To: <1333462226.23.0.725280599354.issue14484@psf.upfronthosting.co.za> Message-ID: <1639257375.43.0.189729101825.issue14484@roundup.psfhosted.org> Eryk Sun added the comment: The details of os.kill() on Windows have been discussed extensively for years in various issues such as bpo-26350, bpo-23948, and bpo-42962. But the problem of the missing return statement is always overwhelmed by discussion of the egregiously bad design of this function and its misuse, which depends on bugs in WinAPI GenerateConsoleCtrlEvent() when passed a PID that is not a process group ID and/or not attached to the console. ---------- versions: +Python 3.7 -Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 16:16:40 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 11 Dec 2021 21:16:40 +0000 Subject: [issue46024] Different behaviour with zipfile In-Reply-To: <1639045155.54.0.671926991121.issue46024@roundup.psfhosted.org> Message-ID: <1639257400.19.0.263444304921.issue46024@roundup.psfhosted.org> Eric V. Smith added the comment: Actually, printing out: print(repr(path), repr(ZipPath(path))) would be more useful. If I don't hear back in a few days, I'm going to close this issue. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 16:17:21 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Dec 2021 21:17:21 +0000 Subject: [issue27718] help('signal') incomplete (e.g: signal.signal not visible) In-Reply-To: <1470746479.88.0.0919609545752.issue27718@psf.upfronthosting.co.za> Message-ID: <1639257441.78.0.64408228919.issue27718@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch nosy: +serhiy.storchaka nosy_count: 6.0 -> 7.0 pull_requests: +28283 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30063 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 16:18:12 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 11 Dec 2021 21:18:12 +0000 Subject: [issue45650] cgitb does not emit CGI headers when format='text' In-Reply-To: <1635439639.23.0.69927337911.issue45650@roundup.psfhosted.org> Message-ID: <1639257492.22.0.0724495417645.issue45650@roundup.psfhosted.org> Eric V. Smith added the comment: Having not heard back about a use case for this, I'm going to close it. If you want to move this forward, I suggest proposing it on the python-ideas mailing list. ---------- resolution: -> rejected stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 16:18:48 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 11 Dec 2021 21:18:48 +0000 Subject: [issue44053] Can't connect to a server also not showing any type of output In-Reply-To: <1620284980.8.0.330788733855.issue44053@roundup.psfhosted.org> Message-ID: <1639257528.68.0.876703832923.issue44053@roundup.psfhosted.org> Eric V. Smith added the comment: Closing due to lack of feedback. ---------- resolution: -> not a bug stage: -> resolved status: pending -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 16:20:15 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 11 Dec 2021 21:20:15 +0000 Subject: [issue24372] Documentation for ssl.wrap_socket's ssl_version parameter is odd In-Reply-To: <1433337046.56.0.760667574061.issue24372@psf.upfronthosting.co.za> Message-ID: <1639257615.54.0.722310750356.issue24372@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> out of date stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 16:21:07 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 11 Dec 2021 21:21:07 +0000 Subject: [issue44475] Dataclass Causes Infinite Recursion when using type of bytes In-Reply-To: <1624287996.71.0.124244983784.issue44475@roundup.psfhosted.org> Message-ID: <1639257667.88.0.688980598992.issue44475@roundup.psfhosted.org> Eric V. Smith added the comment: Closing due to lack of feedback. ---------- resolution: -> not a bug stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 16:21:33 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Dec 2021 21:21:33 +0000 Subject: [issue27718] help('signal') incomplete (e.g: signal.signal not visible) In-Reply-To: <1470746479.88.0.0919609545752.issue27718@psf.upfronthosting.co.za> Message-ID: <1639257693.29.0.2369503393.issue27718@roundup.psfhosted.org> Serhiy Storchaka added the comment: This is due to use functools.wraps(). If __all__ is not defined all non-builtin functions should have correct __module__ to be displayed by pydoc. functools.wraps() assigns __module__, __name__, __qualname__, __doc__ and __annotations__. __module__ should be preserved ('signal', not '_signal'), __name__ and __qualname__ are already correct, __annotations__ does not exist. So only __doc__ should be copied. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 16:28:34 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 Dec 2021 21:28:34 +0000 Subject: [issue46042] Error range of "duplicate argument" SyntaxErrors is too big In-Reply-To: <1639171461.19.0.894286110082.issue46042@roundup.psfhosted.org> Message-ID: <1639258114.71.0.208591963559.issue46042@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 59435eea08d30796174552c0ca03c59b41adf8a5 by Pablo Galindo Salgado in branch 'main': bpo-46042: Improve SyntaxError locations in the symbol table (GH-30059) https://github.com/python/cpython/commit/59435eea08d30796174552c0ca03c59b41adf8a5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 16:28:47 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 11 Dec 2021 21:28:47 +0000 Subject: [issue46042] Error range of "duplicate argument" SyntaxErrors is too big In-Reply-To: <1639171461.19.0.894286110082.issue46042@roundup.psfhosted.org> Message-ID: <1639258127.0.0.245063369065.issue46042@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28284 pull_request: https://github.com/python/cpython/pull/30064 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 16:29:46 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 Dec 2021 21:29:46 +0000 Subject: [issue46042] Error range of "duplicate argument" SyntaxErrors is too big In-Reply-To: <1639171461.19.0.894286110082.issue46042@roundup.psfhosted.org> Message-ID: <1639258186.84.0.929013256512.issue46042@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 16:32:05 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 Dec 2021 21:32:05 +0000 Subject: [issue46042] Error range of "duplicate argument" SyntaxErrors is too big In-Reply-To: <1639171461.19.0.894286110082.issue46042@roundup.psfhosted.org> Message-ID: <1639258325.2.0.648355200503.issue46042@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Oh no, I was about to open mine ;-) Sorry, Carl, I apologize. I hope it was not too disruptive to do the work. I was taking a look and I felt bad that the issue was probably messier than I thought and I didn't want you to have to iterate many times :( Thanks a lot for helping review the PR and for pointing out the extra cases!! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 17:10:38 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 11 Dec 2021 22:10:38 +0000 Subject: [issue9436] test_sysconfig failure: build a 32-bit Python a 64-bit OS In-Reply-To: <1280591591.84.0.476083865565.issue9436@psf.upfronthosting.co.za> Message-ID: <1639260638.38.0.127706074808.issue9436@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 17:12:16 2021 From: report at bugs.python.org (Anton Bryl) Date: Sat, 11 Dec 2021 22:12:16 +0000 Subject: [issue46052] Ctrl+C, Ctrl+V in IDLE on Windows do not work with Cyrillic keyboard layout Message-ID: <1639260736.08.0.703954085889.issue46052@roundup.psfhosted.org> New submission from Anton Bryl : Ctrl+C and Ctrl+V key combinations in IDLE on Windows do not work with Cyrillic keyboard layout. It is unexpected, as well as inconvenient when editing string constants. ---------- assignee: terry.reedy components: IDLE messages: 408345 nosy: anton.bryl, terry.reedy priority: normal severity: normal status: open title: Ctrl+C, Ctrl+V in IDLE on Windows do not work with Cyrillic keyboard layout type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 17:17:08 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 11 Dec 2021 22:17:08 +0000 Subject: [issue37701] shutil.copyfile raises SpecialFileError for symlink to fifo In-Reply-To: <1564375011.26.0.591034083368.issue37701@roundup.psfhosted.org> Message-ID: <1639261028.37.0.311478562435.issue37701@roundup.psfhosted.org> Eryk Sun added the comment: > Raising a SpecialFileError would be OK if `follow_symlinks` was False. I expect it to fail if follow_symlinks is True, which is the default value. I expect it to succeed with follow_symlinks=False, which should create a shallow copy of just the symlink, regardless of its target. Instead, what happens is that it calls shutil._stat(fn) on both src and dst, regardless of follow_symlinks. I think the call should be shutil._stat(fn, follow_symlinks). This requires updating shutil._stat() to pass the value to fn.stat() and os.stat(). ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 18:00:45 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Dec 2021 23:00:45 +0000 Subject: [issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth In-Reply-To: <1484021927.49.0.387886726852.issue29221@psf.upfronthosting.co.za> Message-ID: <1639263645.5.0.211616851464.issue29221@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is still reproducible if increase the depth. In 3.8-3.10 it needs 329 nested classes, in 3.11 -- 496. Seems the limit is sys.getrecursionlimit()//k - 4, where k=4 in 3.7 and older, k=3 in 3.8-3.10, and k=2 in 3.11. It is much better than was initially, but the ideal is k=1. ---------- resolution: out of date -> stage: resolved -> status: closed -> open versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 18:08:05 2021 From: report at bugs.python.org (Alex Waygood) Date: Sat, 11 Dec 2021 23:08:05 +0000 Subject: [issue46032] functools' singledispatch does not support GenericAlias In-Reply-To: <1639127096.15.0.258621113418.issue46032@roundup.psfhosted.org> Message-ID: <1639264085.84.0.577557164098.issue46032@roundup.psfhosted.org> Alex Waygood added the comment: The PR looks good to me. I think it's also important that we document that these types aren't supported, as it's not mentioned anywhere at the moment. Related: Issue34498. ---------- nosy: +uriyyo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 18:15:12 2021 From: report at bugs.python.org (Thomas Klausner) Date: Sat, 11 Dec 2021 23:15:12 +0000 Subject: [issue46053] NetBSD: ossaudio support incomplete Message-ID: <1639264512.66.0.774714620496.issue46053@roundup.psfhosted.org> New submission from Thomas Klausner : When compiling Python on NetBSD, the ossaudio module is not enabled. 1. the code tries to export some #define that are not in the public OSS API (but that some other implementations provide) 2. on NetBSD, you need to link against libossaudio when using OSS ---------- components: Extension Modules messages: 408349 nosy: wiz priority: normal severity: normal status: open title: NetBSD: ossaudio support incomplete type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 18:17:51 2021 From: report at bugs.python.org (Thomas Klausner) Date: Sat, 11 Dec 2021 23:17:51 +0000 Subject: [issue46053] NetBSD: ossaudio support incomplete In-Reply-To: <1639264512.66.0.774714620496.issue46053@roundup.psfhosted.org> Message-ID: <1639264671.16.0.00613104740418.issue46053@roundup.psfhosted.org> Change by Thomas Klausner : ---------- keywords: +patch pull_requests: +28285 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30065 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 18:26:47 2021 From: report at bugs.python.org (Alex Waygood) Date: Sat, 11 Dec 2021 23:26:47 +0000 Subject: [issue46032] functools' singledispatch does not support GenericAlias In-Reply-To: <1639127096.15.0.258621113418.issue46032@roundup.psfhosted.org> Message-ID: <1639265207.62.0.52867569688.issue46032@roundup.psfhosted.org> Change by Alex Waygood : ---------- components: +Documentation type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 18:41:17 2021 From: report at bugs.python.org (=?utf-8?q?Alex_Gr=C3=B6nholm?=) Date: Sat, 11 Dec 2021 23:41:17 +0000 Subject: [issue43794] OpenSSL 3.0.0: Handle UNEXPECTED_EOF_WHILE_READING / wrap SSL_OP_IGNORE_UNEXPECTED_EOF In-Reply-To: <1617977591.38.0.697961461689.issue43794@roundup.psfhosted.org> Message-ID: <1639266077.15.0.385632266361.issue43794@roundup.psfhosted.org> Alex Gr?nholm added the comment: OpenSSL 1.1.1 also handled EOFs strictly, but this behavior was generally suppressed in the ssl module through the default setting of suppress_ragged_eofs=True (thus enabling truncation attacks by default). The PR changes the behavior of existing applications in such a way that previously detectable unexpected EOFs are now no longer detectable by default. To make matters worse, EOF errors are not translated to SSLEOFError anymore, and instead I have to match the strerror attribute in SSLError to detect this condition. ---------- nosy: +alex.gronholm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 18:51:18 2021 From: report at bugs.python.org (Thomas Klausner) Date: Sat, 11 Dec 2021 23:51:18 +0000 Subject: [issue30512] CAN Socket support for NetBSD In-Reply-To: <1496155843.0.0.360939407267.issue30512@psf.upfronthosting.co.za> Message-ID: <1639266678.62.0.590187449872.issue30512@roundup.psfhosted.org> Change by Thomas Klausner : ---------- pull_requests: +28286 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30066 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 19:01:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 00:01:55 +0000 Subject: [issue41222] POpen bufsize=0 ignored with universal_newlines=True In-Reply-To: <1594065242.21.0.841046846995.issue41222@roundup.psfhosted.org> Message-ID: <1639267315.15.0.813670578661.issue41222@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11 -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 19:08:06 2021 From: report at bugs.python.org (wats0ns) Date: Sun, 12 Dec 2021 00:08:06 +0000 Subject: [issue36207] robotsparser deny all with some rules In-Reply-To: <1551865321.24.0.407834320039.issue36207@roundup.psfhosted.org> Message-ID: <1552951200.45.0.980846340144.issue36207@roundup.psfhosted.org> wats0ns added the comment: I can't find a documentation about it, but all of the robots.txt checkers I find behave like this. You can test on this site: http://www.eskimoz.fr/robots.txt, I believe that this is how it's implemented now in most parsers ? ---------- nosy: +quentin-maire _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 19:11:21 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 00:11:21 +0000 Subject: [issue36207] robotsparser deny all with some rules In-Reply-To: <1551865321.24.0.407834320039.issue36207@roundup.psfhosted.org> Message-ID: <1639267881.7.0.822198029299.issue36207@roundup.psfhosted.org> Irit Katriel added the comment: I restored one non-spam message from the OP that was deleted. Changing to enhancement because this is not a bug (i.e., deviation from documentation). I don't know enough about this to have a view on whether this enhancement request should be accepted. ---------- nosy: +iritkatriel type: behavior -> enhancement versions: +Python 3.11 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 19:18:24 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 00:18:24 +0000 Subject: [issue26216] run runtktests.py error when test tkinter In-Reply-To: <1453901780.17.0.263140202656.issue26216@psf.upfronthosting.co.za> Message-ID: <1639268304.09.0.127817660556.issue26216@roundup.psfhosted.org> Irit Katriel added the comment: runtktests.py was deleted here: https://github.com/python/cpython/pull/28929 ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 19:21:42 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 00:21:42 +0000 Subject: [issue21737] runpy.run_path() fails with frozen __main__ modules In-Reply-To: <1402590260.07.0.642136179062.issue21737@psf.upfronthosting.co.za> Message-ID: <1639268502.28.0.653259465428.issue21737@roundup.psfhosted.org> Irit Katriel added the comment: The code looks very different from the patch now, is this issue still relevant? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 19:26:56 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 00:26:56 +0000 Subject: [issue22858] unittest.__init__:main shadows unittest.main In-Reply-To: <1415874204.41.0.576776716148.issue22858@psf.upfronthosting.co.za> Message-ID: <1639268816.7.0.596378099065.issue22858@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.11 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 19:38:04 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 00:38:04 +0000 Subject: [issue20123] pydoc.synopsis fails to load binary modules In-Reply-To: <1388874425.94.0.221860493391.issue20123@psf.upfronthosting.co.za> Message-ID: <1639269484.65.0.436867595081.issue20123@roundup.psfhosted.org> Irit Katriel added the comment: Re-enabling the test is tracked on 20128, so this issue is no longer needed. ---------- nosy: +iritkatriel resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 19:39:32 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 00:39:32 +0000 Subject: [issue20128] Re-enable test_modules_search_builtin() in test_pydoc In-Reply-To: <1388905827.82.0.948519018287.issue20128@psf.upfronthosting.co.za> Message-ID: <1639269572.66.0.115191686323.issue20128@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 19:45:46 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 00:45:46 +0000 Subject: [issue17840] base64_codec uses assert for runtime validity checks In-Reply-To: <1366875650.57.0.151905786577.issue17840@psf.upfronthosting.co.za> Message-ID: <1639269946.73.0.242454815151.issue17840@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.11 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 19:51:42 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 00:51:42 +0000 Subject: [issue26951] [doc] Unintuitive error when using generator expression in class property In-Reply-To: <1462372473.02.0.946073615941.issue26951@psf.upfronthosting.co.za> Message-ID: <1639270302.45.0.476925713313.issue26951@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: Unintuitive error when using generator expression in class property -> [doc] Unintuitive error when using generator expression in class property versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 20:22:28 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 01:22:28 +0000 Subject: [issue10116] Sporadic failures in test_urllibnet In-Reply-To: <1287150282.16.0.127032822399.issue10116@psf.upfronthosting.co.za> Message-ID: <1639272148.7.0.11429965263.issue10116@roundup.psfhosted.org> Irit Katriel added the comment: The www.example.com url was replaced by a local one in Issue36019, so this seems to complete what remained to do here. ---------- nosy: +iritkatriel resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 20:24:16 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 Dec 2021 01:24:16 +0000 Subject: [issue46042] Error range of "duplicate argument" SyntaxErrors is too big In-Reply-To: <1639171461.19.0.894286110082.issue46042@roundup.psfhosted.org> Message-ID: <1639272256.71.0.628803180875.issue46042@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 438817fdd5b731d486285d205bed2e78b655c0d6 by Miss Islington (bot) in branch '3.10': bpo-46042: Improve SyntaxError locations in the symbol table (GH-30059) (GH-30064) https://github.com/python/cpython/commit/438817fdd5b731d486285d205bed2e78b655c0d6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 20:30:46 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 12 Dec 2021 01:30:46 +0000 Subject: [issue46052] Ctrl+C, C+V in IDLE on Windows do not work with Cyrillic keys In-Reply-To: <1639260736.08.0.703954085889.issue46052@roundup.psfhosted.org> Message-ID: <1639272646.98.0.926894082814.issue46052@roundup.psfhosted.org> Terry J. Reedy added the comment: IDLE is a tkinter application and tkinter wraps the tcl/tk GUI framework. Your problem is mostly in the interaction between Windows, your Cyrillic input method, and tk. As a test, run import tkinter as tk r = tk.Tk() t = tk.Text(r) t.pack() Click in the box, type something, and try Ctrl-X, -C, -V. If they work, we can add explicit bindings somewhat similar to those IDLE makes. Also, how do you make your keyboard a Cyrillic keyboard. EP, are you aware of any related tk issues? Serhiy, do you know of any specific problems with Cyrillic and tkinter/tk? ---------- assignee: terry.reedy -> components: +Tkinter nosy: +epaine, serhiy.storchaka title: Ctrl+C, Ctrl+V in IDLE on Windows do not work with Cyrillic keyboard layout -> Ctrl+C, C+V in IDLE on Windows do not work with Cyrillic keys _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 20:43:28 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sun, 12 Dec 2021 01:43:28 +0000 Subject: [issue45977] Unexpected effect of sys.pycache_prefix = "" In-Reply-To: <1638590311.18.0.778355816492.issue45977@roundup.psfhosted.org> Message-ID: <1639273408.4.0.376912882205.issue45977@roundup.psfhosted.org> Andrei Kulakov added the comment: Thanks, I've misunderstood how it works. It makes sense now. Closing as not a bug. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 11 22:16:47 2021 From: report at bugs.python.org (AegisEmerald545) Date: Sun, 12 Dec 2021 03:16:47 +0000 Subject: [issue46043] Python Launcher Not Opening Files. In-Reply-To: <1639178553.87.0.850014051129.issue46043@roundup.psfhosted.org> Message-ID: <1639279007.52.0.107715053148.issue46043@roundup.psfhosted.org> AegisEmerald545 added the comment: Same here. macOS Monterey with an Apple Silicon SoC and there seems not to be any workaround this time ---------- nosy: +AegisEmerald545 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 00:09:47 2021 From: report at bugs.python.org (Kumar Aditya) Date: Sun, 12 Dec 2021 05:09:47 +0000 Subject: [issue23469] Delete Misc/*.wpr files In-Reply-To: <1424048342.99.0.00819785192711.issue23469@psf.upfronthosting.co.za> Message-ID: <1639285787.73.0.680662859612.issue23469@roundup.psfhosted.org> Change by Kumar Aditya : ---------- keywords: +patch nosy: +kumaraditya303 nosy_count: 4.0 -> 5.0 pull_requests: +28287 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30067 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 00:24:58 2021 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Sun, 12 Dec 2021 05:24:58 +0000 Subject: [issue46042] Error range of "duplicate argument" SyntaxErrors is too big In-Reply-To: <1639171461.19.0.894286110082.issue46042@roundup.psfhosted.org> Message-ID: <1639286698.59.0.51610020182.issue46042@roundup.psfhosted.org> Carl Friedrich Bolz-Tereick added the comment: Oh, don't worry, it's all good! It got fixed and I learned something. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 00:29:47 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 Dec 2021 05:29:47 +0000 Subject: [issue46054] Incorrect error when parsing non-utf8 files Message-ID: <1639286987.92.0.127175285023.issue46054@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : Python3.9 shows: ../3.9/python /bin/ls SyntaxError: Non-UTF-8 code starting with '\xfc' in file /bin/ls on line 2, but no encoding declared; see https://python.org/dev/peps/pep-0263/ for detail while 3.10 shows: python /bin/ls File "/bin/ls", line 0 SyntaxError: unknown parsing error ---------- components: Parser messages: 408361 nosy: lys.nikolaou, pablogsal priority: normal severity: normal status: open title: Incorrect error when parsing non-utf8 files versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 00:31:00 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 Dec 2021 05:31:00 +0000 Subject: [issue46054] Incorrect error when parsing non-utf8 files In-Reply-To: <1639286987.92.0.127175285023.issue46054@roundup.psfhosted.org> Message-ID: <1639287060.74.0.846832786902.issue46054@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +28288 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30068 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 00:33:38 2021 From: report at bugs.python.org (Xinhang Xu) Date: Sun, 12 Dec 2021 05:33:38 +0000 Subject: [issue46055] Speed up binary shifting operators Message-ID: <1639287218.01.0.821172330488.issue46055@roundup.psfhosted.org> New submission from Xinhang Xu : See its PR. --------- Inspired by [bpo-44946](https://bugs.python.org/issue44946), I found there were no special shortcuts for shifting operation applied to "medium value" long object. So I modified CPython's VM to accelerate my python project where there is plenty of binary shifting operation. I guess somebody else might also need it. ---------- components: Interpreter Core messages: 408362 nosy: xuxinhang priority: normal pull_requests: 28289 severity: normal status: open title: Speed up binary shifting operators type: performance versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 00:36:38 2021 From: report at bugs.python.org (Ned Deily) Date: Sun, 12 Dec 2021 05:36:38 +0000 Subject: [issue46043] Python Launcher Not Opening Files. In-Reply-To: <1639178553.87.0.850014051129.issue46043@roundup.psfhosted.org> Message-ID: <1639287398.65.0.934864151225.issue46043@roundup.psfhosted.org> Ned Deily added the comment: There is definitely something odd going on here. I am seeing different behaviors across different systems: I have at least one macOS 12.0.1 system where the Launcher app seems to work OK with the current 3.10.1 (as long as the Terminal.app is already running) but then on some other 12.0.1 systems and on an 11.6.1 system it fails as you describe it. This is also across a mixture of Intel and Apple Silicon systems and VMs so no obvious correlation there. Launching via IDLE does seem to work properly on the systems I've tested so perhaps that might be a temporary workaround as well as just manually running the script in a Terminal.app window. I am going to close this issue as a duplicate of Issue40477 and am bumping the priority with the aim to have a fix prior to the next round of releases in early January. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Python Launcher app on macOS 10.15 Catalina fails to run scripts _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 00:39:29 2021 From: report at bugs.python.org (Ned Deily) Date: Sun, 12 Dec 2021 05:39:29 +0000 Subject: [issue40477] Python Launcher app on macOS 10.15+ fails to run scripts In-Reply-To: <1588435279.1.0.0339863635356.issue40477@roundup.psfhosted.org> Message-ID: <1639287569.74.0.305351777576.issue40477@roundup.psfhosted.org> Ned Deily added the comment: >From comments in duplicate Issue46043: "There is definitely something odd going on here. I am seeing different behaviors across different systems: I have at least one macOS 12.0.1 system where the Launcher app seems to work OK with the current 3.10.1 (as long as the Terminal.app is already running) but then on some other 12.0.1 systems and on an 11.6.1 system it fails as you describe it. This is also across a mixture of Intel and Apple Silicon systems and VMs so no obvious correlation there. Launching via IDLE does seem to work properly on the systems I've tested so perhaps that might be a temporary workaround as well as just manually running the script in a Terminal.app window. I am going to close this issue as a duplicate of Issue40477 and am bumping the priority with the aim to have a fix prior to the next round of releases in early January." ---------- nosy: +AegisEmerald545, nicholasjbond2020 priority: high -> critical title: Python Launcher app on macOS 10.15 Catalina fails to run scripts -> Python Launcher app on macOS 10.15+ fails to run scripts _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 01:31:09 2021 From: report at bugs.python.org (Gianni Mariani) Date: Sun, 12 Dec 2021 06:31:09 +0000 Subject: [issue44674] dataclasses should allow frozendict default value In-Reply-To: <1626703592.29.0.0154308260517.issue44674@roundup.psfhosted.org> Message-ID: <1639290669.19.0.634727990233.issue44674@roundup.psfhosted.org> Gianni Mariani added the comment: Excellent. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 02:07:03 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 12 Dec 2021 07:07:03 +0000 Subject: [issue46054] Incorrect error when parsing non-utf8 files In-Reply-To: <1639286987.92.0.127175285023.issue46054@roundup.psfhosted.org> Message-ID: <1639292823.14.0.883236718382.issue46054@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +28290 pull_request: https://github.com/python/cpython/pull/30069 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 02:07:14 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 Dec 2021 07:07:14 +0000 Subject: [issue46054] Incorrect error when parsing non-utf8 files In-Reply-To: <1639286987.92.0.127175285023.issue46054@roundup.psfhosted.org> Message-ID: <1639292834.06.0.196841276252.issue46054@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 4325a766f5f603ef6dfb8c4d5798e5e73cb5efd5 by Pablo Galindo Salgado in branch 'main': bpo-46054: Fix parsing error when parsing non-utf8 characters in source files (GH-30068) https://github.com/python/cpython/commit/4325a766f5f603ef6dfb8c4d5798e5e73cb5efd5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 03:31:27 2021 From: report at bugs.python.org (John Belmonte) Date: Sun, 12 Dec 2021 08:31:27 +0000 Subject: [issue45995] string formatting: normalize negative zero In-Reply-To: <1638792226.95.0.292604366656.issue45995@roundup.psfhosted.org> Message-ID: <1639297887.28.0.671126054271.issue45995@roundup.psfhosted.org> John Belmonte added the comment: > For Decimal, we'd need to "own" the string formatting, taking that responsibility away from mpdecimal, but there are already other reasons to do that. After some digging, I believe this is the background on forking pieces of mpdecimal (and why the existing source copy inside Python doesn't count as a fork): https://bugs.python.org/issue45708#msg405895 https://github.com/python/cpython/pull/29438 If I understand correctly, the PR for supporting underscore separators in Decimal formatting is only taking control of generating a mpd_spec_t from the spec string. Formatting itself is still done by mpd_qformat_spec(). So there's outstanding work to also pull the formatting code itself into _decimal.c. (And this is wanted anyway to reconcile existing libmpdec formatting modifications: https://github.com/python/cpython/commit/298131a44896a4fec1ea829814ad52409d59aba5) And this is all because vendors have the crazy practice of unbundling libmpdec from Python. (If a project is bundling the source of another, there may be some reason...?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 03:41:19 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 12 Dec 2021 08:41:19 +0000 Subject: [issue45874] urllib.parse.parse_qsl does not parse empty query string with strict parsing In-Reply-To: <1637620540.89.0.438888661904.issue45874@roundup.psfhosted.org> Message-ID: <1639298479.21.0.730656343127.issue45874@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset e6fe10d34096a23be7d26271cf6aba429313b01d by Christian Sattler in branch 'main': bpo-45874: Handle empty query string correctly in urllib.parse.parse_qsl (#29716) https://github.com/python/cpython/commit/e6fe10d34096a23be7d26271cf6aba429313b01d ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 03:45:28 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 12 Dec 2021 08:45:28 +0000 Subject: [issue45855] PyCapsule_Import still using PyImport_ImportModuleNoBlock In-Reply-To: <1637425638.46.0.745441938277.issue45855@roundup.psfhosted.org> Message-ID: <1639298728.17.0.334991782224.issue45855@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 41026c3155012d6ea50e01205c163b6739c675b8 by Kumar Aditya in branch 'main': bpo-45855: Replaced deprecated `PyImport_ImportModuleNoBlock` with PyImport_ImportModule (GH-30046) https://github.com/python/cpython/commit/41026c3155012d6ea50e01205c163b6739c675b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 03:47:07 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 12 Dec 2021 08:47:07 +0000 Subject: [issue45855] Replace PyImport_ImportModuleNoBlock with PyImport_ImportModule in std modules In-Reply-To: <1637425638.46.0.745441938277.issue45855@roundup.psfhosted.org> Message-ID: <1639298827.56.0.568711950093.issue45855@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: PyCapsule_Import still using PyImport_ImportModuleNoBlock -> Replace PyImport_ImportModuleNoBlock with PyImport_ImportModule in std modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 04:09:43 2021 From: report at bugs.python.org (Georg Brandl) Date: Sun, 12 Dec 2021 09:09:43 +0000 Subject: [issue45855] Replace PyImport_ImportModuleNoBlock with PyImport_ImportModule in std modules In-Reply-To: <1637425638.46.0.745441938277.issue45855@roundup.psfhosted.org> Message-ID: <1639300183.69.0.392032351556.issue45855@roundup.psfhosted.org> Change by Georg Brandl : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 04:27:53 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 12 Dec 2021 09:27:53 +0000 Subject: [issue44674] dataclasses should allow frozendict default value In-Reply-To: <1626703592.29.0.0154308260517.issue44674@roundup.psfhosted.org> Message-ID: <1639301273.0.0.987049966008.issue44674@roundup.psfhosted.org> Eric V. Smith added the comment: @gianni: can you verify that your use case works in 3.11? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 04:49:56 2021 From: report at bugs.python.org (Georg Brandl) Date: Sun, 12 Dec 2021 09:49:56 +0000 Subject: [issue45855] Replace PyImport_ImportModuleNoBlock with PyImport_ImportModule in std modules In-Reply-To: <1637425638.46.0.745441938277.issue45855@roundup.psfhosted.org> Message-ID: <1639302596.63.0.137625291329.issue45855@roundup.psfhosted.org> Georg Brandl added the comment: New changeset f4095e53ab708d95e019c909d5928502775ba68f by Georg Brandl in branch 'main': bpo-45855: document that `no_block` has no use anymore in PyCapsule_Import (#29665) https://github.com/python/cpython/commit/f4095e53ab708d95e019c909d5928502775ba68f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 04:50:44 2021 From: report at bugs.python.org (Georg Brandl) Date: Sun, 12 Dec 2021 09:50:44 +0000 Subject: [issue45855] Replace PyImport_ImportModuleNoBlock with PyImport_ImportModule in std modules In-Reply-To: <1637425638.46.0.745441938277.issue45855@roundup.psfhosted.org> Message-ID: <1639302644.29.0.277332184625.issue45855@roundup.psfhosted.org> Change by Georg Brandl : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 04:58:30 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Dec 2021 09:58:30 +0000 Subject: [issue46055] Speed up binary shifting operators In-Reply-To: <1639287218.01.0.821172330488.issue46055@roundup.psfhosted.org> Message-ID: <1639303110.87.0.273749046805.issue46055@roundup.psfhosted.org> Serhiy Storchaka added the comment: Could you please show any microbenchmarking results? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 05:05:25 2021 From: report at bugs.python.org (Alex Waygood) Date: Sun, 12 Dec 2021 10:05:25 +0000 Subject: [issue45684] `functools.singledispatchmethod` does not define `__class_getitem__` In-Reply-To: <1635790981.47.0.0130236033988.issue45684@roundup.psfhosted.org> Message-ID: <1639303525.39.0.738567309164.issue45684@roundup.psfhosted.org> Alex Waygood added the comment: Closing this, as I don't think the use case I presented is strong enough, and there are ultimately more important things to worry about. ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 05:36:45 2021 From: report at bugs.python.org (Roundup Robot) Date: Sun, 12 Dec 2021 10:36:45 +0000 Subject: [issue13966] Add disable_interspersed_args() to argparse.ArgumentParser In-Reply-To: <1328687368.18.0.265955669963.issue13966@psf.upfronthosting.co.za> Message-ID: <1639305405.95.0.837748294926.issue13966@roundup.psfhosted.org> Change by Roundup Robot : ---------- nosy: +python-dev nosy_count: 5.0 -> 6.0 pull_requests: +28291 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30071 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 06:13:31 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 11:13:31 +0000 Subject: [issue6634] [doc] sys.exit() called from threads other than the main one: undocumented behaviour In-Reply-To: <1249327311.32.0.926815032903.issue6634@psf.upfronthosting.co.za> Message-ID: <1639307611.31.0.0890345005956.issue6634@roundup.psfhosted.org> Irit Katriel added the comment: Since 3.8 we have threading.excepthook() so the situation is different now: https://github.com/python/cpython/pull/13515 I think it still makes sense to change the wording of the doc for sys.exit() a bit, and add a reference to the relevant section of the threading doc. ---------- keywords: +easy nosy: +iritkatriel title: sys.exit() called from threads other than the main one: undocumented behaviour -> [doc] sys.exit() called from threads other than the main one: undocumented behaviour type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 06:19:40 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 11:19:40 +0000 Subject: [issue24224] test_msilib is inadequate In-Reply-To: <1431928593.08.0.843064802562.issue24224@psf.upfronthosting.co.za> Message-ID: <1639307980.47.0.0202225392246.issue24224@roundup.psfhosted.org> Irit Katriel added the comment: It seems that most of the tests in this script were written after this issue was created. If there is still need to extend them, it would help to elaborate here on what is still needed. Otherwise, we could close this. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 06:30:42 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 11:30:42 +0000 Subject: [issue22833] The decode_header() function decodes raw part to bytes or str, depending on encoded part In-Reply-To: <1415587360.95.0.777626227555.issue22833@psf.upfronthosting.co.za> Message-ID: <1639308642.72.0.146158511312.issue22833@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 06:35:36 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 11:35:36 +0000 Subject: [issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS In-Reply-To: <1385801049.84.0.483097954762.issue19838@psf.upfronthosting.co.za> Message-ID: <1639308936.64.0.282771067456.issue19838@roundup.psfhosted.org> Irit Katriel added the comment: issue15745 has been fixed in the meantime (about 6 years ago). If nobody objects I will close this as out of date. If there is still a problem with the test is will be reported for a current python version. ---------- nosy: +iritkatriel resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 06:52:22 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 11:52:22 +0000 Subject: [issue18778] email docstrings and comments say about Unicode strings In-Reply-To: <1376896820.36.0.260467198244.issue18778@psf.upfronthosting.co.za> Message-ID: <1639309942.29.0.343058824488.issue18778@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 07:03:33 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 12:03:33 +0000 Subject: [issue25668] Deadlock in logging caused by a possible race condition with "format" In-Reply-To: <1447942973.46.0.788007678714.issue25668@psf.upfronthosting.co.za> Message-ID: <1639310613.73.0.664663554893.issue25668@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> wont fix stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 07:04:32 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 12:04:32 +0000 Subject: [issue27920] Embedding python in a shared library fails to import the Python module In-Reply-To: <1472672150.5.0.175635801824.issue27920@psf.upfronthosting.co.za> Message-ID: <1639310672.8.0.390060288959.issue27920@roundup.psfhosted.org> Irit Katriel added the comment: 3.4 is no longer maintained. Please create a new issue if you are still having this problem on a current python version (>= 3.9). ---------- resolution: -> out of date stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 07:33:41 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 12 Dec 2021 12:33:41 +0000 Subject: [issue40477] Python Launcher app on macOS 10.15+ fails to run scripts In-Reply-To: <1588435279.1.0.0339863635356.issue40477@roundup.psfhosted.org> Message-ID: <1639312421.32.0.323140090968.issue40477@roundup.psfhosted.org> Ronald Oussoren added the comment: FWIW, I'm experimenting with using Scripting Bridge instead of raw Apple Events in Python Laucher. Mostly to check if that fixes the issue because I can run scripts in Terminal using Scripting Bridge from a Python script using PyObjC. Scripting Bridge would also result in slightly easier to read code. On my machine (M1 Mac Book running macOS 12.0.1) Python Launcher cannot start scripts (as described in this issue). Same when I strip code signatures (and ad-hoc sign without using the hardened runtime) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 07:45:16 2021 From: report at bugs.python.org (wolfgang kuehn) Date: Sun, 12 Dec 2021 12:45:16 +0000 Subject: [issue46056] Cannot use virtual environment on Windows 10 in cooperate security settingss Message-ID: <1639313116.18.0.364057363878.issue46056@roundup.psfhosted.org> New submission from wolfgang kuehn : I just installed Python3.10.1 from the Windows 10 App Store. Most workflows depend on creating virtual environments, but (1) python -m venv venv # -> Error 1260: Windows cannot open this program because it has been prevented by a software restriction policy However, a (2) python -m venv --without-pip venv completes, only to not allow execution of (3) .\venv\Scripts\python.exe # -> Error 1260: Windows cannot open this program because it has been prevented by a software restriction policy Reason for this probably are the (not so unreasonable) cooperate Software Restriction Policy (in our case enforced by Applocker): You are not allowed to execute from where you are allowed to write. So basically Python is broken in many MS Windows cooperate settings. Cooperate meaning (Software Restriction Policies) + (Usage of Virtual Environments). And my feeling is that it does not need to be, the virtual environment implementation with those *.exe copies being a kludge, IMHO. Note: (2) is reminiscent of bpo-45337, which was fixed with 3.9. ---------- components: Installation messages: 408380 nosy: wolfgang-kuehn priority: normal severity: normal status: open title: Cannot use virtual environment on Windows 10 in cooperate security settingss 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 Dec 12 07:49:06 2021 From: report at bugs.python.org (wolfgang kuehn) Date: Sun, 12 Dec 2021 12:49:06 +0000 Subject: [issue46056] Cannot use virtual environment on Windows 10 in cooperate security settings In-Reply-To: <1639313116.18.0.364057363878.issue46056@roundup.psfhosted.org> Message-ID: <1639313346.27.0.821316611237.issue46056@roundup.psfhosted.org> Change by wolfgang kuehn : ---------- title: Cannot use virtual environment on Windows 10 in cooperate security settingss -> Cannot use virtual environment on Windows 10 in cooperate security settings type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 08:06:47 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 13:06:47 +0000 Subject: [issue18778] email docstrings and comments use python 2 language (Unicode strings) In-Reply-To: <1376896820.36.0.260467198244.issue18778@psf.upfronthosting.co.za> Message-ID: <1639314407.28.0.411708444734.issue18778@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python title: email docstrings and comments say about Unicode strings -> email docstrings and comments use python 2 language (Unicode strings) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 08:07:13 2021 From: report at bugs.python.org (Anton Bryl) Date: Sun, 12 Dec 2021 13:07:13 +0000 Subject: [issue46052] Ctrl+C, C+V in IDLE on Windows do not work with Cyrillic keys In-Reply-To: <1639260736.08.0.703954085889.issue46052@roundup.psfhosted.org> Message-ID: <1639314433.44.0.821429185334.issue46052@roundup.psfhosted.org> Anton Bryl added the comment: Tried the tkinter example. The exact same problem occurs there as well: when a Cyrillic layout is on, Ctrl+Letter combinations do not work (it's in fact not just Ctrl+C and Ctrl+V, but apparently all of them). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 08:10:20 2021 From: report at bugs.python.org (Anton Bryl) Date: Sun, 12 Dec 2021 13:10:20 +0000 Subject: [issue46052] Ctrl+C, C+V in IDLE on Windows do not work with Cyrillic keys In-Reply-To: <1639260736.08.0.703954085889.issue46052@roundup.psfhosted.org> Message-ID: <1639314620.24.0.732045746548.issue46052@roundup.psfhosted.org> Anton Bryl added the comment: > Also, how do you make your keyboard a Cyrillic keyboard. On Windows, just install a keyboard layout for e.g. Russian. As soon as you switch to it, all Ctrl+Letter combinations stop working. Switch back to EN, and everything's working again. As the code is written in Latin alphabet, it's only rarely a problem, but, as I mentioned, sometimes one needs to edit string constants, and then it's an inconvenience (normally the exact same key combinations work). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 08:14:12 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 13:14:12 +0000 Subject: [issue6942] email.generator.Generator memory consumption In-Reply-To: <1253318032.63.0.187743524666.issue6942@psf.upfronthosting.co.za> Message-ID: <1639314852.95.0.0650704231135.issue6942@roundup.psfhosted.org> Irit Katriel added the comment: Ross, the link to your code no longer works. Do you still have it, and if so could you paste/upload it here? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 08:19:55 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 12 Dec 2021 13:19:55 +0000 Subject: [issue40477] Python Launcher app on macOS 10.15+ fails to run scripts In-Reply-To: <1588435279.1.0.0339863635356.issue40477@roundup.psfhosted.org> Message-ID: <1639315195.72.0.652125210938.issue40477@roundup.psfhosted.org> Ronald Oussoren added the comment: It looks like this is related to code signing and entitlements, in particular: * On my system Terminal.app is in the "Automation" list in the Security & Privacy control panel, and none of the installed Python Launchers are * The script let below works (assuming PyObjC is installed): ``` import ScriptingBridge command = """cd '' && '/Library/Frameworks/Python.framework/Versions/3.10/bin/python3' '/Users/ronald/issuequery.py' && echo Exit status: $? && exit 1""" app = ScriptingBridge.SBApplication.applicationWithBundleIdentifier_("com.apple.Terminal") app.activate() res = app.doScript_in_(command, None) print(res) ``` * Python Launcher does not work when launched normally * Python Launcher *does* work when I run "/Applcations/Python 3.X/Python Launcher/Contents/MacOS/Python Launcher" in Terminal.app and try to open a python file using Python Launcher - I've tried this with 3 variants of Python Launcher: 3.9.7 from python.org installer, no modifications; 3.10.1 from python.org installer, stripped signature and resigned ad-hoc; 3.11 installed from source with ScriptingBridge. As mentioned before I've experimented with ScriptingBridge in Python Launcher, replacing "doscript.m" by the code below: ``` #import #import #import "doscript.h" extern int doscript(const char *command) { NSObject* terminalApp = [SBApplication applicationWithBundleIdentifier:@"com.apple.Terminal"]; //[terminalApp activate]; NSObject* res = [terminalApp doScript:[NSString stringWithUTF8String:command] in:nil]; NSRunAlertPanel(@"script result", @"%@", @"ok",nil, nil, res); return 0; } ``` That's equivalent to the python code I posted earlier. This is not production quality code, it compiles with a warning about "doScript:in:" that can be avoided by a different way of using ScriptingBridge. That's irrelevant for this experiment though. When I test the call to "doScript:in:" *fails* (returns nil) when launching the app regularly, and *succeeds* when running as a terminal command (as mentioned earlier). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 08:26:15 2021 From: report at bugs.python.org (Xinhang Xu) Date: Sun, 12 Dec 2021 13:26:15 +0000 Subject: [issue46055] Speed up binary shifting operators In-Reply-To: <1639287218.01.0.821172330488.issue46055@roundup.psfhosted.org> Message-ID: <1639315575.14.0.849779545786.issue46055@roundup.psfhosted.org> Xinhang Xu added the comment: I post a comment to the PR showing its performance improvement. I paste it below. I think the result not bad. ------------- I use timeit to measure time costs and any other operators or calls are excluded. For each testcase, the former is dcd2796 and the latter is this PR's base 036bbb1. 64-bit Release building. Run in Windows 10 1709 (64-bit) python -m timeit " i = 1; i <<= 3; i >>= 3" # small value (cost down by 36%) 5000000 loops, best of 5: 92.7 nsec per loop 2000000 loops, best of 5: 145 nsec per loop python -m timeit " i = 1; i <<= 10; i >>= 10" # medium value (-25%) 2000000 loops, best of 5: 114 nsec per loop 2000000 loops, best of 5: 151 nsec per loop python -m timeit " i = 1; i <<= 100; i >>= 100" # big value (-12%) 1000000 loops, best of 5: 209 nsec per loop 1000000 loops, best of 5: 238 nsec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 08:30:56 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 12 Dec 2021 13:30:56 +0000 Subject: [issue46056] Cannot use virtual environment on Windows 10 in corporate security settings In-Reply-To: <1639313116.18.0.364057363878.issue46056@roundup.psfhosted.org> Message-ID: <1639315856.29.0.027989259377.issue46056@roundup.psfhosted.org> Change by Eric V. Smith : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware title: Cannot use virtual environment on Windows 10 in cooperate security settings -> Cannot use virtual environment on Windows 10 in corporate security settings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 08:38:24 2021 From: report at bugs.python.org (AnLong) Date: Sun, 12 Dec 2021 13:38:24 +0000 Subject: [issue16594] SocketServer should set SO_REUSEPORT along with SO_REUSEADDR when present In-Reply-To: <1354439249.45.0.0324812571604.issue16594@psf.upfronthosting.co.za> Message-ID: <1639316304.46.0.837388247653.issue16594@roundup.psfhosted.org> Change by AnLong : ---------- keywords: +patch nosy: +asaka nosy_count: 2.0 -> 3.0 pull_requests: +28292 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30072 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 08:57:13 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 12 Dec 2021 13:57:13 +0000 Subject: [issue40477] Python Launcher app on macOS 10.15+ fails to run scripts In-Reply-To: <1588435279.1.0.0339863635356.issue40477@roundup.psfhosted.org> Message-ID: <1639317433.83.0.876750778397.issue40477@roundup.psfhosted.org> Ronald Oussoren added the comment: Pfff.... Apple's documentation is too incomplete. In recent versions the apple events entitlement only works when the program also has an NSAppleEventsUsageDescription key in Info.plist with a string value that describes why it needs the entitlement, this information is shown to the user on first launch. When I add this key to info.plist and resign the launcher works. I forgot to create a screenshot of this and cannot recreate the system dialog that gets shown, probably documentement somewhere that I haven't found yet... For now I used: NSAppleEventsUsageDescription Python Launcher needs this to run scripts in a Terminal window This requires no code changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 09:51:26 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 14:51:26 +0000 Subject: [issue1525919] email package content-transfer-encoding behaviour changed Message-ID: <1639320686.28.0.356834303238.issue1525919@roundup.psfhosted.org> Irit Katriel added the comment: The encoding functions are now doing orig = msg.get_payload(decode=True) Does this fix the double-encoding issue? This change was made in https://github.com/python/cpython/commit/00ae435deef434f471e39bea3f3ab3a3e3cd90fe ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 09:53:18 2021 From: report at bugs.python.org (=?utf-8?b?TMOhc3psw7MgQXR0aWxhIFTDs3Ro?=) Date: Sun, 12 Dec 2021 14:53:18 +0000 Subject: [issue46057] argparse: embedded groups may prevent options from being in help output Message-ID: <1639320798.63.0.0421812802369.issue46057@roundup.psfhosted.org> New submission from L?szl? Attila T?th : I tried to use the following code where the --db-password is not shown in the --help output (Originally I wanted to use mutually exclusive groups but that feature also works strangely, so I changed them to regular groups). def register_db_args(parser: argparse.ArgumentParser): grp = parser.add_argument_group('Database settings') grp.add_argument('--db-config', dest='db_config_file', help='Config file containg all details including password') grp.add_argument('--db-host') grp.add_argument('--db-port') grp.add_argument('--db-user') xgrp = grp.add_argument_group() xgrp.add_argument('--db-password') xgrp.add_argument('--db-password-env') xgrp.add_argument('--db-password-file') ---------- components: Library (Lib) messages: 408388 nosy: Laszlo.Attila.Toth priority: normal severity: normal status: open title: argparse: embedded groups may prevent options from being in help output type: behavior versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 09:57:46 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 14:57:46 +0000 Subject: [issue46057] argparse: embedded groups may prevent options from being in help output In-Reply-To: <1639320798.63.0.0421812802369.issue46057@roundup.psfhosted.org> Message-ID: <1639321066.76.0.931991332581.issue46057@roundup.psfhosted.org> Irit Katriel added the comment: Please complete the bug report: How did you run this function, what output did you get and what output did you expect? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 10:21:38 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 15:21:38 +0000 Subject: [issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures In-Reply-To: <1390491231.67.0.503348563079.issue20369@psf.upfronthosting.co.za> Message-ID: <1639322498.96.0.93057923177.issue20369@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- components: +Library (Lib) nosy: +iritkatriel type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 10:24:35 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 15:24:35 +0000 Subject: [issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures In-Reply-To: <1390491231.67.0.503348563079.issue20369@psf.upfronthosting.co.za> Message-ID: <1639322675.43.0.69834286535.issue20369@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 10:31:40 2021 From: report at bugs.python.org (E. Paine) Date: Sun, 12 Dec 2021 15:31:40 +0000 Subject: [issue46052] Ctrl+C, C+V in IDLE on Windows do not work with Cyrillic keys In-Reply-To: <1639260736.08.0.703954085889.issue46052@roundup.psfhosted.org> Message-ID: <1639323100.95.0.282775534802.issue46052@roundup.psfhosted.org> E. Paine added the comment: I have reproduced the behaviour described in Wish (from the Tk head). Having tried other applications, I can also confirm that it is normal for inputs to be treated in this manner (e.g. using Ctrl-C on my Latin keyboard with the input device set to Russian copies to the clipboard). I'll take it up with the Tk team. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 10:44:37 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 15:44:37 +0000 Subject: [issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP In-Reply-To: <1635372832.22.0.99301821488.issue45636@roundup.psfhosted.org> Message-ID: <1639323877.52.0.119914256761.issue45636@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +iritkatriel nosy_count: 3.0 -> 4.0 pull_requests: +28293 pull_request: https://github.com/python/cpython/pull/30073 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 10:46:30 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 15:46:30 +0000 Subject: [issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP In-Reply-To: <1635372832.22.0.99301821488.issue45636@roundup.psfhosted.org> Message-ID: <1639323990.37.0.455802146502.issue45636@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: -28293 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 10:47:51 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 15:47:51 +0000 Subject: [issue45635] Tidy up error handling in traceback.c / python run.c In-Reply-To: <1635370026.46.0.0220648873339.issue45635@roundup.psfhosted.org> Message-ID: <1639324071.18.0.399587323094.issue45635@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +28295 pull_request: https://github.com/python/cpython/pull/30073 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 10:47:51 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 15:47:51 +0000 Subject: [issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP In-Reply-To: <1635372832.22.0.99301821488.issue45636@roundup.psfhosted.org> Message-ID: <1639324071.09.0.899433829529.issue45636@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +28294 pull_request: https://github.com/python/cpython/pull/30073 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 10:58:33 2021 From: report at bugs.python.org (E. Paine) Date: Sun, 12 Dec 2021 15:58:33 +0000 Subject: [issue46052] Ctrl+C, C+V in IDLE on Windows do not work with Cyrillic keys In-Reply-To: <1639260736.08.0.703954085889.issue46052@roundup.psfhosted.org> Message-ID: <1639324713.23.0.555167654592.issue46052@roundup.psfhosted.org> E. Paine added the comment: Actually, doing a bit more research, issue31244 came up (and more specifically msg300716). It was concluded there that the issue should not be fixed, though there was some C/C++ code reported in the last message that the OP claims could potentially solve the issue if added to either Tk or Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 10:59:58 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 Dec 2021 15:59:58 +0000 Subject: [issue46054] Incorrect error when parsing non-utf8 files In-Reply-To: <1639286987.92.0.127175285023.issue46054@roundup.psfhosted.org> Message-ID: <1639324798.16.0.207817267453.issue46054@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +28296 pull_request: https://github.com/python/cpython/pull/30074 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 11:08:57 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 16:08:57 +0000 Subject: [issue1599254] mailbox: other programs' messages can vanish without trace Message-ID: <1639325337.62.0.113449499023.issue1599254@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11 - the test in mailbox-test.patch fails. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 11:25:28 2021 From: report at bugs.python.org (=?utf-8?b?TMOhc3psw7MgQXR0aWxhIFTDs3Ro?=) Date: Sun, 12 Dec 2021 16:25:28 +0000 Subject: [issue46057] argparse: embedded groups may prevent options from being in help output In-Reply-To: <1639320798.63.0.0421812802369.issue46057@roundup.psfhosted.org> Message-ID: <1639326328.45.0.24411109797.issue46057@roundup.psfhosted.org> L?szl? Attila T?th added the comment: Sorry, these are two bugs in fact. The current one, the help with minmal code: import argparse parser = argparse.ArgumentParser() grp = parser.add_argument_group('Database settings') grp.add_argument('--db-config') xgrp = grp.add_argument_group() xgrp.add_argument('--db-password') parser.parse_args(['-h']) The group's help output shows only --db-config option: Database settings: --db-config DB_CONFIG If I change the xgrp to be mutually exclusive group as: xgrp = grp.add_mutually_exclusive_group() then the output is the same as I expect for the previous code, too: Database settings: --db-config DB_CONFIG --db-password DB_PASSWORD ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 11:27:18 2021 From: report at bugs.python.org (E. Paine) Date: Sun, 12 Dec 2021 16:27:18 +0000 Subject: [issue46052] Ctrl+C, C+V in IDLE on Windows do not work with Cyrillic keys In-Reply-To: <1639260736.08.0.703954085889.issue46052@roundup.psfhosted.org> Message-ID: <1639326438.42.0.0265571398779.issue46052@roundup.psfhosted.org> E. Paine added the comment: Sorry for the spam... OK, making the corresponding ctypes calls to the commands reported in issue31244 succeeds in the Python REPL, but the Tk text's behaviour doesn't change. In IDLE, the ctypes calls fail. ctypes.windll.Kernel32.SetConsoleCP(1251) ctypes.windll.Kernel32.SetConsoleOutputCP(1251) locale.setlocale(locale.LC_ALL, 'Russian') Hence, I don't think this a viable option. And it would not be viable for either this project, nor Tk, to write our own codepages, so I'm not sure whether it is worth raising it with the Tk team. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 11:29:30 2021 From: report at bugs.python.org (=?utf-8?b?TMOhc3psw7MgQXR0aWxhIFTDs3Ro?=) Date: Sun, 12 Dec 2021 16:29:30 +0000 Subject: [issue46057] argparse: embedded groups may prevent options from being in help output In-Reply-To: <1639320798.63.0.0421812802369.issue46057@roundup.psfhosted.org> Message-ID: <1639326570.6.0.215317166484.issue46057@roundup.psfhosted.org> L?szl? Attila T?th added the comment: And the leading part is the same for both the mutually exclusive and the argument groups: usage: test1.py [-h] [--db-config DB_CONFIG] [--db-password DB_PASSWORD] optional arguments: -h, --help show this help message and exit Database settings: .... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 11:35:16 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 16:35:16 +0000 Subject: [issue27258] Exception in BytesGenerator.flatten In-Reply-To: <1465329163.65.0.664069941673.issue27258@psf.upfronthosting.co.za> Message-ID: <1639326916.83.0.158826944322.issue27258@roundup.psfhosted.org> Irit Katriel added the comment: I am also unable to reproduce the issue on 3.11 with the attached script and input. Please create a new issue if this problem still exists in a current python version (>= 3.9). ---------- nosy: +iritkatriel resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 11:52:53 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 Dec 2021 16:52:53 +0000 Subject: [issue46054] Incorrect error when parsing non-utf8 files In-Reply-To: <1639286987.92.0.127175285023.issue46054@roundup.psfhosted.org> Message-ID: <1639327973.06.0.586882222486.issue46054@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 94483f1e3cec182fabe19268e579f63045bc984a by Miss Islington (bot) in branch '3.10': bpo-46054: Fix parsing error when parsing non-utf8 characters in source files (GH-30068) (GH-30069) https://github.com/python/cpython/commit/94483f1e3cec182fabe19268e579f63045bc984a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 11:53:04 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 Dec 2021 16:53:04 +0000 Subject: [issue46054] Incorrect error when parsing non-utf8 files In-Reply-To: <1639286987.92.0.127175285023.issue46054@roundup.psfhosted.org> Message-ID: <1639327984.87.0.466732080044.issue46054@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset c6d1c52c166968fb722ae26d44aa2c1c030dc613 by Pablo Galindo Salgado in branch 'main': bpo-46054: Correct non-utf8 character tests in test_exceptions (GH-30074) https://github.com/python/cpython/commit/c6d1c52c166968fb722ae26d44aa2c1c030dc613 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 11:55:04 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 12 Dec 2021 16:55:04 +0000 Subject: [issue46052] Ctrl+C, C+V in tk.Text on Windows do not work with Cyrillic keys In-Reply-To: <1639260736.08.0.703954085889.issue46052@roundup.psfhosted.org> Message-ID: <1639328104.36.0.927531159837.issue46052@roundup.psfhosted.org> Terry J. Reedy added the comment: It appears that your particular keyboard program is translating Ctrl + letter key combinations to something other than the default Ascii Control-letter code. Do you see the same problem with Notepad? To test what tcl/tk and hence tkinter see, expand the test code to import tkinter as tk r = tk.Tk() t = tk.Text(r) t.pack() def keyevent(e): if c := e.char: print(f'char: {c}, ord: {ord(c)}, ', end='') print(f'code: {e.keycode}, sym: {e.keysym}, num: {e.keysym_num}.') t.bind('', keyevent) If I type c and ctrl + c in the tk box, I see the following in either the IDLE Shell or Command Prompt. char: c, ord: 99, code: 67, sym: c, num: 99. code: 17, sym: Control_L, num: 65507. char: , ord: 3, code: 67, sym: c, num: 99. I expect the third line will be different for you when you switch to Russian. Your immediate fix is to use either the IDLE Edit menu or the right-click context menu to access copy and paste functions. A longer term fix might be to get a different Russian keyboard program. Assuming that I am correct above, I will make this an IDLE doc issue to add something about non-ascii keyboard issues, and include the test program above. ---------- title: Ctrl+C, C+V in IDLE on Windows do not work with Cyrillic keys -> Ctrl+C, C+V in tk.Text on Windows do not work with Cyrillic keys _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 12:06:10 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 17:06:10 +0000 Subject: [issue37602] nonzero fixer problem In-Reply-To: <1563255027.06.0.811777029402.issue37602@roundup.psfhosted.org> Message-ID: <1639328770.96.0.213068059863.issue37602@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +iritkatriel nosy_count: 5.0 -> 6.0 pull_requests: +28297 status: pending -> open pull_request: https://github.com/python/cpython/pull/30075 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 12:19:22 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 17:19:22 +0000 Subject: [issue25299] argparse: TypeError: __init__() takes at least 4 arguments (4 given) In-Reply-To: <1443785146.27.0.85852377889.issue25299@psf.upfronthosting.co.za> Message-ID: <1639329562.09.0.5920930519.issue25299@roundup.psfhosted.org> Irit Katriel added the comment: This is working on 3.11: >>> from argparse import ArgumentParser >>> parser = ArgumentParser() >>> parser.add_argument("--foo", help="foo", action='store_const') _StoreConstAction(option_strings=['--foo'], dest='foo', nargs=0, const=None, default=None, type=None, choices=None, help='foo', metavar=None) >>> parser.print_usage() usage: [-h] [--foo] >>> So I agree this issue can be closed. ---------- nosy: +iritkatriel resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 12:26:36 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 17:26:36 +0000 Subject: [issue39306] Lib/configparser.py - RawConfigParser.set does not pass non-truthy values through to Interpolation.before_set In-Reply-To: <1578771708.17.0.449482349848.issue39306@roundup.psfhosted.org> Message-ID: <1639329996.43.0.319405619297.issue39306@roundup.psfhosted.org> Irit Katriel added the comment: Hans, as mentioned on the PR, the merit of this change needs to be discussed. If you would like to pursue this, please begin by explaining the use case. If you lost interest in this problem, let's close this issue. ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 12:47:07 2021 From: report at bugs.python.org (quapka) Date: Sun, 12 Dec 2021 17:47:07 +0000 Subject: [issue46051] Make @atexit.register work for functions with arguments In-Reply-To: <1639243621.71.0.144294694671.issue46051@roundup.psfhosted.org> Message-ID: <1639331227.68.0.985372178253.issue46051@roundup.psfhosted.org> quapka added the comment: I'm adding the tests I've written for this issue. First, the tests that do pass already: https://github.com/quapka/cpython/commit/913055932be4be1c61ac8383615045f8bceee4e8 Secondly, the ones that I'd expect to pass as well, but fail atm: https://github.com/quapka/cpython/commit/916968fcebe0266baebce7209ef6db25c091b604 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 13:50:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 18:50:45 +0000 Subject: [issue12165] [doc] clarify documentation of nonlocal In-Reply-To: <1306216657.18.0.255448168009.issue12165@psf.upfronthosting.co.za> Message-ID: <1639335045.14.0.320801936012.issue12165@roundup.psfhosted.org> Irit Katriel added the comment: The doc has been updated by now and mentions "excluding globals". I'm changing the title to reflect Terry's last comment. One comment on his suggestion: I would remove/change "the nonlocal statement is similar to the global statement" because it's not obvious in what way it is similar just from the sentence, I think this is more confusing then helpful. ---------- keywords: +easy -patch nosy: +iritkatriel title: Nonlocal does not include global; clarify doc -> [doc] clarify documentation of nonlocal versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 13:58:58 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 18:58:58 +0000 Subject: [issue20907] behavioral differences between shutil.unpack_archive and ZipFile.extractall In-Reply-To: <1394703965.34.0.603199781912.issue20907@psf.upfronthosting.co.za> Message-ID: <1639335538.8.0.0570434980775.issue20907@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.11 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 13:59:47 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 18:59:47 +0000 Subject: [issue20741] Documentation archives should be available also in tar.xz format In-Reply-To: <1393142720.31.0.255845110134.issue20741@psf.upfronthosting.co.za> Message-ID: <1639335587.47.0.968868450474.issue20741@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 14:00:24 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 19:00:24 +0000 Subject: [issue20741] Documentation archives should be available also in tar.xz format In-Reply-To: <1393142720.31.0.255845110134.issue20741@psf.upfronthosting.co.za> Message-ID: <1639335624.93.0.811146465285.issue20741@roundup.psfhosted.org> Change by Irit Katriel : ---------- status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 14:01:00 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 19:01:00 +0000 Subject: [issue16247] Report failing url in URLError? In-Reply-To: <1350390680.77.0.132205585956.issue16247@psf.upfronthosting.co.za> Message-ID: <1639335660.42.0.603268419117.issue16247@roundup.psfhosted.org> Change by Irit Katriel : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 14:01:14 2021 From: report at bugs.python.org (=?utf-8?b?TMOhc3psw7MgQXR0aWxhIFTDs3Ro?=) Date: Sun, 12 Dec 2021 19:01:14 +0000 Subject: [issue46058] argparse: arg groups and mutually exclusive groups behave inconsitently Message-ID: <1639335674.28.0.221723621867.issue46058@roundup.psfhosted.org> New submission from L?szl? Attila T?th : I tried to add arguments to process DB-related settings, either from typing import Optional from a file or explicitly specifying them. In theory with nested groups (by add_argument_group and add_mutually_exlusive_group) this can be implemented in almost straightforward way: # test.py import argparse parser = argparse.ArgumentParser() dbsettings = parser.add_argument_group('Database settings') xdbgrp = dbsettings.add_mutually_exclusive_group(required=True) xdbgrp.add_argument('--db-config') grp = xdbgrp.add_argument_group(required=True) grp.add_argument('--db-host') grp.add_argument('--db-user') xgrp = grp.add_mutually_exclusive_group() xgrp.add_argument('--db-password') xgrp.add_argument('--db-password-file') parser.parse_args() But there are issues: 1) the add_mutually_exclusive_group has only one optional parameter, required=False by default, so I cannot provide a title, I have to create yet another group (xdbgrp in the example) 2) I would expect the parser do the complete argument parsing and validation, so I don't need to implement certain steps. In this example I expect to have a --db-host arg if the --db-config is not specified. But if I add ``required=True``, the argparse module expects that with --db-config the --db-host is also specified. In other words the xdbgrp mutually exclusive group fails to be mutually exclusive. 3) While xgrp behaves correctly, I cannot specify both --db-password and --db-password-file, I still can specify them with --db-config (see #2) 4) If I run it as: python3 test.py --db-host x the command fails: usage: test.py [-h] --db-config DB_CONFIG --db-host DB_HOST [--db-user DB_USER] [--db-password DB_PASSWORD | --db-password-file DB_PASSWORD_FILE] test.py: error: one of the arguments --db-config is required So both --db-config and --db-host are required, the embedded group, grp fails to work, or prehaps again the xdbgrp fails (depends on the view) 5) Removing all required=True options the following is accepted: python3 test.py --db-host x --db-config y so the xdbgrp mutually exclusive group again doesn't work. 6) Only xdbgrp is required, --db-host is not: python3 test.py --db-host x usage: test.py [-h] --db-config DB_CONFIG [--db-host DB_HOST] [--db-user DB_USER] [--db-password DB_PASSWORD | --db-password-file DB_PASSWORD_FILE] test.py: error: one of the arguments --db-config is required Again, the group embedded into a mutually exclusive group is not handled correctly What is expected: 1) add_mutually_exclusive_group can have title/description, but unfortunately it is not backward compatible 2) If I add a mutally exclusive group, it has XOR relation between its arguments and argument groups. 3) An argument group is handled as a single entity similar to an argument. Basically this is the same as #2. 4) A required argument affects only its argument group and the parent group and so on till the parser, but this chain stops at a mutually exclusive group, based on #2 and #3 . ---------- components: Library (Lib) messages: 408405 nosy: Laszlo.Attila.Toth priority: normal severity: normal status: open title: argparse: arg groups and mutually exclusive groups behave inconsitently type: behavior versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 14:03:33 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 19:03:33 +0000 Subject: [issue17763] test_pydoc fails with the installed testsuite In-Reply-To: <1366125816.55.0.847870350484.issue17763@psf.upfronthosting.co.za> Message-ID: <1639335813.52.0.89597123595.issue17763@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> third party stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 14:05:24 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 19:05:24 +0000 Subject: [issue34135] The results of time.tzname print broken. In-Reply-To: <1531803123.68.0.56676864532.issue34135@psf.upfronthosting.co.za> Message-ID: <1639335924.91.0.623560503886.issue34135@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 14:07:28 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 19:07:28 +0000 Subject: [issue17120] Mishandled _POSIX_C_SOURCE and _XOPEN_SOURCE in pyconfig.h In-Reply-To: <1359956347.87.0.611737971795.issue17120@psf.upfronthosting.co.za> Message-ID: <1639336048.32.0.18753961627.issue17120@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 14:10:33 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 19:10:33 +0000 Subject: [issue6642] returning after forking a child thread doesn't call Py_Finalize In-Reply-To: <1249410110.52.0.861898541816.issue6642@psf.upfronthosting.co.za> Message-ID: <1639336233.82.0.143936352502.issue6642@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 14:21:22 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 19:21:22 +0000 Subject: [issue28884] Python 3.5.2 non-segfaulting bugs (from PyPy) In-Reply-To: <1481025303.32.0.218031723176.issue28884@psf.upfronthosting.co.za> Message-ID: <1639336882.6.0.0503508039659.issue28884@roundup.psfhosted.org> Irit Katriel added the comment: B7 passes on 3.11. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 14:33:23 2021 From: report at bugs.python.org (=?utf-8?b?TMOhc3psw7MgQXR0aWxhIFTDs3Ro?=) Date: Sun, 12 Dec 2021 19:33:23 +0000 Subject: [issue46058] argparse: arg groups and mutually exclusive groups behave inconsitently In-Reply-To: <1639335674.28.0.221723621867.issue46058@roundup.psfhosted.org> Message-ID: <1639337603.36.0.0775135102148.issue46058@roundup.psfhosted.org> L?szl? Attila T?th added the comment: Checking the code the add_mutually_exclusive_group has only kwargs, so one part can be fixed (POC, breaks tests): --- Lib/argparse.py +++ Lib/argparse.py @@ -1648,8 +1648,8 @@ def _remove_action(self, action): class _MutuallyExclusiveGroup(_ArgumentGroup): - def __init__(self, container, required=False): - super(_MutuallyExclusiveGroup, self).__init__(container) + def __init__(self, container, required=False, title=None, description=None): + super(_MutuallyExclusiveGroup, self).__init__(container, title, description) self.required = required self._container = container @@ -2529,6 +2529,14 @@ def format_help(self): formatter.add_arguments(action_group._group_actions) formatter.end_section() + for mutual_group in self._mutually_exclusive_groups: + if not mutual_group.title: + continue + formatter.start_section(mutual_group.title) + formatter.add_text(mutual_group.description) + formatter.add_arguments(mutual_group._group_actions) + formatter.end_section() + # epilog formatter.add_text(self.epilog) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 14:36:12 2021 From: report at bugs.python.org (Alex Waygood) Date: Sun, 12 Dec 2021 19:36:12 +0000 Subject: [issue45840] Improve cross-references in the data model documentation In-Reply-To: <1637287286.96.0.846227383123.issue45840@roundup.psfhosted.org> Message-ID: <1639337772.19.0.381840135621.issue45840@roundup.psfhosted.org> Change by Alex Waygood : ---------- pull_requests: +28298 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/30077 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 14:38:32 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 19:38:32 +0000 Subject: [issue46058] argparse: arg groups and mutually exclusive groups behave inconsitently In-Reply-To: <1639335674.28.0.221723621867.issue46058@roundup.psfhosted.org> Message-ID: <1639337912.71.0.917241016275.issue46058@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 14:44:27 2021 From: report at bugs.python.org (Alex Waygood) Date: Sun, 12 Dec 2021 19:44:27 +0000 Subject: [issue45729] [doc] "history and license" link has wrong target In-Reply-To: <1636128373.81.0.436284013167.issue45729@roundup.psfhosted.org> Message-ID: <1639338267.52.0.251650762608.issue45729@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: -AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 14:45:16 2021 From: report at bugs.python.org (Alex Waygood) Date: Sun, 12 Dec 2021 19:45:16 +0000 Subject: [issue45985] AttributeError from @property inadvertantly flows into __getattr__ In-Reply-To: <1638702146.56.0.573091484317.issue45985@roundup.psfhosted.org> Message-ID: <1639338316.38.0.0627922900504.issue45985@roundup.psfhosted.org> Change by Alex Waygood : ---------- versions: -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 14:52:30 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 19:52:30 +0000 Subject: [issue39071] [doc] email.parser.BytesParser - parse and parsebytes work not equivalent In-Reply-To: <1576571549.52.0.292971717442.issue39071@roundup.psfhosted.org> Message-ID: <1639338750.43.0.515314925531.issue39071@roundup.psfhosted.org> Irit Katriel added the comment: The relevant section in the docs is https://docs.python.org/3/library/email.parser.html#email.parser.Parser It currently doesn't advise against using the text parser in any way. At the top of the page, the second paragraph says: "You can pass the parser a bytes, string or file object, and the parser will return to you the root EmailMessage instance of the object structure." ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, iritkatriel title: email.parser.BytesParser - parse and parsebytes work not equivalent -> [doc] email.parser.BytesParser - parse and parsebytes work not equivalent versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 15:01:54 2021 From: report at bugs.python.org (=?utf-8?b?TMOhc3psw7MgQXR0aWxhIFTDs3Ro?=) Date: Sun, 12 Dec 2021 20:01:54 +0000 Subject: [issue46057] argparse: embedded groups may prevent options from being in help output In-Reply-To: <1639320798.63.0.0421812802369.issue46057@roundup.psfhosted.org> Message-ID: <1639339314.32.0.964368879522.issue46057@roundup.psfhosted.org> L?szl? Attila T?th added the comment: The fix is something like this for _ArgumentGroup, but as the container may not be an _ArgumentGroup, it breaks the tests. --- Lib/argparse.py +++ Lib/argparse.py @@ -1635,9 +1640,13 @@ def __init__(self, container, title=None, description=None, **kwargs): self._has_negative_number_optionals = \ container._has_negative_number_optionals self._mutually_exclusive_groups = container._mutually_exclusive_groups + self._container = container def _add_action(self, action): - action = super(_ArgumentGroup, self)._add_action(action) + if self.title: + action = super(_ArgumentGroup, self)._add_action(action) + else: + action = self._container._add_action(action) self._group_actions.append(action) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 17:16:59 2021 From: report at bugs.python.org (Jan Kaliszewski) Date: Sun, 12 Dec 2021 22:16:59 +0000 Subject: [issue20751] Harmonize descriptor protocol documentation: direct call, super binding with Descriptor Howto docs In-Reply-To: <1393193636.36.0.125202538555.issue20751@psf.upfronthosting.co.za> Message-ID: <1639347419.17.0.880032978879.issue20751@roundup.psfhosted.org> Jan Kaliszewski added the comment: Sure. But don't you think there should be ``.__get__(a, type(a))`` rather than ``.__get__(a, A)``? Then the whole statement would be true regardless of whether A is the actual type of a, or only a superclass of the type of a. That would also be more consistent with the second point of the description, i.e., the one about *Instance Binding* (where we have ``type(a).__dict__['x'].__get__(a, type(a))``). Also, I believe that ``type(a).__mro__`` would be more consistent (than ``a.__class__.mro``) with that point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 18:07:35 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 23:07:35 +0000 Subject: [issue46057] argparse: embedded groups may prevent options from being in help output In-Reply-To: <1639320798.63.0.0421812802369.issue46057@roundup.psfhosted.org> Message-ID: <1639350455.75.0.0661671820779.issue46057@roundup.psfhosted.org> Irit Katriel added the comment: According to the docs it should be >>> xgrp = parser.add_argument_group() rather than >>> xgrp = grp.add_argument_group() This seems to work: >>> parser = argparse.ArgumentParser() >>> grp = parser.add_argument_group('Database settings') >>> grp.add_argument('--db-config') _StoreAction(option_strings=['--db-config'], dest='db_config', nargs=None, const=None, default=None, type=None, choices=None, help=None, metavar=None) >>> xgrp = parser.add_argument_group() >>> xgrp.add_argument('--db-password') _StoreAction(option_strings=['--db-password'], dest='db_password', nargs=None, const=None, default=None, type=None, choices=None, help=None, metavar=None) >>> parser.parse_args(['-h']) usage: [-h] [--db-config DB_CONFIG] [--db-password DB_PASSWORD] options: -h, --help show this help message and exit Database settings: --db-config DB_CONFIG --db-password DB_PASSWORD ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 18:28:33 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 12 Dec 2021 23:28:33 +0000 Subject: [issue22047] argparse improperly prints mutually exclusive options when they are in a group In-Reply-To: <1406131424.14.0.0235697032218.issue22047@psf.upfronthosting.co.za> Message-ID: <1639351713.54.0.771581011428.issue22047@roundup.psfhosted.org> Irit Katriel added the comment: While I was unable to reproduce this rendering error, there are other issues due to nesting of argument groups, and I wonder if we should deprecate those operations, along the lines of Paul's patch on this issue (but with deprecation rather than raising an exception). Other related issues: issue46057 (from today), issue16807, issue45690, issue43259, (there are probably more). ---------- nosy: +rhettinger, serhiy.storchaka status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 18:52:33 2021 From: report at bugs.python.org (John Belmonte) Date: Sun, 12 Dec 2021 23:52:33 +0000 Subject: [issue45995] string formatting: normalize negative zero In-Reply-To: <1638792226.95.0.292604366656.issue45995@roundup.psfhosted.org> Message-ID: <1639353153.33.0.902838834028.issue45995@roundup.psfhosted.org> John Belmonte added the comment: potential short-term solution for Decimal: if negative zero option is set and sign is negative: pre-round into a temp using mpd_qrescale() if mpd_iszero(temp): change sign to positive ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 19:10:38 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 13 Dec 2021 00:10:38 +0000 Subject: [issue46052] Ctrl+C, C+V in tk.Text on Windows do not work with Cyrillic keys In-Reply-To: <1639260736.08.0.703954085889.issue46052@roundup.psfhosted.org> Message-ID: <1639354238.76.0.203561716712.issue46052@roundup.psfhosted.org> Terry J. Reedy added the comment: This is a duplicate of #31244, but I continue here with more experiments using the code above. I first confirmed that on Windows, CapsLock is really 'caps inversion. Keycode 67 is the keycode for 'C' given in https://www.tcl.tk/man/tcl/TkCmd/keysyms.html (Ascii keyboards have the capitals on keycaps), but the chars 'c' and 'C', without and with shift, are 4 different events. char: c, ord: 99, code: 67, sym: c, num: 99. code: 16, sym: Shift_L, num: 65505. char: C, ord: 67, code: 67, sym: C, num: 67. code: 20, sym: Caps_Lock, num: 65509. char: C, ord: 67, code: 67, sym: C, num: 67. code: 16, sym: Shift_L, num: 65505. char: c, ord: 99, code: 67, sym: c, num: 99. Next, the same keypresses with Ctrl added. At least on Windows, Ctrl+c, Shift+Ctrl+c, Ctrl+C, and Shift+Ctrl+C are different events that have the same Ascii code but are differentiated by the key sym that would have been generated without the control modifier and the state of the Shift key. (Note, for instance, that on the file menu, the addition of 'Shift' modifies 'Save' to 'Save as'). code: 17, sym: Control_L, num: 65507. char: , ord: 3, code: 67, sym: c, num: 99. code: 17, sym: Control_L, num: 65507. code: 16, sym: Shift_L, num: 65505. char: , ord: 3, code: 67, sym: C, num: 67. code: 20, sym: Caps_Lock, num: 65509. code: 17, sym: Control_L, num: 65507. char: , ord: 3, code: 67, sym: C, num: 67. code: 17, sym: Control_L, num: 65507. code: 16, sym: Shift_L, num: 65505. char: , ord: 3, code: 67, sym: c, num: 99. I loaded the Win 10 Russian package. Repeating the no-ctrl block, we get the Cyrillic ? and ?. The keysym field is '??' instead of the char because non-ascii letters are not valid as keysyms. The keysym_num field is correct as if the keysym were the non-ascii letter. char: ?, ord: 1089, code: 67, sym: ??, num: 1089. code: 16, sym: Shift_L, num: 65505. char: ?, ord: 1057, code: 67, sym: ??, num: 1057. code: 20, sym: Caps_Lock, num: 65509. char: ?, ord: 1057, code: 67, sym: ??, num: 1057. code: 16, sym: Shift_L, num: 65505. char: ?, ord: 1089, code: 67, sym: ??, num: 1089. With Ctrl added, the generated character is still ascii 3, control-C and the keycode is still 67. But the keysym and keysym_num are changed and they no longer match neither ascii 'c' or 'C'. So the event matches neither the control-c or control-C events and the copy event is not invoked. code: 17, sym: Control_L, num: 65507. char: , ord: 3, code: 67, sym: ??, num: 1089. code: 17, sym: Control_L, num: 65507. code: 16, sym: Shift_L, num: 65505. char: , ord: 3, code: 67, sym: ??, num: 1057. code: 20, sym: Caps_Lock, num: 65509. code: 17, sym: Control_L, num: 65507. char: , ord: 3, code: 67, sym: ??, num: 1057. code: 17, sym: Control_L, num: 65507. code: 16, sym: Shift_L, num: 65505. char: , ord: 3, code: 67, sym: ??, num: 1089. The workaround considered in #31244 was to add key-x bindings specific to a particular Windows IME. But this does not work as key sequences only allow ascii alphanumerics as keysyms. (See https://www.tcl.tk/man/tcl8.6/TkCmd/bind.html, event details.) There are non-ascii letter descriptions, such as 'Cyrillic_es' listed in https://www.tcl.tk/man/tcl/TkCmd/keysyms.html, but I suspect that these only work for native keyboards, with the non-ascii chars on the keycaps, that generate the keycodes specific to each key as listed in that doc. Cyrillic_es has keycode 1747, not 67. When I tried binding '' there was no TclError, but a Russian es, '?' or '?', did not invoke the handler. Instead of expanding keybindings, we should consider collapsing events to undo the IME translation. '??' is not a valid keysym, so there seems to be no generic 'non-Ascii IME letter' event. But we could try replacing the keysym with the ascii char that would have been there if there were no IME. The problem is that modifying the python event will not change the tk event. Nor can it be used with event_generate. Rather it has to be turn back into 'sequence' string, taking into account the .state attribute. Automated testing would be done by calling the key event handler with a synthesized Event instance. EP: Since Key-X, where x is a non-ascii char, in not a legal sequence and cannot be bound to anything, it seems reasonable to ask that tk itself translate control key events into bindable control sequences. They might object that this would break any code that catches '??' events in generic key handlers to do something language specific. But perhaps they could add a non-default option. ---------- assignee: -> terry.reedy stage: -> test needed versions: +Python 3.11 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 19:46:36 2021 From: report at bugs.python.org (Vivek Vashist) Date: Mon, 13 Dec 2021 00:46:36 +0000 Subject: [issue46059] Typo in match Statement example Message-ID: <1639356396.07.0.913283855262.issue46059@roundup.psfhosted.org> New submission from Vivek Vashist : Possible Typo in match statement example. https://docs.python.org/3/tutorial/controlflow.html#match-statements BROKEN: > python Python 3.10.0b4 (default, Nov 15 2021, 18:26:05) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from enum import Enum >>> class Color(Enum): ... RED = 0 ... GREEN = 1 ... BLUE = 2 ... >>> match color: ... case Color.RED: ... print("I see red!") ... case Color.GREEN: ... print("Grass is green") ... case Color.BLUE: ... print("I'm feeling the blues :(") ... Traceback (most recent call last): File "", line 1, in NameError: name 'color' is not defined. Did you mean: 'Color'? WORKING: > python Python 3.10.0b4 (default, Nov 15 2021, 18:26:05) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> >>> >>> >>> from enum import Enum >>> class Color(Enum): ... RED = 0 ... GREEN = 1 ... BLUE = 2 ... >>> match Color: ... case Color.RED: ... print("I see red!") ... case Color.GREEN: ... print("Grass is green") ... case Color.BLUE: ... print("I'm feeling the blues :(") ---------- assignee: docs at python components: Documentation messages: 408415 nosy: docs at python, vivekvashist priority: normal severity: normal status: open title: Typo in match Statement example versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 20:20:32 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 13 Dec 2021 01:20:32 +0000 Subject: [issue31244] IDLE: work around shortcuts bug in Windows' IMEs and tk In-Reply-To: <1503317029.77.0.700563383458.issue31244@psf.upfronthosting.co.za> Message-ID: <1639358432.94.0.0470085507546.issue31244@roundup.psfhosted.org> Terry J. Reedy added the comment: What makes IDLE different from other desktop apps is that is it written in Python, uses the tkinter wrapping of cross-platform tcl/tk, and allows users to customize nearly all hotkey shortcuts. But tk only allows Ascii chars, with modifiers, for hotkeys. This issue would be much easier if IDLE had a fixed set of bindings, or even a fixed set for each major platform. Issue 46052 is a duplicate of this. In experiments reported there, using the Win10 Russian IME, I determined that the event.char for a Ctrl + letter-key combination is the corresponding Ascii control character, even when switched to Russian. The difference is that event.keysym is '??' instead of an ascii letter and event.keysym_num is the unicode ordinal of the russian letter instead of the ascii letter. So ('c', 99) becomes ('??', 1089). I propose on #46052 to solve these issues by undoing this change and generating the event that would have happened in ENG mode. ---------- resolution: -> duplicate stage: test needed -> resolved status: open -> closed superseder: -> Ctrl+C, C+V in tk.Text on Windows do not work with Cyrillic keys _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 20:28:55 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 13 Dec 2021 01:28:55 +0000 Subject: [issue46052] IDLE: make Ctrl, Alt + IME non-ascii letter work on Windows In-Reply-To: <1639260736.08.0.703954085889.issue46052@roundup.psfhosted.org> Message-ID: <1639358935.25.0.856303885983.issue46052@roundup.psfhosted.org> Terry J. Reedy added the comment: I closed #31244 as a duplicate of this. The modifier code for tkinter.Event.__repr__ can be used to construct the modifier part of the reconstructed event sequence. Just join with '-' instead of '|'. ---------- title: Ctrl+C, C+V in tk.Text on Windows do not work with Cyrillic keys -> IDLE: make Ctrl,Alt + IME non-ascii letter work on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 20:40:55 2021 From: report at bugs.python.org (Shantanu) Date: Mon, 13 Dec 2021 01:40:55 +0000 Subject: [issue40059] Provide a toml module in the standard library In-Reply-To: <1585119261.47.0.818238682424.issue40059@roundup.psfhosted.org> Message-ID: <1639359655.86.0.974988147879.issue40059@roundup.psfhosted.org> Shantanu added the comment: Given that this currently seems blocked on the broad question of "how should additions and removals to the stdlib be managed", I'd like to not focus too hard just yet on the specifics of tomli. I assume it's unlikely, but for all we know, the SC could determine that all newly included modules have to be written from scratch, following along the lines of recent additions like zoneinfo, graphlib and importlib.metadata. There's a lot we could bikeshed or debate... e.g., it's not even clear to me what a toml package in the stdlib would be named, never mind what it means for an unreleased version of a commonly used third party toml package dropping support for an imminently EOL version of Python. I'm possibly totally out of line, but in my head, the process would look something like this: Step 1: Hear back from the SC about criteria and considerations for new modules in the stdlib Step 2: Determine whether a TOML library *in the abstract* is something that would meet the outlined criteria (potentially e.g. is this something we even want? is this something we can maintain?) Step 3: Determine if we have an implementation (written from scratch, copied, or derived from something pre-existing) that would meet the outlined criteria Step 4: Do all the rest of the work to meet the outlined criteria (potentially e.g. go through PEP process, create proposed impl, write a backport, bikeshed api and name, etc) I guess I have the following questions: - Is my understanding correct that this issue is blocked on SC guidance? - Is there anything we could do in advance of SC guidance that would be productive? Brett previously mentioned bringing it up with the author of tomli, as per https://github.com/hukkin/tomli/issues/141 they seem supportive - Is there a good place to follow along or be notified of SC thoughts? I see no mention of stdlib changes in https://github.com/python/steering-council and the discuss thread linked above seems to have petered out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 21:07:40 2021 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 13 Dec 2021 02:07:40 +0000 Subject: [issue16247] Report failing url in URLError? In-Reply-To: <1639335660.44.0.340160161143.issue16247@roundup.psfhosted.org> Message-ID: Senthil Kumaran added the comment: It is going to take a few weeks for me to get to my alerts, I will address this as soon as I get to it . Thanks for the triage, Irit. On Mon, Dec 13, 2021, 12:31 AM Irit Katriel wrote: > > Change by Irit Katriel : > > > ---------- > status: open -> pending > > _______________________________________ > Python tracker > > _______________________________________ > ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 21:23:38 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 13 Dec 2021 02:23:38 +0000 Subject: [issue37584] Multiple test failures with OSError: [Errno 84] Invalid or incomplete multibyte or wide character on ZFS with utf8only=on In-Reply-To: <1563012837.05.0.658851590788.issue37584@roundup.psfhosted.org> Message-ID: <1639362218.75.0.370442139127.issue37584@roundup.psfhosted.org> Gregory P. Smith added the comment: Confirmed. Repro: Do an ubuntu 20.04 install and choose "experimental zfs" support during install - https://ubuntu.com/blog/zfs-focus-on-ubuntu-20-04-lts-whats-new). On such a zfs filesystem, the following tests from a ./python -m test.regrtest run fail in 3.10: 11 tests failed: test_cmd_line_script test_httpservers test_imp test_import test_ntpath test_os test_posixpath test_socket test_unicode_file test_unicode_file_functions test_zipimport Move over to a tmpfs and all but test_httpservers now pass. test_httpservers tries to create such a path on /tmp ====================================================================== ERROR: test_undecodable_filename (test.test_httpservers.SimpleHTTPServerTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/greg/test/cpython/Lib/test/test_httpservers.py", line 400, in test_undecodable_filename with open(os.path.join(self.tempdir, filename), 'wb') as f: OSError: [Errno 84] Invalid or incomplete multibyte or wide character: '/tmp/tmpnt9ch98x/@test_124227_tmp\udce7w\udcf0.txt' I expect any filesystem mounted to reject non-UTF8 pathnames to cause similar failures. Our test suite needs to detect this environment and skip these tests there. ---------- nosy: +gregory.p.smith versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 21:58:57 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 13 Dec 2021 02:58:57 +0000 Subject: [issue46052] IDLE: make Ctrl, Alt + IME non-ascii letter work on Windows In-Reply-To: <1639260736.08.0.703954085889.issue46052@roundup.psfhosted.org> Message-ID: <1639364337.58.0.808893940543.issue46052@roundup.psfhosted.org> Eryk Sun added the comment: The alternate keyboard shortcuts for the clipboard work fine with a Russian keyboard layout: copy: Ctrl+Insert cut: Shift+Delete paste: Shift+Insert Some programs also support Alt+Backspace for undo (Ctrl+Z). Watch out with Shift+Delete in GUI shells, since it physically deletes files, bypassing the recycle bin (trash), instead of cutting the selected files to the clipboard. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 22:01:59 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 13 Dec 2021 03:01:59 +0000 Subject: [issue46052] IDLE: make Ctrl, Alt + IME non-ascii letter work on Windows In-Reply-To: <1639260736.08.0.703954085889.issue46052@roundup.psfhosted.org> Message-ID: <1639364519.56.0.0496634361153.issue46052@roundup.psfhosted.org> Eryk Sun added the comment: I think the following wiki article still applies even though it was first discussed in 2003: "KeySyms on platforms other than X11" [1]. In particular, it states the following: On Windows and MacOS X Tk only supports keysyms correctly for a limited number of keys, namely special keys, and the ranges of ASCII and ISO-8859-1 (support of ISO-8859-1 on MacOS X since 8.4.2). I can confirm the result for the Russian keyboard mapping. The value of keysym is "??", even when combined with the control key. x: char: '?', ord: 0447, code: 0058, sym: '??', num: 0447. Ctrl+x: char: '\x18', ord: 0018, code: 0058, sym: '??', num: 0447. c: char: '?', ord: 0441, code: 0043, sym: '??', num: 0441. Ctrl+c: char: '\x03', ord: 0003, code: 0043, sym: '??', num: 0441. v: char: '?', ord: 043c, code: 0056, sym: '??', num: 043c. Crl+v: char: '\x16', ord: 0016, code: 0056, sym: '??', num: 043c. (I modified the keyevent function from msg408400 to use hexadecimal and repr formatting.) I checked Ubuntu 20.04 with a Russian keyboard layout. It seems in Linux the combination with the control key changes keysym and keysym_num to use the ASCII characters "x", "c", and "v": x: char: '?', ord: 0447, code: 0035, sym: 'Cyrillic_che', num: 06de. Ctrl+x: char: '\x18', ord: 0018, code: 0035, sym: 'x', num: 0078. c: char: '?', ord: 0441, code: 0036, sym: 'Cyrillic_es', num: 06d3. Ctrl+c: char: '\x03', ord: 0003, code: 0036, sym: 'c', num: 0063. v: char: '?', ord: 043c, code: 0037, sym: 'Cyrillic_em', num: 06cd. Crl+v: char: '\x16', ord: 0016, code: 0037, sym: 'v', num: 0076. --- [1] https://wiki.tcl-lang.org/page/KeySyms+on+platforms+other+than+X11 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 12 22:38:05 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 13 Dec 2021 03:38:05 +0000 Subject: [issue20741] Documentation archives should be available also in tar.xz format In-Reply-To: <1393142720.31.0.255845110134.issue20741@psf.upfronthosting.co.za> Message-ID: <1639366685.96.0.323393227542.issue20741@roundup.psfhosted.org> Ned Deily added the comment: Documentation downloads are still built and provided for each release (as linked to from https://www.python.org/doc/ and https://www.python.org/doc/versions/) as well as daily for the heads of each active bugfix and feature branch, in each case via the "Download these documents" link on the top page of the release/branch documentation set, for example, https://docs.python.org/3/ -> https://docs.python.org/3/download.html. The downloadable doc formats are still .zip and .bz2 while cPython source archives are still .tgz and .xz formats. Julien Palard (@mdk) is the release team documentation expert. Julien, what do you think? ---------- assignee: -> mdk components: +Documentation nosy: +mdk, ned.deily resolution: out of date -> status: pending -> open versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 00:08:56 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 13 Dec 2021 05:08:56 +0000 Subject: [issue46056] Cannot use virtual environment on Windows 10 in corporate security settings In-Reply-To: <1639313116.18.0.364057363878.issue46056@roundup.psfhosted.org> Message-ID: <1639372136.48.0.842047562007.issue46056@roundup.psfhosted.org> Eryk Sun added the comment: Try using symlinks if you're allowed, e.g. `python -m venv --symlinks `. Note that a virtual environment created with symlinks is unreliable in some cases because ShellExecute[Ex]W() eagerly resolves a symlink before calling CreateProcessW(). Also, you won't be able to use EXE script wrappers in an active environment due to the security restrictions in place on your system. You'll need to use `python -m ` alternative commands, such as `python -m pip` instead of `pip`. ---------- components: -Windows nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 00:10:39 2021 From: report at bugs.python.org (Paul Bryan) Date: Mon, 13 Dec 2021 05:10:39 +0000 Subject: [issue46060] Clarify asyncio.new_event_loop return value Message-ID: <1639372239.16.0.586208830445.issue46060@roundup.psfhosted.org> New submission from Paul Bryan : Currently, the documentation states it creates a new event loop; it should also indicate that it returns the newly created event loop. ---------- assignee: docs at python components: Documentation messages: 408425 nosy: docs at python, pbryan2 priority: normal severity: normal status: open title: Clarify asyncio.new_event_loop return value versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 00:15:10 2021 From: report at bugs.python.org (Paul Bryan) Date: Mon, 13 Dec 2021 05:15:10 +0000 Subject: [issue46060] Clarify asyncio.new_event_loop return value In-Reply-To: <1639372239.16.0.586208830445.issue46060@roundup.psfhosted.org> Message-ID: <1639372510.78.0.626635006043.issue46060@roundup.psfhosted.org> Change by Paul Bryan : ---------- keywords: +patch nosy: +pbryan nosy_count: 2.0 -> 3.0 pull_requests: +28299 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30078 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 00:40:20 2021 From: report at bugs.python.org (Larry Hastings) Date: Mon, 13 Dec 2021 05:40:20 +0000 Subject: [issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS In-Reply-To: <1385801049.84.0.483097954762.issue19838@psf.upfronthosting.co.za> Message-ID: <1639374020.45.0.180869058406.issue19838@roundup.psfhosted.org> Larry Hastings added the comment: I can confirm that the behavior is fixed in ZFS on Linux. My test case C program now prints "Everything is okay." when run on a ZFS partition on Linux, and test_touch_common from the current tree passes every time. ZFS fixing this was the best possible outcome. I'll go ahead and just close it now--why wait! If somebody confirms that the test still fails on FreeBSD, please open a new issue. Thanks for checking in, Irit! ---------- stage: patch review -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 01:48:31 2021 From: report at bugs.python.org (=?utf-8?b?TMOhc3psw7MgQXR0aWxhIFTDs3Ro?=) Date: Mon, 13 Dec 2021 06:48:31 +0000 Subject: [issue46057] argparse: embedded groups may prevent options from being in help output In-Reply-To: <1639320798.63.0.0421812802369.issue46057@roundup.psfhosted.org> Message-ID: <1639378111.1.0.107134874113.issue46057@roundup.psfhosted.org> L?szl? Attila T?th added the comment: According to the documentation only the ArgumentParser has add_argument_group option, which is not true, the code allows me to add a subgroup to any group. The complete example is in issue 4608: https://bugs.python.org/issue46058 If add_argument_group shouldn't be used for a regular argument group, I suggest the following change: _ActionsContainer.add_argument_group should return self if title is not specified and raise error if add_argument_group("...") is called on a group with title. This is close to the originally intended, documented behaviour. I'd still allow groups without title in mutually exclusive groups and vice versa. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 02:53:07 2021 From: report at bugs.python.org (Elmir) Date: Mon, 13 Dec 2021 07:53:07 +0000 Subject: [issue46005] [doc] replace 'distutils' examples with 'setuptools' In-Reply-To: <1638864537.57.0.967787312853.issue46005@roundup.psfhosted.org> Message-ID: <1639381987.71.0.348255695309.issue46005@roundup.psfhosted.org> Elmir added the comment: I think it would be very helpful to include an example how to build with setuptools as well. As it in the end boils down to two simple steps: * install 'setuptools' package * change import line: "from distutils.core import setup, Extension" to "from setuptools import setup, Extension" It took me a lot of time to figure out that 'setuptools' have this 'drop-in replacement' API for distutils. IMHO, it's not very well documented anywhere. I can make a PR with such addition, if you thinks it's good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 04:10:04 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 13 Dec 2021 09:10:04 +0000 Subject: [issue46059] Typo in match Statement example In-Reply-To: <1639356396.07.0.913283855262.issue46059@roundup.psfhosted.org> Message-ID: <1639386604.45.0.0810461421425.issue46059@roundup.psfhosted.org> Change by Alex Waygood : ---------- keywords: +patch nosy: +AlexWaygood nosy_count: 2.0 -> 3.0 pull_requests: +28300 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30079 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 04:20:26 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Dec 2021 09:20:26 +0000 Subject: [issue45840] Improve cross-references in the data model documentation In-Reply-To: <1637287286.96.0.846227383123.issue45840@roundup.psfhosted.org> Message-ID: <1639387226.73.0.287609768554.issue45840@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 7da90251ae80f5faac938b659675ff159d565537 by Alex Waygood in branch '3.10': bpo-45840: Improve cross-references in the data model documentation (GH-29633) (GH-30077) https://github.com/python/cpython/commit/7da90251ae80f5faac938b659675ff159d565537 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 04:21:59 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Dec 2021 09:21:59 +0000 Subject: [issue27718] help('signal') incomplete (e.g: signal.signal not visible) In-Reply-To: <1470746479.88.0.0919609545752.issue27718@psf.upfronthosting.co.za> Message-ID: <1639387319.86.0.525994301477.issue27718@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset e08c0d8eec528f1d7a282ee19bcadb9aae9ec123 by Serhiy Storchaka in branch 'main': bpo-27718: Fix help for the signal module (GH-30063) https://github.com/python/cpython/commit/e08c0d8eec528f1d7a282ee19bcadb9aae9ec123 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 04:22:21 2021 From: report at bugs.python.org (Ajaya Sutar) Date: Mon, 13 Dec 2021 09:22:21 +0000 Subject: [issue46061] Journal execution gives fatal error in Python 3.10.1 Message-ID: <1639387341.54.0.200759283155.issue46061@roundup.psfhosted.org> New submission from Ajaya Sutar : +++ General Fault Exception +++ Invalid read from 0000000000000000 rsp: 74b27f8a10, rip: 7ffe704e2f93, rbp: 74b27f8ce9 rsi: 0, rdi: 0 rax: 0, rbx: 7f, rcx: 194b6e90000, rdx: 194b6e90000 r8: 194b6db96c0, r9: 1, r10: 8000, r11: 74b27f8a00 r12: 0, r13: 0, r14: 19484550e40, r15: 0 [ 1] 7FFE704E2F93 pylifecycle\fatal_output_debug Line 2492 +0x43 (python310) [ 2] 7FFE704E3CCA pylifecycle\fatal_error Line 2734 +0x2ba (python310) [ 3] 7FFE704E3E4C pylifecycle\_Py_FatalErrorFormat Line 2784 +0xec (python310) [ 4] 7FFE704E6F52 pystate\PyThreadState_Delete Line 930 +0x52 (python310) [ 5] 7FFE704E1BF9 pylifecycle\new_interpreter Line 1967 +0x269 (python310) [ 6] 7FFE704E1CDF pylifecycle\Py_NewInterpreter Line 1988 +0x1f (python310) ---------- components: C API messages: 408431 nosy: eaqrzn priority: normal severity: normal status: open title: Journal execution gives fatal error in Python 3.10.1 type: crash versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 04:38:18 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Dec 2021 09:38:18 +0000 Subject: [issue27718] help('signal') incomplete (e.g: signal.signal not visible) In-Reply-To: <1470746479.88.0.0919609545752.issue27718@psf.upfronthosting.co.za> Message-ID: <1639388298.01.0.80577494547.issue27718@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +28301 pull_request: https://github.com/python/cpython/pull/30080 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 04:38:54 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 13 Dec 2021 09:38:54 +0000 Subject: [issue46061] Journal execution gives fatal error in Python 3.10.1 In-Reply-To: <1639387341.54.0.200759283155.issue46061@roundup.psfhosted.org> Message-ID: <1639388334.35.0.536116918809.issue46061@roundup.psfhosted.org> Eric V. Smith added the comment: Please show the code that causes this problem. There?s not enough information here to reproduce this failure. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 04:38:56 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 13 Dec 2021 09:38:56 +0000 Subject: [issue45840] Improve cross-references in the data model documentation In-Reply-To: <1637287286.96.0.846227383123.issue45840@roundup.psfhosted.org> Message-ID: <1639388336.84.0.938492765165.issue45840@roundup.psfhosted.org> Change by Alex Waygood : ---------- pull_requests: +28302 pull_request: https://github.com/python/cpython/pull/30081 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 04:53:07 2021 From: report at bugs.python.org (Thomas Arendsen Hein) Date: Mon, 13 Dec 2021 09:53:07 +0000 Subject: [issue1525919] email package content-transfer-encoding behaviour changed Message-ID: <1639389187.38.0.688205177315.issue1525919@roundup.psfhosted.org> Thomas Arendsen Hein added the comment: Default python3 on Debian buster: $ python3 Python 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import email.mime.text >>> mt = email.mime.text.MIMEText('Ta m?re', 'plain', 'utf-8') >>> print(mt.as_string()) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 VGEgbcOocmU= >>> email.encoders.encode_quopri(mt) >>> print(mt.as_string()) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Transfer-Encoding: quoted-printable Ta=20m=C3=A8re So the encoded text looks good now, but there are still duplicate headers. Old output (python2.7) is identical to what Asheesh Laroia (paulproteus) reported for python2.5: --- Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Transfer-Encoding: quoted-printable VGEgbcOocmU=3D --- ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 04:53:17 2021 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 13 Dec 2021 09:53:17 +0000 Subject: [issue45919] Use WinAPI GetFileType() in is_valid_fd() In-Reply-To: <1638127307.77.0.0584468495635.issue45919@roundup.psfhosted.org> Message-ID: <1639389197.67.0.0214341317753.issue45919@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch nosy: +corona10 nosy_count: 5.0 -> 6.0 pull_requests: +28303 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30082 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 04:55:31 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 09:55:31 +0000 Subject: [issue1525919] email package content-transfer-encoding behaviour changed Message-ID: <1639389331.28.0.184126966432.issue1525919@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 05:04:39 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 10:04:39 +0000 Subject: [issue37602] nonzero fixer problem In-Reply-To: <1563255027.06.0.811777029402.issue37602@roundup.psfhosted.org> Message-ID: <1639389879.3.0.139617146575.issue37602@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 481f3ffdbe40bd19677a1ba0ac2e7cece8949b47 by Irit Katriel in branch 'main': bpo-37602: Clarify that the lib2to3 nonzero fixer changes only definitions (GH-30075) https://github.com/python/cpython/commit/481f3ffdbe40bd19677a1ba0ac2e7cece8949b47 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 05:04:49 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 13 Dec 2021 10:04:49 +0000 Subject: [issue37602] nonzero fixer problem In-Reply-To: <1563255027.06.0.811777029402.issue37602@roundup.psfhosted.org> Message-ID: <1639389889.65.0.394127462328.issue37602@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +28304 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30083 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 05:05:24 2021 From: report at bugs.python.org (wolfgang kuehn) Date: Mon, 13 Dec 2021 10:05:24 +0000 Subject: [issue46056] Cannot use virtual environment on Windows 10 in corporate security settings In-Reply-To: <1639313116.18.0.364057363878.issue46056@roundup.psfhosted.org> Message-ID: <1639389924.03.0.713035426784.issue46056@roundup.psfhosted.org> wolfgang kuehn added the comment: symlinks do not work for me, this may be another bug (should I create a new issue?): python -m venv --without-pip --symlinks venv Unable to symlink 'C:\\Users\\****\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\idle.exe' to 'C:\\****\venv\\Scripts\\idle.exe' Error: [Errno 22] Invalid argument: 'C:\\Users\\****\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\idle.exe' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 05:15:06 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 13 Dec 2021 10:15:06 +0000 Subject: [issue27718] help('signal') incomplete (e.g: signal.signal not visible) In-Reply-To: <1470746479.88.0.0919609545752.issue27718@psf.upfronthosting.co.za> Message-ID: <1639390506.36.0.829650383503.issue27718@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +28305 pull_request: https://github.com/python/cpython/pull/30084 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 05:15:13 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Dec 2021 10:15:13 +0000 Subject: [issue27718] help('signal') incomplete (e.g: signal.signal not visible) In-Reply-To: <1470746479.88.0.0919609545752.issue27718@psf.upfronthosting.co.za> Message-ID: <1639390513.33.0.611517212158.issue27718@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset e55deaabd8de338138cf29aea6890996e794c997 by Serhiy Storchaka in branch '3.10': [3.10] bpo-27718: Fix help for the signal module (GH-30063) (GH-30080) https://github.com/python/cpython/commit/e55deaabd8de338138cf29aea6890996e794c997 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 05:41:38 2021 From: report at bugs.python.org (Martin Whitehead) Date: Mon, 13 Dec 2021 10:41:38 +0000 Subject: [issue46062] In IDLE, 'File > Save As' seems not to allow creation of a new folder Message-ID: <1639392097.98.0.679705685324.issue46062@roundup.psfhosted.org> New submission from Martin Whitehead : The problem: In both the IDLE shell and the editor, 'File > Save As' seems not to allow creation of a new folder. My system: IDLE v3.8.10 (64 bit) Python 3.8.10 Tk version 8.6.10 Linus Mint 20.2 Uma (64 bit), which is based on Ubuntu 20.04 LTS (Focal Fossa) ---------- assignee: terry.reedy components: IDLE messages: 408437 nosy: suffolkpunch, terry.reedy priority: normal severity: normal status: open title: In IDLE, 'File > Save As' seems not to allow creation of a new folder versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 05:43:39 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 13 Dec 2021 10:43:39 +0000 Subject: [issue27718] help('signal') incomplete (e.g: signal.signal not visible) In-Reply-To: <1470746479.88.0.0919609545752.issue27718@psf.upfronthosting.co.za> Message-ID: <1639392219.74.0.884400331356.issue27718@roundup.psfhosted.org> miss-islington added the comment: New changeset 80f98b1614cc8e58d8a5ec72c94d27f663e23035 by Miss Islington (bot) in branch '3.9': [3.10] bpo-27718: Fix help for the signal module (GH-30063) (GH-30080) https://github.com/python/cpython/commit/80f98b1614cc8e58d8a5ec72c94d27f663e23035 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 05:45:18 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 10:45:18 +0000 Subject: [issue37602] nonzero fixer problem In-Reply-To: <1563255027.06.0.811777029402.issue37602@roundup.psfhosted.org> Message-ID: <1639392318.68.0.810251963512.issue37602@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +28306 pull_request: https://github.com/python/cpython/pull/30085 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 05:45:59 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 10:45:59 +0000 Subject: [issue37602] nonzero fixer problem In-Reply-To: <1563255027.06.0.811777029402.issue37602@roundup.psfhosted.org> Message-ID: <1639392359.93.0.826757047058.issue37602@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 80eb8ab81fbe46497f16071b311c9d8e13ec2d3b by Miss Islington (bot) in branch '3.9': bpo-37602: Clarify that the lib2to3 nonzero fixer changes only definitions (GH-30075) (GH-30083) https://github.com/python/cpython/commit/80eb8ab81fbe46497f16071b311c9d8e13ec2d3b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 05:47:42 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 10:47:42 +0000 Subject: [issue37602] nonzero fixer problem In-Reply-To: <1563255027.06.0.811777029402.issue37602@roundup.psfhosted.org> Message-ID: <1639392462.35.0.522675157968.issue37602@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 310bae628a9b065d29dbdbf4f7f5beb9fcc72ace by Irit Katriel in branch '3.10': [3.10] bpo-37602: Clarify that the lib2to3 nonzero fixer changes only definitions (GH-30075) (GH-30085) https://github.com/python/cpython/commit/310bae628a9b065d29dbdbf4f7f5beb9fcc72ace ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 05:48:01 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 10:48:01 +0000 Subject: [issue37602] nonzero fixer problem In-Reply-To: <1563255027.06.0.811777029402.issue37602@roundup.psfhosted.org> Message-ID: <1639392481.42.0.870597606708.issue37602@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 05:52:32 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 13 Dec 2021 10:52:32 +0000 Subject: [issue46056] Cannot use virtual environment on Windows 10 in corporate security settings In-Reply-To: <1639313116.18.0.364057363878.issue46056@roundup.psfhosted.org> Message-ID: <1639392752.47.0.017934394028.issue46056@roundup.psfhosted.org> Eryk Sun added the comment: > symlinks do not work for me Sorry, I forgot that you're using the store app. The store app has to use the copied venv launchers. When a store app is run from the command line, the system executes an appexec link from "%LocalAppData%\Microsoft\WindowsApps". Unfortunately appexec links have to be executed directly in order for CreateProcessW() to find the required app information that's in the link. The API doesn't manually reparse symlinks until it reaches an appexec link. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 06:05:19 2021 From: report at bugs.python.org (Ajaya Sutar) Date: Mon, 13 Dec 2021 11:05:19 +0000 Subject: [issue46061] Journal execution gives fatal error in Python 3.10.1 In-Reply-To: <1639387341.54.0.200759283155.issue46061@roundup.psfhosted.org> Message-ID: <1639393519.25.0.943389450847.issue46061@roundup.psfhosted.org> Ajaya Sutar added the comment: It is a simply python script. Even if you will run a simply python script without any content that is giving error. Just for example journal.py if we run it is also giving error. In python 3.8, we are able to create // create sub-interpreter using Py_NewInterpreter and it is working fine. but in python 3.10.1 it is not working fine. it is giving fatal error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 06:12:53 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Dec 2021 11:12:53 +0000 Subject: [issue27718] help('signal') incomplete (e.g: signal.signal not visible) In-Reply-To: <1470746479.88.0.0919609545752.issue27718@psf.upfronthosting.co.za> Message-ID: <1639393973.27.0.104068669007.issue27718@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 Dec 13 06:18:25 2021 From: report at bugs.python.org (wolfgang kuehn) Date: Mon, 13 Dec 2021 11:18:25 +0000 Subject: [issue46056] Cannot use virtual environment on Windows 10 in corporate security settings In-Reply-To: <1639313116.18.0.364057363878.issue46056@roundup.psfhosted.org> Message-ID: <1639394305.82.0.995109798039.issue46056@roundup.psfhosted.org> wolfgang kuehn added the comment: Currently we have a glitch in our internal access rights system. This resulted in me loosing my Admin-privileges. I can only install python from the app-store, which is ok. But without venv support I am stuck for the time being. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 06:21:48 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 13 Dec 2021 11:21:48 +0000 Subject: [issue46061] Journal execution gives fatal error in Python 3.10.1 In-Reply-To: <1639387341.54.0.200759283155.issue46061@roundup.psfhosted.org> Message-ID: <1639394508.59.0.871059521025.issue46061@roundup.psfhosted.org> Christian Heimes added the comment: We cannot help you unless you show us your code and provide a reproducer. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 06:55:25 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 13 Dec 2021 11:55:25 +0000 Subject: [issue46061] Journal execution gives fatal error in Python 3.10.1 In-Reply-To: <1639387341.54.0.200759283155.issue46061@roundup.psfhosted.org> Message-ID: <1639396525.2.0.217815322874.issue46061@roundup.psfhosted.org> Change by Eric V. Smith : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 06:59:59 2021 From: report at bugs.python.org (Bar Harel) Date: Mon, 13 Dec 2021 11:59:59 +0000 Subject: [issue10850] inconsistent behavior concerning multiprocessing.manager.BaseManager._Server In-Reply-To: <1294360374.53.0.588595674921.issue10850@psf.upfronthosting.co.za> Message-ID: <1639396799.52.0.704489023498.issue10850@roundup.psfhosted.org> Change by Bar Harel : ---------- keywords: +patch pull_requests: +28307 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30086 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 07:12:03 2021 From: report at bugs.python.org (Sami Salonen) Date: Mon, 13 Dec 2021 12:12:03 +0000 Subject: [issue46063] TimedRotatingFileHandler deletes wrong files Message-ID: <1639397523.26.0.357602434319.issue46063@roundup.psfhosted.org> New submission from Sami Salonen : https://bugs.python.org/issue45628 breaks file rotation. I name my log files after module name, run the modules in separate processes, use the same log config in them, and store the log files in one common directory. For example, for modules `a.b` and `a.b.c` I have the following log files: a.b.log a.b.c.log Now after bpo-45628 fix, `getFilesToDelete` treats the rotated log files from those modules the same, and deletes wrong files. If `backupCount` is set to e.g. 7, only total of 7 files are stored instead of 7 of each. ---------- components: Library (Lib) messages: 408445 nosy: Sami Salonen priority: normal severity: normal status: open title: TimedRotatingFileHandler deletes wrong files type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 07:14:04 2021 From: report at bugs.python.org (Sami Salonen) Date: Mon, 13 Dec 2021 12:14:04 +0000 Subject: [issue46063] TimedRotatingFileHandler deletes wrong files In-Reply-To: <1639397523.26.0.357602434319.issue46063@roundup.psfhosted.org> Message-ID: <1639397644.28.0.907298118628.issue46063@roundup.psfhosted.org> Sami Salonen added the comment: Breaking PR: https://github.com/python/cpython/pull/29310 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 07:14:36 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 13 Dec 2021 12:14:36 +0000 Subject: [issue16594] SocketServer should set SO_REUSEPORT along with SO_REUSEADDR when present In-Reply-To: <1354439249.45.0.0324812571604.issue16594@psf.upfronthosting.co.za> Message-ID: <1639397676.6.0.300635894558.issue16594@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset b56774bd93822e1598bb5d6c1d0b1fe8c45a750d by AN Long in branch 'main': bpo-16594: Add allow_reuse_port on socketserver (GH-30072) https://github.com/python/cpython/commit/b56774bd93822e1598bb5d6c1d0b1fe8c45a750d ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 07:19:12 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Dec 2021 12:19:12 +0000 Subject: [issue45840] Improve cross-references in the data model documentation In-Reply-To: <1637287286.96.0.846227383123.issue45840@roundup.psfhosted.org> Message-ID: <1639397952.59.0.32830629792.issue45840@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 2029c58097e49b5aedc152ab65958a9db35ebd1e by Alex Waygood in branch '3.9': [3.9] bpo-45840: Improve cross-references in the data model documentation (GH-29633) (GH-30081) https://github.com/python/cpython/commit/2029c58097e49b5aedc152ab65958a9db35ebd1e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 07:19:38 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Dec 2021 12:19:38 +0000 Subject: [issue45840] Improve cross-references in the data model documentation In-Reply-To: <1637287286.96.0.846227383123.issue45840@roundup.psfhosted.org> Message-ID: <1639397978.81.0.0227785934471.issue45840@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 Dec 13 07:43:42 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 13 Dec 2021 12:43:42 +0000 Subject: [issue46060] Clarify asyncio.new_event_loop return value In-Reply-To: <1639372239.16.0.586208830445.issue46060@roundup.psfhosted.org> Message-ID: <1639399422.28.0.354697988695.issue46060@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28308 pull_request: https://github.com/python/cpython/pull/30088 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 07:52:34 2021 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 13 Dec 2021 12:52:34 +0000 Subject: [issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams In-Reply-To: <1518686430.4.0.467229070634.issue32849@psf.upfronthosting.co.za> Message-ID: <1639399954.5.0.488320307187.issue32849@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 nosy_count: 5.0 -> 6.0 pull_requests: +28310 pull_request: https://github.com/python/cpython/pull/30082 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 07:52:34 2021 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 13 Dec 2021 12:52:34 +0000 Subject: [issue30225] EBADF error on x86 Tiger 3.x buildbot In-Reply-To: <1493712772.54.0.125879756705.issue30225@psf.upfronthosting.co.za> Message-ID: <1639399954.38.0.838706727746.issue30225@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 nosy_count: 4.0 -> 5.0 pull_requests: +28309 pull_request: https://github.com/python/cpython/pull/30082 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 07:58:03 2021 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 13 Dec 2021 12:58:03 +0000 Subject: [issue45919] Use WinAPI GetFileType() in is_valid_fd() In-Reply-To: <1638127307.77.0.0584468495635.issue45919@roundup.psfhosted.org> Message-ID: <1639400283.81.0.680414400966.issue45919@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 191c431de7d9b23484dd16f67e62c6e85a1fac7f by Dong-hee Na in branch 'main': bpo-45919: Use WinAPI GetFileType() in is_valid_fd() (GH-30082) https://github.com/python/cpython/commit/191c431de7d9b23484dd16f67e62c6e85a1fac7f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 08:05:16 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 13 Dec 2021 13:05:16 +0000 Subject: [issue45840] Improve cross-references in the data model documentation In-Reply-To: <1637287286.96.0.846227383123.issue45840@roundup.psfhosted.org> Message-ID: <1639400716.08.0.695497875915.issue45840@roundup.psfhosted.org> Alex Waygood added the comment: Thanks, Serhiy! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 08:06:50 2021 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 13 Dec 2021 13:06:50 +0000 Subject: [issue45919] Use WinAPI GetFileType() in is_valid_fd() In-Reply-To: <1638127307.77.0.0584468495635.issue45919@roundup.psfhosted.org> Message-ID: <1639400810.97.0.904862283375.issue45919@roundup.psfhosted.org> Change by Dong-hee Na : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 08:14:42 2021 From: report at bugs.python.org (Fabian Dill) Date: Mon, 13 Dec 2021 13:14:42 +0000 Subject: [issue46064] Permalinks to underscored documentation entries don't work. Message-ID: <1639401282.19.0.555190776199.issue46064@roundup.psfhosted.org> New submission from Fabian Dill : As an example, go to https://docs.python.org/3/library/constants.html and request a permalink to __debug__. The link you get will not jump to it. The link I get is https://docs.python.org/3/library/constants.html#debug__ ---------- assignee: docs at python components: Documentation messages: 408451 nosy: Fabian Dill, docs at python priority: normal severity: normal status: open title: Permalinks to underscored documentation entries don't work. type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 08:19:00 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 13 Dec 2021 13:19:00 +0000 Subject: [issue46064] Permalinks to underscored documentation entries don't work. In-Reply-To: <1639401282.19.0.555190776199.issue46064@roundup.psfhosted.org> Message-ID: <1639401540.27.0.111560162503.issue46064@roundup.psfhosted.org> Alex Waygood added the comment: I can't reproduce this -- the permalink to __debug__ that I get is the same as the one you have posted here, and works fine for me on my laptop, phone and iPad. ---------- nosy: +AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 08:19:42 2021 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 13 Dec 2021 13:19:42 +0000 Subject: [issue45915] Use fcntl(fd, F_GETFD) to check whether an fd is valid In-Reply-To: <1638094386.96.0.551592531479.issue45915@roundup.psfhosted.org> Message-ID: <1639401582.41.0.301562112022.issue45915@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 nosy_count: 3.0 -> 4.0 pull_requests: +28311 pull_request: https://github.com/python/cpython/pull/30082 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 08:25:37 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 13 Dec 2021 13:25:37 +0000 Subject: [issue46060] Clarify asyncio.new_event_loop return value In-Reply-To: <1639372239.16.0.586208830445.issue46060@roundup.psfhosted.org> Message-ID: <1639401937.68.0.208123549386.issue46060@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28312 pull_request: https://github.com/python/cpython/pull/30089 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 08:26:28 2021 From: report at bugs.python.org (Ramzi Trabelsi) Date: Mon, 13 Dec 2021 13:26:28 +0000 Subject: [issue46065] re.findall takes forever and never ends Message-ID: <1639401988.73.0.733937004071.issue46065@roundup.psfhosted.org> New submission from Ramzi Trabelsi : parsing emails from this text took forever and never ends. Here the code and the file res.html is attached. The Behavior is same on Windows 10, 11 and Ubuntu 18.04 CODE: import re pattern_email = r"[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]{2,3}" with open("res.html","r",encoding="utf-8") as FF: TEXT = FF.read() matched_email = re.findall(pattern_email,TEXT) ---------- components: macOS files: res.zip messages: 408453 nosy: ned.deily, ramzitra, ronaldoussoren priority: normal severity: normal status: open title: re.findall takes forever and never ends type: crash versions: Python 3.9 Added file: https://bugs.python.org/file50488/res.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 08:31:51 2021 From: report at bugs.python.org (Ramzi Trabelsi) Date: Mon, 13 Dec 2021 13:31:51 +0000 Subject: [issue46065] re.findall takes forever and never ends In-Reply-To: <1639401988.73.0.733937004071.issue46065@roundup.psfhosted.org> Message-ID: <1639402311.82.0.829080663445.issue46065@roundup.psfhosted.org> Change by Ramzi Trabelsi : ---------- components: -macOS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 08:32:45 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 13 Dec 2021 13:32:45 +0000 Subject: [issue46065] re.findall takes forever and never ends In-Reply-To: <1639401988.73.0.733937004071.issue46065@roundup.psfhosted.org> Message-ID: <1639402365.07.0.0303230799845.issue46065@roundup.psfhosted.org> Change by Ned Deily : ---------- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett, serhiy.storchaka -ned.deily, ronaldoussoren type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 08:33:49 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 13 Dec 2021 13:33:49 +0000 Subject: [issue16594] SocketServer should set SO_REUSEPORT along with SO_REUSEADDR when present In-Reply-To: <1354439249.45.0.0324812571604.issue16594@psf.upfronthosting.co.za> Message-ID: <1639402429.17.0.862642517599.issue16594@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.11 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 08:48:55 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Dec 2021 13:48:55 +0000 Subject: [issue14484] missing return in win32_kill? In-Reply-To: <1333462226.23.0.725280599354.issue14484@psf.upfronthosting.co.za> Message-ID: <1639403335.08.0.338110100926.issue14484@roundup.psfhosted.org> STINNER Victor added the comment: IMO trying to mimic POSIX behavior on Windows in the single function os.kill() was a bad design idea. Windows should have its own specific function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 09:29:32 2021 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 13 Dec 2021 14:29:32 +0000 Subject: [issue45919] Use WinAPI GetFileType() in is_valid_fd() In-Reply-To: <1638127307.77.0.0584468495635.issue45919@roundup.psfhosted.org> Message-ID: <1639405772.23.0.0754418937082.issue45919@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +28313 pull_request: https://github.com/python/cpython/pull/30090 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 09:40:12 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 13 Dec 2021 14:40:12 +0000 Subject: [issue46059] Typo in match Statement example In-Reply-To: <1639356396.07.0.913283855262.issue46059@roundup.psfhosted.org> Message-ID: <1639406412.95.0.00809016145664.issue46059@roundup.psfhosted.org> Change by Alex Waygood : ---------- type: -> behavior versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 10:06:09 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Dec 2021 15:06:09 +0000 Subject: [issue46065] re.findall takes forever and never ends In-Reply-To: <1639401988.73.0.733937004071.issue46065@roundup.psfhosted.org> Message-ID: <1639407969.23.0.0763851017917.issue46065@roundup.psfhosted.org> Serhiy Storchaka added the comment: It ends, but it tooks several minutes to complete. It is a limitation of the regular expression implementation in Python. Your input contains a sequence of 588431 characters which match the pattern [a-zA-Z0-9_.+-] not following by '@'. The engine finds the first character in this sequence, then scans 588431 characters matching this pattern, but does not find '@' after them. So it backtracks, steps back by one character and tries to match '@', fails, and continue stepping back until returns to the initial character. 588431 steps forward and 588431 steps back are needed to find that no matches starting at this position. So it steps forward and try the proce3dure from a new position. No it does 588430 steps in both direction. Totally it needs to do 588431+588430+588429+...+1 ~ 588431**2/2 ~ 173e9 steps. It takes a long time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 10:13:22 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Dec 2021 15:13:22 +0000 Subject: [issue46065] re.findall takes forever and never ends In-Reply-To: <1639401988.73.0.733937004071.issue46065@roundup.psfhosted.org> Message-ID: <1639408402.26.0.663126662906.issue46065@roundup.psfhosted.org> Serhiy Storchaka added the comment: The simplest example is: re.search('a@', 'a'*100000) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 10:27:16 2021 From: report at bugs.python.org (Ramzi Trabelsi) Date: Mon, 13 Dec 2021 15:27:16 +0000 Subject: [issue46065] re.findall takes forever and never ends In-Reply-To: <1639401988.73.0.733937004071.issue46065@roundup.psfhosted.org> Message-ID: <1639409236.94.0.53786546289.issue46065@roundup.psfhosted.org> Ramzi Trabelsi added the comment: thanks for the answer. Is there any workaround for this ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 10:36:57 2021 From: report at bugs.python.org (97littleleaf11) Date: Mon, 13 Dec 2021 15:36:57 +0000 Subject: [issue46066] Docs: TypedDict alternative definition syntax with keyword args is confusing Message-ID: <1639409817.42.0.21314101687.issue46066@roundup.psfhosted.org> New submission from 97littleleaf11 <97littleleaf11 at gmail.com>: According to the docs: https://docs.python.org/3/library/typing.html?#typing.TypedDict, there are two additional equivalent syntax for TypedDict definition. Point2D = TypedDict('Point2D', x=int, y=int, label=str) Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str}) However, the former one is quite confusing since we have the `total` keyword arg for TypedDict. In addition, PEP589(https://www.python.org/dev/peps/pep-0589/#id19) doesn't have this. I think we could discard the definition syntax using keyword args in the doc. ---------- assignee: docs at python components: Documentation messages: 408458 nosy: 97littleleaf11, docs at python priority: normal severity: normal status: open title: Docs: TypedDict alternative definition syntax with keyword args is confusing versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 10:38:08 2021 From: report at bugs.python.org (97littleleaf11) Date: Mon, 13 Dec 2021 15:38:08 +0000 Subject: [issue46066] [doc] TypedDict alternative definition syntax with keyword args is confusing In-Reply-To: <1639409817.42.0.21314101687.issue46066@roundup.psfhosted.org> Message-ID: <1639409888.47.0.445453346469.issue46066@roundup.psfhosted.org> Change by 97littleleaf11 <97littleleaf11 at gmail.com>: ---------- title: Docs: TypedDict alternative definition syntax with keyword args is confusing -> [doc] TypedDict alternative definition syntax with keyword args is confusing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 10:40:19 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 15:40:19 +0000 Subject: [issue46063] TimedRotatingFileHandler deletes wrong files In-Reply-To: <1639397523.26.0.357602434319.issue46063@roundup.psfhosted.org> Message-ID: <1639410019.76.0.0695241446881.issue46063@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 10:43:18 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Dec 2021 15:43:18 +0000 Subject: [issue46065] re.findall takes forever and never ends In-Reply-To: <1639401988.73.0.733937004071.issue46065@roundup.psfhosted.org> Message-ID: <1639410198.33.0.708950389465.issue46065@roundup.psfhosted.org> Serhiy Storchaka added the comment: Limit the number of repetitions. For example use "{1,100}" (or what is the expected maximal length of email) instead of "+". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 10:48:21 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 15:48:21 +0000 Subject: [issue45615] Missing test for type of error when printing traceback for non-exception In-Reply-To: <1635261430.95.0.190322958386.issue45615@roundup.psfhosted.org> Message-ID: <1639410501.88.0.894911160518.issue45615@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch pull_requests: +28314 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30091 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 11:08:59 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 16:08:59 +0000 Subject: [issue20392] Inconsistency with uppercase file extensions in MimeTypes.guess_type In-Reply-To: <1390670268.05.0.579524422182.issue20392@psf.upfronthosting.co.za> Message-ID: <1639411739.85.0.512811850872.issue20392@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- keywords: +easy -patch nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 11:26:14 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 16:26:14 +0000 Subject: [issue12411] cgi.parse_multipart is broken on 3.x In-Reply-To: <1309014548.2.0.906650270303.issue12411@psf.upfronthosting.co.za> Message-ID: <1639412774.54.0.76920163286.issue12411@roundup.psfhosted.org> Irit Katriel added the comment: Senthil, was this last part done in issue29979? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 11:34:00 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 16:34:00 +0000 Subject: [issue21390] readline: setlocale() returns NULL on Android In-Reply-To: <1398843223.64.0.854948810113.issue21390@psf.upfronthosting.co.za> Message-ID: <1639413240.06.0.953001705222.issue21390@roundup.psfhosted.org> Irit Katriel added the comment: Neither of the patches were applied. Is this still needed? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 11:41:20 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 16:41:20 +0000 Subject: [issue30716] Failing tests with installed 3.6.2rc1 on Win 10-64 In-Reply-To: <1497984928.25.0.777622060627.issue30716@psf.upfronthosting.co.za> Message-ID: <1639413680.92.0.656234334541.issue30716@roundup.psfhosted.org> Irit Katriel added the comment: Shall we close this? I don't think 3.6 test failures will still be looked into. ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 11:45:36 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 13 Dec 2021 16:45:36 +0000 Subject: [issue46052] IDLE: make Ctrl, Alt + IME non-ascii letter work on Windows In-Reply-To: <1639260736.08.0.703954085889.issue46052@roundup.psfhosted.org> Message-ID: <1639413936.72.0.842593984667.issue46052@roundup.psfhosted.org> Terry J. Reedy added the comment: Thank you Eryk. The X/Ubuntu behavior is what I want to simulate. I can only wonder why tk has not fixed that for non-X systems. Are Alt+letter combinations also fixed on Ubuntu, so that, for instance, Alt+M-key is seen as Alt-M even with Russian layout? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 11:57:29 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 13 Dec 2021 16:57:29 +0000 Subject: [issue30716] Failing tests with installed 3.6.2rc1 on Win 10-64 In-Reply-To: <1497984928.25.0.777622060627.issue30716@psf.upfronthosting.co.za> Message-ID: <1639414649.76.0.573246680355.issue30716@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> out of date stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 12:00:34 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 17:00:34 +0000 Subject: [issue33099] test_poplib hangs with the changes done in PR In-Reply-To: <1521411483.84.0.467229070634.issue33099@psf.upfronthosting.co.za> Message-ID: <1639414834.9.0.649448339431.issue33099@roundup.psfhosted.org> Irit Katriel added the comment: #32706 is now fixed, does that resolve this issue as well? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 12:14:57 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 17:14:57 +0000 Subject: [issue40927] ./python -m test test___all__ test_binhex fails In-Reply-To: <1591699636.51.0.837580045442.issue40927@roundup.psfhosted.org> Message-ID: <1639415697.84.0.722255836499.issue40927@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 12:18:25 2021 From: report at bugs.python.org (Jonas Witschel) Date: Mon, 13 Dec 2021 17:18:25 +0000 Subject: [issue46067] SSLContext.set_npn_protocols broken in Python 3.10, tries to call non-existing _set_npn_protocols Message-ID: <1639415904.86.0.18905683137.issue46067@roundup.psfhosted.org> New submission from Jonas Witschel : Consider the following minimal example: import ssl context = ssl.create_default_context() context.set_npn_protocols(['http/1.1', 'spdy/2']) In Python 3.10, it fails with the following error: AttributeError: 'SSLContext' object has no attribute '_set_npn_protocols'. Did you mean: 'set_npn_protocols'? This is because bpo-43669 (https://github.com/python/cpython/commit/39258d3595300bc7b952854c915f63ae2d4b9c3e) removed _set_npn_protocols, while it is still used by SSLContext.set_npn_protocols: https://github.com/python/cpython/blob/191c431de7d9b23484dd16f67e62c6e85a1fac7f/Lib/ssl.py#L551 Note that the function is already deprecated in Python 3.10 and throws a DeprecationWarning: ssl NPN is deprecated, use ALPN instead but should still probably continue working for now. ---------- assignee: christian.heimes components: SSL messages: 408466 nosy: christian.heimes, diabonas priority: normal severity: normal status: open title: SSLContext.set_npn_protocols broken in Python 3.10, tries to call non-existing _set_npn_protocols type: compile error versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 12:23:07 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Dec 2021 17:23:07 +0000 Subject: [issue45643] SIGSTKFLT is missing from the signals module on Linux In-Reply-To: <1635417063.88.0.746261778756.issue45643@roundup.psfhosted.org> Message-ID: <1639416187.29.0.681487191714.issue45643@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a62be77266b1beadd42d4952186332bc0847b7d6 by Gareth Rees in branch 'main': bpo-45643: Add signal.SIGSTKFLT on platforms where this is defined (GH-29266) https://github.com/python/cpython/commit/a62be77266b1beadd42d4952186332bc0847b7d6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 12:24:43 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Dec 2021 17:24:43 +0000 Subject: [issue45643] Add signal.SIGSTKFLT constant (Linux) In-Reply-To: <1635417063.88.0.746261778756.issue45643@roundup.psfhosted.org> Message-ID: <1639416283.16.0.2164268198.issue45643@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: SIGSTKFLT is missing from the signals module on Linux -> Add signal.SIGSTKFLT constant (Linux) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 12:25:08 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Dec 2021 17:25:08 +0000 Subject: [issue45643] Add signal.SIGSTKFLT constant (Linux) In-Reply-To: <1635417063.88.0.746261778756.issue45643@roundup.psfhosted.org> Message-ID: <1639416308.57.0.732107372755.issue45643@roundup.psfhosted.org> STINNER Victor added the comment: I merged your PR, thanks! I'm curious how people use this signal :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 12:26:33 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Dec 2021 17:26:33 +0000 Subject: [issue40927] ./python -m test test___all__ test_binhex fails In-Reply-To: <1591699636.51.0.837580045442.issue40927@roundup.psfhosted.org> Message-ID: <1639416393.34.0.0851074388479.issue40927@roundup.psfhosted.org> STINNER Victor added the comment: Oh thanks Irit! It's too easy to forget closing an issue! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 12:27:46 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Dec 2021 17:27:46 +0000 Subject: [issue30716] Failing tests with installed 3.6.2rc1 on Win 10-64 In-Reply-To: <1497984928.25.0.777622060627.issue30716@psf.upfronthosting.co.za> Message-ID: <1639416466.43.0.862443385952.issue30716@roundup.psfhosted.org> STINNER Victor added the comment: It seems like this issue has been fixed in bpo-27425. ---------- resolution: out of date -> duplicate superseder: -> Tests fail because of git's newline preferences on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 12:29:09 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Dec 2021 17:29:09 +0000 Subject: [issue21390] readline: setlocale() returns NULL on Android In-Reply-To: <1398843223.64.0.854948810113.issue21390@psf.upfronthosting.co.za> Message-ID: <1639416549.72.0.204861403622.issue21390@roundup.psfhosted.org> STINNER Victor added the comment: Since 2014, Android got getter support for Unix locales. Since nobody was able to say if the issue still exists on Android since 2014, nor if my patch fix the issue, I perfer to close the issue as out of date. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 12:29:21 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Dec 2021 17:29:21 +0000 Subject: [issue12411] cgi.parse_multipart is broken on 3.x In-Reply-To: <1309014548.2.0.906650270303.issue12411@psf.upfronthosting.co.za> Message-ID: <1639416561.75.0.689301892805.issue12411@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 12:35:22 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 17:35:22 +0000 Subject: [issue12411] cgi.parse_multipart is broken on 3.x In-Reply-To: <1309014548.2.0.906650270303.issue12411@psf.upfronthosting.co.za> Message-ID: <1639416922.1.0.424449739327.issue12411@roundup.psfhosted.org> Change by Irit Katriel : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 12:36:57 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 13 Dec 2021 17:36:57 +0000 Subject: [issue46066] [doc] TypedDict alternative definition syntax with keyword args is confusing In-Reply-To: <1639409817.42.0.21314101687.issue46066@roundup.psfhosted.org> Message-ID: <1639417017.08.0.600124386116.issue46066@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +gvanrossum, kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 12:40:54 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 17:40:54 +0000 Subject: [issue23747] [doc] platform module exposes win32_ver function on posix systems In-Reply-To: <1427103016.81.0.503768282249.issue23747@psf.upfronthosting.co.za> Message-ID: <1639417254.67.0.84068940698.issue23747@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy title: platform module exposes win32_ver function on posix systems -> [doc] platform module exposes win32_ver function on posix systems versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 12:50:29 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 17:50:29 +0000 Subject: [issue39757] EmailMessage bad encoding for international domain In-Reply-To: <1582709775.3.0.571538664603.issue39757@roundup.psfhosted.org> Message-ID: <1639417829.47.0.460995874373.issue39757@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 12:53:17 2021 From: report at bugs.python.org (=?utf-8?b?TMOhc3psw7MgQXR0aWxhIFTDs3Ro?=) Date: Mon, 13 Dec 2021 17:53:17 +0000 Subject: [issue46057] argparse: embedded groups may prevent options from being in help output In-Reply-To: <1639320798.63.0.0421812802369.issue46057@roundup.psfhosted.org> Message-ID: <1639417997.93.0.509597758121.issue46057@roundup.psfhosted.org> L?szl? Attila T?th added the comment: my idea regarding _ArgumentGroup,add_argument_group is in the attached file. This doesn't solve the complete help output issue, but addresses the incorrectly called _ArgumentGroup.add_argument_group - a warn() call and return self. As a result the help output for embedded groups (not mutually exclusive groups) work as expected. If the title parameter is specified, this scenario is not checked, and so on. ---------- keywords: +patch Added file: https://bugs.python.org/file50489/argparse-add-arg_grp-deprecation.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 13:01:38 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 13 Dec 2021 18:01:38 +0000 Subject: [issue45653] Freeze the encodings module. In-Reply-To: <1635444712.46.0.923300343963.issue45653@roundup.psfhosted.org> Message-ID: <1639418498.93.0.611873850949.issue45653@roundup.psfhosted.org> Christian Heimes added the comment: Eric, I have a simple reproducer for the issue: This works: $ LC_ALL=en_US.utf-8 TESTPATH=$(pwd)/Lib:$(pwd)/build/lib.linux-x86_64-3.11 ./Programs/_testembed test_init_setpath_config This fails because it cannot load ISO-8859-1 / latin-1 codec $ LC_ALL=en_US.latin1 TESTPATH=$(pwd)/Lib:$(pwd)/build/lib.linux-x86_64-3.11 ./Programs/_testembed test_init_setpath_config Python path configuration: PYTHONHOME = (not set) PYTHONPATH = (not set) program name = 'conf_program_name' isolated = 0 environment = 1 user site = 1 import site = 1 is in build tree = 0 stdlib dir = '' sys._base_executable = 'conf_executable' sys.base_prefix = '' sys.base_exec_prefix = '' sys.platlibdir = 'lib' sys.executable = 'conf_executable' sys.prefix = '' sys.exec_prefix = '' sys.path = [ '/home/heimes/dev/python/cpython/Lib', '/home/heimes/dev/python/cpython/build/lib.linux-x86_64-3.11', ] Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized LookupError: unknown encoding: ISO-8859-1 Current thread 0x00007f9c42be6740 (most recent call first): With this patch I'm seeing that encodings.__path__ is not absolute and that __spec__ has an empty submodule_search_locations. --- a/Lib/encodings/__init__.py +++ b/Lib/encodings/__init__.py @@ -98,9 +98,12 @@ def search_function(encoding): # module with side-effects that is not in the 'encodings' package. mod = __import__('encodings.' + modname, fromlist=_import_tail, level=0) - except ImportError: + except ImportError as e: # ImportError may occur because 'encodings.(modname)' does not exist, # or because it imports a name that does not exist (see mbcs and oem) + sys.stderr.write(f"exception: {e}\n") + sys.stderr.write(f"encodings.__path__: {__path__}\n") + sys.stderr.write(f"encodings.__spec__: {__spec__}\n") pass else: break $ LC_ALL=en_US.latin1 TESTPATH=$(pwd)/Lib:$(pwd)/build/lib.linux-x86_64-3.11 ./Programs/_testembed test_init_setpath_config exception: No module named 'encodings.latin_1' encodings.__path__: ['encodings'] encodings.__spec__: ModuleSpec(name='encodings', loader=, origin='frozen', submodule_search_locations=[]) exception: No module named 'encodings.iso_8859_1' encodings.__path__: ['encodings'] encodings.__spec__: ModuleSpec(name='encodings', loader=, origin='frozen', submodule_search_locations=[]) It should have this search location: >>> import encodings >>> encodings.__spec__ ModuleSpec(name='encodings', loader=, origin='frozen', submodule_search_locations=['/home/heimes/dev/python/cpython/Lib/encodings']) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 13:14:44 2021 From: report at bugs.python.org (Paul Bryan) Date: Mon, 13 Dec 2021 18:14:44 +0000 Subject: [issue46060] Clarify asyncio.new_event_loop return value In-Reply-To: <1639372239.16.0.586208830445.issue46060@roundup.psfhosted.org> Message-ID: <1639419284.89.0.658315621905.issue46060@roundup.psfhosted.org> Change by Paul Bryan : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 13:19:56 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 13 Dec 2021 18:19:56 +0000 Subject: [issue46062] tkinter.filedialog.SaveAs: create new folder on Ubuntu? In-Reply-To: <1639392097.98.0.679705685324.issue46062@roundup.psfhosted.org> Message-ID: <1639419596.15.0.709163090395.issue46062@roundup.psfhosted.org> Terry J. Reedy added the comment: This is not an IDLE issue, as IDLE merely calls tkinter.filedialog.SaveAS(args).show() and uses the returned path to open and write the file. This is likely not a tkinter issue either, but I will leave it open for now for others to comment. SaveAs subclasses _Dialog, which subclasses tkinter.commondialog.Dialog. For SaveAs .show calls tk_getSaveFile. This "pops up a dialog box for the user to select a file to save" and returns a full path or "". https://www.tcl.tk/man/tcl8.6/TkCmd/getOpenFile.html makes little promise about the dialog. On Windows, it opens a standard system SaveAs dialog, which allows directory navigation and creation. On macOS it opens a macOS dialog. I don't know about other systems. You might want to ask or python-list or idledev list about the experience of others with newer Python versions. ---------- assignee: terry.reedy -> components: +Tkinter -IDLE nosy: +serhiy.storchaka title: In IDLE, 'File > Save As' seems not to allow creation of a new folder -> tkinter.filedialog.SaveAs: create new folder on Ubuntu? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 13:23:05 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 18:23:05 +0000 Subject: [issue21910] [doc] File protocol should document if writelines must handle generators sensibly In-Reply-To: <1404380309.75.0.473808735546.issue21910@psf.upfronthosting.co.za> Message-ID: <1639419785.27.0.189298525944.issue21910@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy title: File protocol should document if writelines must handle generators sensibly -> [doc] File protocol should document if writelines must handle generators sensibly versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 13:34:33 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 18:34:33 +0000 Subject: [issue16392] [doc] import crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1639420473.42.0.739400955461.issue16392@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy title: import crashes on circular imports in ext modules -> [doc] import crashes on circular imports in ext modules versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 13:40:21 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 18:40:21 +0000 Subject: [issue17505] [doc] email.header.Header.__unicode__ does not decode header In-Reply-To: <1363852013.63.0.253070231302.issue17505@psf.upfronthosting.co.za> Message-ID: <1639420821.67.0.024007063417.issue17505@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy title: email.header.Header.__unicode__ does not decode header -> [doc] email.header.Header.__unicode__ does not decode header versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 13:49:20 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 18:49:20 +0000 Subject: [issue24116] --with-pydebug has no effect when the final python binary is compiled In-Reply-To: <1430637278.73.0.597162622661.issue24116@psf.upfronthosting.co.za> Message-ID: <1639421360.43.0.61278641176.issue24116@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 14:22:07 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 19:22:07 +0000 Subject: [issue19888] Three argument type() super call sets __name__ but not __qualname__ In-Reply-To: <1386194767.46.0.367836396475.issue19888@psf.upfronthosting.co.za> Message-ID: <1639423327.08.0.255198732175.issue19888@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 14:47:07 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 13 Dec 2021 19:47:07 +0000 Subject: [issue46066] [doc] TypedDict alternative definition syntax with keyword args is confusing In-Reply-To: <1639409817.42.0.21314101687.issue46066@roundup.psfhosted.org> Message-ID: <1639424827.81.0.978850952965.issue46066@roundup.psfhosted.org> Guido van Rossum added the comment: This is not really just a doc issue then, is it? Maybe we should just deprecate the feature? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 14:48:54 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 13 Dec 2021 19:48:54 +0000 Subject: [issue45949] Provide pure-Python implementation of Programs/_freeze_module for cross building In-Reply-To: <1638372868.47.0.982140813893.issue45949@roundup.psfhosted.org> Message-ID: <1639424934.6.0.901440345341.issue45949@roundup.psfhosted.org> Christian Heimes added the comment: New changeset eb483c46d62707bdf705491f76cf1fa9642fb47e by Christian Heimes in branch 'main': bpo-45949: Pure Python freeze module for cross builds (GH-29899) https://github.com/python/cpython/commit/eb483c46d62707bdf705491f76cf1fa9642fb47e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 14:53:06 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 13 Dec 2021 19:53:06 +0000 Subject: [issue45949] Provide pure-Python implementation of Programs/_freeze_module for cross building In-Reply-To: <1638372868.47.0.982140813893.issue45949@roundup.psfhosted.org> Message-ID: <1639425186.81.0.154211921259.issue45949@roundup.psfhosted.org> Christian Heimes added the comment: Thanks for your review, Eric! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 15:01:15 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Dec 2021 20:01:15 +0000 Subject: [issue46062] tkinter.filedialog.SaveAs: create new folder on Ubuntu? In-Reply-To: <1639392097.98.0.679705685324.issue46062@roundup.psfhosted.org> Message-ID: <1639425675.27.0.798300205345.issue46062@roundup.psfhosted.org> Serhiy Storchaka added the comment: On other systems it opens a simple dialog window implemented in Tk. AFAIK it does not support creating new directories. Ask Tk core developers for a new feature. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 15:01:41 2021 From: report at bugs.python.org (Ammar Askar) Date: Mon, 13 Dec 2021 20:01:41 +0000 Subject: [issue20949] Missing platform security integrations In-Reply-To: <1394998623.61.0.250593398151.issue20949@psf.upfronthosting.co.za> Message-ID: <1639425701.54.0.191231390283.issue20949@roundup.psfhosted.org> Ammar Askar added the comment: Hi Jeffrey, your second solution where you omit `-pie` is almost there. Instead of modifying the Makefile you can pass `-pie` in `LINKFORSHARED`: export CFLAGS="-fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2" export CXXFLAGS="-fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2" export LDFLAGS="-Wl,-z,noexecstack -Wl,-z,noexecheap -Wl,-z,now -Wl,-z,relro" export LINKFORSHARED="-pie" $ checksec ./python [*] '/home/ammar/workspace/cpython/python' Arch: amd64-64-little RELRO: Full RELRO Stack: Canary found NX: NX enabled PIE: PIE enabled FORTIFY: Enabled ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 15:32:52 2021 From: report at bugs.python.org (Eric Snow) Date: Mon, 13 Dec 2021 20:32:52 +0000 Subject: [issue45949] Provide pure-Python implementation of Programs/_freeze_module for cross building In-Reply-To: <1638372868.47.0.982140813893.issue45949@roundup.psfhosted.org> Message-ID: <1639427572.82.0.31678923523.issue45949@roundup.psfhosted.org> Eric Snow added the comment: You're welcome! Thanks for doing the work! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 15:44:00 2021 From: report at bugs.python.org (Eric Snow) Date: Mon, 13 Dec 2021 20:44:00 +0000 Subject: [issue45953] Statically allocate interpreter states as much as possible. In-Reply-To: <1638384639.14.0.97360024283.issue45953@roundup.psfhosted.org> Message-ID: <1639428240.04.0.205727528336.issue45953@roundup.psfhosted.org> Change by Eric Snow : ---------- pull_requests: +28315 pull_request: https://github.com/python/cpython/pull/30092 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 16:03:30 2021 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 13 Dec 2021 21:03:30 +0000 Subject: [issue16392] [doc] import crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1639429410.58.0.443336072426.issue16392@roundup.psfhosted.org> Stefan Behnel added the comment: Given that PEP-489 has landed in Py3.5, which is already retired and has been for more than a year, I think we can just close this issue as outdated. ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 16:55:25 2021 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 13 Dec 2021 21:55:25 +0000 Subject: [issue46063] TimedRotatingFileHandler deletes wrong files In-Reply-To: <1639397523.26.0.357602434319.issue46063@roundup.psfhosted.org> Message-ID: <1639432525.53.0.476496623723.issue46063@roundup.psfhosted.org> Change by Vinay Sajip : ---------- keywords: +patch pull_requests: +28316 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30093 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 17:15:11 2021 From: report at bugs.python.org (David Peled) Date: Mon, 13 Dec 2021 22:15:11 +0000 Subject: [issue45959] Teach pprint about dict views In-Reply-To: <1638428816.23.0.206050902249.issue45959@roundup.psfhosted.org> Message-ID: <1639433711.06.0.718185868491.issue45959@roundup.psfhosted.org> Change by David Peled : ---------- nosy: +david-peled _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 17:24:47 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 13 Dec 2021 22:24:47 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639434287.83.0.584001127114.issue46028@roundup.psfhosted.org> Steve Dower added the comment: > $ cat venv_a3/pyvenv.cfg > home = /home/ss/.pyenv/versions/3.11.0a3/bin > $ venv_a3/bin/python -c "import sys,os.path; print(e := sys._base_executable); print(os.path.exists(e))" > /home/ss/.pyenv/versions/3.11.0a3/bin/python > True This is the intended behaviour, and yes it's changed from previous versions (but not on Windows, where it was always correct). The previous value was incorrect, hence it was marked as an internal field. If your venv doesn't have a "python" binary in the directory set as "home" in pyvenv.cfg (which by definition, according to Lib/venv/__init__.py, is dirname(sys.executable) ), then there's some other issue with venv on your platform. ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 17:25:45 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 13 Dec 2021 22:25:45 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639434345.19.0.383759813663.issue46028@roundup.psfhosted.org> Steve Dower added the comment: I'm downgrading this from release blocker. If Vinay thinks there's a venv-related release blocker here he's welcome to raise the priority again, but I only see an intentional change to an internal value. Tools relying on internal fields will have to adapt for 3.11. ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 17:31:08 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 13 Dec 2021 22:31:08 +0000 Subject: [issue46056] Cannot use virtual environment on Windows 10 in corporate security settings In-Reply-To: <1639313116.18.0.364057363878.issue46056@roundup.psfhosted.org> Message-ID: <1639434668.17.0.864654193924.issue46056@roundup.psfhosted.org> Steve Dower added the comment: If you execute "python -m venv --without-pip ..." to create, then as a workaround you can set the __PYVENV_LAUNCHER__ environment variable to the full path to the venv's python.exe and run the normal python3.10.exe. As Eryk mentioned, you'll need to run everything through "-m" instead of the script wrappers that pip would install. This includes "-m ensurepip", which should be able to install pip into the venv normally. Note that this is an undocumented/unsupported environment variable, and so it may change in later releases. But it should work fine throughout 3.10's lifetime (and it hasn't changed _yet_ in 3.11). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 17:32:32 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 13 Dec 2021 22:32:32 +0000 Subject: [issue46056] Cannot use virtual environment on Windows 10 in corporate security settings In-Reply-To: <1639313116.18.0.364057363878.issue46056@roundup.psfhosted.org> Message-ID: <1639434752.94.0.976901350349.issue46056@roundup.psfhosted.org> Steve Dower added the comment: Also, if you see people discussing PEP 582, you might want to throw in a vote of support. It is intended to provide the benefits of a venv without needing to do tricks like we do for the current design, but it keeps being rejected for "not being sufficiently useful". Seems like in your case it would be very useful. That might help sway some of the opponents. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 17:36:29 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 13 Dec 2021 22:36:29 +0000 Subject: [issue14484] missing return in win32_kill? In-Reply-To: <1639403335.08.0.338110100926.issue14484@roundup.psfhosted.org> Message-ID: Steve Dower added the comment: > Windows should have its own specific function. Either that or mimic it properly. Having a single function that requires different parameters based on OS is a very user-hostile design. If someone wants to shepherd it through the process, I'd support either making the typical POSIX values do sensible equivalents on Windows (as best possible), or adding a new function entirely and deprecating all use of the current one on Windows. Those are the only ways to lead people into writing code that works well on all platforms. (My *real* preference is that people stop trying to kill applications ;) and try to set up a safe communication channel instead, but I know it's often unavoidable. Having common parameters that do the Right Things on all platforms is next best.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 17:45:12 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Mon, 13 Dec 2021 22:45:12 +0000 Subject: [issue46068] Change use of warnings.warn to logging.warning in a few places Message-ID: <1639435512.0.0.159079727605.issue46068@roundup.psfhosted.org> New submission from Andrei Kulakov : In discussion on https://github.com/python/cpython/pull/29910 related to whether to use warnings.warn or logging.warning, I found two places in the library where it might make sense to change to logging.warning. There's probably other instances where the same change can be made but it's not easy to tell just by going through the list because the difference of when use one or the other is not always clearcut. If more instances are found, they can be added to this issue. https://docs.python.org/3/howto/logging.html#when-to-use-logging https://github.com/python/cpython/blob/eb483c46d62707bdf705491f76cf1fa9642fb47e/Lib/zoneinfo/_tzpath.py#L44 https://github.com/python/cpython/blob/f42a06ba279c916fb67289e47f9bc60dc5dee4ee/Lib/zipfile.py#L1480 The downside of making this change is that it may break 3rd party unit tests. ---------- components: Library (Lib) messages: 408488 nosy: andrei.avk priority: low severity: normal status: open title: Change use of warnings.warn to logging.warning in a few places type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 17:46:01 2021 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 13 Dec 2021 22:46:01 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639435561.27.0.649453521116.issue46028@roundup.psfhosted.org> Vinay Sajip added the comment: > This is the intended behaviour, and yes it's changed from previous versions ... The previous value was incorrect, hence it was marked as an internal field. But the value as it's calculated now seems to give a file that doesn't exist - how can that be correct? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 17:46:11 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 22:46:11 +0000 Subject: [issue14484] missing return in win32_kill? In-Reply-To: <1333462226.23.0.725280599354.issue14484@psf.upfronthosting.co.za> Message-ID: <1639435571.6.0.163909513568.issue14484@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 17:50:55 2021 From: report at bugs.python.org (Ned Batchelder) Date: Mon, 13 Dec 2021 22:50:55 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639435855.12.0.849964620223.issue46028@roundup.psfhosted.org> Ned Batchelder added the comment: This started because a set of tests in the coverage.py test suite fail with 3.11.0a3. They attempt to create a venv in the test, and the test is already running inside a virtualenv. The venv creation fails, with a reference to a non-existent file. I wrote the bug about sys._base_executable because that seemed to be the central difference that was causing the problem. I was not relying on sys._base_executable, venv was. I will find steps to reproduce that don't reference sys._base_executable if you need them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 17:54:17 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 13 Dec 2021 22:54:17 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639436057.92.0.409019658146.issue46028@roundup.psfhosted.org> Steve Dower added the comment: Is sys._base_executable correct without a venv? It should be the same as sys.executable in that case. venv calculates 'home' here: Lib/venv/__init__.py#L117 executable = sys._base_executable dirname, exename = os.path.split(os.path.abspath(executable)) context.executable = executable # not relevant to this bug context.python_dir = dirname # written as "home = ..." If the path doesn't exist later on, it's because it didn't exist in the first place. *That* could be the real bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 17:56:52 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 13 Dec 2021 22:56:52 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639436212.01.0.554835785359.issue46028@roundup.psfhosted.org> Steve Dower added the comment: > But the value as it's calculated now seems to give a file that doesn't exist - how can that be correct? Because we never actually use the executable referenced by the 'home' path in a pyvenv.cfg. It's only used as a starting point to locate a couple of entries in sys.path. So if the executable isn't there, it's no big deal. It shouldn't even matter in the nested-creation case, because we still don't execute it then. It's just how we end up with the same value for 'home' in any venvs created within a venv. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 18:00:07 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 13 Dec 2021 23:00:07 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639436407.09.0.315870791373.issue46028@roundup.psfhosted.org> Steve Dower added the comment: > Because we never actually use the executable referenced by the 'home' path in a pyvenv.cfg. This is actually not true on Windows or (I believe) some situations on macOS, where we need to use a redirecting launcher to actually launch the binary specified in this value. But on POSIX, because all the references are hardcoded in the binary, we can just copy the original around and it never loses track of its real home and never has to launch its original copy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 18:05:58 2021 From: report at bugs.python.org (Ned Batchelder) Date: Mon, 13 Dec 2021 23:05:58 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639436758.52.0.926720041511.issue46028@roundup.psfhosted.org> Ned Batchelder added the comment: Demonstration of a problem with only stdlib, and no undocumented features. This is on a Mac: This works: $ python3.10 -V Python 3.10.0 $ python3.10 -m venv v310 $ v310/bin/python -m venv v310-nested $ v310-nested/bin/python -V Python 3.10.0 This does not work: $ python3.11 -V Python 3.11.0a3 $ python3.11 -m venv v311 $ v311/bin/python -m venv 311-nested Error: [Errno 2] No such file or directory: '/private/tmp/bpo-46028/311-nested/bin/python' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 18:26:10 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Dec 2021 23:26:10 +0000 Subject: [issue23469] Delete Misc/*.wpr files In-Reply-To: <1424048342.99.0.00819785192711.issue23469@psf.upfronthosting.co.za> Message-ID: <1639437970.17.0.915555368225.issue23469@roundup.psfhosted.org> STINNER Victor added the comment: IMO it's ok to remove these files. If WING is maintained again, it will be trivial to add again these configuratin files. I suggest to only remove these files in Python 3.11. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 18:28:11 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Dec 2021 23:28:11 +0000 Subject: [issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes In-Reply-To: <1536622594.77.0.0269046726804.issue34624@psf.upfronthosting.co.za> Message-ID: <1639438091.87.0.491884656043.issue34624@roundup.psfhosted.org> STINNER Victor added the comment: Oh, I didn't know this issue. I closed my issue bpo-43862 as a duplicate. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 18:28:26 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Dec 2021 23:28:26 +0000 Subject: [issue43862] warnings: -W option and PYTHONWARNINGS now use the message as a regex In-Reply-To: <1618578407.09.0.811659309688.issue43862@roundup.psfhosted.org> Message-ID: <1639438106.71.0.646579793959.issue43862@roundup.psfhosted.org> STINNER Victor added the comment: I mark this issue as a duplicate of bpo-34624. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> -W option and PYTHONWARNINGS env variable does not accept module regexes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 18:29:50 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Dec 2021 23:29:50 +0000 Subject: [issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes In-Reply-To: <1536622594.77.0.0269046726804.issue34624@psf.upfronthosting.co.za> Message-ID: <1639438190.25.0.310533517336.issue34624@roundup.psfhosted.org> STINNER Victor added the comment: > Adding regular expression support to -W and PYTHONWARNINGS env var turns the options into potential attack vectors. Why would an attacker control these options? If an attacker controls how Python is run, they are more efficient way to take control of Python and execute arbitrary code, than just trigger a denial of service, no ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 18:33:49 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Dec 2021 23:33:49 +0000 Subject: [issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes In-Reply-To: <1536622594.77.0.0269046726804.issue34624@psf.upfronthosting.co.za> Message-ID: <1639438429.29.0.0881367454673.issue34624@roundup.psfhosted.org> STINNER Victor added the comment: One option is to keep the current behavior by default, but support a new "/regex/" format. The /regex/ format is commonly used in Perl and sed. Example to ignore warnings containing "deprecated" string in their message: python3 -W "ignore:/deprecated/" PYTHONWARNINGS="ignore:/deprecated/" whereas the following commands continue to match exactly the whole warning message "deprecated": python3 -W "ignore:deprecated" PYTHONWARNINGS="ignore:deprecated" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 18:49:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 23:49:55 +0000 Subject: [issue12489] email.errors.HeaderParseError if base64url is used In-Reply-To: <1309790300.23.0.111625308862.issue12489@psf.upfronthosting.co.za> Message-ID: <1639439395.38.0.897377329324.issue12489@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11: >>> from email.header import decode_header >>> decode_header('=?iso-8859-1?B?QW5tZWxkdW5nIE5ldHphbnNjaGx1c3MgU_xkcmluZzNwLmpwZw==?=') Traceback (most recent call last): File "/Users/iritkatriel/src/cpython-1/Lib/email/header.py", line 126, in decode_header word = email.base64mime.decode(encoded_string) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/iritkatriel/src/cpython-1/Lib/email/base64mime.py", line 112, in decode return a2b_base64(string.encode('raw-unicode-escape')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ binascii.Error: Invalid base64-encoded string: number of data characters (49) cannot be 1 more than a multiple of 4 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/Users/iritkatriel/src/cpython-1/Lib/email/header.py", line 128, in decode_header raise HeaderParseError('Base64 decoding error') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ email.errors.HeaderParseError: Base64 decoding error ---------- nosy: +iritkatriel type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 18:54:42 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 23:54:42 +0000 Subject: [issue25948] Invalid MIME encoding generated by email.mime (line too long) In-Reply-To: <1451039623.64.0.603876276349.issue25948@psf.upfronthosting.co.za> Message-ID: <1639439682.2.0.697812181649.issue25948@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 18:59:35 2021 From: report at bugs.python.org (Brett Cannon) Date: Mon, 13 Dec 2021 23:59:35 +0000 Subject: [issue31370] Remove support for threads-less builds In-Reply-To: <1504732249.83.0.180664230366.issue31370@psf.upfronthosting.co.za> Message-ID: <1639439975.38.0.279555744763.issue31370@roundup.psfhosted.org> Brett Cannon added the comment: > https://web.dev/webassembly-threads/ suggests otherwise. It actually doesn't as that post isn't for WASI, it's for WASM in the browser (I chose my acronyms carefully ?). WASI is like POSIX for WebAssembly, so it's meant for desktop usage and thus no browser or JS engine is involved to provide web workers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 18:59:51 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 13 Dec 2021 23:59:51 +0000 Subject: [issue23148] Missing the charset parameter in as_encoded_word() In-Reply-To: <1420195099.17.0.393236049779.issue23148@psf.upfronthosting.co.za> Message-ID: <1639439991.54.0.411874343432.issue23148@roundup.psfhosted.org> Irit Katriel added the comment: I can't find as_encoded_word anywhere. Even on 3.7 branch. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 19:06:23 2021 From: report at bugs.python.org (Brett Cannon) Date: Tue, 14 Dec 2021 00:06:23 +0000 Subject: [issue40059] Provide a toml module in the standard library In-Reply-To: <1585119261.47.0.818238682424.issue40059@roundup.psfhosted.org> Message-ID: <1639440383.55.0.533034448988.issue40059@roundup.psfhosted.org> Brett Cannon added the comment: > I just noticed that tomli has dropped support for Python 3.6. That's a road block for general adoption of the package in the Python ecosystem. It's already in pip, so I think it's already generally adopted ?. https://github.com/pypa/pip/tree/main/src/pip/_vendor/tomli > Is my understanding correct that this issue is blocked on SC guidance? Not officially, no. But I'm personally not going to bring it forward right now. If someone else wants to formulate a complete proposal for the SC on this then they are definitely welcome to! You will need to address where the code is coming from, why that code should be used, what's the API, etc. The only reason the SC is mentioned here is there will be a discussion about how to maintain the stdlib, but it simply hasn't happened yet. You don't have to wait for it and asking for a TOML module might actually force the issue. > Is there anything we could do in advance of SC guidance that would be productive? Nope, someone eventually has to have the time to make the proposal and manage the deluge of comments. > Is there a good place to follow along or be notified of SC thoughts? https://github.com/python/steering-council as you already pointed out through the issues and monthly summaries. Otherwise you just need to open an issue and ask. ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 19:10:12 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 14 Dec 2021 00:10:12 +0000 Subject: [issue26528] NameError for built in function open when re-raising stored exception from yielded function In-Reply-To: <1457611797.69.0.202848672993.issue26528@psf.upfronthosting.co.za> Message-ID: <1639440612.12.0.332321821861.issue26528@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 19:22:35 2021 From: report at bugs.python.org (Martin Reboredo) Date: Tue, 14 Dec 2021 00:22:35 +0000 Subject: [issue40059] Provide a toml module in the standard library In-Reply-To: <1585119261.47.0.818238682424.issue40059@roundup.psfhosted.org> Message-ID: <1639441355.46.0.918325730306.issue40059@roundup.psfhosted.org> Martin Reboredo added the comment: > Not officially, no. But I'm personally not going to bring it forward right now. If someone else wants to formulate a complete proposal for the SC on this then they are definitely welcome to! You will need to address where the code is coming from, why that code should be used, what's the API, etc. > > The only reason the SC is mentioned here is there will be a discussion about how to maintain the stdlib, but it simply hasn't happened yet. You don't have to wait for it and asking for a TOML module might actually force the issue. I've been working on a document detailing the API implementation (as a PEP draft) see https://gitlab.com/YakoYakoYokuYoku/pep-toml. Although I've yet to write the code I'll to move forward with it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 19:53:45 2021 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 14 Dec 2021 00:53:45 +0000 Subject: [issue46063] TimedRotatingFileHandler deletes wrong files In-Reply-To: <1639397523.26.0.357602434319.issue46063@roundup.psfhosted.org> Message-ID: <1639443225.2.0.856323452896.issue46063@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset cb589d1b6bad4b75852c2e2a471a3800d5efdca7 by Vinay Sajip in branch 'main': bpo-46063: Improve algorithm for computing which rolled-over log file? (GH-30093) https://github.com/python/cpython/commit/cb589d1b6bad4b75852c2e2a471a3800d5efdca7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 19:53:56 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 14 Dec 2021 00:53:56 +0000 Subject: [issue46063] TimedRotatingFileHandler deletes wrong files In-Reply-To: <1639397523.26.0.357602434319.issue46063@roundup.psfhosted.org> Message-ID: <1639443236.94.0.898852115229.issue46063@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +28317 pull_request: https://github.com/python/cpython/pull/30094 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 19:54:01 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 14 Dec 2021 00:54:01 +0000 Subject: [issue46063] TimedRotatingFileHandler deletes wrong files In-Reply-To: <1639397523.26.0.357602434319.issue46063@roundup.psfhosted.org> Message-ID: <1639443241.17.0.945432092759.issue46063@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28318 pull_request: https://github.com/python/cpython/pull/30095 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 20:04:10 2021 From: report at bugs.python.org (Eric Snow) Date: Tue, 14 Dec 2021 01:04:10 +0000 Subject: [issue45953] Statically allocate interpreter states as much as possible. In-Reply-To: <1638384639.14.0.97360024283.issue45953@roundup.psfhosted.org> Message-ID: <1639443850.41.0.0812887406878.issue45953@roundup.psfhosted.org> Eric Snow added the comment: New changeset 121f1f893a39d0b58d3d2b5597505c154ecaac2a by Eric Snow in branch 'main': bpo-45953: Statically initialize the small ints. (gh-30092) https://github.com/python/cpython/commit/121f1f893a39d0b58d3d2b5597505c154ecaac2a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 20:06:34 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Dec 2021 01:06:34 +0000 Subject: [issue31370] Remove support for threads-less builds In-Reply-To: <1504732249.83.0.180664230366.issue31370@psf.upfronthosting.co.za> Message-ID: <1639443994.46.0.441144097737.issue31370@roundup.psfhosted.org> STINNER Victor added the comment: > This has unfortunately turned out to be a blocker on getting WASI support as there's not direct threading support in WebAssembly. This issue is now closed and unrelated to WASI support. Can you please open a new separated issue for it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 20:16:00 2021 From: report at bugs.python.org (Eric Snow) Date: Tue, 14 Dec 2021 01:16:00 +0000 Subject: [issue45953] Statically allocate interpreter states as much as possible. In-Reply-To: <1638384639.14.0.97360024283.issue45953@roundup.psfhosted.org> Message-ID: <1639444560.21.0.253536217362.issue45953@roundup.psfhosted.org> Change by Eric Snow : ---------- pull_requests: +28319 pull_request: https://github.com/python/cpython/pull/30096 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 20:18:02 2021 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 14 Dec 2021 01:18:02 +0000 Subject: [issue46063] TimedRotatingFileHandler deletes wrong files In-Reply-To: <1639397523.26.0.357602434319.issue46063@roundup.psfhosted.org> Message-ID: <1639444682.67.0.373212627651.issue46063@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset f84e2f6c0aca97c59ec8ce21715ae9bd89893307 by Miss Islington (bot) in branch '3.10': [3.10] bpo-46063: Improve algorithm for computing which rolled-over log file? (GH-30093) (GH-30094) https://github.com/python/cpython/commit/f84e2f6c0aca97c59ec8ce21715ae9bd89893307 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 20:19:54 2021 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 14 Dec 2021 01:19:54 +0000 Subject: [issue46063] TimedRotatingFileHandler deletes wrong files In-Reply-To: <1639397523.26.0.357602434319.issue46063@roundup.psfhosted.org> Message-ID: <1639444794.72.0.750560972885.issue46063@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 94234228abbb84945a48049a7515dea960bc9834 by Miss Islington (bot) in branch '3.9': [3.9] bpo-46063: Improve algorithm for computing which rolled-over log file? (GH-30093) (GH-30095) https://github.com/python/cpython/commit/94234228abbb84945a48049a7515dea960bc9834 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 20:31:45 2021 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 14 Dec 2021 01:31:45 +0000 Subject: [issue45919] Use WinAPI GetFileType() in is_valid_fd() In-Reply-To: <1638127307.77.0.0584468495635.issue45919@roundup.psfhosted.org> Message-ID: <1639445505.28.0.254895123957.issue45919@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 9130a4d62032468e0d4949aaa49c29afb0d854ca by Dong-hee Na in branch 'main': bpo-45919: Remove out of date comment (GH-30090) https://github.com/python/cpython/commit/9130a4d62032468e0d4949aaa49c29afb0d854ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 20:39:54 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 14 Dec 2021 01:39:54 +0000 Subject: [issue46068] Change use of warnings.warn to logging.warning in a few places In-Reply-To: <1639435512.0.0.159079727605.issue46068@roundup.psfhosted.org> Message-ID: <1639445994.53.0.250163503528.issue46068@roundup.psfhosted.org> Raymond Hettinger added the comment: > The downside of making this change is that it may break 3rd party unit tests. I don?t see any upside. The modules in question have been stable for a good while. There?s no benefit to changing them. Also, there is no strong agreement that the standard library should ever prefer logging.warn() over the warnings module which has mechanisms for filtering the warnings. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 20:44:08 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 14 Dec 2021 01:44:08 +0000 Subject: [issue46068] Change use of warnings.warn to logging.warning in a few places In-Reply-To: <1639435512.0.0.159079727605.issue46068@roundup.psfhosted.org> Message-ID: <1639446248.74.0.870599131905.issue46068@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- Removed message: https://bugs.python.org/msg408512 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 20:45:39 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 14 Dec 2021 01:45:39 +0000 Subject: [issue46068] Change use of warnings.warn to logging.warning in a few places In-Reply-To: <1639435512.0.0.159079727605.issue46068@roundup.psfhosted.org> Message-ID: <1639446339.33.0.0204450365872.issue46068@roundup.psfhosted.org> Raymond Hettinger added the comment: > The downside of making this change is that it may break 3rd party unit tests. I don?t see any upside. The modules in question have been stable for a good while. There?s no benefit to changing them. Also, there is no strong agreement that the standard library should ever prefer logging.warning() over the warnings module which has mechanisms for filtering the warnings, escalating them to errors, or limiting the number of times they are reported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 13 22:31:17 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 14 Dec 2021 03:31:17 +0000 Subject: [issue45915] Use fcntl(fd, F_GETFD) to check whether an fd is valid In-Reply-To: <1638094386.96.0.551592531479.issue45915@roundup.psfhosted.org> Message-ID: <1639452677.64.0.595861860742.issue45915@roundup.psfhosted.org> Eryk Sun added the comment: PR 29821 adds __APPLE__ to the platforms that use fcntl(fd, F_GETFD). Is this okay on macOS, given bpo-30225? Apparently fstat() fails if the other end of a pipe is closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 02:11:28 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 14 Dec 2021 07:11:28 +0000 Subject: [issue46057] argparse: embedded groups may prevent options from being in help output In-Reply-To: <1639320798.63.0.0421812802369.issue46057@roundup.psfhosted.org> Message-ID: <1639465888.81.0.172095134819.issue46057@roundup.psfhosted.org> Irit Katriel added the comment: You?re right that the api should not be there. See issue22047. I don?t think it should be patches to call super/return self. That would just be confusing. ---------- resolution: -> duplicate superseder: -> argparse improperly prints mutually exclusive options when they are in a group _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 03:09:08 2021 From: report at bugs.python.org (Aivar Annamaa) Date: Tue, 14 Dec 2021 08:09:08 +0000 Subject: [issue46062] tkinter.filedialog.SaveAs: create new folder on Ubuntu? In-Reply-To: <1639392097.98.0.679705685324.issue46062@roundup.psfhosted.org> Message-ID: <1639469348.01.0.188233952538.issue46062@roundup.psfhosted.org> Aivar Annamaa added the comment: You may want to use zenity in a subprocess instead of this dialog in Linux, but this has its own problems (appearing behind other windows occasionally) ---------- nosy: +aivarannamaa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 03:59:56 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Dec 2021 08:59:56 +0000 Subject: [issue23148] Missing the charset parameter in as_encoded_word() In-Reply-To: <1420195099.17.0.393236049779.issue23148@psf.upfronthosting.co.za> Message-ID: <1639472396.11.0.934563201308.issue23148@roundup.psfhosted.org> Serhiy Storchaka added the comment: The code was completely rewritten in issue27240. No tests are needed. ---------- resolution: -> fixed stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 04:31:42 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Dec 2021 09:31:42 +0000 Subject: [issue31370] Remove support for threads-less builds In-Reply-To: <1504732249.83.0.180664230366.issue31370@psf.upfronthosting.co.za> Message-ID: <1639474302.48.0.153970475445.issue31370@roundup.psfhosted.org> Serhiy Storchaka added the comment: Concur with Victor. It is fine to add a link to other discussion in a closed issue, but an issue closed many years ago is not a good place for a new discussion at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 04:38:01 2021 From: report at bugs.python.org (haven david) Date: Tue, 14 Dec 2021 09:38:01 +0000 Subject: [issue46069] Super Smash Flash 2 Message-ID: <1639474681.48.0.76279555559.issue46069@roundup.psfhosted.org> New submission from haven david : Opportunity for you to transform into interesting characters like Mario, Sonic... Online game with exciting battles https://super-smashflash2.com ---------- components: Build messages: 408519 nosy: havenhaven priority: normal severity: normal status: open title: Super Smash Flash 2 versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 04:40:34 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Dec 2021 09:40:34 +0000 Subject: [issue46069] Super Smash Flash 2 In-Reply-To: <1639474681.48.0.76279555559.issue46069@roundup.psfhosted.org> Message-ID: <1639474834.77.0.543434319597.issue46069@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 05:01:53 2021 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 14 Dec 2021 10:01:53 +0000 Subject: [issue46063] TimedRotatingFileHandler deletes wrong files In-Reply-To: <1639397523.26.0.357602434319.issue46063@roundup.psfhosted.org> Message-ID: <1639476113.99.0.589640920672.issue46063@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 05:08:04 2021 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 14 Dec 2021 10:08:04 +0000 Subject: [issue23010] "unclosed file" warning when defining unused logging FileHandler in dictConfig In-Reply-To: <1418046415.01.0.116582999558.issue23010@psf.upfronthosting.co.za> Message-ID: <1639476484.25.0.117635013785.issue23010@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 05:09:02 2021 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 14 Dec 2021 10:09:02 +0000 Subject: [issue46028] 3.11.0a3: sys._base_executable is wrong, breaks venv - it wasn't under 3.11.0a2 In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639476542.67.0.250088700892.issue46028@roundup.psfhosted.org> Change by Vinay Sajip : ---------- title: 3.11.0a3: under tox, sys._base_executable is wrong -> 3.11.0a3: sys._base_executable is wrong, breaks venv - it wasn't under 3.11.0a2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 05:57:50 2021 From: report at bugs.python.org (graysky) Date: Tue, 14 Dec 2021 10:57:50 +0000 Subject: [issue46070] broken subinterpreters Message-ID: <1639479470.16.0.0957612092108.issue46070@roundup.psfhosted.org> New submission from graysky : Seems as though cpython is broken when working with subinterpreters. The problematic change could be (d0d29655ff) affecting import.c.[1] Reverting this commit and rebuilding python fixes the issues on my system with some scripts that import sqlite, for example, the Kodi plugin YouTube[2] and the IMDB Trailers plugin. Others have reported similar breakage with other python code[3]. Example output when the bug manifests: ERROR : Traceback (most recent call last): ERROR : File "/usr/lib/python3.10/sqlite3/dbapi2.py", line 83, in register_adapters_and_converters ERROR : ERROR : register_converter("timestamp", convert_timestamp) ERROR : ERROR : KeyError ERROR : : ERROR : 'timepart_full' ERROR : ERROR : Exception ignored deletion of interned string failed ERROR : : References: 1. https://github.com/python/cpython/commit/d0d29655ffc43d426ad68542d8de8304f7f1346a 2. https://github.com/anxdpanic/plugin.video.youtube/issues/255 3. https://bbs.archlinux.org/viewtopic.php?id=272121 ---------- components: Interpreter Core messages: 408520 nosy: graysky priority: normal severity: normal status: open title: broken subinterpreters versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 06:18:12 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 14 Dec 2021 11:18:12 +0000 Subject: [issue46063] TimedRotatingFileHandler deletes wrong files In-Reply-To: <1639397523.26.0.357602434319.issue46063@roundup.psfhosted.org> Message-ID: <1639480692.05.0.668607157304.issue46063@roundup.psfhosted.org> Irit Katriel added the comment: % ./python.exe -We -m test -v test_logging -m test_compute_files_to_delete Raised RLIMIT_NOFILE: 256 -> 1024 == CPython 3.11.0a3+ (heads/main:9130a4d620, Dec 14 2021, 11:12:05) [Clang 13.0.0 (clang-1300.0.29.3)] == macOS-11.6-x86_64-i386-64bit little-endian == cwd: /Users/iritkatriel/src/cpython/build/test_python_86072? == CPU count: 12 == encodings: locale=UTF-8, FS=utf-8 0:00:00 load avg: 5.20 Run tests sequentially 0:00:00 load avg: 5.20 [1/1] test_logging test_compute_files_to_delete (test.test_logging.TimedRotatingFileHandlerTest) ... Warning -- Unraisable exception Exception ignored in: <_io.FileIO name='/var/folders/kf/0v7kz3ps62dg11v9rq0sz35m0000gn/T/test_logging_w3nn9vsi/d.e.log' mode='ab' closefd=True> Traceback (most recent call last): File "/Users/iritkatriel/src/cpython/Lib/test/test_logging.py", line 5469, in test_compute_files_to_delete for i, prefix in enumerate(prefixes): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/folders/kf/0v7kz3ps62dg11v9rq0sz35m0000gn/T/test_logging_w3nn9vsi/d.e.log' mode='a' encoding='UTF-8'> Warning -- Unraisable exception Exception ignored in: <_io.FileIO name='/var/folders/kf/0v7kz3ps62dg11v9rq0sz35m0000gn/T/test_logging_w3nn9vsi/a.b.c.log' mode='ab' closefd=True> Traceback (most recent call last): File "/Users/iritkatriel/src/cpython/Lib/test/test_logging.py", line 5469, in test_compute_files_to_delete for i, prefix in enumerate(prefixes): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/folders/kf/0v7kz3ps62dg11v9rq0sz35m0000gn/T/test_logging_w3nn9vsi/a.b.c.log' mode='a' encoding='UTF-8'> Warning -- Unraisable exception Exception ignored in: <_io.FileIO name='/var/folders/kf/0v7kz3ps62dg11v9rq0sz35m0000gn/T/test_logging_w3nn9vsi/a.b.log' mode='ab' closefd=True> Traceback (most recent call last): File "/Users/iritkatriel/src/cpython/Lib/test/test_logging.py", line 5469, in test_compute_files_to_delete for i, prefix in enumerate(prefixes): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/folders/kf/0v7kz3ps62dg11v9rq0sz35m0000gn/T/test_logging_w3nn9vsi/a.b.log' mode='a' encoding='UTF-8'> Warning -- Unraisable exception Exception ignored in: <_io.FileIO name='/var/folders/kf/0v7kz3ps62dg11v9rq0sz35m0000gn/T/test_logging_w3nn9vsi/d.e.f.log' mode='ab' closefd=True> Traceback (most recent call last): File "/Users/iritkatriel/src/cpython/Lib/test/test_logging.py", line 5469, in test_compute_files_to_delete for i, prefix in enumerate(prefixes): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/folders/kf/0v7kz3ps62dg11v9rq0sz35m0000gn/T/test_logging_w3nn9vsi/d.e.f.log' mode='a' encoding='UTF-8'> ok ---------------------------------------------------------------------- Ran 1 test in 0.016s OK test_logging failed (env changed) == Tests result: SUCCESS == 1 test altered the execution environment: test_logging ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 06:22:49 2021 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 14 Dec 2021 11:22:49 +0000 Subject: [issue46063] TimedRotatingFileHandler deletes wrong files In-Reply-To: <1639397523.26.0.357602434319.issue46063@roundup.psfhosted.org> Message-ID: <1639480969.55.0.376925750819.issue46063@roundup.psfhosted.org> Vinay Sajip added the comment: Ah ... forgot to set delay=True for the handlers. Will look at this soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 06:53:02 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 14 Dec 2021 11:53:02 +0000 Subject: [issue46023] Modules/makesetup generated rules ignore *disabled* In-Reply-To: <1639041830.9.0.701619101169.issue46023@roundup.psfhosted.org> Message-ID: <1639482782.28.0.124121308179.issue46023@roundup.psfhosted.org> Christian Heimes added the comment: GH-30001 may have introduced a regression. makesetup is dropping too many modules. Back to the drawing board! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 06:56:41 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 14 Dec 2021 11:56:41 +0000 Subject: [issue22047] Deprecate unsupported nesting of argparse groups In-Reply-To: <1406131424.14.0.0235697032218.issue22047@psf.upfronthosting.co.za> Message-ID: <1639483001.42.0.146875264306.issue22047@roundup.psfhosted.org> Irit Katriel added the comment: I am repurposing this issue for the deprecation of nesting. It is pretty clear that the functions exist by accident through inheritance. They are not documented and from the number of open issues about them they clearly are not working as people expect them to. ---------- title: argparse improperly prints mutually exclusive options when they are in a group -> Deprecate unsupported nesting of argparse groups versions: +Python 3.11 -Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 06:57:42 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 14 Dec 2021 11:57:42 +0000 Subject: [issue22047] Deprecate unsupported nesting of argparse groups In-Reply-To: <1406131424.14.0.0235697032218.issue22047@psf.upfronthosting.co.za> Message-ID: <1639483062.91.0.705559981431.issue22047@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +28320 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30098 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 07:39:01 2021 From: report at bugs.python.org (97littleleaf11) Date: Tue, 14 Dec 2021 12:39:01 +0000 Subject: [issue46066] TypedDict alternative definition syntax with keyword args is confusing In-Reply-To: <1639409817.42.0.21314101687.issue46066@roundup.psfhosted.org> Message-ID: <1639485541.91.0.649041009238.issue46066@roundup.psfhosted.org> Change by 97littleleaf11 <97littleleaf11 at gmail.com>: ---------- title: [doc] TypedDict alternative definition syntax with keyword args is confusing -> TypedDict alternative definition syntax with keyword args is confusing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 07:50:02 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 14 Dec 2021 12:50:02 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639436758.52.0.926720041511.issue46028@roundup.psfhosted.org> Message-ID: Steve Dower added the comment: > $ v311/bin/python -m venv 311-nested > Error: [Errno 2] No such file or directory: '/private/tmp/bpo-46028/311-nested/bin/python' I assume /private/tmp/bpo-46028/311-nested/bin/python3.11 exists though? Probably that's the issue here - I don't know how else to get the real executable *name* other than copying from argv[0], and it isn't supposed to be necessary. You also have v311/bin/python3.11, right? If you use that one, does it work? I'm trying to narrow down where the base executable is actually being launched and why. ---------- title: 3.11.0a3: sys._base_executable is wrong, breaks venv - it wasn't under 3.11.0a2 -> 3.11.0a3: under tox, sys._base_executable is wrong _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 07:57:53 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 14 Dec 2021 12:57:53 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: Message-ID: Steve Dower added the comment: Or possibly that error is coming from the attempt to copy it? And since both executable and base_executable don't have the 3/3.x suffix, the copy is failing because the "real" binary does have the suffix. This could be corrected in getpath.py with a platform-specific quirk that searches for suffixed binaries for base_executable, but for performance reasons I think we'd prefer to have that check in venv so that it doesn't impact every single launch of CPython. The actual binary could also be added to pyvenv.cfg as another value - parsing that out in getpath.py is now considerably easier for someone to add than it used to be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 08:01:18 2021 From: report at bugs.python.org (Berker Peksag) Date: Tue, 14 Dec 2021 13:01:18 +0000 Subject: [issue23469] Delete Misc/*.wpr files In-Reply-To: <1424048342.99.0.00819785192711.issue23469@psf.upfronthosting.co.za> Message-ID: <1639486878.03.0.592004163251.issue23469@roundup.psfhosted.org> Berker Peksag added the comment: New changeset d46d08d9474cb00b697dbdbb12cc7ce8f8ddfcec by Kumar Aditya in branch 'main': bpo-23469: Delete Wing IDE configuration files (GH-30067) https://github.com/python/cpython/commit/d46d08d9474cb00b697dbdbb12cc7ce8f8ddfcec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 08:02:33 2021 From: report at bugs.python.org (Berker Peksag) Date: Tue, 14 Dec 2021 13:02:33 +0000 Subject: [issue23469] Delete Misc/*.wpr files In-Reply-To: <1424048342.99.0.00819785192711.issue23469@psf.upfronthosting.co.za> Message-ID: <1639486953.93.0.228137367593.issue23469@roundup.psfhosted.org> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 08:15:26 2021 From: report at bugs.python.org (Ned Batchelder) Date: Tue, 14 Dec 2021 13:15:26 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639487726.16.0.455228110235.issue46028@roundup.psfhosted.org> Ned Batchelder added the comment: > I assume /private/tmp/bpo-46028/311-nested/bin/python3.11 exists though? Yes, that file exists, but it's a symlink to a non-existent file: $ ls -al 311-nested/bin total 0 drwxr-xr-x 5 nedbatchelder wheel 160 Dec 13 18:04 ./ drwxr-xr-x 6 nedbatchelder wheel 192 Dec 13 18:04 ../ lrwxr-xr-x 1 nedbatchelder wheel 21 Dec 13 18:04 python@ -> /usr/local/bin/python lrwxr-xr-x 1 nedbatchelder wheel 6 Dec 13 18:04 python3@ -> python lrwxr-xr-x 1 nedbatchelder wheel 6 Dec 13 18:04 python3.11@ -> python $ ls -al /usr/local/bin/python ls: /usr/local/bin/python: No such file or directory ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 08:16:26 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 14 Dec 2021 13:16:26 +0000 Subject: [issue26952] argparse help formatter raises IndexError In-Reply-To: <1462374887.67.0.462060112057.issue26952@psf.upfronthosting.co.za> Message-ID: <1639487786.81.0.195500774788.issue26952@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch nosy: +iritkatriel nosy_count: 6.0 -> 7.0 pull_requests: +28321 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30099 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 08:25:50 2021 From: report at bugs.python.org (John Belmonte) Date: Tue, 14 Dec 2021 13:25:50 +0000 Subject: [issue45995] string formatting: normalize negative zero In-Reply-To: <1638792226.95.0.292604366656.issue45995@roundup.psfhosted.org> Message-ID: <1639488350.22.0.835885556032.issue45995@roundup.psfhosted.org> John Belmonte added the comment: implemented float and Decimal-- PR is ready for review ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 09:12:58 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 14 Dec 2021 14:12:58 +0000 Subject: [issue46023] Modules/makesetup generated rules ignore *disabled* In-Reply-To: <1639041830.9.0.701619101169.issue46023@roundup.psfhosted.org> Message-ID: <1639491178.66.0.628151889169.issue46023@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28322 pull_request: https://github.com/python/cpython/pull/30100 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 09:22:51 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 14 Dec 2021 14:22:51 +0000 Subject: [issue18467] argparse - problematic 'default' behavior In-Reply-To: <1373927590.26.0.302211166373.issue18467@psf.upfronthosting.co.za> Message-ID: <1639491771.14.0.942819468098.issue18467@roundup.psfhosted.org> Irit Katriel added the comment: Mat?j, did Paul's suggestion solve your use case? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 09:42:56 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 14 Dec 2021 14:42:56 +0000 Subject: [issue46023] Modules/makesetup generated rules ignore *disabled* In-Reply-To: <1639041830.9.0.701619101169.issue46023@roundup.psfhosted.org> Message-ID: <1639492976.99.0.42975417999.issue46023@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 74821b30539bba3cf0ac4148923ec0e9b826508e by Christian Heimes in branch 'main': bpo-46023: Skip build if module is marked as DISABLED (GH-30100) https://github.com/python/cpython/commit/74821b30539bba3cf0ac4148923ec0e9b826508e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 09:43:01 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 14 Dec 2021 14:43:01 +0000 Subject: [issue45383] PyType_FromSpec API fails to use metaclass of bases In-Reply-To: <1633470686.49.0.00898443232155.issue45383@roundup.psfhosted.org> Message-ID: <1639492981.73.0.693505890002.issue45383@roundup.psfhosted.org> Petr Viktorin added the comment: I haven't forgotten this issue, but when I get to it it always leads to a rabbit hole. Sometimes just chasing refleaks, but there are deeper issues as well. AFAICS, there's no way to call metatype.tp_new for such a class. I guess the safest option is to fail when the metaclass has a custom tp_new -- because that means the metaclass is requesting that it wants to allocate/initialize its types itself. We can call metatype.tp_init, and probably should. And __init_subclass__ too, I suppose. But at that point, this is duplicating a lot of existing functionality, and I'm starting to wonder if this wouldn't all be better with calling the metaclass instead. What's missing? - basicsize/itemsize could be allowed with __basicsize__/__itemsize__ in the dict. - flags: we could add mechanisms to set individual flags after the type is created, as needed. - slots can usually be applied after the class is created; maybe there should be a public function for this. - members could theoretically be copied to individual descriptors; there doesn't seem much need for keeping tp_members around. Does that seem like a more reasonable direction to explore? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 09:50:10 2021 From: report at bugs.python.org (wolfgang kuehn) Date: Tue, 14 Dec 2021 14:50:10 +0000 Subject: [issue46056] Cannot use virtual environment on Windows 10 in corporate security settings In-Reply-To: <1639313116.18.0.364057363878.issue46056@roundup.psfhosted.org> Message-ID: <1639493410.48.0.823998046134.issue46056@roundup.psfhosted.org> wolfgang kuehn added the comment: I can confirm that setting __PYVENV_LAUNCHER__ to ANY path with prefix ./venv/Scripts/ does indeed mark the python session as being a virtual environment, no special permissions needed. However, you will have no tooling support whatsoever (e.g. PyCharms Package Mngt) because __PYVENV_LAUNCHER__ is, after all, non-standard. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 10:04:39 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 14 Dec 2021 15:04:39 +0000 Subject: [issue46059] Typo in match Statement example In-Reply-To: <1639356396.07.0.913283855262.issue46059@roundup.psfhosted.org> Message-ID: <1639494279.33.0.707931729097.issue46059@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +28323 pull_request: https://github.com/python/cpython/pull/30101 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 10:04:38 2021 From: report at bugs.python.org (Ken Jin) Date: Tue, 14 Dec 2021 15:04:38 +0000 Subject: [issue46059] Typo in match Statement example In-Reply-To: <1639356396.07.0.913283855262.issue46059@roundup.psfhosted.org> Message-ID: <1639494278.34.0.143966026286.issue46059@roundup.psfhosted.org> Ken Jin added the comment: New changeset 1cbb88736c32ac30fd530371adf53fe7554be0a5 by Alex Waygood in branch 'main': bpo-46059: Clarify pattern-matching example in "control flow" docs (GH-30079) https://github.com/python/cpython/commit/1cbb88736c32ac30fd530371adf53fe7554be0a5 ---------- nosy: +kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 10:20:03 2021 From: report at bugs.python.org (David Mc Dougall) Date: Tue, 14 Dec 2021 15:20:03 +0000 Subject: [issue46071] Graphlib documentation Message-ID: <1639495203.77.0.753963192728.issue46071@roundup.psfhosted.org> New submission from David Mc Dougall : The documentation for graphlib encourages users to represent their graphs in a awkward format. Graphs are currently represented using dictionaries of nodes, for example: graph["end_node"] = ["start_node"] And this is unintuitive because you can't use the graph traverse edges in their forward direction. If you look up a node in the graph, you get all of the nodes that point to the key, as opposed to all of the nodes that the key points to. The solution is to rewrite the documentation such that all of the edge directions are reversed. The final topologically sorted list will be in the "opposite" direction as a consequence. This will cause no functional changes. ---------- assignee: docs at python components: Documentation messages: 408535 nosy: dam1784, docs at python priority: normal severity: normal status: open title: Graphlib documentation type: enhancement versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 10:22:49 2021 From: report at bugs.python.org (Roundup Robot) Date: Tue, 14 Dec 2021 15:22:49 +0000 Subject: [issue46071] Graphlib documentation In-Reply-To: <1639495203.77.0.753963192728.issue46071@roundup.psfhosted.org> Message-ID: <1639495369.2.0.7962097582.issue46071@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 2.0 -> 3.0 pull_requests: +28324 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30102 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 10:25:52 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 14 Dec 2021 15:25:52 +0000 Subject: [issue46059] Typo in match Statement example In-Reply-To: <1639356396.07.0.913283855262.issue46059@roundup.psfhosted.org> Message-ID: <1639495552.52.0.0372370809321.issue46059@roundup.psfhosted.org> miss-islington added the comment: New changeset 503803d8c19be91becc09ca59f3febcbc324d6d2 by Miss Islington (bot) in branch '3.10': bpo-46059: Clarify pattern-matching example in "control flow" docs (GH-30079) https://github.com/python/cpython/commit/503803d8c19be91becc09ca59f3febcbc324d6d2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 10:27:48 2021 From: report at bugs.python.org (Ken Jin) Date: Tue, 14 Dec 2021 15:27:48 +0000 Subject: [issue46059] Typo in match Statement example In-Reply-To: <1639356396.07.0.913283855262.issue46059@roundup.psfhosted.org> Message-ID: <1639495668.17.0.710579597124.issue46059@roundup.psfhosted.org> Change by Ken Jin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 10:28:31 2021 From: report at bugs.python.org (Ken Jin) Date: Tue, 14 Dec 2021 15:28:31 +0000 Subject: [issue46046] I/O bound threads got to no chance to run with small CPU bound threads with new GIL In-Reply-To: <1639220179.27.0.659005921662.issue46046@roundup.psfhosted.org> Message-ID: <1639495711.07.0.392278644556.issue46046@roundup.psfhosted.org> Ken Jin added the comment: Hi, Thank you for your interest in Python, and especially the GIL. David Beazley opened an issue for his PyCon 2010 GIL talk at https://bugs.python.org/issue7946. You can discuss more on that issue (I suggest first reading through it, there's a really long history behind the GIL). I'm closing this issue as a duplicate, as discussion should be redirected to the abovementioned issue7946 instead. ---------- nosy: +kj resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 10:28:42 2021 From: report at bugs.python.org (Zachary Ware) Date: Tue, 14 Dec 2021 15:28:42 +0000 Subject: [issue46069] Spam In-Reply-To: <1639474681.48.0.76279555559.issue46069@roundup.psfhosted.org> Message-ID: <1639495722.7.0.639264040551.issue46069@roundup.psfhosted.org> Change by Zachary Ware : ---------- components: -Build nosy: -havenhaven title: Super Smash Flash 2 -> Spam versions: -Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 10:28:52 2021 From: report at bugs.python.org (Alex Waygood) Date: Tue, 14 Dec 2021 15:28:52 +0000 Subject: [issue46059] Typo in match Statement example In-Reply-To: <1639356396.07.0.913283855262.issue46059@roundup.psfhosted.org> Message-ID: <1639495732.32.0.26415924883.issue46059@roundup.psfhosted.org> Alex Waygood added the comment: Thanks for the bug report, Vivek! It should be fixed now -- it might take a day or two for the online docs to update. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 10:29:15 2021 From: report at bugs.python.org (Zachary Ware) Date: Tue, 14 Dec 2021 15:29:15 +0000 Subject: [issue46069] Spam Message-ID: <1639495755.19.0.908871862246.issue46069@roundup.psfhosted.org> Change by Zachary Ware : ---------- Removed message: https://bugs.python.org/msg408519 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 10:36:55 2021 From: report at bugs.python.org (Eric Snow) Date: Tue, 14 Dec 2021 15:36:55 +0000 Subject: [issue46070] broken subinterpreters In-Reply-To: <1639479470.16.0.0957612092108.issue46070@roundup.psfhosted.org> Message-ID: <1639496215.82.0.167638495489.issue46070@roundup.psfhosted.org> Eric Snow added the comment: (related: bpo-44059) Presumably the problem relates to global state used in different interpreters leading to an inconsistent state in the crashing extension (or its dependencies). @graysky, do you know if this was a problem before Python 3.8? ---------- components: +Subinterpreters nosy: +eric.snow, petr.viktorin, shihai1991 stage: -> test needed type: -> behavior versions: +Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 10:42:54 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 14 Dec 2021 15:42:54 +0000 Subject: [issue26726] Incomplete Internationalization in Argparse Module In-Reply-To: <1460242413.52.0.89369314936.issue26726@psf.upfronthosting.co.za> Message-ID: <1639496574.06.0.742478664451.issue26726@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 10:44:53 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 14 Dec 2021 15:44:53 +0000 Subject: [issue46070] broken subinterpreters In-Reply-To: <1639479470.16.0.0957612092108.issue46070@roundup.psfhosted.org> Message-ID: <1639496693.19.0.272147786271.issue46070@roundup.psfhosted.org> Petr Viktorin added the comment: Interned strings were broken in GH-20058, see bpo-46006. Maybe that's also the issue here? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 10:49:56 2021 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 14 Dec 2021 15:49:56 +0000 Subject: [issue46071] Graphlib documentation In-Reply-To: <1639495203.77.0.753963192728.issue46071@roundup.psfhosted.org> Message-ID: <1639496996.4.0.646592700023.issue46071@roundup.psfhosted.org> Change by Eric V. Smith : ---------- nosy: +eric.smith, rhettinger, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 11:03:26 2021 From: report at bugs.python.org (graysky) Date: Tue, 14 Dec 2021 16:03:26 +0000 Subject: [issue46070] broken subinterpreters In-Reply-To: <1639479470.16.0.0957612092108.issue46070@roundup.psfhosted.org> Message-ID: <1639497806.07.0.742111155566.issue46070@roundup.psfhosted.org> graysky added the comment: @Eric - I have not seen this on 3.8 or 3.9. No data before 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 11:07:48 2021 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 14 Dec 2021 16:07:48 +0000 Subject: [issue46063] TimedRotatingFileHandler deletes wrong files In-Reply-To: <1639397523.26.0.357602434319.issue46063@roundup.psfhosted.org> Message-ID: <1639498068.79.0.714796997493.issue46063@roundup.psfhosted.org> Change by Vinay Sajip : ---------- pull_requests: +28326 pull_request: https://github.com/python/cpython/pull/30103 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 11:08:42 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 14 Dec 2021 16:08:42 +0000 Subject: [issue9350] add remove_argument_group to argparse In-Reply-To: <1279893088.18.0.675631346333.issue9350@psf.upfronthosting.co.za> Message-ID: <1639498122.25.0.245120706405.issue9350@roundup.psfhosted.org> Irit Katriel added the comment: This is over a decade old and the discussion is mostly that it's not worth doing, so I suggest we close. ---------- nosy: +iritkatriel resolution: -> rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 11:17:53 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 14 Dec 2021 16:17:53 +0000 Subject: [issue46072] Unify handling of stats in the CPython VM Message-ID: <1639498673.65.0.709719181358.issue46072@roundup.psfhosted.org> New submission from Mark Shannon : By "stats" I mean the internal numbers gathered by the VM for performance and debugging. This has nothing to do with any statistics module. Currently various parts of the VM gather stats: the GC, dicts, the bytecode interpreter, type lookup cache, etc. These stats have various compile time flags to turn them on and off. They have differing ways to display the stats, and no unified way to gather stats across different runs. For the specialization stats we dump stats, which we can parse to collate stats across runs. We should: 1. Add a --with-pystats config flag (like with-pydebug) to turn on stat gathering at build time. 2. Convert the other stats to the format used by the specialization stats, so all stats can be parsed and collated. ---------- messages: 408543 nosy: Mark.Shannon priority: normal severity: normal status: open title: Unify handling of stats in the CPython VM _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 11:22:44 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 14 Dec 2021 16:22:44 +0000 Subject: [issue26726] Incomplete Internationalization in Argparse Module In-Reply-To: <1460242413.52.0.89369314936.issue26726@psf.upfronthosting.co.za> Message-ID: <1639498964.34.0.944905811325.issue26726@roundup.psfhosted.org> Irit Katriel added the comment: Closing as duplicate of issue39464, which has a GitHub PR. ---------- nosy: +iritkatriel resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Allow translating argparse error messages _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 11:22:47 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 14 Dec 2021 16:22:47 +0000 Subject: [issue39464] Allow translating argparse error messages In-Reply-To: <1580133337.82.0.00677207154431.issue39464@roundup.psfhosted.org> Message-ID: <1639498967.27.0.55728416534.issue39464@roundup.psfhosted.org> Irit Katriel added the comment: Closed issue26726 as duplicate of this. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 11:38:50 2021 From: report at bugs.python.org (Brian Carlson) Date: Tue, 14 Dec 2021 16:38:50 +0000 Subject: [issue46073] ast.unparse produces: 'FunctionDef' object has no attribute 'lineno' for valid module Message-ID: <1639499930.14.0.345587742085.issue46073@roundup.psfhosted.org> New submission from Brian Carlson : Test file linked. When unparsing the output from ast.parse on a simple class, unparse throws an error: 'FunctionDef' object has no attribute 'lineno' for a valid class and valid AST. It fails when programmatically building the module AST as well. It seems to be from this function: https://github.com/python/cpython/blob/1cbb88736c32ac30fd530371adf53fe7554be0a5/Lib/ast.py#L790 ---------- components: Library (Lib) files: test.py messages: 408546 nosy: TheRobotCarlson priority: normal severity: normal status: open title: ast.unparse produces: 'FunctionDef' object has no attribute 'lineno' for valid module type: crash versions: Python 3.10, Python 3.11, Python 3.9 Added file: https://bugs.python.org/file50490/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 11:43:02 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 14 Dec 2021 16:43:02 +0000 Subject: [issue46066] TypedDict alternative definition syntax with keyword args is confusing In-Reply-To: <1639409817.42.0.21314101687.issue46066@roundup.psfhosted.org> Message-ID: <1639500182.25.0.664911090459.issue46066@roundup.psfhosted.org> Guido van Rossum added the comment: I recommend opening an issue here: https://github.com/python/typing/issues/new/choose ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 11:46:22 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 14 Dec 2021 16:46:22 +0000 Subject: [issue46063] TimedRotatingFileHandler deletes wrong files In-Reply-To: <1639397523.26.0.357602434319.issue46063@roundup.psfhosted.org> Message-ID: <1639500382.62.0.762728309368.issue46063@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28327 pull_request: https://github.com/python/cpython/pull/30104 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 11:46:27 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 14 Dec 2021 16:46:27 +0000 Subject: [issue46063] TimedRotatingFileHandler deletes wrong files In-Reply-To: <1639397523.26.0.357602434319.issue46063@roundup.psfhosted.org> Message-ID: <1639500387.54.0.235567629099.issue46063@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28328 pull_request: https://github.com/python/cpython/pull/30105 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 11:46:38 2021 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 14 Dec 2021 16:46:38 +0000 Subject: [issue46063] TimedRotatingFileHandler deletes wrong files In-Reply-To: <1639397523.26.0.357602434319.issue46063@roundup.psfhosted.org> Message-ID: <1639500398.68.0.258524496114.issue46063@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 850aefc2c651110a784cd5478af9774b1f6287a3 by Vinay Sajip in branch 'main': bpo-46063: Add 'delay=True' to file handler initialization. (GH-30103) https://github.com/python/cpython/commit/850aefc2c651110a784cd5478af9774b1f6287a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 11:48:28 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 14 Dec 2021 16:48:28 +0000 Subject: [issue45292] Implement PEP 654: Exception Groups In-Reply-To: <1632667049.99.0.614000687095.issue45292@roundup.psfhosted.org> Message-ID: <1639500508.24.0.979761034627.issue45292@roundup.psfhosted.org> Irit Katriel added the comment: New changeset d60457a6673cf0263213c2f2be02c633ec2e2038 by Irit Katriel in branch 'main': bpo-45292: [PEP-654] add except* (GH-29581) https://github.com/python/cpython/commit/d60457a6673cf0263213c2f2be02c633ec2e2038 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 11:58:45 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 14 Dec 2021 16:58:45 +0000 Subject: [issue46074] deepfreeze should rehash all strings upon reset Message-ID: <1639501125.0.0.728137663959.issue46074@roundup.psfhosted.org> New submission from Guido van Rossum : In https://github.com/python/cpython/pull/30096#discussion_r768802144 it is pointed out that the hash seed can be changed if the interpreter is reset. To guard against this we need to force (re)calculation of all hash seeds in the generated code when the corresponding code object is retrieved. This can be done by adding extra code to the `_Py_get__toplevel()` functions. (Strings that are shared between code objects will have to be rehashed repeatedly -- no big deal.) ---------- components: Build messages: 408550 nosy: gvanrossum priority: normal severity: normal stage: test needed status: open title: deepfreeze should rehash all strings upon reset type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 12:03:45 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 14 Dec 2021 17:03:45 +0000 Subject: [issue23522] Misleading note in Statistics module documentation In-Reply-To: <1424889646.1.0.160219400081.issue23522@psf.upfronthosting.co.za> Message-ID: <1639501425.97.0.867890662066.issue23522@roundup.psfhosted.org> Guido van Rossum added the comment: Couldn't we just change the first occurrence of "central location" in the note to "a central location" and the second to "(different) central locations"? That would leave Steven's intention intact but satisfy those who read it as referring to *a single* central location. ---------- nosy: +gvanrossum resolution: rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 12:27:09 2021 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 14 Dec 2021 17:27:09 +0000 Subject: [issue46063] TimedRotatingFileHandler deletes wrong files In-Reply-To: <1639397523.26.0.357602434319.issue46063@roundup.psfhosted.org> Message-ID: <1639502829.26.0.850744754155.issue46063@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 908fd691f96403a3c30d85c17dd74ed1f26a60fd by Miss Islington (bot) in branch '3.10': [3.10] bpo-46063: Add 'delay=True' to file handler initialization. (GH-30103) (GH-30104) https://github.com/python/cpython/commit/908fd691f96403a3c30d85c17dd74ed1f26a60fd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 12:27:26 2021 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 14 Dec 2021 17:27:26 +0000 Subject: [issue46063] TimedRotatingFileHandler deletes wrong files In-Reply-To: <1639397523.26.0.357602434319.issue46063@roundup.psfhosted.org> Message-ID: <1639502846.55.0.066575976647.issue46063@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 17260e44b5ed3508e3c15f1b7ded761879e91d3e by Miss Islington (bot) in branch '3.9': [3.9] bpo-46063: Add 'delay=True' to file handler initialization. (GH-30103) (GH-30105) https://github.com/python/cpython/commit/17260e44b5ed3508e3c15f1b7ded761879e91d3e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 13:22:52 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 14 Dec 2021 18:22:52 +0000 Subject: [issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations In-Reply-To: <1624890138.2.0.824780513801.issue44525@roundup.psfhosted.org> Message-ID: <1639506172.37.0.067026364275.issue44525@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 9f8f45144b6f0ad481e80570538cce89b414f7f9 by Mark Shannon in branch 'main': bpo-44525: Split calls into PRECALL and CALL (GH-30011) https://github.com/python/cpython/commit/9f8f45144b6f0ad481e80570538cce89b414f7f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 13:35:22 2021 From: report at bugs.python.org (=?utf-8?b?TWF0xJtqIFTDvcSN?=) Date: Tue, 14 Dec 2021 18:35:22 +0000 Subject: [issue18467] argparse - problematic 'default' behavior In-Reply-To: <1373927590.26.0.302211166373.issue18467@psf.upfronthosting.co.za> Message-ID: <1639506922.61.0.0681268262448.issue18467@roundup.psfhosted.org> Mat?j T?? added the comment: Thanks for reaching out. I have no idea whether it helped me or not, sorry for not replying back in a timely manner :-( I think that the feature request/bugreport originates from bad coding practices, when I wanted argparse to perform something more than just plain parsing of arguments into a data structure. Nowadays I would tell myself to solve it by introducing a layer between argparse and the rest of the code without putting additional pressure on argparse. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 13:36:48 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 14 Dec 2021 18:36:48 +0000 Subject: [issue18467] argparse - problematic 'default' behavior In-Reply-To: <1373927590.26.0.302211166373.issue18467@psf.upfronthosting.co.za> Message-ID: <1639507008.56.0.979435580183.issue18467@roundup.psfhosted.org> Irit Katriel added the comment: Thanks, I think we can close this then. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 14:11:03 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 14 Dec 2021 19:11:03 +0000 Subject: [issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations In-Reply-To: <1624890138.2.0.824780513801.issue44525@roundup.psfhosted.org> Message-ID: <1639509063.05.0.0677923532647.issue44525@roundup.psfhosted.org> Change by Mark Shannon : ---------- pull_requests: +28329 pull_request: https://github.com/python/cpython/pull/30107 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 14:29:54 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 14 Dec 2021 19:29:54 +0000 Subject: [issue45292] Implement PEP 654: Exception Groups In-Reply-To: <1632667049.99.0.614000687095.issue45292@roundup.psfhosted.org> Message-ID: <1639510194.17.0.94948182749.issue45292@roundup.psfhosted.org> Guido van Rossum added the comment: We should have a discussion here about improvements that Mark Shannon would like to see, in particular to do more work in the compiler instead of the interpreter. ---------- nosy: +Mark.Shannon, gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 15:17:18 2021 From: report at bugs.python.org (graysky) Date: Tue, 14 Dec 2021 20:17:18 +0000 Subject: [issue46070] broken subinterpreters In-Reply-To: <1639479470.16.0.0957612092108.issue46070@roundup.psfhosted.org> Message-ID: <1639513038.74.0.992012625424.issue46070@roundup.psfhosted.org> graysky added the comment: While this is being evaluated, can someone give an opinion about the sanity of simply reverting https://hg.python.org/lookup/d0d29655ff for now in order to use 3.10.1? Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 15:21:57 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 14 Dec 2021 20:21:57 +0000 Subject: [issue45292] Implement PEP 654: Exception Groups In-Reply-To: <1632667049.99.0.614000687095.issue45292@roundup.psfhosted.org> Message-ID: <1639513317.25.0.162597426296.issue45292@roundup.psfhosted.org> Mark Shannon added the comment: PR 29581 resulted in a 1% slowdown, which is not terrible, but code not using except* should not be slowed down at all. IMO, the way to avoid the slowdown is to implement except* using the existing instruction set (perhaps with a few minor additions) We already implement try-finally, named except blocks and with statements without any complex bytecodes (except perhaps WITH_EXCEPT_START). These used to involve a lot of state and more complex bytecodes. So it is possible to make these simplifications, but it does take work. There are a number of techniques we can use: If any state is needed, push it to the stack as we do with `ctx.__exit__` in the with statement, and when pushing f_lasti in exception handlers. Duplicate code paths when the semantics differ in different cases, as we do for finally blocks. If anything is too complex to handle on the stack, put it in a temporary variable. Be liberal in your use of virtual try-excepts (SETUP_FINALLY, POP_FINALLY pairs), as zero-cost exception handling should keep the cost down. It may be too late for this advice, but if I were writing the `except*` implementation from scratch, I would: 1. Sketch out the pseudo Python that a try-except* would map to. This is a good opportunity to discover any design bugs that might result in undesirable behavior for corner cases. 2. Implement the translation in the compiler, not worrying about any redundancy or inefficiency, just correctness. 3. Look to improve the above, either in the compiler front-end, or by replacing inefficient code patterns in the back-end. Handling the optimization in the backend has the advantage that other code might benefit as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 15:45:24 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 14 Dec 2021 20:45:24 +0000 Subject: [issue45292] Implement PEP 654: Exception Groups In-Reply-To: <1632667049.99.0.614000687095.issue45292@roundup.psfhosted.org> Message-ID: <1639514724.72.0.692803501418.issue45292@roundup.psfhosted.org> Irit Katriel added the comment: The PR adds two new opcodes. Let's start with the simpler of the two - JUMP_IF_NOT_EG_MATCH. This is the exception-group variation on JUMP_IF_NOT_EXC_MATCH. JUMP_IF_NOT_EXC_MATCH checks for a match by checking if the exception is of the given type. The result is boolean. JUMP_IF_NOT_EG_MATCH checks for a matching by calling .split() on the exception group. The result is two exception groups (the matching part and the non-matching part). Can we do this without a new opcode? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 15:57:42 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Tue, 14 Dec 2021 20:57:42 +0000 Subject: [issue46073] ast.unparse produces: 'FunctionDef' object has no attribute 'lineno' for valid module In-Reply-To: <1639499930.14.0.345587742085.issue46073@roundup.psfhosted.org> Message-ID: <1639515462.32.0.257931488159.issue46073@roundup.psfhosted.org> Nikita Sobolev added the comment: Looks like this little patch can solve this problem: ``` def unparse(ast_obj): unparser = _Unparser() --- return unparser.visit(ast_obj) +++ return unparser.visit(fix_missing_locations(ast_obj)) ``` But, I am not sure we should call this helper here. Another approach is to refactor `get_type_comment` function into something like this: ``` def get_type_comment(self, node): comment = None if hasattr(node, 'lineno'): comment = self._type_ignores.get(node.lineno) comment = comment or node.type_comment if comment is not None: return f" # type: {comment}" ``` I feel like this is more suitable for this case. Even `ast.pyi` has this line: ``` # TODO: Not all nodes have all of the following attributes lineno: int col_offset: int ``` So, I am going to propose a PR with the second option. Please, send your feedback! ---------- nosy: +sobolevn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 15:58:48 2021 From: report at bugs.python.org (Sergei Maertens) Date: Tue, 14 Dec 2021 20:58:48 +0000 Subject: [issue45339] concurrent.future.ThreadPoolExecutor should parameterize class used for threads In-Reply-To: <1633084673.43.0.269469120691.issue45339@roundup.psfhosted.org> Message-ID: <1639515528.79.0.621874339094.issue45339@roundup.psfhosted.org> Sergei Maertens added the comment: I was looking for some way to be able to add a thread finalizer, a piece of code to be called when the thread pool shuts down and all threads need cleaning up. Glad I came across this issue, since the example of using a Thread subclass with a custom run (wrapped in a context manager) would fill my needs completely. > What are examples of your some_important_context()? Is it important to call some code before destroying the thread? I currently have a use case with a web-framework that has persistent DB connections - i.e. they span multiple HTTP requests. This also applies in the context of running a command-line script with said framework where database connections are opened. We are calling external APIs (IO heavy), so using a ThreadPoolExecutor makes sense. However, since those "DB connection pools" are thread locals, we need to ensure that database connections are closed again to not leak resources. The current workaround is to submit a job/function to the pool and have it close the database connections, which adds overhead since database connections are now opened and closed within the same thread that could have been re-used. Using a context manager, we would be able to wrap the `super().run(...)` and close the database connections when the thread exits (succesfully or because of an Exception, even). This comes very close to having an `atexit` for individual threads. Furthermore I like the idea of being able to provide the class as a context manager kwarg, but would also not be opposed to a class property specifying the Thread class to use - both would greatly enhance composability and are a cleaner solution than adding a finalizer option (similar to the `initializer` kwarg) ---------- nosy: +Sergei Maertens _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 16:06:00 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Tue, 14 Dec 2021 21:06:00 +0000 Subject: [issue46073] ast.unparse produces: 'FunctionDef' object has no attribute 'lineno' for valid module In-Reply-To: <1639499930.14.0.345587742085.issue46073@roundup.psfhosted.org> Message-ID: <1639515960.03.0.0610393299101.issue46073@roundup.psfhosted.org> Nikita Sobolev added the comment: Moreover, there's always an option to pass `lineno` and `column` explicitly: ``` from ast import * # if we build the module manually and try it directly value = Module( body=[ FunctionDef( name="items_needed", args=arguments( posonlyargs=[], args=[], kwonlyargs=[], kw_defaults=[], defaults=[], ), body=[Return(value=Constant(value="test"))], decorator_list=[], lineno=1, column=1, ) ], type_ignores=[], ) unparse(value) # ok ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 16:08:16 2021 From: report at bugs.python.org (Nick) Date: Tue, 14 Dec 2021 21:08:16 +0000 Subject: [issue46075] CookieJar.extract_cookies doesn't process cookies form local domains when domain is explicitly set in header Message-ID: <1639516096.67.0.483308979986.issue46075@roundup.psfhosted.org> New submission from Nick : Apparently, CookieJar.extract_cookies doesn't process cookies form local domains which explicitly set domain in Set-Cookie header. That means that headers with domain specified, like "Set-Cookie: foo=baz; Domain=localhost;", are ignored. As far as I can tell, this might be actually part of the standard: https://stackoverflow.com/questions/1134290/cookies-on-localhost-with-explicit-domain/32210291#32210291 . However, it looks like other HTTP clients, including modern versions of both Chrome and Firefox do accept cookies from localhost with explicit domain=localhost, and this change doesn't appear to break existing software in any way. (simple POC to test behavior in browsers: https://gist.github.com/keddad/e2ce034f68b77e59077cdb1e887fa4a1). Maybe it would be best to also allow this behavior in Python? ---------- components: Library (Lib) messages: 408564 nosy: keddad priority: normal severity: normal status: open title: CookieJar.extract_cookies doesn't process cookies form local domains when domain is explicitly set in header type: behavior versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 16:12:37 2021 From: report at bugs.python.org (Nick) Date: Tue, 14 Dec 2021 21:12:37 +0000 Subject: [issue46075] CookieJar.extract_cookies doesn't process cookies form local domains when domain is explicitly set in header In-Reply-To: <1639516096.67.0.483308979986.issue46075@roundup.psfhosted.org> Message-ID: <1639516357.79.0.500931815702.issue46075@roundup.psfhosted.org> Change by Nick : ---------- keywords: +patch pull_requests: +28330 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30108 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 16:14:03 2021 From: report at bugs.python.org (Brian Carlson) Date: Tue, 14 Dec 2021 21:14:03 +0000 Subject: [issue46073] ast.unparse produces: 'FunctionDef' object has no attribute 'lineno' for valid module In-Reply-To: <1639499930.14.0.345587742085.issue46073@roundup.psfhosted.org> Message-ID: <1639516443.04.0.219671332453.issue46073@roundup.psfhosted.org> Brian Carlson added the comment: The second solution seems more optimal, in my opinion. I monkey patched the function like this in my own code: ``` def get_type_comment(self, node): comment = self._type_ignores.get(node.lineno) if hasattr(node, "lineno") else node.type_comment if comment is not None: return f" # type: {comment}" ``` Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 16:16:19 2021 From: report at bugs.python.org (Brian Carlson) Date: Tue, 14 Dec 2021 21:16:19 +0000 Subject: [issue46073] ast.unparse produces: 'FunctionDef' object has no attribute 'lineno' for valid module In-Reply-To: <1639499930.14.0.345587742085.issue46073@roundup.psfhosted.org> Message-ID: <1639516579.86.0.263347013675.issue46073@roundup.psfhosted.org> Brian Carlson added the comment: I don't think passing `lineno` and `column` is preferred. It makes code generation harder because `lineno` and `column` are hard to know ahead of when code is being unparsed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 16:32:52 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Tue, 14 Dec 2021 21:32:52 +0000 Subject: [issue46073] ast.unparse produces: 'FunctionDef' object has no attribute 'lineno' for valid module In-Reply-To: <1639499930.14.0.345587742085.issue46073@roundup.psfhosted.org> Message-ID: <1639517572.45.0.0212068624511.issue46073@roundup.psfhosted.org> Nikita Sobolev added the comment: Or, maybe this is a correct thing to do. Consider this case. Let's say we now check that `node` has `lineno` and exclude ones that don't. Then, we write this test (in `Lib/test/test_unparse`): ``` def test_unparse_nodes_without_lineno(self): # https://bugs.python.org/issue46073 def create_module(ignores): return ast.Module( body=[ ast.FunctionDef( name="items_needed", args=ast.arguments( posonlyargs=[], args=[], kwonlyargs=[], kw_defaults=[], defaults=[], ), body=[ast.Pass()], decorator_list=[], ), ], type_ignores=ignores, ) ast1 = create_module([]) self.assertASTEqual(ast1, ast.parse(ast.unparse(ast1))) ast2 = create_module([ast.TypeIgnore(lineno=1, tag='')]) # This fill fail without `ast2 = ast.fix_missing_locations(ast2)` self.assertASTEqual(ast2, ast.parse(ast.unparse(ast2), type_comments=True)) ``` In this case the second `assert` will fail, because the resulting codes would be different: ``` # "original" def items_needed(): # type: ignore pass # unparsed def items_needed(): pass ``` So, basically users will get different code. Which is not a good thing. So, maybe raising an error that some `node` does not have `lineno` is good after all? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 16:38:04 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 14 Dec 2021 21:38:04 +0000 Subject: [issue46070] broken subinterpreters In-Reply-To: <1639479470.16.0.0957612092108.issue46070@roundup.psfhosted.org> Message-ID: <1639517884.02.0.278828506346.issue46070@roundup.psfhosted.org> Petr Viktorin added the comment: That was a fix for GH-17350, which might need to be reverted as well. Victor, could you take another look at GH-17350? I must admit I (still) don't understand this change; what would break if it was reverted (along with the fixup from bpo-44050)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 16:41:13 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 14 Dec 2021 21:41:13 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639518073.28.0.398039895344.issue46028@roundup.psfhosted.org> Steve Dower added the comment: Does the first venv's 'python' link to python3[.11]? If so, maybe _base_executable should be based on real_executable's filename rather than executable (that is, *after* resolving symlinks rather than before). I don't *think* that will cause any issues, and it shouldn't be any more expensive to compute. Only has to change for when a pyvenv.cfg is detected I think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 16:57:38 2021 From: report at bugs.python.org (coroa) Date: Tue, 14 Dec 2021 21:57:38 +0000 Subject: [issue29699] shutil.rmtree should not fail with FileNotFoundError (race condition) In-Reply-To: <1488481944.03.0.0307704051627.issue29699@psf.upfronthosting.co.za> Message-ID: <1639519058.74.0.237704605528.issue29699@roundup.psfhosted.org> coroa added the comment: Just realised that the "race condition" is triggered consistently on Mac OSX machines working on non-Mac filesystems, where they store extended attributes like last access time in meta files with a `._` prefix. These files are listed by `os.scandir` after their original files and are removed, as soon as the original file is unlinked. Ie. a test.txt, ._test.txt pair will always raise FileNotFoundError for ._test.txt since the file system driver itself already removed it when the unlink on test.txt was executed. Refer also to https://stackoverflow.com/a/70355470/2873952. Current status seems to be: 1. https://bugs.python.org/issue29699 and https://bugs.python.org/issue37260 are duplicates. 2. https://github.com/python/cpython/pull/13580 linked from here has been closed due to lack of unit tests (but with the possibility to re-open after providing those) 3. https://github.com/python/cpython/pull/14064 is still open and seems to be mostly the same patch, does have unit tests and awaiting a second review. What is the next step? ---------- nosy: +coroa versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 17:13:19 2021 From: report at bugs.python.org (Alex Waygood) Date: Tue, 14 Dec 2021 22:13:19 +0000 Subject: [issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError In-Reply-To: <1450150718.99.0.697293755498.issue25864@psf.upfronthosting.co.za> Message-ID: <1639519999.16.0.498176772109.issue25864@roundup.psfhosted.org> Alex Waygood added the comment: The proposed patch appears to have been implemented in https://github.com/python/cpython/commit/97c1adf3935234da716d3289b85f72dcd67e90c2, and there has been no discussion for five years. I think this can now be closed. ---------- nosy: +AlexWaygood resolution: -> fixed stage: patch review -> resolved status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 17:16:01 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 14 Dec 2021 22:16:01 +0000 Subject: [issue46074] deepfreeze should rehash all strings upon reset In-Reply-To: <1639501125.0.0.728137663959.issue46074@roundup.psfhosted.org> Message-ID: <1639520161.48.0.946218215482.issue46074@roundup.psfhosted.org> Guido van Rossum added the comment: Never mind, this was based on incorrect information. See subsequent messages in the linked thread. ---------- resolution: -> not a bug stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 17:25:11 2021 From: report at bugs.python.org (Alex Waygood) Date: Tue, 14 Dec 2021 22:25:11 +0000 Subject: [issue46076] Document using __slots__ to provide per-attribute docstrings Message-ID: <1639520711.47.0.591169978723.issue46076@roundup.psfhosted.org> New submission from Alex Waygood : The ability to add docstrings for individual attributes, by using a dictionary for __slots__ was added in Issue36326. This is a fantastic feature, and deserves better documentation. It appears to currently only be documented in the "What's New" entry for Python 3.8: https://docs.python.org/3/whatsnew/3.8.html#inspect. Moreover, the data model documentation currently states the following regarding using a mapping to specify __slots__: """ Any non-string iterable may be assigned to __slots__. Mappings may also be used; however, in the future, special meaning may be assigned to the values corresponding to each key. """ This is arguably now incorrect. A special meaning has been assigned to the values corresponding to each key: the values can be used for per-attribute docstrings. ---------- assignee: docs at python components: Documentation messages: 408573 nosy: AlexWaygood, docs at python, rhettinger priority: normal severity: normal status: open title: Document using __slots__ to provide per-attribute docstrings type: enhancement versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 17:30:39 2021 From: report at bugs.python.org (Alex Waygood) Date: Tue, 14 Dec 2021 22:30:39 +0000 Subject: [issue46076] Document using __slots__ to provide per-attribute docstrings In-Reply-To: <1639520711.47.0.591169978723.issue46076@roundup.psfhosted.org> Message-ID: <1639521039.64.0.729484891498.issue46076@roundup.psfhosted.org> Change by Alex Waygood : ---------- keywords: +patch pull_requests: +28332 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30109 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 17:58:02 2021 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 14 Dec 2021 22:58:02 +0000 Subject: [issue44896] AttributeError in ast.unparse In-Reply-To: <1628731580.95.0.847749574283.issue44896@roundup.psfhosted.org> Message-ID: <1639522682.5.0.475992665322.issue44896@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 17:58:20 2021 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 14 Dec 2021 22:58:20 +0000 Subject: [issue46073] ast.unparse produces: 'FunctionDef' object has no attribute 'lineno' for valid module In-Reply-To: <1639499930.14.0.345587742085.issue46073@roundup.psfhosted.org> Message-ID: <1639522700.95.0.078109716479.issue46073@roundup.psfhosted.org> Batuhan Taskaya added the comment: >From the first glance, this seems like a duplicate of bpo-44896. ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 17:59:44 2021 From: report at bugs.python.org (Brett Cannon) Date: Tue, 14 Dec 2021 22:59:44 +0000 Subject: [issue31370] Remove support for threads-less builds In-Reply-To: <1504732249.83.0.180664230366.issue31370@psf.upfronthosting.co.za> Message-ID: <1639522784.77.0.951439347884.issue31370@roundup.psfhosted.org> Brett Cannon added the comment: I am not opening a new discussion; this is just recording this fact here as it has come up in other places on the internet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 18:00:51 2021 From: report at bugs.python.org (Brett Cannon) Date: Tue, 14 Dec 2021 23:00:51 +0000 Subject: [issue40059] Provide a toml module in the standard library In-Reply-To: <1585119261.47.0.818238682424.issue40059@roundup.psfhosted.org> Message-ID: <1639522851.51.0.593082205652.issue40059@roundup.psfhosted.org> Brett Cannon added the comment: I opened https://github.com/python/steering-council/issues/92 for the SC to discuss stdlib additions in case I am not re-elected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 18:39:00 2021 From: report at bugs.python.org (Craig Holmquist) Date: Tue, 14 Dec 2021 23:39:00 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639525140.7.0.992399566579.issue46006@roundup.psfhosted.org> Change by Craig Holmquist : ---------- nosy: +craigh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 19:50:55 2021 From: report at bugs.python.org (Vivek Vashist) Date: Wed, 15 Dec 2021 00:50:55 +0000 Subject: [issue46059] Typo in match Statement example In-Reply-To: <1639356396.07.0.913283855262.issue46059@roundup.psfhosted.org> Message-ID: <1639529455.41.0.692028824912.issue46059@roundup.psfhosted.org> Vivek Vashist added the comment: Thanks for sorting this out Alex :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 20:22:53 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 15 Dec 2021 01:22:53 +0000 Subject: [issue46056] Cannot use virtual environment on Windows 10 in corporate security settings In-Reply-To: <1639313116.18.0.364057363878.issue46056@roundup.psfhosted.org> Message-ID: <1639531373.02.0.0756825563915.issue46056@roundup.psfhosted.org> Gregory P. Smith added the comment: While the discussion is interesting for some who are trying to work around security policy mechanisms, we can't control what policies people enforce upon themselves that make their machines useless for software development. Marking as not a bug. The normal thing to do is to obtain an exemption to policies from the corporate security org managing your machine(s) because you have a business need for it. If you have specific implementation changes that would make life easier, file specific issues for those to be addressed. (ex: PEP 582 is pretty specific - and there is a package manager https://pdm.fming.dev/ that supports it) ---------- nosy: +gregory.p.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 20:40:48 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 15 Dec 2021 01:40:48 +0000 Subject: [issue46077] Include sha256 hashes of release downloads in announcement communications Message-ID: <1639532448.32.0.197660327997.issue46077@roundup.psfhosted.org> New submission from Gregory P. Smith : The announcement email list (https://mail.python.org/archives/list/python-announce-list at python.org/) and other places we make announcements beyond just the release pages like https://www.python.org/downloads/release/python-3101/ should include a list of sha256 hashes of the release binaries in the announcement text. This serves as an alternative confirmation that nothing has changed as such announcements are widely distributed and archived by independent parties and individuals and can thus convey a level of trust that a hash listed on the downloads page cannot (where an attacker would simply modify both). Yes there is a gpg signature on the downloads. I encourage people to use that. But this provides an alternate distributed mechanism to verify that nothing has changed at all since the release announcement. Something a gpg signature cannot fully do (consider this protection against the possibility of new signed binary being put into its place by a compromised key/signer/builder/RM before anyone happens to notice and poke around). A simple table of: filename.tar.gz | sha256 hash filename.msi | sha256 hash filename.dmg | sha256 hash ... At the end of the announcement email/post would suffice. Less of an issue on source packages as those can be verified against the git repo. But it's nice for people to know if binaries change without an announcement and explanation and is easy for us to provide. Bonus points if the release announcement email body itself is signed (if that is even feasible per our release signing GPG key management). [context: see recent python-dev subject: Python release announcement format] ---------- messages: 408579 nosy: gregory.p.smith priority: deferred blocker severity: normal status: open title: Include sha256 hashes of release downloads in announcement communications versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 21:37:47 2021 From: report at bugs.python.org (Samuel Marks) Date: Wed, 15 Dec 2021 02:37:47 +0000 Subject: =?utf-8?q?=5Bissue46078=5D_=60ast=2Eunparse=60_fails_on_=60class_C=3A_i?= =?utf-8?q?=3A_int=60=E2=80=A6_convert_broken_from_=60ast=2EAnnAssign=60_t?= =?utf-8?q?o_=60ast=2EAssign=60?= Message-ID: <1639535867.25.0.73298480081.issue46078@roundup.psfhosted.org> New submission from Samuel Marks : astor fails with: ``` File "python3.8/site-packages/astor/code_gen.py", line 63, in to_source generator.visit(node) File "python3.8/site-packages/astor/node_util.py", line 143, in visit return visitor(node) File "python3.8/site-packages/astor/code_gen.py", line 878, in visit_Module self.write(*node.body) File "python3.8/site-packages/astor/code_gen.py", line 178, in write visit(item) File "python3.8/site-packages/astor/node_util.py", line 143, in visit return visitor(node) File "python3.8/site-packages/astor/code_gen.py", line 364, in visit_ClassDef self.body(node.body) File "python3.8/site-packages/astor/code_gen.py", line 226, in body self.write(*statements) File "python3.8/site-packages/astor/code_gen.py", line 178, in write visit(item) File "python3.8/site-packages/astor/node_util.py", line 143, in visit return visitor(node) File "python3.8/site-packages/astor/code_gen.py", line 293, in visit_Assign self.visit(node.value) File "python3.8/site-packages/astor/node_util.py", line 143, in visit return visitor(node) File "python3.8/site-packages/astor/node_util.py", line 137, in abort_visit raise AttributeError(msg % node.__class__.__name__) AttributeError: No defined handler for node of type NoneType ``` Whereas the now builtin to Python (3.9+) `ast.unparse` gives: ``` File "3.10/lib/python3.10/ast.py", line 1673, in unparse return unparser.visit(ast_obj) File "3.10/lib/python3.10/ast.py", line 807, in visit self.traverse(node) File "3.10/lib/python3.10/ast.py", line 798, in traverse super().visit(node) File "3.10/lib/python3.10/ast.py", line 410, in visit return visitor(node) File "3.10/lib/python3.10/ast.py", line 822, in visit_Module self._write_docstring_and_traverse_body(node) File "3.10/lib/python3.10/ast.py", line 815, in _write_docstring_and_traverse_body self.traverse(node.body) File "3.10/lib/python3.10/ast.py", line 796, in traverse self.traverse(item) File "3.10/lib/python3.10/ast.py", line 798, in traverse super().visit(node) File "3.10/lib/python3.10/ast.py", line 410, in visit return visitor(node) File "3.10/lib/python3.10/ast.py", line 1001, in visit_ClassDef self._write_docstring_and_traverse_body(node) File "3.10/lib/python3.10/ast.py", line 815, in _write_docstring_and_traverse_body self.traverse(node.body) File "3.10/lib/python3.10/ast.py", line 796, in traverse self.traverse(item) File "3.10/lib/python3.10/ast.py", line 798, in traverse super().visit(node) File "3.10/lib/python3.10/ast.py", line 410, in visit return visitor(node) File "3.10/lib/python3.10/ast.py", line 863, in visit_Assign self.traverse(node.value) File "3.10/lib/python3.10/ast.py", line 798, in traverse super().visit(node) File "3.10/lib/python3.10/ast.py", line 410, in visit return visitor(node) File "3.10/lib/python3.10/ast.py", line 414, in generic_visit for field, value in iter_fields(node): File "3.10/lib/python3.10/ast.py", line 252, in iter_fields for field in node._fields: AttributeError: 'NoneType' object has no attribute '_fields' ``` Found it when I tried to unparse previously parsed: ```py class C: i: int ``` Found in reality when trying to parse then emit: - https://github.com/tensorflow/tensorflow/blob/ba146843/tensorflow/compiler/xla/python/xla_client.py#L402-L413 Which is creating this: ``` ast.Assign(targets=[ast.Name(id="interior_padding")], type_comment="int", value=None) ``` (one thing my library does is convert betwixt `ast.Assign` and `ast.AnnAssign`? later I'll be doing more interesting variable type tracing to generate big `typing.Union` of all possible types each variable may have? but if it finds `None` then it will infer `typing.Optional`.) Here is my `ast.NodeTransformer` override for `visit_AnnAssign`: https://github.com/offscale/cdd-python/blob/968507e/cdd/doctrans_utils.py#L111-L131 Is there some way of rewriting an `ast.AnnAssign` to `ast.Assign` without losing type information? ---------- messages: 408580 nosy: samuelmarks priority: normal severity: normal status: open title: `ast.unparse` fails on `class C: i: int`? convert broken from `ast.AnnAssign` to `ast.Assign` versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 22:00:40 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Wed, 15 Dec 2021 03:00:40 +0000 Subject: =?utf-8?q?=5Bissue46078=5D_=60ast=2Eunparse=60_fails_on_=60class_C=3A_i?= =?utf-8?q?=3A_int=60=E2=80=A6_convert_broken_from_=60ast=2EAnnAssign=60_t?= =?utf-8?q?o_=60ast=2EAssign=60?= In-Reply-To: <1639535867.25.0.73298480081.issue46078@roundup.psfhosted.org> Message-ID: <1639537240.02.0.533022391813.issue46078@roundup.psfhosted.org> theeshallnotknowethme added the comment: This seems like just a problem of your library instead of a problem with Python. Are you sure this is the right place you're in? ---------- nosy: +February291948 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 22:07:28 2021 From: report at bugs.python.org (Joshua Insel) Date: Wed, 15 Dec 2021 03:07:28 +0000 Subject: [issue45959] Teach pprint about dict views In-Reply-To: <1638428816.23.0.206050902249.issue45959@roundup.psfhosted.org> Message-ID: <1639537648.22.0.731250680818.issue45959@roundup.psfhosted.org> Joshua Insel added the comment: According to the documentation for pprint, it is supposed to print objects on a single line if possible. See the second paragraph here: https://docs.python.org/3/library/pprint.html ---------- nosy: +joshinsel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 22:37:52 2021 From: report at bugs.python.org (Samuel Marks) Date: Wed, 15 Dec 2021 03:37:52 +0000 Subject: =?utf-8?q?=5Bissue46078=5D_=60ast=2Eunparse=60_fails_on_=60class_C=3A_i?= =?utf-8?q?=3A_int=60=E2=80=A6_convert_broken_from_=60ast=2EAnnAssign=60_t?= =?utf-8?q?o_=60ast=2EAssign=60?= In-Reply-To: <1639535867.25.0.73298480081.issue46078@roundup.psfhosted.org> Message-ID: <1639539472.68.0.197748582764.issue46078@roundup.psfhosted.org> Samuel Marks added the comment: Just fixed the issue by using this value: ```py "```(None)```" if sys.version_info[:2] >= (3, 9) else "```None```" ``` ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 14 22:45:07 2021 From: report at bugs.python.org (Christopher Hunt) Date: Wed, 15 Dec 2021 03:45:07 +0000 Subject: [issue37701] shutil.copyfile raises SpecialFileError for symlink to fifo In-Reply-To: <1564375011.26.0.591034083368.issue37701@roundup.psfhosted.org> Message-ID: <1639539907.01.0.209472229047.issue37701@roundup.psfhosted.org> Christopher Hunt added the comment: > I expect it to fail if follow_symlinks is True, which is the default value. I expect it to succeed with follow_symlinks=False, which should create a shallow copy of just the symlink, regardless of its target. I agree, thanks for the correction. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 01:10:31 2021 From: report at bugs.python.org (Vivek Vashist) Date: Wed, 15 Dec 2021 06:10:31 +0000 Subject: [issue46079] Broken URL in tutorial Message-ID: <1639548631.13.0.586608874559.issue46079@roundup.psfhosted.org> New submission from Vivek Vashist : URL: http://tycho.usno.navy.mil/cgi-bin/timer.pl is broken in the example https://docs.python.org/3/tutorial/stdlib.html#internet-access > curl -v http://tycho.usno.navy.mil/cgi-bin/timer.pl * Could not resolve host: tycho.usno.navy.mil * Closing connection 0 curl: (6) Could not resolve host: tycho.usno.navy.mil ---------- assignee: docs at python components: Documentation messages: 408585 nosy: docs at python, vivekvashist priority: normal severity: normal status: open title: Broken URL in tutorial versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 01:29:31 2021 From: report at bugs.python.org (Felix Fontein) Date: Wed, 15 Dec 2021 06:29:31 +0000 Subject: [issue46080] argparse.BooleanOptionalAction with default=argparse.SUPPRESS and help specified crashes Message-ID: <1639549771.77.0.946249381009.issue46080@roundup.psfhosted.org> New submission from Felix Fontein : When argparse.BooleanOptionalAction is used with default=argparse.SUPPRESS and help is specified, trying to display --help results in a crash. Reproducer: import argparse parser = argparse.ArgumentParser() parser.add_argument('--test', action=argparse.BooleanOptionalAction, default=argparse.SUPPRESS, help='Foo') parser.parse_args() Result when running 'python t.py --help': Traceback (most recent call last): File "/path/to/t.py", line 4, in parser.parse_args() File "/usr/lib/python3.10/argparse.py", line 1821, in parse_args args, argv = self.parse_known_args(args, namespace) File "/usr/lib/python3.10/argparse.py", line 1854, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/usr/lib/python3.10/argparse.py", line 2063, in _parse_known_args start_index = consume_optional(start_index) File "/usr/lib/python3.10/argparse.py", line 2003, in consume_optional take_action(action, args, option_string) File "/usr/lib/python3.10/argparse.py", line 1931, in take_action action(self, namespace, argument_values, option_string) File "/usr/lib/python3.10/argparse.py", line 1095, in __call__ parser.print_help() File "/usr/lib/python3.10/argparse.py", line 2551, in print_help self._print_message(self.format_help(), file) File "/usr/lib/python3.10/argparse.py", line 2535, in format_help return formatter.format_help() File "/usr/lib/python3.10/argparse.py", line 283, in format_help help = self._root_section.format_help() File "/usr/lib/python3.10/argparse.py", line 214, in format_help item_help = join([func(*args) for func, args in self.items]) File "/usr/lib/python3.10/argparse.py", line 214, in item_help = join([func(*args) for func, args in self.items]) File "/usr/lib/python3.10/argparse.py", line 214, in format_help item_help = join([func(*args) for func, args in self.items]) File "/usr/lib/python3.10/argparse.py", line 214, in item_help = join([func(*args) for func, args in self.items]) File "/usr/lib/python3.10/argparse.py", line 530, in _format_action help_text = self._expand_help(action) File "/usr/lib/python3.10/argparse.py", line 627, in _expand_help return self._get_help_string(action) % params KeyError: 'default' The problem is that in https://github.com/python/cpython/blob/f54fee7f37563fbd569596cf94aad023ac6c3179/Lib/argparse.py#L879, default isn't tested for SUPPRESS as well. I've prepared a patch to fix that and will push it to GitHub soon. (I've experienced the crash with Python 3.9 and 3.10; the test I've created also crashes for the current main branch, so I guess that means that Python 3.11 is also affected. I haven't tested older Python versions before 3.9.) ---------- components: Library (Lib) messages: 408586 nosy: felixfontein priority: normal severity: normal status: open title: argparse.BooleanOptionalAction with default=argparse.SUPPRESS and help specified crashes versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 01:35:08 2021 From: report at bugs.python.org (Felix Fontein) Date: Wed, 15 Dec 2021 06:35:08 +0000 Subject: [issue46080] argparse.BooleanOptionalAction with default=argparse.SUPPRESS and help specified crashes In-Reply-To: <1639549771.77.0.946249381009.issue46080@roundup.psfhosted.org> Message-ID: <1639550108.63.0.62104811598.issue46080@roundup.psfhosted.org> Change by Felix Fontein : ---------- keywords: +patch pull_requests: +28333 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30111 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 01:36:04 2021 From: report at bugs.python.org (Felix Fontein) Date: Wed, 15 Dec 2021 06:36:04 +0000 Subject: [issue46080] argparse.BooleanOptionalAction with default=argparse.SUPPRESS and help specified crashes In-Reply-To: <1639549771.77.0.946249381009.issue46080@roundup.psfhosted.org> Message-ID: <1639550164.42.0.39661588068.issue46080@roundup.psfhosted.org> Change by Felix Fontein : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 01:41:16 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 15 Dec 2021 06:41:16 +0000 Subject: [issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError In-Reply-To: <1450150718.99.0.697293755498.issue25864@psf.upfronthosting.co.za> Message-ID: <1639550476.37.0.160478319103.issue25864@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 03:21:42 2021 From: report at bugs.python.org (hongweipeng) Date: Wed, 15 Dec 2021 08:21:42 +0000 Subject: [issue38085] Interrupting class creation in __init_subclass__ may lead to incorrect isinstance() and issubclass() results In-Reply-To: <1568106581.16.0.558052842785.issue38085@roundup.psfhosted.org> Message-ID: <1639556502.55.0.631447195101.issue38085@roundup.psfhosted.org> Change by hongweipeng : ---------- keywords: +patch pull_requests: +28335 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30112 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 03:33:37 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 15 Dec 2021 08:33:37 +0000 Subject: [issue46079] [doc] Broken URL in "Brief Tour of the Standard Library" In-Reply-To: <1639548631.13.0.586608874559.issue46079@roundup.psfhosted.org> Message-ID: <1639557217.94.0.567248033874.issue46079@roundup.psfhosted.org> Change by Alex Waygood : ---------- title: Broken URL in tutorial -> [doc] Broken URL in "Brief Tour of the Standard Library" type: -> behavior versions: +Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 03:38:11 2021 From: report at bugs.python.org (Ram Rachum) Date: Wed, 15 Dec 2021 08:38:11 +0000 Subject: [issue46081] Document the msg argument for assertRaises Message-ID: <1639557491.44.0.830591969979.issue46081@roundup.psfhosted.org> New submission from Ram Rachum : The `msg` argument to the `assertRaises` function isn't documented. The documentation should say what this argument does. ---------- assignee: docs at python components: Documentation messages: 408587 nosy: cool-RR, docs at python priority: normal severity: normal status: open title: Document the msg argument for assertRaises versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 03:39:51 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 15 Dec 2021 08:39:51 +0000 Subject: [issue46080] argparse.BooleanOptionalAction with default=argparse.SUPPRESS and help specified crashes In-Reply-To: <1639549771.77.0.946249381009.issue46080@roundup.psfhosted.org> Message-ID: <1639557591.56.0.123653223889.issue46080@roundup.psfhosted.org> Irit Katriel added the comment: Changing type. Crash is typically segfault or hang in c code rather than an exception. ---------- nosy: +iritkatriel type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 03:49:37 2021 From: report at bugs.python.org (Yann Droneaud) Date: Wed, 15 Dec 2021 08:49:37 +0000 Subject: [issue46077] Include sha256 hashes of release downloads in announcement communications In-Reply-To: <1639532448.32.0.197660327997.issue46077@roundup.psfhosted.org> Message-ID: <1639558177.12.0.0727896555976.issue46077@roundup.psfhosted.org> Change by Yann Droneaud : ---------- nosy: +ydroneaud _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 04:20:05 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 15 Dec 2021 09:20:05 +0000 Subject: [issue46081] Document the msg argument for assertRaises In-Reply-To: <1639557491.44.0.830591969979.issue46081@roundup.psfhosted.org> Message-ID: <1639560005.44.0.0869178734918.issue46081@roundup.psfhosted.org> Change by Alex Waygood : ---------- versions: -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 04:34:07 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 15 Dec 2021 09:34:07 +0000 Subject: [issue45292] Implement PEP 654: Exception Groups In-Reply-To: <1632667049.99.0.614000687095.issue45292@roundup.psfhosted.org> Message-ID: <1639560847.01.0.732090103149.issue45292@roundup.psfhosted.org> Irit Katriel added the comment: The second opcode that the PR adds is PREP_RERAISE_STAR. This opcode takes a list that contains: 1. all the exceptions that were raised in the executed except* clauses 2. the unmatched part of the exception group It constructs the exception group that needs to be raised at the end. This is done through a fairly complex operation on the BaseExceptionGroup, which merges the re-raised exceptions into the same nesting structure they had in the original exception group, so that try: raise eg except* ValueError: raise except* TypeError: raise is equivalent to just 'raise eg'. Is there any overlap with existing opcodes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 04:39:41 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 15 Dec 2021 09:39:41 +0000 Subject: [issue45292] Implement PEP 654: Exception Groups In-Reply-To: <1632667049.99.0.614000687095.issue45292@roundup.psfhosted.org> Message-ID: <1639561181.18.0.703452098122.issue45292@roundup.psfhosted.org> Irit Katriel added the comment: The way these two opcodes are combined by the compiler to implement except* is described in the pseudo code here: https://github.com/python/cpython/pull/29581#issuecomment-975660029 except* uses JUMP_IF_NOT_EG_MATCH. The excepts (not-*) that collect exceptions raised in the except* clauses are virtual. The do_reraise_star at the end is PREP_RERAISE_STAR followed by POP_EXCEPT_AND_RERAISE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 04:47:05 2021 From: report at bugs.python.org (arian-f) Date: Wed, 15 Dec 2021 09:47:05 +0000 Subject: [issue42209] Incorrect line reported in syntax error In-Reply-To: <1604071774.71.0.0589140009748.issue42209@roundup.psfhosted.org> Message-ID: <1639561625.4.0.466033871644.issue42209@roundup.psfhosted.org> arian-f added the comment: There are still variations of this issue in python 3.10 - the line nr is correct - in script attached it's line 2 (the attached script is otherwise the same): f'{ 1_a }' resulting in: File "test.py", line 1 ( 1_a ) ^ SyntaxError: invalid decimal literal or is this a different but similar bug? Can this bug be reopened or should I file a new bug? > python -VV Python 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)] ---------- nosy: +arian-f versions: +Python 3.10 -Python 3.8 Added file: https://bugs.python.org/file50491/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 05:08:37 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 15 Dec 2021 10:08:37 +0000 Subject: [issue26952] argparse help formatter raises IndexError In-Reply-To: <1462374887.67.0.462060112057.issue26952@psf.upfronthosting.co.za> Message-ID: <1639562917.46.0.60985281169.issue26952@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 86de99588db3beff964137f4fe27dd1077a09b35 by Irit Katriel in branch 'main': bpo-26952: [argparse] clearer error when formatting an empty mutually? (GH-30099) https://github.com/python/cpython/commit/86de99588db3beff964137f4fe27dd1077a09b35 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 05:08:44 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 15 Dec 2021 10:08:44 +0000 Subject: [issue26952] argparse help formatter raises IndexError In-Reply-To: <1462374887.67.0.462060112057.issue26952@psf.upfronthosting.co.za> Message-ID: <1639562924.76.0.424976727433.issue26952@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +28336 pull_request: https://github.com/python/cpython/pull/30114 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 05:08:49 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 15 Dec 2021 10:08:49 +0000 Subject: [issue26952] argparse help formatter raises IndexError In-Reply-To: <1462374887.67.0.462060112057.issue26952@psf.upfronthosting.co.za> Message-ID: <1639562929.07.0.0737740628789.issue26952@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28337 pull_request: https://github.com/python/cpython/pull/30115 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 05:30:22 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 15 Dec 2021 10:30:22 +0000 Subject: [issue46039] Break up the YIELD_FROM instruction. In-Reply-To: <1639158532.51.0.938199888812.issue46039@roundup.psfhosted.org> Message-ID: <1639564222.91.0.983591894655.issue46039@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 0b50a4f0cdee41a18fb4ba6e75569f9cfaceb39e by Mark Shannon in branch 'main': bpo-46039: Split yield from in two (GH-30035) https://github.com/python/cpython/commit/0b50a4f0cdee41a18fb4ba6e75569f9cfaceb39e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 05:36:14 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 15 Dec 2021 10:36:14 +0000 Subject: [issue46072] Unify handling of stats in the CPython VM In-Reply-To: <1639498673.65.0.709719181358.issue46072@roundup.psfhosted.org> Message-ID: <1639564574.99.0.288989954394.issue46072@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +28338 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30116 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 05:59:37 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 15 Dec 2021 10:59:37 +0000 Subject: [issue44035] Regenerating the configure script fails even if dependencies are satisfied In-Reply-To: <1620147514.31.0.864280114209.issue44035@roundup.psfhosted.org> Message-ID: <1639565977.26.0.565894813372.issue44035@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28339 pull_request: https://github.com/python/cpython/pull/30117 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 06:18:36 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Dec 2021 11:18:36 +0000 Subject: [issue31370] Remove support for threads-less builds In-Reply-To: <1504732249.83.0.180664230366.issue31370@psf.upfronthosting.co.za> Message-ID: <1639567116.1.0.769424711424.issue31370@roundup.psfhosted.org> STINNER Victor added the comment: Either reopen the issue or open a new issue. Only people subscribed to this bug are aware of the recent comments. Closed issues are hidden from the bugs home page and from the default search. If you consider that Python must again support thread-less platforms, IMO it's a new feature and a new issue must be opened. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 06:21:17 2021 From: report at bugs.python.org (aziz) Date: Wed, 15 Dec 2021 11:21:17 +0000 Subject: [issue46082] type casting of bool Message-ID: <1639567277.19.0.409904988292.issue46082@roundup.psfhosted.org> New submission from aziz : >>> st = "True" >>> bool(st) True >>> st = "False" >>> bool(st) True >>> >>> stk = "False" >>> bool(stk) True >>> eval(stk) False ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 408595 nosy: aziz priority: normal severity: normal status: open title: type casting of bool type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 07:18:57 2021 From: report at bugs.python.org (Devourer Station) Date: Wed, 15 Dec 2021 12:18:57 +0000 Subject: [issue45981] Get raw file name in bytes from ZipFile In-Reply-To: <1638625166.93.0.299659631229.issue45981@roundup.psfhosted.org> Message-ID: <1639570737.91.0.412178471507.issue45981@roundup.psfhosted.org> Devourer Station added the comment: I do think providing a rawfile field in the ZipInfo struct helps. As a library, ZipFile should let users know what they are dealing with. Users can get data from zip files, and ZipFile shouldn't corrupt them. I don't mean that we should provide everything in raw bytes. What I mean is that DATA could be CONVERTED, but couldn't be CORRUPTED. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 07:20:25 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 15 Dec 2021 12:20:25 +0000 Subject: [issue26952] argparse help formatter raises IndexError In-Reply-To: <1462374887.67.0.462060112057.issue26952@psf.upfronthosting.co.za> Message-ID: <1639570825.99.0.242368330416.issue26952@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 8e4c96295bd78ae5f70b908e5dbac0da7c4c21bd by Miss Islington (bot) in branch '3.10': bpo-26952: [argparse] clearer error when formatting an empty mutually? (GH-30099) (GH-30114) https://github.com/python/cpython/commit/8e4c96295bd78ae5f70b908e5dbac0da7c4c21bd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 07:24:53 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 15 Dec 2021 12:24:53 +0000 Subject: [issue26952] argparse help formatter raises IndexError In-Reply-To: <1462374887.67.0.462060112057.issue26952@psf.upfronthosting.co.za> Message-ID: <1639571093.97.0.637209418378.issue26952@roundup.psfhosted.org> Irit Katriel added the comment: New changeset f0b274d2e21e6c7c1c0f56464070108f9bd00d20 by Miss Islington (bot) in branch '3.9': bpo-26952: [argparse] clearer error when formatting an empty mutually? (GH-30099) (GH-30115) https://github.com/python/cpython/commit/f0b274d2e21e6c7c1c0f56464070108f9bd00d20 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 07:25:23 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 15 Dec 2021 12:25:23 +0000 Subject: [issue26952] argparse help formatter raises IndexError In-Reply-To: <1462374887.67.0.462060112057.issue26952@psf.upfronthosting.co.za> Message-ID: <1639571123.0.0.68070315334.issue26952@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 07:34:29 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 15 Dec 2021 12:34:29 +0000 Subject: [issue46082] type casting of bool In-Reply-To: <1639567277.19.0.409904988292.issue46082@roundup.psfhosted.org> Message-ID: <1639571669.9.0.295707422886.issue46082@roundup.psfhosted.org> Alex Waygood added the comment: Hi! Your message here is a little unclear. Are you proposing a new feature (an enhancement), or filing a bug report? In either case, I'm afraid this behavior is very unlikely to change. In general, strings in Python are always considered truthy unless they are empty, even if they are the literal string "False" or "0". This is a very important principle in Python, and changing it would raise serious backwards-compatibility concerns. You can read more about truth-value testing here: https://docs.python.org/3/library/stdtypes.html#truth-value-testing ---------- components: -2to3 (2.x to 3.x conversion tool) nosy: +AlexWaygood status: open -> pending type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 07:52:41 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 15 Dec 2021 12:52:41 +0000 Subject: [issue17975] altinstall should not install libpython3.so (conflict between multiple $VERSIONs) In-Reply-To: <1368542639.2.0.817126483539.issue17975@psf.upfronthosting.co.za> Message-ID: <1639572761.97.0.56875099103.issue17975@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 08:09:13 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 15 Dec 2021 13:09:13 +0000 Subject: [issue46081] Document the msg argument for assertRaises In-Reply-To: <1639557491.44.0.830591969979.issue46081@roundup.psfhosted.org> Message-ID: <1639573753.54.0.916866117674.issue46081@roundup.psfhosted.org> Eric V. Smith added the comment: The documentation at https://docs.python.org/3/library/unittest.html says "All the assert methods accept a msg argument that, if specified, is used as the error message on failure (see also longMessage). Note that the msg keyword argument can be passed to assertRaises(), assertRaisesRegex(), assertWarns(), assertWarnsRegex() only when they are used as a context manager." ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 08:48:53 2021 From: report at bugs.python.org (Ram Rachum) Date: Wed, 15 Dec 2021 13:48:53 +0000 Subject: [issue46081] Document the msg argument for assertRaises In-Reply-To: <1639557491.44.0.830591969979.issue46081@roundup.psfhosted.org> Message-ID: <1639576133.8.0.350533390911.issue46081@roundup.psfhosted.org> Ram Rachum added the comment: Thanks, but people looking at a specific function might not guess that the documentation for one of its arguments is hiding somewhere on the long page. This is especially relevant with a confusing argument like `msg`, since it's tempting to think that this would be the message of the expected exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 08:53:48 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 15 Dec 2021 13:53:48 +0000 Subject: [issue46081] Document the msg argument for assertRaises In-Reply-To: <1639557491.44.0.830591969979.issue46081@roundup.psfhosted.org> Message-ID: <1639576428.94.0.81212546096.issue46081@roundup.psfhosted.org> Eric V. Smith added the comment: Suggestions to improve it are welcomed. I can't think of a way to do it without cluttering things up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 08:59:10 2021 From: report at bugs.python.org (Roundup Robot) Date: Wed, 15 Dec 2021 13:59:10 +0000 Subject: [issue41354] filecmp.cmp documentation does not match actual code In-Reply-To: <1595316543.83.0.558279011146.issue41354@roundup.psfhosted.org> Message-ID: <1639576750.55.0.340089000017.issue41354@roundup.psfhosted.org> Change by Roundup Robot : ---------- nosy: +python-dev nosy_count: 4.0 -> 5.0 pull_requests: +28340 pull_request: https://github.com/python/cpython/pull/30120 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 09:28:02 2021 From: report at bugs.python.org (Ram Rachum) Date: Wed, 15 Dec 2021 14:28:02 +0000 Subject: [issue46081] Document the msg argument for assertRaises In-Reply-To: <1639557491.44.0.830591969979.issue46081@roundup.psfhosted.org> Message-ID: <1639578482.11.0.326432019913.issue46081@roundup.psfhosted.org> Ram Rachum added the comment: I'd include that same message you quoted, minus the list of functions, on each and every one of the functions that have this argument. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 09:28:25 2021 From: report at bugs.python.org (Thomas Wouters) Date: Wed, 15 Dec 2021 14:28:25 +0000 Subject: [issue46083] PyUnicode_FSConverter() has confusing reference semantics Message-ID: <1639578505.04.0.502075999768.issue46083@roundup.psfhosted.org> New submission from Thomas Wouters : The PyUnicode_FSConverter function has confusing reference semantics, and confusing documentation. https://docs.python.org/3/c-api/unicode.html#c.PyUnicode_FSConverter says the output argument "must be a PyBytesObject* which must be released when it is no longer used." That seems to suggest one must pass a PyBytesObject to it, and indeed one of the error paths assumes an object was passed (https://github.com/python/cpython/blob/main/Objects/unicodeobject.c#L4116-- 'addr' is called 'result' in the docs). Not passing a valid object would result in trying to DECREF NULL, or garbage. However, the function doesn't actually use the object, and later in the function overwrites the value *without* DECREFing it, so passing a valid object would in fact cause a leak. I understand the function signature is the way it is so it can be used with PyArg_ParseTuple's O& format, but there are reasons to call it directly (e.g. with METH_O functions), and it would be nice if the semantics were more clear. ---------- components: C API messages: 408604 nosy: twouters priority: normal severity: normal status: open title: PyUnicode_FSConverter() has confusing reference semantics versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 09:40:12 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 15 Dec 2021 14:40:12 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1639579212.08.0.109764265535.issue45711@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +28341 pull_request: https://github.com/python/cpython/pull/30122 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 09:44:52 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Dec 2021 14:44:52 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639579492.97.0.366677856647.issue46006@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +28342 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30123 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 09:45:48 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Dec 2021 14:45:48 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639579548.85.0.766768925301.issue46006@roundup.psfhosted.org> STINNER Victor added the comment: I created PR 30123 to fix _PyUnicode_EqualToASCIIId() and type update_slot() functions. I added comments explaining why we can no longer optimize the comparison of two interned string objects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 09:49:20 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Dec 2021 14:49:20 +0000 Subject: [issue40533] [subinterpreters] Don't share Python objects between interpreters In-Reply-To: <1588777895.61.0.395509624257.issue40533@roundup.psfhosted.org> Message-ID: <1639579760.52.0.946887055447.issue40533@roundup.psfhosted.org> STINNER Victor added the comment: Until all Python stdlib C extensions and all third-party C extensions will be modified to no longer use and define static types and will stop shared Python objects between two interpreters, we can no longer micro-optimize the comparison of two interned strings by only comparing their memory addresse. See bpo-46006. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 09:54:30 2021 From: report at bugs.python.org (Jim Schwartz) Date: Wed, 15 Dec 2021 14:54:30 +0000 Subject: [issue46084] Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not Message-ID: <1639580070.17.0.621007734089.issue46084@roundup.psfhosted.org> New submission from Jim Schwartz : Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not. I've enclosed sample scripts that compare the two and have returned the results. the windows 10 registry entry to extend the path names fixes this issue (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled set to 1). I've enclosed a scripts that proved this occurs and can be used for testing. I have a script that does the same thing using os_walk, but I can't attach two scripts to this Issue. ---------- components: IO, Tests, Windows files: test_dir_scan_dir.py messages: 408607 nosy: jschwar313, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not type: crash versions: Python 3.9 Added file: https://bugs.python.org/file50492/test_dir_scan_dir.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 09:59:48 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 15 Dec 2021 14:59:48 +0000 Subject: [issue46080] argparse.BooleanOptionalAction with default=argparse.SUPPRESS and help specified raises exception In-Reply-To: <1639549771.77.0.946249381009.issue46080@roundup.psfhosted.org> Message-ID: <1639580388.91.0.984116940322.issue46080@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: argparse.BooleanOptionalAction with default=argparse.SUPPRESS and help specified crashes -> argparse.BooleanOptionalAction with default=argparse.SUPPRESS and help specified raises exception _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 10:03:46 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 15 Dec 2021 15:03:46 +0000 Subject: [issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations In-Reply-To: <1624890138.2.0.824780513801.issue44525@roundup.psfhosted.org> Message-ID: <1639580626.61.0.769163921226.issue44525@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 3a60bfef49b3324660a615a8e6d10710e5f669d9 by Mark Shannon in branch 'main': bpo-44525: Specialize for calls to type and other builtin classes with 1 argument. (GH-29942) https://github.com/python/cpython/commit/3a60bfef49b3324660a615a8e6d10710e5f669d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 10:03:40 2021 From: report at bugs.python.org (Jim Schwartz) Date: Wed, 15 Dec 2021 15:03:40 +0000 Subject: [issue46084] Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not In-Reply-To: <1639580070.17.0.621007734089.issue46084@roundup.psfhosted.org> Message-ID: <1639580620.31.0.817631789897.issue46084@roundup.psfhosted.org> Jim Schwartz added the comment: Here's the second file that works just fine under python 3.9 (by the way, I am using Windows 64-bit). I didn't test this on later python versions, however, nor did I test it on 32-bit versions. I see that many people on the internet have said to change the working directory as a work around. Could this possibly be why? ---------- Added file: https://bugs.python.org/file50493/test_os_walk.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 10:11:46 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Dec 2021 15:11:46 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639581106.18.0.800866381869.issue46006@roundup.psfhosted.org> STINNER Victor added the comment: These bug prevent the Fedora infra team from upgrading the Koji builders to Fedora 35. Koji runs on mod_wsgi which is affected by the bug: https://bugzilla.redhat.com/show_bug.cgi?id=2030621#c1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 10:16:25 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Dec 2021 15:16:25 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639581385.87.0.607777274039.issue46006@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-46070: I don't know if it's related. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 10:20:38 2021 From: report at bugs.python.org (Ken Jin) Date: Wed, 15 Dec 2021 15:20:38 +0000 Subject: [issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure In-Reply-To: <1598923449.65.0.107960415995.issue41682@roundup.psfhosted.org> Message-ID: <1639581638.95.0.773820231198.issue41682@roundup.psfhosted.org> Ken Jin added the comment: Happened to a PR I was reviewing today: https://github.com/python/cpython/runs/4535247255?check_suite_focus=true ---------- keywords: -patch nosy: +kj versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 10:32:41 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 15 Dec 2021 15:32:41 +0000 Subject: [issue46072] Unify handling of stats in the CPython VM In-Reply-To: <1639498673.65.0.709719181358.issue46072@roundup.psfhosted.org> Message-ID: <1639582361.15.0.175243029188.issue46072@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 342b93f9f28746abb7b221a61d5a9b26ccbb395a by Mark Shannon in branch 'main': bpo-46072: Add --with-pystats configure option to simplify gathering of VM stats (GH-30116) https://github.com/python/cpython/commit/342b93f9f28746abb7b221a61d5a9b26ccbb395a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 10:44:03 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 15 Dec 2021 15:44:03 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639583043.17.0.105027446884.issue46006@roundup.psfhosted.org> Mark Shannon added the comment: The problem here is that different sub-interpreters have different strings for the same Python string. Unless sub-interpreters are fully independent, and they cannot be due to limitations imposed by the stable API, then all sub-interpreters must share the same poll of strings. Since the only object reachable from a string is the `str` object (which is a static global object `PyUnicode_Type`), then the invariant that no object that is unique to one sub-interpreter can be reached from another sub-interpreter remains valid if strings are shared. I.e. there is no reason not to share strings. As Victor points out, there is no bug in 3.9 because interned strings are common across all interpreter. We should revert that behavior. ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 11:15:50 2021 From: report at bugs.python.org (Daniel McDonald) Date: Wed, 15 Dec 2021 16:15:50 +0000 Subject: [issue44413] OverflowError: mktime argument out of range after 2019 In-Reply-To: <1623607333.16.0.709856027198.issue44413@roundup.psfhosted.org> Message-ID: <1639584950.25.0.540216906188.issue44413@roundup.psfhosted.org> Daniel McDonald added the comment: I'd like to politely request this issue be reopened. We recently observed a similar, if not the same, OverflowError during continuous integration using Github Actions on ubuntu-latest (20.04). We can produce the error using pure Python without pytz. We have been unable to replicate the error using Github Actions on macos-latest, Centos 7.9, Ubuntu 18.04 or OSX 11.6.1. Specifically, the following code, which I believe is pure python, will trigger the overflow. We've observed this using Python 3.7 and 3.9. import time print(time.mktime((2017,5,26,15,30,16,4,146,1))) Exact error output from CI can be found at the link below: https://github.com/biocore/microsetta-private-api/runs/4536611219?check_suite_focus=true#step:4:117 On a passing system, we receive "1495837816.0" as output. On a failing system, we observe "OverflowError: mktime argument out of range". More detail can be found on our issue with pytz and stub42 who helped guide a more definitive example of the bug showing it could be pure Python. That issue can be found here: https://github.com/stub42/pytz/issues/66 Last, I apologize in advance if any detail is missing here or if this is not formatted as well as it should be. This is my first bug report with Python and am unfamiliar with the norms. Please let me know if further information may be helpful. ---------- nosy: +wasade versions: +Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 11:48:00 2021 From: report at bugs.python.org (Kevin Shweh) Date: Wed, 15 Dec 2021 16:48:00 +0000 Subject: [issue46085] OrderedDict iterator allocates di_result unnecessarily Message-ID: <1639586880.61.0.695571105446.issue46085@roundup.psfhosted.org> New submission from Kevin Shweh : The OrderedDict iterator caches a di_result tuple for use with iter(od.items()). It's *supposed* to only do that for the items() case, but the code does if (kind & (_odict_ITER_KEYS | _odict_ITER_VALUES)) to test for this case. This is the wrong test. It should be if ((kind & _odict_ITER_KEYS) && (kind &_odict_ITER_VALUES)) The current test allocates di_result for key and value iterators as well as items iterators. ---------- components: Library (Lib) messages: 408616 nosy: Kevin Shweh priority: normal severity: normal status: open title: OrderedDict iterator allocates di_result unnecessarily type: resource usage versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 11:55:42 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 15 Dec 2021 16:55:42 +0000 Subject: [issue46084] Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not In-Reply-To: <1639580070.17.0.621007734089.issue46084@roundup.psfhosted.org> Message-ID: <1639587342.91.0.107164253169.issue46084@roundup.psfhosted.org> Eryk Sun added the comment: > Python 3.9.6 scan_dir returns filenotfound on long paths, > but os_walk does not. This would be surprising. os.walk() has been implemented via os.scandir() since Python 3.5. Do you have a concrete example of the directory structure to test? > I see that many people on the internet have said to > change the working directory as a work around. Changing the working directory is a workaround in Unix, not Windows. Without long-path support, the working directory in Windows is limited to 258 (MAX_PATH - 2) characters. Without long-path support, the workaround in Windows is to use an extended path, i.e. a Unicode path that's fully-qualified and normalized -- as returned by os.path.abspath() -- and prefixed by "\\\\?\\" or "\\\\?\\UNC\\" (e.g. r"\\?\C:\spam" or r"\\?\UNC\server\share\spam"). This allows the native path length limit of about 32760 characters. Some API functions and applications do not support extended paths. In particular setting an extended path as the working directory is unsupported and buggy, even if long-path support is enabled. But extended paths work fine with most file functions in the os and shutil modules, such as os.scandir(), os.stat(), os.open(), shutil.copytree(), and shutil.rmtree(). ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 11:58:07 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 15 Dec 2021 16:58:07 +0000 Subject: [issue46085] OrderedDict iterator allocates di_result unnecessarily In-Reply-To: <1639586880.61.0.695571105446.issue46085@roundup.psfhosted.org> Message-ID: <1639587487.27.0.374474338622.issue46085@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +rhettinger versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 12:14:09 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 15 Dec 2021 17:14:09 +0000 Subject: [issue46072] Unify handling of stats in the CPython VM In-Reply-To: <1639498673.65.0.709719181358.issue46072@roundup.psfhosted.org> Message-ID: <1639588449.51.0.791307185232.issue46072@roundup.psfhosted.org> Christian Heimes added the comment: Could you please add the new option to Doc/using/configure.rst ? ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 12:14:58 2021 From: report at bugs.python.org (Jim Schwartz) Date: Wed, 15 Dec 2021 17:14:58 +0000 Subject: [issue46084] Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not In-Reply-To: <1639580070.17.0.621007734089.issue46084@roundup.psfhosted.org> Message-ID: <1639588498.24.0.567035105739.issue46084@roundup.psfhosted.org> Jim Schwartz added the comment: yes, I do. C:\Users\Jim\Documents\jschw_uiowtv3_old\AppData\Local\Google\Chrome\User Data\Default\Extensions\nenlahapcbofgnanklpelkaejcehkggg\0.1.823.675_0\notifications\pages\Cashback\components\CashBackResolve\components\RewardsActivation\components\CashbackSectionSimple it's over the 260 character limit that's the default for windows 10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 12:15:51 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Dec 2021 17:15:51 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639588551.3.0.191016955996.issue46006@roundup.psfhosted.org> STINNER Victor added the comment: Mark: "As Victor points out, there is no bug in 3.9 because interned strings are common across all interpreter. We should revert that behavior." The rationale for having per-interpreter interned strings and per-interpreter _Py_IDENTIFIER() string objects can be found in bpo-39465 and bpo-40521. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 12:18:58 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Dec 2021 17:18:58 +0000 Subject: [issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure In-Reply-To: <1598923449.65.0.107960415995.issue41682@roundup.psfhosted.org> Message-ID: <1639588738.58.0.96074586938.issue41682@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 12:29:08 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Wed, 15 Dec 2021 17:29:08 +0000 Subject: [issue44413] OverflowError: mktime argument out of range after 2019 In-Reply-To: <1623607333.16.0.709856027198.issue44413@roundup.psfhosted.org> Message-ID: <1639589348.84.0.399991241077.issue44413@roundup.psfhosted.org> Change by Andrei Kulakov : ---------- pull_requests: +28343 pull_request: https://github.com/python/cpython/pull/30124 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 12:32:36 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 15 Dec 2021 17:32:36 +0000 Subject: [issue46084] Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not In-Reply-To: <1639580070.17.0.621007734089.issue46084@roundup.psfhosted.org> Message-ID: <1639589556.28.0.171383827114.issue46084@roundup.psfhosted.org> Eryk Sun added the comment: It works as expected for me: >>> len(p) 261 >>> print(p) C:\Temp\Jim\Documents\jschw_uiowtv3_old\AppData\Local\Google\Chrome\User Data\Default\Extensions\nenlahapcbofgnanklpelkaejcehkggg\0.1.823.675_0\notifications\pages\Cashback\components\CashBackResolve\components\RewardsActivation\components\CashbackSectionSimple os.walk() can list the files in directory `p` if the \\?\ prefix is prepended: >>> next(os.walk('\\\\?\\' + p))[-1] ['spam.txt'] Without the prefix, the internal os.scandir() call fails, but by default the error is ignored: >>> next(os.walk(p))[-1] Traceback (most recent call last): File "", line 1, in StopIteration We can print the exception to see that it's the expected ERROR_PATH_NOT_FOUND (3) error for a path that's too long: >>> next(os.walk(p, onerror=print))[-1] [WinError 3] The system cannot find the path specified: 'C:\\Temp\\Jim\\Documents\\jschw_uiowtv3_old\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Extensions\\nenlahapcbofgnanklpelkaejcehkggg\\0.1.823.675_0\\notifications\\pages\\Cashback\\components\\CashBackResolve\\components\\RewardsActivation\\components\\CashbackSectionSimple' Traceback (most recent call last): File "", line 1, in StopIteration ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 12:37:14 2021 From: report at bugs.python.org (Giacomo) Date: Wed, 15 Dec 2021 17:37:14 +0000 Subject: [issue46086] Add ratio_min() function to the difflib library Message-ID: <1639589834.45.0.869314940446.issue46086@roundup.psfhosted.org> New submission from Giacomo : Here I propose a new function, namely .ratio_min(self,m). .ratio_min(self,m) is an extension of the difflib's function .ratio(self). Equivalently to .ratio(self), .ratio_min(self,m) returns a measure of two sequences' similarity (float in [0,1]). In addition to .ratio(), it can ignore matched substrings if these substrings have length less than a given threshold m. m is the second variable of the function. It is very useful to avoid spurious high similarity scores. # NEW FUNCTION: def ratio_min(self,m): """Return a measure of the sequences' similarity (float in [0,1]). Where T is the total number of elements in both sequences, and M_min is the number of matches with every single match has length at least m, this is 2.0*M_min / T. Note that this is 1 if the sequences are identical, and 0 if they have no substring of length m or more in common. .ratio_min() is similar to .ratio(). .ratio_min(1) is equivalent to .ratio(). >>> s = SequenceMatcher(None, "abcd", "bcde") >>> s.ratio_min(1) 0.75 >>> s.ratio_min(2) 0.75 >>> s.ratio_min(3) 0.75 >>> s.ratio_min(4) 0.0 """ matches = sum(triple[-1] for triple in self.get_matching_blocks() if triple[-1] >=m) return _calculate_ratio(matches, len(self.a) + len(self.b)) ---------- components: Library (Lib) messages: 408622 nosy: gibu priority: normal severity: normal status: open title: Add ratio_min() function to the difflib library type: enhancement versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 12:40:50 2021 From: report at bugs.python.org (Roundup Robot) Date: Wed, 15 Dec 2021 17:40:50 +0000 Subject: [issue46086] Add ratio_min() function to the difflib library In-Reply-To: <1639589834.45.0.869314940446.issue46086@roundup.psfhosted.org> Message-ID: <1639590050.63.0.486763507728.issue46086@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +28344 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 12:47:43 2021 From: report at bugs.python.org (Jim Schwartz) Date: Wed, 15 Dec 2021 17:47:43 +0000 Subject: [issue46084] Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not In-Reply-To: <1639580070.17.0.621007734089.issue46084@roundup.psfhosted.org> Message-ID: <1639590463.39.0.387229928563.issue46084@roundup.psfhosted.org> Jim Schwartz added the comment: do you have this registry entry set to 1: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled set to 1. It works if you do. What version of windows do you have? I have version 21H2 (OS Build 19044.1387). I don't have windows 11 yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 12:48:58 2021 From: report at bugs.python.org (Arthur Milchior) Date: Wed, 15 Dec 2021 17:48:58 +0000 Subject: [issue46087] Zip library documentation error Message-ID: <1639590538.75.0.882210215696.issue46087@roundup.psfhosted.org> New submission from Arthur Milchior : I don't have permission to assign the issue, but I intend to post the change in a few minutes as a PR Copied from Richard Hyde's email to doc mailing list. One of the examples of string formatting doesn't work. This applies to prior versions of Python as well. The last set of the examples headed: 'Nesting arguments and more complex examples:' starts with the following code: >>> for align, text in zip('<^>', ['left', 'center', 'right']): ... '{0:{fill}{align}16}'.format(text, fill=align, align=align) ... This omits print() The correct code would be: >>> for align, text in zip('<^>', ['left', 'center', 'right']): ... print('{0:{fill}{align}16}'.format(text, fill=align, align=align)) ... ----------------------------------------------- I agree with Richard here that there is a problem. Most example don't use print, but since there is no returned expression, that's the most relevant way to express the meaning of the example. Adding an expression would just make things more complex. Bug introducde in 28fbea412819f90698527c1997ece5aeddf8e9a7 in 2010. ---------- assignee: docs at python components: Documentation messages: 408624 nosy: Arthur-Milchior, docs at python priority: normal severity: normal status: open title: Zip library documentation error type: behavior versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 12:55:20 2021 From: report at bugs.python.org (Arthur Milchior) Date: Wed, 15 Dec 2021 17:55:20 +0000 Subject: [issue46087] Zip library documentation error In-Reply-To: <1639590538.75.0.882210215696.issue46087@roundup.psfhosted.org> Message-ID: <1639590920.69.0.281991993825.issue46087@roundup.psfhosted.org> Change by Arthur Milchior : ---------- keywords: +patch pull_requests: +28345 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30126 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 12:56:01 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 15 Dec 2021 17:56:01 +0000 Subject: [issue46084] Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not In-Reply-To: <1639580070.17.0.621007734089.issue46084@roundup.psfhosted.org> Message-ID: <1639590961.26.0.823482313455.issue46084@roundup.psfhosted.org> Eryk Sun added the comment: If I had long paths enabled, then next(os.walk(p, onerror=print)) would not have printed the error that I showed in the example and would not have immediately raised StopIteration. Instead it would have returned a (dirpath, dirnames, filenames) result for directory `p`. Did you repeat the simple examples that I showed, exactly as shown, and get a different result? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 12:56:20 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Dec 2021 17:56:20 +0000 Subject: [issue46084] Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not In-Reply-To: <1639580070.17.0.621007734089.issue46084@roundup.psfhosted.org> Message-ID: <1639590980.36.0.304617492949.issue46084@roundup.psfhosted.org> Serhiy Storchaka added the comment: os.walk() has been implemented via os.scandir(), but by default it ignores OSErrors raised by os.scandir(), DirEntry.is_dir() and DirEntry.is_symlink(). You can get errors raised by os.scandir() if specify the onerror argument, but errors in DirEntry.is_dir() and DirEntry.is_symlink() are always ignored, so too deep directories or links to directories can be treated as files. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 12:57:37 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Wed, 15 Dec 2021 17:57:37 +0000 Subject: [issue44413] OverflowError: mktime argument out of range after 2019 In-Reply-To: <1623607333.16.0.709856027198.issue44413@roundup.psfhosted.org> Message-ID: <1639591057.89.0.506117897077.issue44413@roundup.psfhosted.org> Andrei Kulakov added the comment: Confirmed on Ubuntu buildbot: https://github.com/python/cpython/runs/4537544103?check_suite_focus=true ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 12:58:13 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Wed, 15 Dec 2021 17:58:13 +0000 Subject: [issue44413] OverflowError: mktime argument out of range after 2019 In-Reply-To: <1623607333.16.0.709856027198.issue44413@roundup.psfhosted.org> Message-ID: <1639591093.64.0.214360878608.issue44413@roundup.psfhosted.org> Change by Andrei Kulakov : ---------- resolution: works for me -> stage: resolved -> needs patch status: closed -> open versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 13:03:17 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Dec 2021 18:03:17 +0000 Subject: [issue46087] Zip library documentation error In-Reply-To: <1639590538.75.0.882210215696.issue46087@roundup.psfhosted.org> Message-ID: <1639591397.2.0.924467901844.issue46087@roundup.psfhosted.org> Serhiy Storchaka added the comment: Since it is a REPL example, no print() is needed. In REPL any expression statement prints the repr of its result. For example: >>> for x in range(1, 5): ... f'{x}**2 = {x**2}' ... '1**2 = 1' '2**2 = 4' '3**2 = 9' '4**2 = 16' There are many such examples in the documentation, and I do not think that this particular example needs a change. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 13:05:36 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 15 Dec 2021 18:05:36 +0000 Subject: [issue46087] Zip library documentation error In-Reply-To: <1639590538.75.0.882210215696.issue46087@roundup.psfhosted.org> Message-ID: <1639591536.5.0.613910234929.issue46087@roundup.psfhosted.org> Change by Eric V. Smith : ---------- versions: -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 13:08:06 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 15 Dec 2021 18:08:06 +0000 Subject: [issue46086] Add ratio_min() function to the difflib library In-Reply-To: <1639589834.45.0.869314940446.issue46086@roundup.psfhosted.org> Message-ID: <1639591686.31.0.433133568438.issue46086@roundup.psfhosted.org> Alex Waygood added the comment: I am removing 3.10 from the "versions" field, since additions to the standard library are only considered for unreleased versions of Python. ---------- nosy: +AlexWaygood, tim.peters versions: -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 13:08:19 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 15 Dec 2021 18:08:19 +0000 Subject: [issue46086] Add ratio_min() function to the difflib library In-Reply-To: <1639589834.45.0.869314940446.issue46086@roundup.psfhosted.org> Message-ID: <1639591699.23.0.873711510593.issue46086@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: -AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 13:09:12 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 15 Dec 2021 18:09:12 +0000 Subject: [issue46087] Zip library documentation error In-Reply-To: <1639590538.75.0.882210215696.issue46087@roundup.psfhosted.org> Message-ID: <1639591752.62.0.0523789547256.issue46087@roundup.psfhosted.org> Eric V. Smith added the comment: Good point, Serhiy. I also don't see how the proposed change is related to any zip documentation (which is in the title of this issue). I suggest closing this. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 13:10:32 2021 From: report at bugs.python.org (Arthur Milchior) Date: Wed, 15 Dec 2021 18:10:32 +0000 Subject: [issue46087] format library documentation error In-Reply-To: <1639590538.75.0.882210215696.issue46087@roundup.psfhosted.org> Message-ID: <1639591832.07.0.299680839943.issue46087@roundup.psfhosted.org> Arthur Milchior added the comment: ipypthon3 does not print the loop content. python3 does. I only tested with ipython. I beg your pardon. I didn't know about this difference in behavior ---------- nosy: -eric.smith title: Zip library documentation error -> format library documentation error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 13:15:25 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Dec 2021 18:15:25 +0000 Subject: [issue46087] format library documentation error In-Reply-To: <1639590538.75.0.882210215696.issue46087@roundup.psfhosted.org> Message-ID: <1639592125.91.0.649435499198.issue46087@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +eric.smith resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 13:27:52 2021 From: report at bugs.python.org (Nathan Jensen) Date: Wed, 15 Dec 2021 18:27:52 +0000 Subject: [issue46070] broken subinterpreters In-Reply-To: <1639479470.16.0.0957612092108.issue46070@roundup.psfhosted.org> Message-ID: <1639592872.77.0.941407469932.issue46070@roundup.psfhosted.org> Change by Nathan Jensen : ---------- nosy: +ndjensen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 13:30:10 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 15 Dec 2021 18:30:10 +0000 Subject: [issue46084] Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not In-Reply-To: <1639580070.17.0.621007734089.issue46084@roundup.psfhosted.org> Message-ID: <1639593010.01.0.0671270527587.issue46084@roundup.psfhosted.org> Eryk Sun added the comment: > but errors in DirEntry.is_dir() and DirEntry.is_symlink() > are always ignored In Windows, is_symlink() won't fail due to a long path, since that information comes from the directory listing, but is_dir() might fail for a long path if it's a symlink to a directory. Windows requires that a symlink to a directory is also a directory (i.e. the symlink reparse point is set on an empty directory), but it's not enough to check that it's a directory symlink. is_dir() requires checking that the target exists, which may fail if the path of the link is too long to open and resolve the link target. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 13:35:10 2021 From: report at bugs.python.org (Ben Steffensmeier) Date: Wed, 15 Dec 2021 18:35:10 +0000 Subject: [issue46070] broken subinterpreters In-Reply-To: <1639479470.16.0.0957612092108.issue46070@roundup.psfhosted.org> Message-ID: <1639593310.74.0.606768971255.issue46070@roundup.psfhosted.org> Ben Steffensmeier added the comment: We have been seeing intermittent crashes on jep that we tracked down to the same change (d0d29655ff). I have created a sample program using _testcapi that crashes about 50% of the time when run on Windows with Python 3.9.9. We have not been able to reproduce problems on any other OS. See also: https://github.com/ninia/jep/issues/366 ---------- nosy: +bsteffensmeier Added file: https://bugs.python.org/file50494/win_py399_crash_reproducer.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 13:43:56 2021 From: report at bugs.python.org (Jim Schwartz) Date: Wed, 15 Dec 2021 18:43:56 +0000 Subject: [issue46084] Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not In-Reply-To: <1639580070.17.0.621007734089.issue46084@roundup.psfhosted.org> Message-ID: <1639593836.49.0.412180634728.issue46084@roundup.psfhosted.org> Jim Schwartz added the comment: the issue is with the scandir script, not the os_walk script. I tried to upload the scandir python script before, but I guess it didn't upload. When I was running the two scripts, I used an input of C:\\ as the input parameter. Hope that helps. ---------- Added file: https://bugs.python.org/file50495/test_dir_scan_dir.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 14:07:01 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 15 Dec 2021 19:07:01 +0000 Subject: [issue46088] Build hangs under Visual Studio in deepfreeze stage Message-ID: <1639595221.47.0.522675592351.issue46088@roundup.psfhosted.org> New submission from Guido van Rossum : I am trying to build under Visual Studio (the 2019 release) and I'm encountering the following weird issue. In the project file PCbuild\_freeze_module.vcxproj there's a command that runs the Tools\scripts\deepfreeze.py script to generate some code. The invocation is as follows: Apparently the PythonForBuild variable is unset, because this steps is trying to *open* the deepfreeze.py script using the default app for opening .py files, which in my case is VS Code. It seems that when using PCbuild\build.bat, PythonForBuild is set (on line 121) to %PYTHON%, which presumably points to some Python interpreter. But apparently when the build is driven by VS, this is not executed and now we're stuck. Is there someone with enough MSBUILD skills to help me fix this? ---------- components: Build, Windows messages: 408635 nosy: gvanrossum, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Build hangs under Visual Studio in deepfreeze stage type: compile error versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 14:12:59 2021 From: report at bugs.python.org (Jim Schwartz) Date: Wed, 15 Dec 2021 19:12:59 +0000 Subject: [issue46084] Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not In-Reply-To: <1639580070.17.0.621007734089.issue46084@roundup.psfhosted.org> Message-ID: <1639595579.42.0.385954868458.issue46084@roundup.psfhosted.org> Jim Schwartz added the comment: when I run the following command: python "H:\Users\LindaJim\Documents\AWS Python Learning\test_dir_scan_dir.py" "C:\\" I get this output: ... Traceback (most recent call last): File "H:\Users\LindaJim\Documents\AWS Python Learning\test_dir_scan_dir.py", line 54, in main(sys.argv[0:]) File "H:\Users\LindaJim\Documents\AWS Python Learning\test_dir_scan_dir.py", line 30, in main for file in get_files_in_dir(source): File "H:\Users\LindaJim\Documents\AWS Python Learning\test_dir_scan_dir.py", line 11, in get_files_in_dir yield from get_files_in_dir(entry.path) File "H:\Users\LindaJim\Documents\AWS Python Learning\test_dir_scan_dir.py", line 11, in get_files_in_dir yield from get_files_in_dir(entry.path) File "H:\Users\LindaJim\Documents\AWS Python Learning\test_dir_scan_dir.py", line 11, in get_files_in_dir yield from get_files_in_dir(entry.path) [Previous line repeated 19 more times] File "H:\Users\LindaJim\Documents\AWS Python Learning\test_dir_scan_dir.py", line 9, in get_files_in_dir for entry in os.scandir(source): FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\Jim\\Documents\\jschw_uiowtv3_old\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Extensions\\nenlahapcbofgnanklpelkaejcehkggg\\0.1.823.675_0\\notifications\\pages\\Cashback\\components\\CashBackResolve\\components\\RewardsActivation\\components\\CashbackSectionSimple' when I run the following command: python "H:\Users\LindaJim\Documents\AWS Python Learning\test_os_walk.py" "C:\\" I get this: ... file is C:\winutils\bin\winutils.exe End time is 2021-12-15.13:11:54 Duration is 0:06:05 I don't think this should happen, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 14:17:18 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 15 Dec 2021 19:17:18 +0000 Subject: [issue22047] Deprecate unsupported nesting of argparse groups In-Reply-To: <1406131424.14.0.0235697032218.issue22047@psf.upfronthosting.co.za> Message-ID: <1639595838.93.0.969195955233.issue22047@roundup.psfhosted.org> Irit Katriel added the comment: Another issue due to nesting: issue38590. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 14:29:43 2021 From: report at bugs.python.org (G. Allard) Date: Wed, 15 Dec 2021 19:29:43 +0000 Subject: [issue46089] Problems with AF_PACKET sockets Message-ID: <1639596583.53.0.533566052583.issue46089@roundup.psfhosted.org> New submission from G. Allard : For educational purposes, I'm developing my own IP stack in Python. It's going well but I'm stuck at a low level. I need to implement the following (simple) task: - open an AF_PACKET socket (socket.socket) - bind it to a specific interface (socket.bind) Python code would look like this: - sock = socket.socket( socket.AF_PACKET, socket.SOCK_RAW, socket.htons( ETH_P_ALL)) - sock.setblocking( False) - sock.bind(( 'eth0', socket.htons( ETH_P_ALL))) It does not work. bind always return "TypeError: AF_PACKET address must be a tuple of two to five elements" I spent many days on that problem. No success. Desperate, I tried to verify it wasn't a kernel problem. I wrote the C version of the above snippet. - sock = socket( AF_PACKET, SOCK_RAW | SOCK_NONBLOCK, htons( 3)); - struct sockaddr_ll addr = {0}; addr.sll_family = AF_PACKET; addr.sll_ifindex = 2; /* index of 'eth0' */ addr.sll_protocol = htons( ETH_P_ALL); - bind( sock, (struct sockaddr*) &addr, sizeof( addr)); I'm not an expert in C programming but it worked on first try. First problem is that AF_PACKET sockets are broken in Python. Second problem is inadequate documentation. Following issue ID 25041, some documentation has been added but there is still lot of room for improvements. For example: - recvfrom return 2 values. The first is the binary packet and the second one is a 5 member structure. The first member of the structure is the interface name. The 5th member if the MAC address (assuming the interface is an Ethernet NIC). The 3rd one is a protocol number (the data-link protocol) whose data is in front of the returnet packet (for WiFi packets, we will see Radiotap protocol at that level). That's a whole new world for documentors. - socket.bind() parameter is documented to be an address. For AF_PACKET, the address is documented in "Socket Families" section. Definition is vague. The 'proto' description would be easier to understand with "An integer (in network-byte-order) representing the low level protocol (enumerated in linux/if_ether.h) or ETH_P_ALL for all protocols. This parameter is only used for filtering inbound packets." IMO 'pkttype', 'hatype', 'addr' are there to document the information returned by recvfrom(). It's written they are "optional" but I think it's not correct. - Working examples of AF_PACKET must be provided, possibly in a HOWTO. When it's easier to program in C, it should tell you there is a problem on Python side. ---------- assignee: docs at python components: Documentation messages: 408638 nosy: docs at python, gallard priority: normal severity: normal status: open title: Problems with AF_PACKET sockets type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 14:50:28 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 15 Dec 2021 19:50:28 +0000 Subject: [issue44999] Argparse missing translates In-Reply-To: <1629886499.18.0.598632982374.issue44999@roundup.psfhosted.org> Message-ID: <1639597828.27.0.906253171282.issue44999@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: -lys.nikolaou type: performance -> behavior versions: +Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 14:51:13 2021 From: report at bugs.python.org (Eric Snow) Date: Wed, 15 Dec 2021 19:51:13 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639597873.98.0.240296728575.issue46006@roundup.psfhosted.org> Eric Snow added the comment: It sounds like this bug is another case where we have made some objects per-interpreter but others are still global and this is causing problems. _PyUnicode_EqualToASCIIId() wouldn't have any problems if interpreters weren't sharing any objects (or were only sharing immutable "immortal" objects). For now can we just move the relevant per-interpreter strings from PyInterpreterState.unicode_state ("interned" and "ids") up to _PyRuntimeState. They will then be global, which should restore the correct behavior. Personally, I'd rather we not revert the original change. Moving the data to _PyRuntimeState would save me some effort with related work I'm doing right now. Of course, the potential bug would still exist in _PyUnicode_EqualToASCIIId(). Could we add a test as part of this fix to verify the failure case described here actually works? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 14:51:30 2021 From: report at bugs.python.org (jdogzz-g5) Date: Wed, 15 Dec 2021 19:51:30 +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: <1639597890.06.0.0836875877785.issue38119@roundup.psfhosted.org> Change by jdogzz-g5 : ---------- nosy: +jdogzz-g5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 14:52:59 2021 From: report at bugs.python.org (Eric Snow) Date: Wed, 15 Dec 2021 19:52:59 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639597979.34.0.170973692095.issue46006@roundup.psfhosted.org> Eric Snow added the comment: FWIW, it makes sense to me for the interned strings to be per-interpreter eventually. Otherwise strings interned by an interpreter would persist after that interpreter is finalized, potentially leaking memory until the runtime is finalized. However, if we end up with immortal objects then I think all the strings created through _Py_IDENTIFIER() should be global (_PyRuntimeState). Otherwise they must be per-interpreter (if we have a per-interpreter GIL). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 14:58:48 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 15 Dec 2021 19:58:48 +0000 Subject: [issue32867] argparse assertion failure with multiline metavars In-Reply-To: <1518930403.05.0.467229070634.issue32867@psf.upfronthosting.co.za> Message-ID: <1639598328.29.0.311823608844.issue32867@roundup.psfhosted.org> Irit Katriel added the comment: It works for me on 3.11: % ./python.exe b.py -h usage: 11111111111111 [-h] [-v] 123456 12345 12345 123 [123456 12345 12345 123 ...] positional arguments: 123456 12345 12345 123 installation targets options: -h, --help show this help message and exit -v, --verbose verbose mode ---------- nosy: +iritkatriel resolution: -> fixed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 15:23:00 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 15 Dec 2021 20:23:00 +0000 Subject: [issue44413] OverflowError: mktime argument out of range after 2019 In-Reply-To: <1623607333.16.0.709856027198.issue44413@roundup.psfhosted.org> Message-ID: <1639599780.34.0.830278829529.issue44413@roundup.psfhosted.org> Terry J. Reedy added the comment: Thank you both. Status: Failures on Open Suse TW (Vyacheslav) and Ubuntu 20-04 (Daniel McDonald, Github Actions, and Azure Pipelines). Success on Windows (me), macOS (Catalina-me and 11.6.1-DM), Centos 7.9 and Ubuntu 18-04 (both DM) I verified that the sample tuple is consistent and round-trips with time.localtime. >>> import time >>> time.mktime((2017,5,26,15,30,16,4,146,1)) 1495827016.0 >>> time.localtime(time.mktime((2017,5,26,15,30,16,4,146,1))) time.struct_time(tm_year=2017, tm_mon=5, tm_mday=26, tm_hour=15, tm_min=30, tm_sec=16, tm_wday=4, tm_yday=146, tm_isdst=1) While OverflowError is documented as a legitimate response, it is not for a contemporary valid datetime such as the above. Someone with a failure machine could try to determine what tuple vales do and don't result in the error. Someone with both failure and success machines could add debug prints to mktime (or use C debugger) to see where the behavior of the C code diverges on the two machines. If no one active on the issue can do either, a request could be made for help on python-list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 15:23:57 2021 From: report at bugs.python.org (Jim Schwartz) Date: Wed, 15 Dec 2021 20:23:57 +0000 Subject: [issue46084] Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not In-Reply-To: <1639580070.17.0.621007734089.issue46084@roundup.psfhosted.org> Message-ID: <1639599837.77.0.0264659812854.issue46084@roundup.psfhosted.org> Jim Schwartz added the comment: my c drive and h drive are both internal drives and I run the python script from my user directory on my c drive. Not sure if that makes any difference. Just trying to think of things that might help you reproduce and fix this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 15:28:38 2021 From: report at bugs.python.org (Daniel McDonald) Date: Wed, 15 Dec 2021 20:28:38 +0000 Subject: [issue44413] OverflowError: mktime argument out of range after 2019 In-Reply-To: <1623607333.16.0.709856027198.issue44413@roundup.psfhosted.org> Message-ID: <1639600118.85.0.783379211478.issue44413@roundup.psfhosted.org> Daniel McDonald added the comment: Thank you, Terry. I'm currently exploring modifications to the test Andrei made within a fork of CPython using Github Actions (ubuntu-latest). These modifications include debug prints in the CPython mktime call, and some parameter exploration. I expect to have a summary of the observations this afternoon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 15:44:19 2021 From: report at bugs.python.org (Ethan Furman) Date: Wed, 15 Dec 2021 20:44:19 +0000 Subject: [issue46089] Problems with AF_PACKET sockets In-Reply-To: <1639596583.53.0.533566052583.issue46089@roundup.psfhosted.org> Message-ID: <1639601059.09.0.0550927411287.issue46089@roundup.psfhosted.org> Ethan Furman added the comment: Thank you for the thorough report. Do you feel comfortable writing that missing documentation? ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 15:46:45 2021 From: report at bugs.python.org (jdogzz-g5) Date: Wed, 15 Dec 2021 20:46:45 +0000 Subject: [issue35844] Calling `Multiprocessing.Queue.close()` too quickly causes intermittent failure (BrokenPipeError) In-Reply-To: <1548707332.73.0.0560406738777.issue35844@roundup.psfhosted.org> Message-ID: <1639601205.0.0.445707594882.issue35844@roundup.psfhosted.org> Change by jdogzz-g5 : ---------- nosy: +jdogzz-g5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 15:53:03 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 15 Dec 2021 20:53:03 +0000 Subject: [issue46086] Add ratio_min() function to the difflib library In-Reply-To: <1639589834.45.0.869314940446.issue46086@roundup.psfhosted.org> Message-ID: <1639601583.68.0.317527183348.issue46086@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 15:53:57 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 15 Dec 2021 20:53:57 +0000 Subject: [issue46085] OrderedDict iterator allocates di_result unnecessarily In-Reply-To: <1639586880.61.0.695571105446.issue46085@roundup.psfhosted.org> Message-ID: <1639601637.64.0.141271243832.issue46085@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 15:55:31 2021 From: report at bugs.python.org (Brandt Bucher) Date: Wed, 15 Dec 2021 20:55:31 +0000 Subject: [issue46090] C extensions can't swap out live frames anymore Message-ID: <1639601731.02.0.904150269203.issue46090@roundup.psfhosted.org> New submission from Brandt Bucher : I'm specifically concerned about Greenlet here (since it's a dependency of pyperformance), but this discussion is equally relevant to any library like it that dynamically swaps out the currently executing frame. CPython 3.11 makes several major changes to how frame objects are used and represented internally: - bpo-44032: Move data stack to thread from FrameObject. (https://github.com/python/cpython/pull/26076) - bpo-44590: Lazily allocate frame objects (https://github.com/python/cpython/pull/27077) - bpo-45637: Store the frame pointer in the cframe (https://github.com/python/cpython/pull/29267) These changes break Greenlet's hot-swapping of frame objects (https://github.com/python-greenlet/greenlet/blob/be41e1a24925326b72a02ef5cb6d1ed9643eb062/src/greenlet/greenlet_greenlet.hpp#L768-L811) in a pretty serious way, and it's not immediately clear what the best fix is. A fairly high-level overview of the new design: When a frame is executing, the current thread state points to the current CFrame, which itself points to a C-level InterpreterFrame. This interpreter frame is located within a "data stack" that is managed by the thread state. If a PyFrameObject for the currently executing frame is requested (using PyThreadState_GetFrame), the new PyFrameObject points into the InterpreterFrame, where all of the important data is still stored. So far so good. The issue is what happens next. If the InterpreterFrame is replaced, or exits in any way, its memory may be reused, or even freed entirely. The PyFrameObject is smart enough to copy the data elsewhere (into itself) when this happens, but the new design means that there is no obvious way for a third-party library to "reactivate" a frame in a way analogous to assigning to the old tstate->frame member. While I'm pretty sure that we don't officially support this "feature", it's probably used often enough that we should at least brainstorm a workaround (if not an unstable C-API function) for affected projects. I suspect that a potential solution likely involves creating an entirely new InterpreterFrame the normal way, and copying the PyFrameObject's InterpreterFrame data into it? Not sure what would happen if the old InterpreterFrame was still alive on the data stack, though... In any case, it probably makes sense to discuss here with affected library maintainers. ---------- assignee: brandtbucher components: Interpreter Core messages: 408646 nosy: Mark.Shannon, brandtbucher, gvanrossum, pablogsal priority: normal severity: normal status: open title: C extensions can't swap out live frames anymore versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 16:04:22 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 15 Dec 2021 21:04:22 +0000 Subject: [issue46079] [doc] Broken URL in "Brief Tour of the Standard Library" In-Reply-To: <1639548631.13.0.586608874559.issue46079@roundup.psfhosted.org> Message-ID: <1639602262.75.0.21585593497.issue46079@roundup.psfhosted.org> Raymond Hettinger added the comment: This seems to be a temporary outage, expected to be restored in the first half of 2022. Source: https://www.usno.navy.mil/USNO/time/master-clock I'll look for an alternative time source that is currently online. ---------- assignee: docs at python -> rhettinger nosy: +rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 16:07:12 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 15 Dec 2021 21:07:12 +0000 Subject: [issue45959] Teach pprint about dict views In-Reply-To: <1638428816.23.0.206050902249.issue45959@roundup.psfhosted.org> Message-ID: <1639602432.37.0.852498301196.issue45959@roundup.psfhosted.org> Raymond Hettinger added the comment: More accurate to say that it aspires to print in a single line ONLY if the content fits in the specified width. Otherwise, it prints vertically with appropriate indentation. Indeed, that is the entire purpose of the module; otherwise, we would just use print() which always writes one line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 16:26:39 2021 From: report at bugs.python.org (Jim Schwartz) Date: Wed, 15 Dec 2021 21:26:39 +0000 Subject: [issue46084] Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not In-Reply-To: <1639580070.17.0.621007734089.issue46084@roundup.psfhosted.org> Message-ID: <1639603599.66.0.898469012203.issue46084@roundup.psfhosted.org> Jim Schwartz added the comment: Please let me know if you are able to reproduce this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 16:55:47 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 15 Dec 2021 21:55:47 +0000 Subject: [issue44413] OverflowError: mktime argument out of range after 2019 In-Reply-To: <1623607333.16.0.709856027198.issue44413@roundup.psfhosted.org> Message-ID: <1639605347.37.0.832694896975.issue44413@roundup.psfhosted.org> Christian Heimes added the comment: time.mktime() is a thin wrapper around the libc function mktime(3). I can confirm that glibc's mktime() on Debian 11 with glibc 2.31 is failing and returning error code -1. Fedora 35 with glibc 2.34, Alpine with musl libc 1.2.2, and RHEL 8 with glibc 2.28 are working fine. This suggests that it is not a bug in Python, but Debian-specific platform issue. Could you please open a bug with Debian and Ubuntu? ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 17:06:14 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 15 Dec 2021 22:06:14 +0000 Subject: [issue46088] Build hangs under Visual Studio in deepfreeze stage In-Reply-To: <1639595221.47.0.522675592351.issue46088@roundup.psfhosted.org> Message-ID: <1639605974.24.0.983434718759.issue46088@roundup.psfhosted.org> Change by Guido van Rossum : ---------- keywords: +patch pull_requests: +28346 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30127 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 18:06:30 2021 From: report at bugs.python.org (Jeremy) Date: Wed, 15 Dec 2021 23:06:30 +0000 Subject: [issue46091] IndendationError from multi-line indented statements Message-ID: <1639609590.75.0.562177749036.issue46091@roundup.psfhosted.org> New submission from Jeremy : At some point in 3.9 Python appears to have stopped accepting source that starts with an indent, then a '\', then the indented statement. From the lexical analysis [1] "Indentation cannot be split over multiple physical lines using backslashes; the whitespace up to the first backslash determines the indentation." Running the attached program under 3.8.12 I get: ``` 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 ``` But running under 3.10.0 I get: ``` File "/Users/jeremyp/tmp/nodent.py", line 3 """Print a Fibonacci series up to n.""" ^ IndentationError: expected an indented block after function definition on line 1 ``` Running under 3.9.9 also gives an IndentationError, both with and without -X oldparser. So this doesn't seem directly related to the new parser, but seems likely it is fall out from the general grammar restructuring. IMHO it isn't a particularly nice feature for the language to have. Especially since not all lines like ' \' behave the same. But it was there and documented for many years, so should probably be put back. Does a core developer agree? That the implementation is not following the spec? [1]: https://docs.python.org/3/reference/lexical_analysis.html#indentation ---------- components: Parser files: nodent.py messages: 408651 nosy: lys.nikolaou, pablogsal, ucodery priority: normal severity: normal status: open title: IndendationError from multi-line indented statements versions: Python 3.10, Python 3.11, Python 3.9 Added file: https://bugs.python.org/file50496/nodent.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 18:17:22 2021 From: report at bugs.python.org (G. Allard) Date: Wed, 15 Dec 2021 23:17:22 +0000 Subject: [issue46089] Problems with AF_PACKET sockets In-Reply-To: <1639596583.53.0.533566052583.issue46089@roundup.psfhosted.org> Message-ID: <1639610242.01.0.886962501421.issue46089@roundup.psfhosted.org> G. Allard added the comment: Next 3 steps must be (in decreasing priorities): - fix the code - write a mini-howto. It will be used for test purposes - write documentation (a Howto/tutorial) For the 3rd step, I would accept to join a team. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 18:27:12 2021 From: report at bugs.python.org (Vivek Vashist) Date: Wed, 15 Dec 2021 23:27:12 +0000 Subject: [issue46092] Fix/update missing parameters in function signatures for Built-in Functions documentation. Message-ID: <1639610832.29.0.673265280888.issue46092@roundup.psfhosted.org> New submission from Vivek Vashist : Previous issue: https://github.com/python/cpython/pull/30113#issuecomment-994642493 As noted/pointed by Alex - I went through all the Built-in Functions and updated/fixed the missing parameters. I'll raise a PR shortly. ---------- assignee: docs at python components: Documentation messages: 408653 nosy: docs at python, vivekvashist priority: normal severity: normal status: open title: Fix/update missing parameters in function signatures for Built-in Functions documentation. type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 18:27:48 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 15 Dec 2021 23:27:48 +0000 Subject: [issue46091] IndendationError from multi-line indented statements In-Reply-To: <1639609590.75.0.562177749036.issue46091@roundup.psfhosted.org> Message-ID: <1639610868.88.0.0288406325829.issue46091@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: This is a side effect on the fix in: https://bugs.python.org/issue40847 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 18:28:12 2021 From: report at bugs.python.org (Vivek Vashist) Date: Wed, 15 Dec 2021 23:28:12 +0000 Subject: [issue46092] Fix/update missing parameters in function signatures for Built-in Functions documentation. In-Reply-To: <1639610832.29.0.673265280888.issue46092@roundup.psfhosted.org> Message-ID: <1639610892.87.0.261766711683.issue46092@roundup.psfhosted.org> Change by Vivek Vashist : ---------- keywords: +patch pull_requests: +28347 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30128 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 18:29:20 2021 From: report at bugs.python.org (Vivek Vashist) Date: Wed, 15 Dec 2021 23:29:20 +0000 Subject: [issue46092] Fix/update missing parameters in function signatures for Built-in Functions documentation. In-Reply-To: <1639610832.29.0.673265280888.issue46092@roundup.psfhosted.org> Message-ID: <1639610960.76.0.787067051023.issue46092@roundup.psfhosted.org> Vivek Vashist added the comment: PR: https://github.com/python/cpython/pull/30128 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 18:35:16 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 15 Dec 2021 23:35:16 +0000 Subject: [issue46091] IndendationError from multi-line indented statements In-Reply-To: <1639609590.75.0.562177749036.issue46091@roundup.psfhosted.org> Message-ID: <1639611316.4.0.964458634794.issue46091@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Unfortunately I am not sure if this is going to be easier to retrofit for the reasons exposed in the issue. I will try to take a look, but if you have some cycles to spare, a PR would be welcomed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 18:38:17 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 15 Dec 2021 23:38:17 +0000 Subject: [issue46091] IndendationError from multi-line indented statements In-Reply-To: <1639609590.75.0.562177749036.issue46091@roundup.psfhosted.org> Message-ID: <1639611497.3.0.512614135601.issue46091@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Actually, I am not sure if this is a bug, at least according to this comment: https://bugs.python.org/msg370812 What are your thoughts on this Guido? ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 18:44:33 2021 From: report at bugs.python.org (Daniel McDonald) Date: Wed, 15 Dec 2021 23:44:33 +0000 Subject: [issue44413] OverflowError: mktime argument out of range after 2019 In-Reply-To: <1623607333.16.0.709856027198.issue44413@roundup.psfhosted.org> Message-ID: <1639611873.48.0.674596561576.issue44413@roundup.psfhosted.org> Daniel McDonald added the comment: The use of tm_isdst=1 appears to trigger the overflow, and occurs when varying other aspects of the timetuple. Python's mktime wrapper can throw OverflowError in two places. The thrown error is the second location, following the call to glibc's mktime occurring in this specific if block: https://github.com/python/cpython/blob/f62420c3d3f5d87f2b57e54b2a98682bc835f7b6/Modules/timemodule.c#L1038-L1046 Modification of Modules/timemodule.c as to printf tm struct members confirms that when tm_isdst=1, the result from mktime() is -1, and the tm_wday member is set to -1, the combination of which triggers the conditional. mktime within the Github Action ubuntu-latest (20.04) environment is sourced from glibc 2.31 as confirmed by ldd and nm on the compiled Python binary. As a proof of concept, C program was written that calls mktime independent of CPython (can be compiled with "gcc bug.c -o bug"). The code below succeeds on both OSX 11.6.1 and Centos 7.9: #include #include void do_test() { struct tm tm_works = { .tm_year=117, .tm_mon=4, .tm_mday=26, .tm_hour=15, .tm_min=30, .tm_sec=16, .tm_wday=4, .tm_yday=145, .tm_isdst=-1 }; struct tm tm_fails = { .tm_year=117, .tm_mon=4, .tm_mday=26, .tm_hour=15, .tm_min=30, .tm_sec=16, .tm_wday=4, .tm_yday=145, .tm_isdst=1 }; time_t works = mktime(&tm_works); time_t fails = mktime(&tm_fails); if(works == -1) { printf("Unexpected failure\n"); } else { if(works == fails) { printf("Test passed\n"); } else { printf("Test failed: works=%d; fails=%d\n", (int)works, (int)fails); } } } int main(int argc, char **argv) { do_test(); } When compiled and run within in the Github Actions ubuntu-latest (20.04) environment, the erroneous behavior occurs: https://github.com/wasade/cpython/runs/4541212472?check_suite_focus=true#step:17:57 The use of tm_isdst=1 is valid according to multiple sources, a few examples are linked below. The sources are consistent, and indicate a positive value means Daylight Savings Time is in effect. https://www.gnu.org/software/libc/manual/html_node/Broken_002ddown-Time.html https://www.cplusplus.com/reference/ctime/tm/ At this time, I believe this remains unexpected behavior, however the source appears upstream of CPython as mktime is part of glibc. Unless suggested otherwise, I'll open an issue with on the glibc tracker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 18:46:15 2021 From: report at bugs.python.org (Daniel McDonald) Date: Wed, 15 Dec 2021 23:46:15 +0000 Subject: [issue44413] OverflowError: mktime argument out of range after 2019 In-Reply-To: <1623607333.16.0.709856027198.issue44413@roundup.psfhosted.org> Message-ID: <1639611975.05.0.356622173841.issue44413@roundup.psfhosted.org> Daniel McDonald added the comment: Thank you, Christian, I apologize for missing your reply. That is great advice, and I will do so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 18:57:28 2021 From: report at bugs.python.org (Brandt Bucher) Date: Wed, 15 Dec 2021 23:57:28 +0000 Subject: [issue45829] Remove C stack use by specializing BINARY_SUBSCR, STORE_SUBSCR, LOAD_ATTR, and STORE_ATTR In-Reply-To: <1637142611.15.0.521267590311.issue45829@roundup.psfhosted.org> Message-ID: <1639612648.01.0.72515748229.issue45829@roundup.psfhosted.org> Change by Brandt Bucher : ---------- pull_requests: +28348 pull_request: https://github.com/python/cpython/pull/30129 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 19:12:13 2021 From: report at bugs.python.org (Alex Waygood) Date: Thu, 16 Dec 2021 00:12:13 +0000 Subject: [issue46092] Fix/update missing parameters in function signatures for Built-in Functions documentation. In-Reply-To: <1639610832.29.0.673265280888.issue46092@roundup.psfhosted.org> Message-ID: <1639613533.71.0.0684277988849.issue46092@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +AlexWaygood versions: +Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 19:12:54 2021 From: report at bugs.python.org (Daniel McDonald) Date: Thu, 16 Dec 2021 00:12:54 +0000 Subject: [issue44413] OverflowError: mktime argument out of range after 2019 In-Reply-To: <1623607333.16.0.709856027198.issue44413@roundup.psfhosted.org> Message-ID: <1639613574.45.0.932039043184.issue44413@roundup.psfhosted.org> Daniel McDonald added the comment: For reference, the bug reports with Debian and Ubuntu are at the following URLs: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1001774 https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1954963 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 19:25:05 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 16 Dec 2021 00:25:05 +0000 Subject: [issue46091] IndendationError from multi-line indented statements In-Reply-To: <1639609590.75.0.562177749036.issue46091@roundup.psfhosted.org> Message-ID: <1639614305.6.0.584239966313.issue46091@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +28349 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30130 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 19:25:18 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 16 Dec 2021 00:25:18 +0000 Subject: [issue46091] IndendationError from multi-line indented statements In-Reply-To: <1639609590.75.0.562177749036.issue46091@roundup.psfhosted.org> Message-ID: <1639614318.57.0.192174993707.issue46091@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: nevermind, I am convinced is a bug. I filed a PR for it ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 19:35:36 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 Dec 2021 00:35:36 +0000 Subject: [issue46070] broken subinterpreters In-Reply-To: <1639479470.16.0.0957612092108.issue46070@roundup.psfhosted.org> Message-ID: <1639614936.78.0.942627029205.issue46070@roundup.psfhosted.org> STINNER Victor added the comment: I can sometimes reproduce the crash on Windows with Python 3.9. Call stack (most recent to oldest frames): * PyObject_GC_UnTrack() - crash on _PyGCHead_SET_NEXT(prev, next) because prev is dangling pointer (0x1fe64dd5250), Visual Studio is unable to read memory * meth_dealloc() -- delete _sre_compile() method object * (...) * PyDict_SetItem() -- set "compile" to None * _PyModule_ClearDict() -- clear the "_sre" module dict * _PyModule_Clear() * _PyImport_Clenaup() * Py_EndInterpreter() * (...) * run_in_subinterp() * (...) * t_bootstrap() The crash occurs in meth_dealloc(), when deallocating the _sre_compile() method object stored in _sre module dictionary as the attribute "compile". The PyGC_Head.prev pointer is a dangling pointer. On Python 3.9, the "re" module is not imported at startup, but it's imported indirectly by "import importlib.util" via "import typing". On Python 3.10, the re module is no longer imported by "import importlib.util". The crash is random. Sometimes, I need 3 or 4 tries. Sometimes, it crash using -X dev. Sometimes, it crash immediately. When debugging in Visual Stuido, the crash seems easier to reproduce. On Python 3.9, the _sre exetnsion uses the old API: PyModule_Create() with PyModuleDef.m_size = -1. On Python 3.10, the _sre extension has been converted to multiphase init API: PyModuleDef_Init() with PyModuleDef.m_size = sizeof(_sremodulestate). Moreover, "import importlib.util" no longer imports indirectly the "re" module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 19:40:16 2021 From: report at bugs.python.org (Jeremy) Date: Thu, 16 Dec 2021 00:40:16 +0000 Subject: [issue46091] IndendationError from multi-line indented statements In-Reply-To: <1639609590.75.0.562177749036.issue46091@roundup.psfhosted.org> Message-ID: <1639615216.86.0.365843233594.issue46091@roundup.psfhosted.org> Jeremy added the comment: Wow, this was a fast turnaround! I was going to spin some cycles on this, but would have not seen the solution in 50m. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 19:40:46 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 Dec 2021 00:40:46 +0000 Subject: [issue46070] broken subinterpreters In-Reply-To: <1639479470.16.0.0957612092108.issue46070@roundup.psfhosted.org> Message-ID: <1639615246.23.0.697309191027.issue46070@roundup.psfhosted.org> STINNER Victor added the comment: Using attached bug.py, it's possible to trigger the crash on the main branch. I modified the reproducer to use the "_asyncio" extension which still uses the old API PyModule_Create() with PyModuleDef.m_size = -1. ---------- Added file: https://bugs.python.org/file50497/bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 19:41:32 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 Dec 2021 00:41:32 +0000 Subject: [issue46070] _PyImport_FixupExtensionObject() regression causing a crash in subintepreters In-Reply-To: <1639479470.16.0.0957612092108.issue46070@roundup.psfhosted.org> Message-ID: <1639615292.14.0.137360486053.issue46070@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: broken subinterpreters -> _PyImport_FixupExtensionObject() regression causing a crash in subintepreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 19:47:31 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 16 Dec 2021 00:47:31 +0000 Subject: [issue46091] IndendationError from multi-line indented statements In-Reply-To: <1639609590.75.0.562177749036.issue46091@roundup.psfhosted.org> Message-ID: <1639615651.76.0.120539479993.issue46091@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg408657 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 19:53:27 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 Dec 2021 00:53:27 +0000 Subject: [issue46070] _PyImport_FixupExtensionObject() regression causing a crash in subintepreters In-Reply-To: <1639479470.16.0.0957612092108.issue46070@roundup.psfhosted.org> Message-ID: <1639616007.76.0.9680267924.issue46070@roundup.psfhosted.org> STINNER Victor added the comment: Hum, maybe bug.py exposes a different kind of bug. The _asyncio extension uses a non-trivial initialize code which doesn't seem to handle well concurrent "import _asyncio". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 20:10:48 2021 From: report at bugs.python.org (Eric Snow) Date: Thu, 16 Dec 2021 01:10:48 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639617048.87.0.1715895232.issue46006@roundup.psfhosted.org> Change by Eric Snow : ---------- pull_requests: +28350 pull_request: https://github.com/python/cpython/pull/30131 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 20:11:44 2021 From: report at bugs.python.org (Eric Snow) Date: Thu, 16 Dec 2021 01:11:44 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639617104.62.0.537818339012.issue46006@roundup.psfhosted.org> Eric Snow added the comment: I've created a PR for moving the interned strings and identifiers to _PyRuntimeState until we are ready to move them back to the interpreter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 20:13:09 2021 From: report at bugs.python.org (Eric Snow) Date: Thu, 16 Dec 2021 01:13:09 +0000 Subject: [issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters In-Reply-To: <1638897146.48.0.478621354755.issue46006@roundup.psfhosted.org> Message-ID: <1639617189.02.0.915138118649.issue46006@roundup.psfhosted.org> Eric Snow added the comment: If that seems okay, I'll work on a backport PR for 3.10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 21:14:51 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Thu, 16 Dec 2021 02:14:51 +0000 Subject: [issue46068] Change use of warnings.warn to logging.warning in a few places In-Reply-To: <1639435512.0.0.159079727605.issue46068@roundup.psfhosted.org> Message-ID: <1639620891.99.0.180131818878.issue46068@roundup.psfhosted.org> Andrei Kulakov added the comment: Raymond: Makes sense; I didn't know there was disagreement about this. I will keep this issue open for a week and then close. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 22:40:31 2021 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 16 Dec 2021 03:40:31 +0000 Subject: [issue46082] type casting of bool In-Reply-To: <1639567277.19.0.409904988292.issue46082@roundup.psfhosted.org> Message-ID: <1639626031.69.0.314542556786.issue46082@roundup.psfhosted.org> Josh Rosenberg added the comment: Agreed, this is not a bug. The behavior of the bool constructor is not a parser (unlike, say, int), it's a truthiness detector. Non-empty strings are always truthy, by design, so both "True" and "False" are truthy strings. There's no bug to address here. ---------- nosy: +josh.r resolution: -> not a bug stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 15 23:09:09 2021 From: report at bugs.python.org (Inada Naoki) Date: Thu, 16 Dec 2021 04:09:09 +0000 Subject: [issue46085] OrderedDict iterator allocates di_result unnecessarily In-Reply-To: <1639586880.61.0.695571105446.issue46085@roundup.psfhosted.org> Message-ID: <1639627749.94.0.633091118448.issue46085@roundup.psfhosted.org> Inada Naoki added the comment: Nice catch. > if ((kind & _odict_ITER_KEYS) && (kind &_odict_ITER_VALUES)) You can reduce one branch by ``` #define _odict_ITER_ITEMS (_odict_ITER_KEYS|_odict_ITER_VALUES) ... if (kind & _odict_ITER_ITEMS == _odict_ITER_ITEMS) ``` ---------- nosy: +methane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 00:16:24 2021 From: report at bugs.python.org (Ritvik S) Date: Thu, 16 Dec 2021 05:16:24 +0000 Subject: [issue46093] 2D array issue Message-ID: <1639631784.52.0.780624744558.issue46093@roundup.psfhosted.org> New submission from Ritvik S : I had a problem running the following code. When I ran through what I thought python was supposed to do, I got a different answer than what python did. I think this is an error. Here is the code: problem_ary = [['a','b','c'],['d','e','f'],['g','h','i']] normal_ary = ['a','b','c'] print(normal_ary[:]) #should print ['a','b','c'] print(problem_ary[:][1]) The second output should be ['b','e','h'] since the print statement tells python to take [0][1],[1][1], and [2][1] from the problem_ary which is 'b','e','h'. It confused me when python instead returned ['d','e','f']. I came across this problem when I was trying to create tic-tac-toe in python. I tried coding this is Python 3.8, 3.9, and using an online interpreter, and I got the same result every time. ---------- files: 2D-Array-Problem.py messages: 408671 nosy: ritviksetty priority: normal severity: normal status: open title: 2D array issue type: behavior versions: Python 3.8, Python 3.9 Added file: https://bugs.python.org/file50498/2D-Array-Problem.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 01:04:30 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 16 Dec 2021 06:04:30 +0000 Subject: [issue46081] Document the msg argument for assertRaises In-Reply-To: <1639557491.44.0.830591969979.issue46081@roundup.psfhosted.org> Message-ID: <1639634670.63.0.384377711587.issue46081@roundup.psfhosted.org> Raymond Hettinger added the comment: I concur with Eric that the current presentation is reasonable and better than adding boilerplate to every entry. It suffices that the docs cover the *msg* argument once and that each entry includes *msg* in its signature. Elsewhere in the docs we also try to avoid unnecessary repetition (for example, most classes don't list all their dunder methods). Excess repetition in the docs impairs readability. The unittest docs are already so long that it discourages someone from reading it top to bottom. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 01:20:18 2021 From: report at bugs.python.org (Ram Rachum) Date: Thu, 16 Dec 2021 06:20:18 +0000 Subject: [issue46081] Document the msg argument for assertRaises In-Reply-To: <1639557491.44.0.830591969979.issue46081@roundup.psfhosted.org> Message-ID: <1639635618.71.0.944560983092.issue46081@roundup.psfhosted.org> Ram Rachum added the comment: I disagree but I guess I'm in the minority here, so I'll close this issue. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 01:46:05 2021 From: report at bugs.python.org (dhruv) Date: Thu, 16 Dec 2021 06:46:05 +0000 Subject: [issue46094] Missing unit test on unittest.TestResult to check for required arguments Message-ID: <1639637165.39.0.102854010232.issue46094@roundup.psfhosted.org> New submission from dhruv : stream, descriptions, and verbosity seem like they aren't needed at first glance but are required to work with multiple inheritance. A simple test can clarify this. ---------- components: Tests messages: 408674 nosy: DreamSh0t priority: normal severity: normal status: open title: Missing unit test on unittest.TestResult to check for required arguments type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 01:52:38 2021 From: report at bugs.python.org (dhruv) Date: Thu, 16 Dec 2021 06:52:38 +0000 Subject: [issue46094] Missing unit test on unittest.TestResult to check for required arguments In-Reply-To: <1639637165.39.0.102854010232.issue46094@roundup.psfhosted.org> Message-ID: <1639637558.52.0.80834100875.issue46094@roundup.psfhosted.org> Change by dhruv : ---------- keywords: +patch pull_requests: +28351 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30132 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 02:00:41 2021 From: report at bugs.python.org (dhruv) Date: Thu, 16 Dec 2021 07:00:41 +0000 Subject: [issue46094] Missing unit test on unittest.TestResult to check for required arguments In-Reply-To: <1639637165.39.0.102854010232.issue46094@roundup.psfhosted.org> Message-ID: <1639638041.04.0.860594561543.issue46094@roundup.psfhosted.org> Change by dhruv : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 02:02:09 2021 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 16 Dec 2021 07:02:09 +0000 Subject: [issue46093] 2D array issue In-Reply-To: <1639631784.52.0.780624744558.issue46093@roundup.psfhosted.org> Message-ID: <1639638129.26.0.561219905403.issue46093@roundup.psfhosted.org> Eric V. Smith added the comment: problem_ary[:] creates a copy of problem_ary, so it's equal to: >>> problem_ary[:] [['a', 'b', 'c'], ['d', 'e', 'f'], ['g', 'h', 'i']] The [1] element of that is: >>> problem_ary[:][1] ['d', 'e', 'f'] So this is working as expected. I suggest you ask on StackOverflow or the python-list mailing list if you need more help in understanding how lists work in Python. ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 02:04:08 2021 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 16 Dec 2021 07:04:08 +0000 Subject: [issue46081] Document the msg argument for assertRaises In-Reply-To: <1639557491.44.0.830591969979.issue46081@roundup.psfhosted.org> Message-ID: <1639638248.0.0.0143847833826.issue46081@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> wont fix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 02:14:55 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 16 Dec 2021 07:14:55 +0000 Subject: [issue46092] Fix/update missing parameters in function signatures for Built-in Functions documentation. In-Reply-To: <1639610832.29.0.673265280888.issue46092@roundup.psfhosted.org> Message-ID: <1639638895.63.0.571745616462.issue46092@roundup.psfhosted.org> Raymond Hettinger added the comment: My understanding is that we're holding off on adding the slash notation to the main docs. The reason is that they are mostly unintelligible to the average user. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 04:12:31 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 09:12:31 +0000 Subject: [issue28816] [doc] Clarify that zipimport does not invoke import hooks to load custom files from zip. In-Reply-To: <1480326340.52.0.39566018579.issue28816@psf.upfronthosting.co.za> Message-ID: <1639645951.66.0.947994910611.issue28816@roundup.psfhosted.org> Irit Katriel added the comment: New changeset a951c95a13c3555ac8fb1c8ee615ba3930ccc6f7 by Irit Katriel in branch 'main': bpo-28816: [doc] clarify that zipimport invokes importers only for python files (GH-30060) https://github.com/python/cpython/commit/a951c95a13c3555ac8fb1c8ee615ba3930ccc6f7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 04:12:48 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 16 Dec 2021 09:12:48 +0000 Subject: [issue28816] [doc] Clarify that zipimport does not invoke import hooks to load custom files from zip. In-Reply-To: <1480326340.52.0.39566018579.issue28816@psf.upfronthosting.co.za> Message-ID: <1639645968.27.0.247414349053.issue28816@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28354 pull_request: https://github.com/python/cpython/pull/30134 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 04:12:43 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 16 Dec 2021 09:12:43 +0000 Subject: [issue28816] [doc] Clarify that zipimport does not invoke import hooks to load custom files from zip. In-Reply-To: <1480326340.52.0.39566018579.issue28816@psf.upfronthosting.co.za> Message-ID: <1639645963.93.0.874944614395.issue28816@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +28353 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30133 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 04:23:16 2021 From: report at bugs.python.org (Alex Waygood) Date: Thu, 16 Dec 2021 09:23:16 +0000 Subject: [issue46092] Fix/update missing parameters in function signatures for Built-in Functions documentation. In-Reply-To: <1639610832.29.0.673265280888.issue46092@roundup.psfhosted.org> Message-ID: <1639646596.45.0.992077752182.issue46092@roundup.psfhosted.org> Alex Waygood added the comment: It concerns me that help() gives very different results for some of these functions than the signature you'll find in the documentation. I think a beginner would find that highly confusing. If the view is that the slash notation should not be added to this piece of documentation, since it is aimed at beginners, should help() be changed so that it does not include the slash notation for built-in functions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 04:46:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 09:46:55 +0000 Subject: [issue22815] unexpected successes are not output In-Reply-To: <1415355708.14.0.235525212407.issue22815@psf.upfronthosting.co.za> Message-ID: <1639648015.91.0.166623503977.issue22815@roundup.psfhosted.org> Irit Katriel added the comment: In verbose mode we do get output like the one in the code.google issue: % cat tmp.py import unittest class TestStringMethods(unittest.TestCase): @unittest.expectedFailure def test_upper(self): self.assertEqual(2, 2) def test_lower(self): return if __name__ == '__main__': unittest.main() % ./python.exe -m tmp -v test_lower (__main__.TestStringMethods) ... ok test_upper (__main__.TestStringMethods) ... unexpected success ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 04:48:01 2021 From: report at bugs.python.org (=?utf-8?q?Ture_P=C3=A5lsson?=) Date: Thu, 16 Dec 2021 09:48:01 +0000 Subject: [issue46095] Warning about iterate/modify has unwarranted detail Message-ID: <1639648081.19.0.0569018631816.issue46095@roundup.psfhosted.org> New submission from Ture P?lsson : The language reference about the 'for' statement (https://docs.python.org/3/reference/compound_stmts.html#the-for-statement) has a "Note" box that states that the for statement uses an "internal counter" which is "incremented", and goes into detail about what happens when modifications happen before or after the current loop position. Surely this depends on the underlying iterator? For example, with a balanced tree an insert or a delete could completely re-jigger the tree with hard-to-predict results on an iterator. ---------- assignee: docs at python components: Documentation messages: 408680 nosy: docs at python, turepalsson priority: normal severity: normal status: open title: Warning about iterate/modify has unwarranted detail type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 04:48:42 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 09:48:42 +0000 Subject: [issue22815] unexpected successes are not output In-Reply-To: <1415355708.14.0.235525212407.issue22815@psf.upfronthosting.co.za> Message-ID: <1639648122.72.0.258611678442.issue22815@roundup.psfhosted.org> Irit Katriel added the comment: I don't think adding more information from the test would be helpful - when a test fails you have (and need) information about what happened. But when a test succeeds the code of the test basically tells you what happened - all the assertions passed. I think we can close this. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 04:54:42 2021 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 16 Dec 2021 09:54:42 +0000 Subject: [issue45959] Teach pprint about dict views In-Reply-To: <1638428816.23.0.206050902249.issue45959@roundup.psfhosted.org> Message-ID: <1639648482.81.0.221009280276.issue45959@roundup.psfhosted.org> Change by Daniel Diniz : ---------- keywords: +patch nosy: +ajaksu2 nosy_count: 4.0 -> 5.0 pull_requests: +28355 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30135 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 05:00:31 2021 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 16 Dec 2021 10:00:31 +0000 Subject: [issue45959] Teach pprint about dict views In-Reply-To: <1638428816.23.0.206050902249.issue45959@roundup.psfhosted.org> Message-ID: <1639648831.13.0.0193957467912.issue45959@roundup.psfhosted.org> Daniel Diniz added the comment: I have tried to add this. The PR adds: - PrettyPrinter._pprint_dict_view to handle dict_keys and dict_values (sorted with _safe_key). = PrettyPrinter._pprint_dict_items_view to handle dict_items (sorted using _safe_tuple). - Tests. Would a NEWS entry or other form of documentation be necessary? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 05:15:44 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Dec 2021 10:15:44 +0000 Subject: [issue22815] unexpected successes are not output In-Reply-To: <1415355708.14.0.235525212407.issue22815@psf.upfronthosting.co.za> Message-ID: <1639649744.27.0.433751793989.issue22815@roundup.psfhosted.org> Serhiy Storchaka added the comment: I think the OP means that test details (test description, traceback, captured output) are printed for ERROR and FAIL in TextTestResult.printErrors(). Other possible results besides error and failure are success, skipped, expected failure and unexpected success. Success, skipped and expected failure are expected, they do not cause total failure, but unexpected success is different. Result.wasSuccessful() returns False if there are any errors, failures or unexpected successes. But unlike errors and failures we do not have any details about unexpected successes. It looks like oversight to me. Yes, there are no traceback for unexpected success, but at least we can output the test description and captured output. ---------- assignee: -> serhiy.storchaka nosy: +ezio.melotti, michael.foord, serhiy.storchaka resolution: out of date -> status: pending -> open versions: +Python 3.11 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 05:33:14 2021 From: report at bugs.python.org (Dmitry) Date: Thu, 16 Dec 2021 10:33:14 +0000 Subject: [issue46096] Support PyObject interface for global variables in local scope and debugger Message-ID: <1639650794.38.0.196898311549.issue46096@roundup.psfhosted.org> New submission from Dmitry : We use the embedded Python in a multiscript environment. For example, VBS can execute Python code and vice versa. For that purpose we use a global context which is common for all running scripts (Python, VBS etc.) and control access to variables in that context by PyObject interface. But we faced with an issue: 1) Setting/deleting global variables in local scope are done outside of our control (without using PyObject interface). 2) A debugger (LOAD_NAME tag) does not see global variables in local scope. We would like to fix that issue by adding a check for exact PyDict (PyDict_CheckExact) in STORE_GLOBAL, DELETE_GLOBAL and LOAD_NAME tags in ceval.c. If a global dictionary is redefined then use PyObject interface instead of direct PyDict one. ---------- components: Interpreter Core hgrepos: 412 messages: 408684 nosy: dzhamoytsin priority: normal severity: normal status: open title: Support PyObject interface for global variables in local scope and debugger type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 05:56:20 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Dec 2021 10:56:20 +0000 Subject: [issue22815] unexpected successes are not output In-Reply-To: <1415355708.14.0.235525212407.issue22815@psf.upfronthosting.co.za> Message-ID: <1639652180.15.0.185372840931.issue22815@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +28356 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30138 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 05:57:51 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Dec 2021 10:57:51 +0000 Subject: [issue22815] unexpected successes are not output In-Reply-To: <1415355708.14.0.235525212407.issue22815@psf.upfronthosting.co.za> Message-ID: <1639652271.66.0.56201201318.issue22815@roundup.psfhosted.org> Serhiy Storchaka added the comment: There are no other details for unexpected successes, only test descriptions. ---------- type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 06:06:10 2021 From: report at bugs.python.org (Mark Shannon) Date: Thu, 16 Dec 2021 11:06:10 +0000 Subject: [issue46097] Split function versions into 1-0xffff and 0x1000+ regions Message-ID: <1639652770.25.0.708221453944.issue46097@roundup.psfhosted.org> New submission from Mark Shannon : Because functions are mutable, specifically because the __code__ attribute is mutable, we need to version functions when specializing. However, some specializations (for special methods mainly) only have space for 16 bit versions. It is likely that programs will have more than 2**16 functions versions, but it is much less likely that they will have more than 2**16 versions of special methods. We should partition the version space into 1-0xffff for use by special methods and 0x1000+ for use by other methods. See https://github.com/python/cpython/pull/30129 for an example of why this is needed. ---------- components: Interpreter Core messages: 408686 nosy: Mark.Shannon, brandtbucher priority: normal severity: normal status: open title: Split function versions into 1-0xffff and 0x1000+ regions type: performance versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 06:08:35 2021 From: report at bugs.python.org (Mark Shannon) Date: Thu, 16 Dec 2021 11:08:35 +0000 Subject: [issue45829] Remove C stack use by specializing BINARY_SUBSCR, STORE_SUBSCR, LOAD_ATTR, and STORE_ATTR In-Reply-To: <1637142611.15.0.521267590311.issue45829@roundup.psfhosted.org> Message-ID: <1639652915.98.0.300215174704.issue45829@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 62a8a0c5223f750e22ee381d3cfbdb718cf1cc93 by Brandt Bucher in branch 'main': bpo-45829: Check `__getitem__`'s version for overflow before specializing (GH-30129) https://github.com/python/cpython/commit/62a8a0c5223f750e22ee381d3cfbdb718cf1cc93 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 06:28:49 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 11:28:49 +0000 Subject: [issue46098] Missing test for multi-line errors in traceback Message-ID: <1639654129.22.0.790505803608.issue46098@roundup.psfhosted.org> New submission from Irit Katriel : While reviewing a change nearby, Erlend noticed that there is no test coverage for the multi-line error case in the traceback printing code added in bpo-43914. See https://github.com/python/cpython/pull/30073#discussion_r770114429 ---------- messages: 408688 nosy: erlendaasland, iritkatriel, pablogsal priority: normal severity: normal status: open title: Missing test for multi-line errors in traceback versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 06:29:34 2021 From: report at bugs.python.org (Mark Shannon) Date: Thu, 16 Dec 2021 11:29:34 +0000 Subject: [issue46072] Unify handling of stats in the CPython VM In-Reply-To: <1639498673.65.0.709719181358.issue46072@roundup.psfhosted.org> Message-ID: <1639654174.06.0.132950241968.issue46072@roundup.psfhosted.org> Change by Mark Shannon : ---------- pull_requests: +28357 pull_request: https://github.com/python/cpython/pull/30139 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 06:37:25 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 11:37:25 +0000 Subject: [issue22815] unexpected successes are not output In-Reply-To: <1415355708.14.0.235525212407.issue22815@psf.upfronthosting.co.za> Message-ID: <1639654645.64.0.863268571349.issue22815@roundup.psfhosted.org> Irit Katriel added the comment: Yes, this is why I don?t understand the request here. When a test fails you know which assertion was violated or which line raised an exception. When a multi line test succeeds, you don?t know which line was supposed to fail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 06:42:13 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 11:42:13 +0000 Subject: [issue22815] unexpected successes are not output In-Reply-To: <1415355708.14.0.235525212407.issue22815@psf.upfronthosting.co.za> Message-ID: <1639654933.65.0.622489410379.issue22815@roundup.psfhosted.org> Irit Katriel added the comment: I know that in unittest2 an unexpected success did not cause the test to fail (when we moved from unittest2 to unittest at work we got test failures due to unexpected successes that previously did not show up). I don't know the whole history of how unittest2 came to be, I think it was a clone of an older copy of unittest? Maybe that it the background for this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 06:42:31 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Dec 2021 11:42:31 +0000 Subject: [issue46094] Missing unit test on unittest.TestResult to check for required arguments In-Reply-To: <1639637165.39.0.102854010232.issue46094@roundup.psfhosted.org> Message-ID: <1639654951.97.0.914100778714.issue46094@roundup.psfhosted.org> Serhiy Storchaka added the comment: What do you mean they are required? All parameters of TestResult() are optional. ---------- nosy: +ezio.melotti, michael.foord, rbcollins, serhiy.storchaka status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 06:48:16 2021 From: report at bugs.python.org (Ned Batchelder) Date: Thu, 16 Dec 2021 11:48:16 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639655296.12.0.70866173844.issue46028@roundup.psfhosted.org> Ned Batchelder added the comment: Here's the experiment again with 3.10.1 and 3.11.0a3, and more ls's: $ python3.10 -V Python 3.10.1 $ python3.10 -m venv v310 $ ls -al v310/bin total 72 drwxr-xr-x 12 nedbatchelder wheel 384 Dec 16 06:42 ./ drwxr-xr-x 6 nedbatchelder wheel 192 Dec 16 06:42 ../ -rw-r--r-- 1 nedbatchelder wheel 9033 Dec 16 06:42 Activate.ps1 -rw-r--r-- 1 nedbatchelder wheel 1993 Dec 16 06:42 activate -rw-r--r-- 1 nedbatchelder wheel 919 Dec 16 06:42 activate.csh -rw-r--r-- 1 nedbatchelder wheel 2061 Dec 16 06:42 activate.fish -rwxr-xr-x 1 nedbatchelder wheel 246 Dec 16 06:42 pip* -rwxr-xr-x 1 nedbatchelder wheel 246 Dec 16 06:42 pip3* -rwxr-xr-x 1 nedbatchelder wheel 246 Dec 16 06:42 pip3.10* lrwxr-xr-x 1 nedbatchelder wheel 10 Dec 16 06:42 python@ -> python3.10 lrwxr-xr-x 1 nedbatchelder wheel 10 Dec 16 06:42 python3@ -> python3.10 lrwxr-xr-x 1 nedbatchelder wheel 25 Dec 16 06:42 python3.10@ -> /usr/local/bin/python3.10 $ ls -al /usr/local/bin/python3.10 lrwxr-xr-x 1 nedbatchelder admin 53 Dec 16 06:38 /usr/local/bin/python3.10@ -> /usr/local/pyenv/pyenv/versions/3.10.1/bin/python3.10 $ v310/bin/python -m venv v310-nested $ v310-nested/bin/python -V Python 3.10.1 $ ls -al v310-nested/bin total 72 drwxr-xr-x 12 nedbatchelder wheel 384 Dec 16 06:43 ./ drwxr-xr-x 6 nedbatchelder wheel 192 Dec 16 06:43 ../ -rw-r--r-- 1 nedbatchelder wheel 9033 Dec 16 06:43 Activate.ps1 -rw-r--r-- 1 nedbatchelder wheel 2014 Dec 16 06:43 activate -rw-r--r-- 1 nedbatchelder wheel 940 Dec 16 06:43 activate.csh -rw-r--r-- 1 nedbatchelder wheel 2082 Dec 16 06:43 activate.fish -rwxr-xr-x 1 nedbatchelder wheel 249 Dec 16 06:43 pip* -rwxr-xr-x 1 nedbatchelder wheel 249 Dec 16 06:43 pip3* -rwxr-xr-x 1 nedbatchelder wheel 249 Dec 16 06:43 pip3.10* lrwxr-xr-x 1 nedbatchelder wheel 37 Dec 16 06:43 python@ -> /private/tmp/bpo46028/v310/bin/python lrwxr-xr-x 1 nedbatchelder wheel 6 Dec 16 06:43 python3@ -> python lrwxr-xr-x 1 nedbatchelder wheel 6 Dec 16 06:43 python3.10@ -> python $ ls -al /private/tmp/bpo46028/v310/bin/python lrwxr-xr-x 1 nedbatchelder wheel 10 Dec 16 06:42 /private/tmp/bpo46028/v310/bin/python@ -> python3.10 $ python3.11 -V Python 3.11.0a3 $ python3.11 -m venv v311 $ ls -al v311/bin total 72 drwxr-xr-x 12 nedbatchelder wheel 384 Dec 16 06:45 ./ drwxr-xr-x 6 nedbatchelder wheel 192 Dec 16 06:45 ../ -rw-r--r-- 1 nedbatchelder wheel 9033 Dec 16 06:45 Activate.ps1 -rw-r--r-- 1 nedbatchelder wheel 1993 Dec 16 06:45 activate -rw-r--r-- 1 nedbatchelder wheel 919 Dec 16 06:45 activate.csh -rw-r--r-- 1 nedbatchelder wheel 2061 Dec 16 06:45 activate.fish -rwxr-xr-x 1 nedbatchelder wheel 246 Dec 16 06:45 pip* -rwxr-xr-x 1 nedbatchelder wheel 246 Dec 16 06:45 pip3* -rwxr-xr-x 1 nedbatchelder wheel 246 Dec 16 06:45 pip3.11* lrwxr-xr-x 1 nedbatchelder wheel 10 Dec 16 06:45 python@ -> python3.11 lrwxr-xr-x 1 nedbatchelder wheel 10 Dec 16 06:45 python3@ -> python3.11 lrwxr-xr-x 1 nedbatchelder wheel 25 Dec 16 06:45 python3.11@ -> /usr/local/bin/python3.11 $ ls -al /usr/local/bin/python3.11 lrwxr-xr-x 1 nedbatchelder admin 55 Dec 9 12:23 /usr/local/bin/python3.11@ -> /usr/local/pyenv/pyenv/versions/3.11.0a3/bin/python3.11 $ v311/bin/python -m venv v311-nested Error: [Errno 2] No such file or directory: '/private/tmp/bpo46028/v311-nested/bin/python' $ ls -al v311-nested/bin total 0 drwxr-xr-x 5 nedbatchelder wheel 160 Dec 16 06:45 ./ drwxr-xr-x 6 nedbatchelder wheel 192 Dec 16 06:45 ../ lrwxr-xr-x 1 nedbatchelder wheel 21 Dec 16 06:45 python@ -> /usr/local/bin/python lrwxr-xr-x 1 nedbatchelder wheel 6 Dec 16 06:45 python3@ -> python lrwxr-xr-x 1 nedbatchelder wheel 6 Dec 16 06:45 python3.11@ -> python $ ls -al /usr/local/bin/python ls: /usr/local/bin/python: No such file or directory ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 06:52:50 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Dec 2021 11:52:50 +0000 Subject: [issue22815] unexpected successes are not output In-Reply-To: <1415355708.14.0.235525212407.issue22815@psf.upfronthosting.co.za> Message-ID: <1639655570.26.0.231523132127.issue22815@roundup.psfhosted.org> Serhiy Storchaka added the comment: Unless you tun tests in verbose mode you do not know which of tests was unexpectedly successful. And even in the verbose mode it is not easy to find that test in long output. Yes, unexpected successes considered successes in earlier versions. See issue20165. You can find many interesting when read git logs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 06:54:02 2021 From: report at bugs.python.org (Jakub Kulik) Date: Thu, 16 Dec 2021 11:54:02 +0000 Subject: [issue46099] Solaris: Fix pthread_getcpuclockid test Message-ID: <1639655642.85.0.652795317343.issue46099@roundup.psfhosted.org> New submission from Jakub Kulik : On Solaris, when `pthread_getcpuclockid()` is called with current thread id as an argument, it returns `CLOCK_THREAD_CPUTIME_ID`. ====================================================================== FAIL: test_pthread_getcpuclockid (test.test_time.TimeTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/share/buildbot-worker/default/3.9.kulikjak-solaris-sparcv9/build/Lib/test/test_time.py", line 116, in test_pthread_getcpuclockid self.assertNotEqual(clk_id, time.CLOCK_THREAD_CPUTIME_ID) AssertionError: 2 == 2 Based on the test code, 32bit AIX seems to do the same thing so I added another similar code for Solaris. ---------- components: Tests messages: 408694 nosy: kulikjak priority: normal severity: normal status: open title: Solaris: Fix pthread_getcpuclockid test versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 06:56:09 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Dec 2021 11:56:09 +0000 Subject: [issue20165] unittest TestResult wasSuccessful returns True when there are unexpected successes In-Reply-To: <1389122721.74.0.155844601606.issue20165@psf.upfronthosting.co.za> Message-ID: <1639655769.27.0.738464646314.issue20165@roundup.psfhosted.org> Serhiy Storchaka added the comment: See also issue22815. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 06:57:18 2021 From: report at bugs.python.org (Jakub Kulik) Date: Thu, 16 Dec 2021 11:57:18 +0000 Subject: [issue46099] Solaris: Fix pthread_getcpuclockid test In-Reply-To: <1639655642.85.0.652795317343.issue46099@roundup.psfhosted.org> Message-ID: <1639655838.0.0.487010631624.issue46099@roundup.psfhosted.org> Change by Jakub Kulik : ---------- keywords: +patch pull_requests: +28358 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30140 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 06:58:24 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Dec 2021 11:58:24 +0000 Subject: [issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls) In-Reply-To: <1555752054.75.0.256314796752.issue36674@roundup.psfhosted.org> Message-ID: <1639655904.48.0.512953345131.issue36674@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 07:13:02 2021 From: report at bugs.python.org (Dmitry) Date: Thu, 16 Dec 2021 12:13:02 +0000 Subject: [issue46096] Support PyObject interface for global variables in local scope and debugger In-Reply-To: <1639650794.38.0.196898311549.issue46096@roundup.psfhosted.org> Message-ID: <1639656782.36.0.948323528967.issue46096@roundup.psfhosted.org> Change by Dmitry : ---------- keywords: +patch pull_requests: +28359 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30141 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 07:15:32 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Dec 2021 12:15:32 +0000 Subject: [issue12681] unittest expectedFailure could take a message argument like skip does In-Reply-To: <1312285316.59.0.648531105022.issue12681@psf.upfronthosting.co.za> Message-ID: <1639656932.13.0.426299728165.issue12681@roundup.psfhosted.org> Serhiy Storchaka added the comment: Such change would break a lot of existing interfaces. * addUnexpectedSuccess() has a single parameter. The change will add the second parameter and will break subclasses of TestResult. * addExpectedFailure() has two parameter. The change will add the third parameter and will break subclasses of TestResult. * unexpectedSuccesses is a list of tests. The change will make it a list of 2-tuples and will break users of TestResult. * expectedFailures is a list of 2-tuples. The change will make it a list of 3-tuples and will break users of TestResult. It is too destructive change. I think we can live without a message argument for expectedFailure(). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 07:16:09 2021 From: report at bugs.python.org (John Marshall) Date: Thu, 16 Dec 2021 12:16:09 +0000 Subject: [issue45554] multiprocessing exitcode is insufficiently documented In-Reply-To: <1634821512.68.0.19757436473.issue45554@roundup.psfhosted.org> Message-ID: <1639656969.12.0.314003597796.issue45554@roundup.psfhosted.org> Change by John Marshall : ---------- keywords: +patch pull_requests: +28360 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30142 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 07:23:29 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 12:23:29 +0000 Subject: [issue28816] [doc] Clarify that zipimport does not invoke import hooks to load custom files from zip. In-Reply-To: <1480326340.52.0.39566018579.issue28816@psf.upfronthosting.co.za> Message-ID: <1639657409.51.0.133860455879.issue28816@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 4c1effaaee472cc67f3186411a3df4f39af3d71a by Miss Islington (bot) in branch '3.9': bpo-28816: [doc] clarify that zipimport invokes importers only for python files (GH-30060) (GH-30134) https://github.com/python/cpython/commit/4c1effaaee472cc67f3186411a3df4f39af3d71a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 07:23:34 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 16 Dec 2021 12:23:34 +0000 Subject: [issue23522] Misleading note in Statistics module documentation In-Reply-To: <1424889646.1.0.160219400081.issue23522@psf.upfronthosting.co.za> Message-ID: <1639657414.12.0.357805023269.issue23522@roundup.psfhosted.org> Steven D'Aprano added the comment: Prompted by Guido's reopening of the ticket, I have given it some more thought, and have softened my views. Jake if you're still around, perhaps there is more to what you said than I initially thought, and I just needed fresh eyes to see it. Sorry for being so slow to come around. People may be less likely to wrongly imagine there is a single centre location of data if we use the term "central tendency" instead of location. I think we should also drop the reference to mode(), since it only works with discrete data and is not suitable for continuous data. "The mean is strongly affected by outliers and is not necessarily a typical example of the data points. For a more robust, although less efficient, measure of central tendency, see median()" How do we feel about linking to Wikipedia? I'd like to link both outliers and central tendency to the appropriate Wikipedia entries. ---------- stage: resolved -> versions: +Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 07:23:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 12:23:45 +0000 Subject: [issue28816] [doc] Clarify that zipimport does not invoke import hooks to load custom files from zip. In-Reply-To: <1480326340.52.0.39566018579.issue28816@psf.upfronthosting.co.za> Message-ID: <1639657425.74.0.27192064537.issue28816@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 0194bbbee6a12264e93d3217c774e226f0a1737d by Miss Islington (bot) in branch '3.10': bpo-28816: [doc] clarify that zipimport invokes importers only for python files (GH-30060) (GH-30133) https://github.com/python/cpython/commit/0194bbbee6a12264e93d3217c774e226f0a1737d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 07:24:31 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 12:24:31 +0000 Subject: [issue28816] [doc] Clarify that zipimport does not invoke import hooks to load custom files from zip. In-Reply-To: <1480326340.52.0.39566018579.issue28816@psf.upfronthosting.co.za> Message-ID: <1639657471.15.0.148243054735.issue28816@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 07:37:48 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 16 Dec 2021 12:37:48 +0000 Subject: [issue46100] Simplify readline / editline detection Message-ID: <1639658268.15.0.0477908867569.issue46100@roundup.psfhosted.org> New submission from Christian Heimes : The configure.ac code for editline/readline detection is complicated. Especially the code for linking with extra termcap libraries makes it complicated to port the check to pkg-config. The termcap checks were added by Greg in bpo-3645 and commit 188209465a966cf046ed7946589aa21767f95e68 . I propose to simplify the checks and require a readline 4.2 compatible API. GNU readline was released in 2001 (20 years ago). NetBSD libedit editline/readline.h has RL_READLINE_VERSION 0x0402 for at least 10 years. * drop the check for additional termcap libs * remove the fallback to completion_matches * replace AC_CHECK_LIB($LIBREADLINE, ...) checks with a check for RL_READLINE_VERSION >= 0x0402 What do you think? ---------- components: Build messages: 408700 nosy: christian.heimes, erlendaasland, gregory.p.smith priority: normal severity: normal status: open title: Simplify readline / editline detection type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 08:07:06 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 16 Dec 2021 13:07:06 +0000 Subject: [issue46100] Simplify readline / editline detection In-Reply-To: <1639658268.15.0.0477908867569.issue46100@roundup.psfhosted.org> Message-ID: <1639660026.65.0.537130371748.issue46100@roundup.psfhosted.org> Erlend E. Aasland added the comment: FWIW, the XCode SDKs for macOS 11 and 12 use the NetBSD editline library. $ grep "NetBSD: readline" /Library/Developer/CommandLineTools/SDKs/MacOSX*.sdk/usr/include/readline/readline.h /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/readline/readline.h:/* $NetBSD: readline.h,v 1.33 2012/05/15 17:30:04 christos Exp $ */ /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/readline/readline.h:/* $NetBSD: readline.h,v 1.33 2012/05/15 17:30:04 christos Exp $ */ /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/readline/readline.h:/* $NetBSD: readline.h,v 1.33 2012/05/15 17:30:04 christos Exp $ */ /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/readline/readline.h:/* $NetBSD: readline.h,v 1.33 2012/05/15 17:30:04 christos Exp $ */ /Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk/usr/include/readline/readline.h:/* $NetBSD: readline.h,v 1.33 2012/05/15 17:30:04 christos Exp $ */ /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/readline/readline.h:/* $NetBSD: readline.h,v 1.33 2012/05/15 17:30:04 christos Exp $ */ $ grep RL_READLINE_VERSION /Library/Developer/CommandLineTools/SDKs/MacOSX*.sdk/usr/include/readline/readline.h /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/readline/readline.h:#define RL_READLINE_VERSION 0x0402 /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/readline/readline.h:#define RL_READLINE_VERSION 0x0402 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/readline/readline.h:#define RL_READLINE_VERSION 0x0402 /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/readline/readline.h:#define RL_READLINE_VERSION 0x0402 /Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk/usr/include/readline/readline.h:#define RL_READLINE_VERSION 0x0402 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/readline/readline.h:#define RL_READLINE_VERSION 0x0402 This is what Homebrew provides: $ PKG_CONFIG_PATH=$(brew --prefix readline)/lib/pkgconfig pkg-config readline --cflags --libs -I/usr/local/Cellar/readline/8.1.1/include -L/usr/local/Cellar/readline/8.1.1/lib -lreadline ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 08:41:06 2021 From: report at bugs.python.org (Mark Shannon) Date: Thu, 16 Dec 2021 13:41:06 +0000 Subject: [issue46072] Unify handling of stats in the CPython VM In-Reply-To: <1639498673.65.0.709719181358.issue46072@roundup.psfhosted.org> Message-ID: <1639662066.84.0.94381115426.issue46072@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 4506bbede1644e985991884964b43afa7ee6f609 by Mark Shannon in branch 'main': bpo-46072: Document --enable-stats option. (GH-30139) https://github.com/python/cpython/commit/4506bbede1644e985991884964b43afa7ee6f609 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 09:00:23 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 16 Dec 2021 14:00:23 +0000 Subject: [issue23522] Misleading note in Statistics module documentation In-Reply-To: <1424889646.1.0.160219400081.issue23522@psf.upfronthosting.co.za> Message-ID: <1639663223.98.0.672855406917.issue23522@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 09:18:52 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 16 Dec 2021 14:18:52 +0000 Subject: [issue46088] Build hangs under Visual Studio in deepfreeze stage In-Reply-To: <1639595221.47.0.522675592351.issue46088@roundup.psfhosted.org> Message-ID: <1639664332.77.0.318336275874.issue46088@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +28361 pull_request: https://github.com/python/cpython/pull/30143 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 09:22:16 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 16 Dec 2021 14:22:16 +0000 Subject: [issue46088] Build hangs under Visual Studio in deepfreeze stage In-Reply-To: <1639595221.47.0.522675592351.issue46088@roundup.psfhosted.org> Message-ID: <1639664536.2.0.689686050491.issue46088@roundup.psfhosted.org> Steve Dower added the comment: I posted a PR that shells out to the find_python script and captures its output to use during VS builds. Theoretically, this could save us from running it in build.bat, but I like having the detection and messages up front rather than buried deep in the build logs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 09:24:25 2021 From: report at bugs.python.org (Ken Jin) Date: Thu, 16 Dec 2021 14:24:25 +0000 Subject: [issue46097] Split function versions into 1-0xffff and 0x1000+ regions In-Reply-To: <1639652770.25.0.708221453944.issue46097@roundup.psfhosted.org> Message-ID: <1639664665.86.0.188453551363.issue46097@roundup.psfhosted.org> Change by Ken Jin : ---------- nosy: +kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 09:25:02 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 16 Dec 2021 14:25:02 +0000 Subject: [issue46072] Unify handling of stats in the CPython VM In-Reply-To: <1639498673.65.0.709719181358.issue46072@roundup.psfhosted.org> Message-ID: <1639664702.49.0.440239374685.issue46072@roundup.psfhosted.org> Christian Heimes added the comment: I just noticed that you are using hard-coded paths with /tmp for the pystats directory. That's problematic and opens the possibility of a symlink race attack. Could please add exclusive create to _Py_PrintSpecializationStats()? The will prevent symlink attacks. fopen() mode "x" is not generally available in all libcs. You have to combine open() and fdopen(): int flags = O_WRONLY | O_CREAT | O_EXCL; #ifdef O_NOFOLLOW flags |= O_NOFOLLOW; #endif #ifdef O_CLOEXEC flags |= O_CLOEXEC; #endif int fd = open(path, flags); if (fd >= 0) { FILE *fout = fdopen(fd, "w"); } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 09:30:36 2021 From: report at bugs.python.org (Ken Jin) Date: Thu, 16 Dec 2021 14:30:36 +0000 Subject: [issue45755] Specialized generic class does not return class attributes in dir In-Reply-To: <1636399849.8.0.841580145929.issue45755@roundup.psfhosted.org> Message-ID: <1639665036.08.0.458451406637.issue45755@roundup.psfhosted.org> Ken Jin added the comment: New changeset d6e13747161d7b634b47d2d3d212ed3be4a21fab by Ken Jin in branch 'main': bpo-45755: [typing] Reveal class attributes of generic in generic aliases in `dir()` (GH-29962) https://github.com/python/cpython/commit/d6e13747161d7b634b47d2d3d212ed3be4a21fab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 09:32:52 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 16 Dec 2021 14:32:52 +0000 Subject: [issue46088] Build hangs under Visual Studio in deepfreeze stage In-Reply-To: <1639595221.47.0.522675592351.issue46088@roundup.psfhosted.org> Message-ID: <1639665172.78.0.522491625997.issue46088@roundup.psfhosted.org> Christian Heimes added the comment: VS builds could use the bootstrap interpreter again. This will remove the need to have a Python interpreter installed to build Python on Windows. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 09:35:18 2021 From: report at bugs.python.org (Ken Jin) Date: Thu, 16 Dec 2021 14:35:18 +0000 Subject: [issue45755] Specialized generic class does not return class attributes in dir In-Reply-To: <1636399849.8.0.841580145929.issue45755@roundup.psfhosted.org> Message-ID: <1639665318.25.0.708562451269.issue45755@roundup.psfhosted.org> Ken Jin added the comment: Hi, I won't be backporting this to 3.9 since I don't like having jarring behavior changes so late into the bugfix cycle of a Python version. I'm tempted to backport to 3.10. For now, I'll be conservative and just merge it in main. Please do tell me if any of you feel that I should backport to 3.10 too. 3.6-3.8 are in security-fix only mode so they won't get any bugfixes. Thanks Kevin for the interesting bug report, and Karthikeyan for saving me a ton of time debugging this! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 09:47:13 2021 From: report at bugs.python.org (Mark Shannon) Date: Thu, 16 Dec 2021 14:47:13 +0000 Subject: [issue46072] Unify handling of stats in the CPython VM In-Reply-To: <1639498673.65.0.709719181358.issue46072@roundup.psfhosted.org> Message-ID: <1639666033.57.0.696871695061.issue46072@roundup.psfhosted.org> Mark Shannon added the comment: The --enable-stats option is for CPython development and shouldn't be turned on for a release version, so I'm not really concerned about people attacking their own machines. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 09:51:59 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 16 Dec 2021 14:51:59 +0000 Subject: [issue46088] Build hangs under Visual Studio in deepfreeze stage In-Reply-To: <1639595221.47.0.522675592351.issue46088@roundup.psfhosted.org> Message-ID: <1639666319.88.0.459433389229.issue46088@roundup.psfhosted.org> Steve Dower added the comment: On Windows we automatically download a runtime if you don't have one, so this isn't such a big deal. You *do* need an internet connection to do this, of course, but that's the case for most of our external dependencies already. Plus I don't think we're even building the bootstrap interpreter on Windows yet? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 10:06:43 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 16 Dec 2021 15:06:43 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639667203.51.0.098603808886.issue46028@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +28362 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30144 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 10:08:13 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 16 Dec 2021 15:08:13 +0000 Subject: [issue46028] 3.11.0a3: under tox, sys._base_executable is wrong In-Reply-To: <1639095861.79.0.661493259569.issue46028@roundup.psfhosted.org> Message-ID: <1639667293.18.0.813555116857.issue46028@roundup.psfhosted.org> Steve Dower added the comment: This PR *might* be a fix, but I think it's only partial. It isn't going to work if you've made a venv and copied "python3"->"python", for example. It still might be best solved by writing base_executable into pyvenv.cfg, and then simply reading it out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 10:21:49 2021 From: report at bugs.python.org (Mark Shannon) Date: Thu, 16 Dec 2021 15:21:49 +0000 Subject: [issue46072] Unify handling of stats in the CPython VM In-Reply-To: <1639498673.65.0.709719181358.issue46072@roundup.psfhosted.org> Message-ID: <1639668109.12.0.0958159324866.issue46072@roundup.psfhosted.org> Change by Mark Shannon : ---------- pull_requests: +28363 pull_request: https://github.com/python/cpython/pull/30145 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 10:29:06 2021 From: report at bugs.python.org (Lucas Cimon) Date: Thu, 16 Dec 2021 15:29:06 +0000 Subject: [issue46101] argparse: using parents & subcommands, options can be ignored Message-ID: <1639668546.2.0.488904720024.issue46101@roundup.psfhosted.org> New submission from Lucas Cimon : Hi! Here is some minimal code reproducing the issue: import argparse common_opts_parser = argparse.ArgumentParser(add_help=False) common_opts_parser.add_argument("--endpoint", choices=("prod", "dev"), default="dev") parser = argparse.ArgumentParser(parents=[common_opts_parser]) subparsers = parser.add_subparsers(required=True) subcmd_cmd = subparsers.add_parser("subcmd", parents=[common_opts_parser]) subcmd_cmd.add_argument("--debug", action="store_true") print(parser.parse_args()) Everything works fine / as expected when specifying the common optional arg last: $ ./bug_repro.py subcmd --endpoint=dev Namespace(endpoint='dev', debug=False) However when specifying the --endpoint between the program and the subcommand, the value provided is ignored: $ ./bug_repro.py --endpoint=dev subcmd Namespace(endpoint=None, debug=False) I have a PR ready to fix that. ---------- components: Library (Lib) messages: 408711 nosy: Lucas Cimon priority: normal severity: normal status: open title: argparse: using parents & subcommands, options can be ignored type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 10:31:21 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 15:31:21 +0000 Subject: [issue22047] Deprecate unsupported nesting of argparse groups In-Reply-To: <1406131424.14.0.0235697032218.issue22047@psf.upfronthosting.co.za> Message-ID: <1639668681.25.0.853162962467.issue22047@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 30322c497e0b8d978f7a0de95985aac9c5daf1ac by Irit Katriel in branch 'main': bpo-22047: [argparse] deprecate nested argument groups and mutually exclusive groups (GH-30098) https://github.com/python/cpython/commit/30322c497e0b8d978f7a0de95985aac9c5daf1ac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 10:32:13 2021 From: report at bugs.python.org (Lucas Cimon) Date: Thu, 16 Dec 2021 15:32:13 +0000 Subject: [issue46101] argparse: using parents & subcommands, options can be ignored In-Reply-To: <1639668546.2.0.488904720024.issue46101@roundup.psfhosted.org> Message-ID: <1639668733.98.0.761427845274.issue46101@roundup.psfhosted.org> Change by Lucas Cimon : ---------- keywords: +patch pull_requests: +28364 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30146 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 10:34:07 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 15:34:07 +0000 Subject: [issue46057] argparse: embedded groups may prevent options from being in help output In-Reply-To: <1639320798.63.0.0421812802369.issue46057@roundup.psfhosted.org> Message-ID: <1639668847.53.0.795866727416.issue46057@roundup.psfhosted.org> Irit Katriel added the comment: Nesting argument groups and mutually exclusive groups is now deprecated (see issue22047). Thank you for the bug report. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 10:34:57 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 15:34:57 +0000 Subject: [issue22047] Deprecate unsupported nesting of argparse groups In-Reply-To: <1406131424.14.0.0235697032218.issue22047@psf.upfronthosting.co.za> Message-ID: <1639668897.02.0.0118933353739.issue22047@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 10:36:42 2021 From: report at bugs.python.org (Aidas Petryla) Date: Thu, 16 Dec 2021 15:36:42 +0000 Subject: [issue46102] pdb can't convert dict_values to list Message-ID: <1639669002.59.0.612026213531.issue46102@roundup.psfhosted.org> New submission from Aidas Petryla : Reproducing: Running pdb shell (for example "python -m pdb " Input: x = {'a': 1} list(x.values()) Output: *** Error in argument: '(x.values())' ---------- messages: 408714 nosy: apetryla priority: normal severity: normal status: open title: pdb can't convert dict_values to list type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 10:38:30 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 15:38:30 +0000 Subject: [issue45690] Argparse exclusive group inside required exclusive group displays incorrectly In-Reply-To: <1635860360.92.0.910770346728.issue45690@roundup.psfhosted.org> Message-ID: <1639669110.1.0.145669771525.issue45690@roundup.psfhosted.org> Irit Katriel added the comment: Nesting argument groups and mutually exclusive groups is now deprecated (see issue22047). Thank you for the bug report. ---------- nosy: +iritkatriel resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Deprecate unsupported nesting of argparse groups _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 10:39:12 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 15:39:12 +0000 Subject: [issue38590] argparse unexpected behavior with argument group inside mutually exclusive group In-Reply-To: <1572027184.79.0.23480523249.issue38590@roundup.psfhosted.org> Message-ID: <1639669152.92.0.359193298541.issue38590@roundup.psfhosted.org> Irit Katriel added the comment: Nesting argument groups and mutually exclusive groups is now deprecated (see issue22047). Thank you for the bug report. ---------- nosy: +iritkatriel resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Deprecate unsupported nesting of argparse groups _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 10:40:43 2021 From: report at bugs.python.org (hongweipeng) Date: Thu, 16 Dec 2021 15:40:43 +0000 Subject: [issue46103] inspect.getmembers will call the instance __bases__ attribute, which may cause an exception Message-ID: <1639669243.89.0.636826061264.issue46103@roundup.psfhosted.org> New submission from hongweipeng : root at debian:/workspace/cpython# ./python Python 3.11.0a3+ (heads/main-dirty:b123ad8030, Dec 16 2021, 06:16:15) [GCC 10.2.1 20210110] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import inspect >>> class Foo: ... def __getattr__(self, attr): ... return None ... >>> inspect.getmembers(Foo()) Traceback (most recent call last): File "", line 1, in File "/workspace/cpython/Lib/inspect.py", line 488, in getmembers return _getmembers(object, predicate, getattr) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/workspace/cpython/Lib/inspect.py", line 455, in _getmembers for base in object.__bases__: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: 'NoneType' object is not iterable ---------- components: Library (Lib) messages: 408717 nosy: hongweipeng priority: normal severity: normal status: open title: inspect.getmembers will call the instance __bases__ attribute, which may cause an exception type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 10:42:33 2021 From: report at bugs.python.org (Lucas Cimon) Date: Thu, 16 Dec 2021 15:42:33 +0000 Subject: [issue38584] argparse: Specifying a whitespace-only help message to a positional arg triggers an IndexError when displaying --help In-Reply-To: <1571928054.48.0.618310381662.issue38584@roundup.psfhosted.org> Message-ID: <1639669353.5.0.705731721403.issue38584@roundup.psfhosted.org> Lucas Cimon added the comment: This was resolved by https://github.com/python/cpython/pull/28050 ---------- message_count: 4.0 -> 5.0 pull_requests: +28366 status: open -> closed pull_request: https://github.com/python/cpython/pull/28050 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 10:43:31 2021 From: report at bugs.python.org (Jason Madden) Date: Thu, 16 Dec 2021 15:43:31 +0000 Subject: [issue46090] C extensions can't swap out live frames anymore In-Reply-To: <1639601731.02.0.904150269203.issue46090@roundup.psfhosted.org> Message-ID: <1639669411.36.0.972532109949.issue46090@roundup.psfhosted.org> Change by Jason Madden : ---------- nosy: +jmadden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 10:45:51 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 15:45:51 +0000 Subject: [issue46058] argparse: arg groups and mutually exclusive groups behave inconsitently In-Reply-To: <1639335674.28.0.221723621867.issue46058@roundup.psfhosted.org> Message-ID: <1639669551.99.0.350028876557.issue46058@roundup.psfhosted.org> Irit Katriel added the comment: Nesting argument groups and mutually exclusive groups is now deprecated (see issue22047). Thank you for the bug report. Note Paul's comment about why nesting mutually exclusive groups does not give you anything in terms of semantics. ---------- nosy: +iritkatriel resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Deprecate unsupported nesting of argparse groups _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 10:46:53 2021 From: report at bugs.python.org (hongweipeng) Date: Thu, 16 Dec 2021 15:46:53 +0000 Subject: [issue46103] inspect.getmembers will call the instance __bases__ attribute, which may cause an exception In-Reply-To: <1639669243.89.0.636826061264.issue46103@roundup.psfhosted.org> Message-ID: <1639669613.34.0.641617905064.issue46103@roundup.psfhosted.org> Change by hongweipeng : ---------- keywords: +patch pull_requests: +28367 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30147 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 11:13:28 2021 From: report at bugs.python.org (Sebastian Berg) Date: Thu, 16 Dec 2021 16:13:28 +0000 Subject: [issue45383] PyType_FromSpec API fails to use metaclass of bases In-Reply-To: <1633470686.49.0.00898443232155.issue45383@roundup.psfhosted.org> Message-ID: <1639671208.64.0.319754322677.issue45383@roundup.psfhosted.org> Sebastian Berg added the comment: Sorry, I need some time to dive back into this, so some things might be garbled :). Yes, I do agree supporting a custom `tp_new` here seems incredibly tricky. I have not thought about the implications of this, though. > guess the safest option is to fail when the metaclass has a custom tp_new That would seem OK, but I can't quite judge it. It may mean that I have to do a custom factory to create new metaclass instances from Python, but that is probably for the better anyway. Now, calling `tp_new` is a bit useless, since from C we don't have a dict anyway (at least not really). So yeah, this does not make sense at all for most Python defined metaclasses... (they may want to inspect/mutate the dict) > But at that point, this is duplicating a lot of existing functionality, and I'm starting to wonder if this wouldn't all be better with calling the metaclass instead. I do not think I am following :(. My worry is that I want people to create a MetaClass instance through C (but not be locked into static types forever). My current thought is that I would like it be possible to do something like: /* Create a new type object */ type_spec = {stuff}; newtype = PyType_FromSpec(&type_spec); /* Finalize the MetaClass */ metatype_spec = {more_stuff}; PyArray_InitDTypeFromSpec(newtype, &metatype_spec); Of course I can move this into a single function and create the class for the user. But I am uncertain that piping everything through `tp_new` will help? At some point I thought that the user should create a subclass, and I create another class inheriting it. But it also seems convoluted and complicated. I have no idea right now, but maybe there could also be a way to make creating a metaclass-factory in C easier, rather than supporting `PyType_FromSpec` for metaclasses. (I.e. an `PType_InitFromSpec()` doing most of what `PyType_FromSpec` does, but really meant to be only used be such metaclass factories.) > - basicsize/itemsize could be allowed with __basicsize__/__itemsize__ in the dict. Do we need this? I need the basicsize of the metaclass, but that of the class seems fixed/OK? > - flags: we could add mechanisms to set individual flags after the type is created, as needed. Seems fine, yeah. > - slots can usually be applied after the class is created; maybe there should be a public function for this. > - members could theoretically be copied to individual descriptors; there doesn't seem much need for keeping tp_members around. But a Python MetaClass (that the author may not even realize about) might need access to these to work properly? A bit far fetched, but... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 11:23:54 2021 From: report at bugs.python.org (Alex Waygood) Date: Thu, 16 Dec 2021 16:23:54 +0000 Subject: [issue46104] Reduce use of old-style syntax in typing docs Message-ID: <1639671834.7.0.734699107107.issue46104@roundup.psfhosted.org> New submission from Alex Waygood : There are a few places in the typing docs where old-style (pre-PEP 526) syntax is used in examples. It doesn't look like these examples have been updated since 2016; it would be good to change them so that they use the newer syntax introduced in PEP 526. ---------- assignee: docs at python components: Documentation messages: 408721 nosy: AlexWaygood, docs at python, gvanrossum, kj priority: normal severity: normal status: open title: Reduce use of old-style syntax in typing docs type: enhancement versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 11:27:20 2021 From: report at bugs.python.org (Alex Waygood) Date: Thu, 16 Dec 2021 16:27:20 +0000 Subject: [issue46104] Reduce use of old-style syntax in typing docs In-Reply-To: <1639671834.7.0.734699107107.issue46104@roundup.psfhosted.org> Message-ID: <1639672040.92.0.229323217033.issue46104@roundup.psfhosted.org> Change by Alex Waygood : ---------- keywords: +patch pull_requests: +28368 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30148 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 11:27:30 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 16 Dec 2021 16:27:30 +0000 Subject: [issue46102] pdb can't convert dict_values to list In-Reply-To: <1639669002.59.0.612026213531.issue46102@roundup.psfhosted.org> Message-ID: <1639672050.96.0.453902135477.issue46102@roundup.psfhosted.org> Christian Heimes added the comment: list is a pdb command. (Pdb) help list l(ist) [first [,last] | .] List source code for the current file. Without arguments, list 11 lines around the current line or continue the previous listing. With . as argument, list 11 lines around the current line. With one argument, list 11 lines starting at that line. With two arguments, list the given range; if the second argument is less than the first, it is a count. The current line in the current frame is indicated by "->". If an exception is being debugged, the line where the exception was originally raised or propagated is indicated by ">>", if it differs from the current line. You have to use "p list(x.values())" if you want to print the output of the list function. (Pdb) x = {'a': 1} (Pdb) p list(x.values()) [1] ---------- nosy: +christian.heimes resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 12:20:02 2021 From: report at bugs.python.org (Sebastian Berg) Date: Thu, 16 Dec 2021 17:20:02 +0000 Subject: [issue45383] PyType_FromSpec API fails to use metaclass of bases In-Reply-To: <1633470686.49.0.00898443232155.issue45383@roundup.psfhosted.org> Message-ID: <1639675202.53.0.0394249266258.issue45383@roundup.psfhosted.org> Sebastian Berg added the comment: It is probably early, but I am starting to like the idea of a "C MetaClass factory" helper/indicator. It seems to me that yes, at least `tp_new` cannot be called reasonable for a class that is created in C, it is just too confusing/awkward to try to push the C stuff _through_ the Python API. (And the Python API is the typical one that should not be inconvenienced) Which gives two possibilities if I want this capability?: 1. Force use of a custom class factory in Python (i.e. not through `__new__`). But that seems hard, since I need to refuse `__new__()`!). 2. Use a class factor in C which never calls `__new__` and knows that this is OK. This is not my turf, so I like unholy, but maybe pragmatic things :). Would a slot/flag indicating `Py_using_metaclass_cinit_pretty_promise_please` "solve" these issues? I mean, we have two ways to create classes (C and Python), I am not sure it is plausible to untangle this on the MetaClass level, so maybe the only way forward is to embrace it: Some Python MetaClasses just can't be instantiated from C, because we don't know it will work. If we want to allow instantiating the MetaClass from C, we need some way to set this up. And either we cannot use `PyType_FromSpec` then, or we need to tell it that we know what we are doing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 12:25:15 2021 From: report at bugs.python.org (Julien Palard) Date: Thu, 16 Dec 2021 17:25:15 +0000 Subject: [issue42238] Deprecate suspicious.py? In-Reply-To: <1604274563.95.0.828690163802.issue42238@roundup.psfhosted.org> Message-ID: <1639675515.52.0.676133436295.issue42238@roundup.psfhosted.org> Julien Palard added the comment: Another true positive for make suspicious: WARNING: [c-api/apiabiversion:70] ":macro" found in "the same format as the c:macro:" I'm working on implementing it on rstlint, in the meantime I opened: => https://github.com/python/cpython/pull/30149 to fix this occurrence. This show that the current version of rstlint catches two mores \o/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 12:35:04 2021 From: report at bugs.python.org (Matej Cepl) Date: Thu, 16 Dec 2021 17:35:04 +0000 Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za> Message-ID: <1639676104.33.0.283052173767.issue5004@roundup.psfhosted.org> Change by Matej Cepl : ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 13:43:21 2021 From: report at bugs.python.org (Brandt Bucher) Date: Thu, 16 Dec 2021 18:43:21 +0000 Subject: [issue46097] Split function versions into 1-0xffff and 0x1000+ regions In-Reply-To: <1639652770.25.0.708221453944.issue46097@roundup.psfhosted.org> Message-ID: <1639680201.5.0.884248539337.issue46097@roundup.psfhosted.org> Brandt Bucher added the comment: Interesting idea! > It is likely that programs will have more than 2**16 functions versions, but it is much less likely that they will have more than 2**16 versions of special methods. Is it? The pyperformance suite isn't exactly representative of huge production apps, sure, but the most recent specialization stats don't seem to indicate that we ever run out of versions. Do we have reason to believe that real-world code would benefit from this? These versions are only created for successful specializations in hot code (and we typically expect a high degree of stability thereafter), so I would think that in practice it's actually quite rare to bump the version after the first few are handed out. > We should partition the version space into 1-0xffff for use by special methods and 0x1000+ for use by other methods. Typo? It seems like the ranges 0x0001-0xFFFF and 0x10000-0x1FFFF are closer to what you're describing here. If so: - Does this mean that it will now be impossible to specialize explicit calls to special methods, like "super().__init__()" or "object.__new__()"? - Why not just maintain two separate 16-bit version counters, instead of one 17-bit counter with two distinct regions? Or maybe you meant 0x0001-0x7FFF and 0x8000-0xFFFF? But then my concern would be that it essentially halves the number of "normal" functions that we can successfully specialize. If it's likely that more than 2**15 "normal" function versions will be used and unlikely that 2**15 special methods will be used, lots of the special method versions will remain unused long after we've exhausted the "normal" versions. Also, just to make sure we're on the same page: when you say "other methods", are you actually referring to "other functions"? It doesn't seem like there's a reason for this versioning to only apply to method objects, but maybe I'm missing something. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 13:55:41 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 16 Dec 2021 18:55:41 +0000 Subject: [issue44893] importlib.metadata Entrypoint has a broken _asdict In-Reply-To: <1628717583.56.0.19105113048.issue44893@roundup.psfhosted.org> Message-ID: <1639680941.76.0.49004852617.issue44893@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- keywords: +patch pull_requests: +28369 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30150 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 13:56:38 2021 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 16 Dec 2021 18:56:38 +0000 Subject: [issue23522] Misleading note in Statistics module documentation In-Reply-To: <1424889646.1.0.160219400081.issue23522@psf.upfronthosting.co.za> Message-ID: <1639680998.23.0.219675680591.issue23522@roundup.psfhosted.org> Guido van Rossum added the comment: Great! I will leave it to Steven and Mark D to work out an acceptable solution. PS. Allen Downey is a computer scientist who has written at least one book about Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 14:14:18 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 16 Dec 2021 19:14:18 +0000 Subject: [issue46105] Requirement syntax broken when extras indicated on url_req Message-ID: <1639682058.29.0.323171575702.issue46105@roundup.psfhosted.org> New submission from Jason R. Coombs : In https://github.com/python/importlib_metadata/issues/357, a user reported an issue where a requirement generated by importlib.metadata from egg info metadata would result in a parse error attempting to parse the error. A fix was released in importlib_metadata 4.8.3. ---------- assignee: jaraco messages: 408727 nosy: jaraco priority: normal severity: normal status: open title: Requirement syntax broken when extras indicated on url_req versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 14:26:11 2021 From: report at bugs.python.org (Kevin Shweh) Date: Thu, 16 Dec 2021 19:26:11 +0000 Subject: [issue46085] OrderedDict iterator allocates di_result unnecessarily In-Reply-To: <1639586880.61.0.695571105446.issue46085@roundup.psfhosted.org> Message-ID: <1639682771.53.0.759145427435.issue46085@roundup.psfhosted.org> Kevin Shweh added the comment: Almost - C's weird bitwise operator precedence means it has to be parenthesized as if ((kind & _odict_ITER_ITEMS) == _odict_ITER_ITEMS) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 14:28:56 2021 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 16 Dec 2021 19:28:56 +0000 Subject: [issue45755] Specialized generic class does not return class attributes in dir In-Reply-To: <1636399849.8.0.841580145929.issue45755@roundup.psfhosted.org> Message-ID: <1639682936.35.0.802263231939.issue45755@roundup.psfhosted.org> Guido van Rossum added the comment: I think a 3.10 backport would be appreciated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 14:31:05 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 16 Dec 2021 19:31:05 +0000 Subject: [issue44893] importlib.metadata Entrypoint has a broken _asdict In-Reply-To: <1628717583.56.0.19105113048.issue44893@roundup.psfhosted.org> Message-ID: <1639683065.82.0.438279330703.issue44893@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +28371 pull_request: https://github.com/python/cpython/pull/30151 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 14:31:05 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 16 Dec 2021 19:31:05 +0000 Subject: [issue46105] Requirement syntax broken when extras indicated on url_req In-Reply-To: <1639682058.29.0.323171575702.issue46105@roundup.psfhosted.org> Message-ID: <1639683065.62.0.67796474166.issue46105@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- keywords: +patch pull_requests: +28370 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30151 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 14:31:43 2021 From: report at bugs.python.org (Lucas Cimon) Date: Thu, 16 Dec 2021 19:31:43 +0000 Subject: [issue46101] argparse: using parents & subcommands, options can be ignored In-Reply-To: <1639668546.2.0.488904720024.issue46101@roundup.psfhosted.org> Message-ID: <1639683103.06.0.176040690154.issue46101@roundup.psfhosted.org> Lucas Cimon added the comment: The GitHub PR is ready for reviewing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 14:34:22 2021 From: report at bugs.python.org (Brandt Bucher) Date: Thu, 16 Dec 2021 19:34:22 +0000 Subject: [issue46097] Split function versions into 1-0xffff and 0x1000+ regions In-Reply-To: <1639652770.25.0.708221453944.issue46097@roundup.psfhosted.org> Message-ID: <1639683262.62.0.582045985962.issue46097@roundup.psfhosted.org> Brandt Bucher added the comment: Ah, never mind, I think I understand what you meant. Special methods get 0x0001-0xFFFF, all other functions get 0x00010000-0xFFFFFFFF. So we use 16-bit versions for special method caches, and 32-bit versions for normal call caches. "super().__init__()" and "object.__new__()" will specialize correctly, since special method versions are also valid function versions. This seems like a solid idea, then, provided that we're reasonably confident this will actually improve real code. I guess the case this optimizes for is a program that specializes more than 2**16 normal calls, *then* tries to specialize a 2**16 special method calls? Seems uncommon, but not impossible. (I think there might be a weird edge-case where a function is specialized first as a normal function, *then* as a special method. I imagine we just reassign it a special method version and continue as normal in that case, though.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 14:35:19 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 16 Dec 2021 19:35:19 +0000 Subject: [issue23522] Misleading note in Statistics module documentation In-Reply-To: <1424889646.1.0.160219400081.issue23522@psf.upfronthosting.co.za> Message-ID: <1639683319.9.0.452176229621.issue23522@roundup.psfhosted.org> Mark Dickinson added the comment: > "The mean is strongly affected by outliers and is not necessarily a typical example of the data points. For a more robust, although less efficient, measure of central tendency, see median()" That wording sounds fine to me. I don't think we can reasonably expect to hear from Jake again, but from my understanding of his post, this addresses his concerns. FWIW, I share those concerns. My brain can't parse "robust estimator for central location", because the term "estimator" has a precise and well-defined meaning in (frequentist) statistics, and what I expect to see after "estimator for" is a description of a parameter of a statistical model - as in for example "estimator for the population mean", or "estimator for the Weibull shape parameter". "central location" doesn't really fit in that slot. > How do we feel about linking to Wikipedia? I can't think of any good reason not to. We have plenty of other external links in the docs, and the Wikipedia links are probably at lower risk of becoming stale than most of the others. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 14:38:14 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 16 Dec 2021 19:38:14 +0000 Subject: [issue44893] importlib.metadata Entrypoint has a broken _asdict In-Reply-To: <1628717583.56.0.19105113048.issue44893@roundup.psfhosted.org> Message-ID: <1639683494.44.0.537851150384.issue44893@roundup.psfhosted.org> Jason R. Coombs added the comment: The change as implemented for importlib_metadata involves refactorings that can't be backported, so the fix will only go into Python 3.11. I'll consider backporting a more selective fix for this issue if it's important, but I suspect there may not be, given that Ronny has reported that he's already migrated to a solution accessing by attribute. ---------- versions: -Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 14:39:17 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 16 Dec 2021 19:39:17 +0000 Subject: [issue44893] importlib.metadata Entrypoint has a broken _asdict In-Reply-To: <1628717583.56.0.19105113048.issue44893@roundup.psfhosted.org> Message-ID: <1639683557.71.0.774349323379.issue44893@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: -28371 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 14:50:06 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Thu, 16 Dec 2021 19:50:06 +0000 Subject: [issue37578] Change Glob: Allow Recursion for Hidden Files In-Reply-To: <1562984633.23.0.0355519865943.issue37578@roundup.psfhosted.org> Message-ID: <1639684206.33.0.806945729225.issue37578@roundup.psfhosted.org> Change by Andrei Kulakov : ---------- keywords: +patch nosy: +andrei.avk nosy_count: 5.0 -> 6.0 pull_requests: +28372 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30153 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 14:57:47 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 16 Dec 2021 19:57:47 +0000 Subject: [issue46044] Update distutils documentation to say PyPI only accepts tar.gz and zip. In-Reply-To: <1639183321.87.0.60010365673.issue46044@roundup.psfhosted.org> Message-ID: <1639684667.99.0.128431172562.issue46044@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28373 pull_request: https://github.com/python/cpython/pull/30154 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 14:57:51 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 16 Dec 2021 19:57:51 +0000 Subject: [issue46044] Update distutils documentation to say PyPI only accepts tar.gz and zip. In-Reply-To: <1639183321.87.0.60010365673.issue46044@roundup.psfhosted.org> Message-ID: <1639684671.63.0.185194165829.issue46044@roundup.psfhosted.org> miss-islington added the comment: New changeset ecdc0ccede5f9ac4042ff56f295d81df2f428950 by Matthias Bussonnier in branch 'main': bpo-46044: Annotate deprecated sdists formats (GH-30043) https://github.com/python/cpython/commit/ecdc0ccede5f9ac4042ff56f295d81df2f428950 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 14:57:51 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 16 Dec 2021 19:57:51 +0000 Subject: [issue46044] Update distutils documentation to say PyPI only accepts tar.gz and zip. In-Reply-To: <1639183321.87.0.60010365673.issue46044@roundup.psfhosted.org> Message-ID: <1639684671.84.0.965039068262.issue46044@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28374 pull_request: https://github.com/python/cpython/pull/30155 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 15:05:11 2021 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 16 Dec 2021 20:05:11 +0000 Subject: [issue46088] Build hangs under Visual Studio in deepfreeze stage In-Reply-To: <1639595221.47.0.522675592351.issue46088@roundup.psfhosted.org> Message-ID: <1639685111.87.0.267904016304.issue46088@roundup.psfhosted.org> Guido van Rossum added the comment: I don't see a reason to go through the bootstrap python on Windows. It would increase the build time, which is already pretty slow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 15:22:02 2021 From: report at bugs.python.org (Ned Deily) Date: Thu, 16 Dec 2021 20:22:02 +0000 Subject: [issue46106] OpenSSL 1.1.1m is now available Message-ID: <1639686122.34.0.476872418462.issue46106@roundup.psfhosted.org> New submission from Ned Deily : Update Windows build, macOS installer, and Tools/multissltests.py ---------- components: Build, Windows, macOS messages: 408736 nosy: christian.heimes, ned.deily, paul.moore, ronaldoussoren, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: OpenSSL 1.1.1m is now available versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 15:48:43 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 16 Dec 2021 20:48:43 +0000 Subject: [issue46105] Requirement syntax broken when extras indicated on url_req In-Reply-To: <1639682058.29.0.323171575702.issue46105@roundup.psfhosted.org> Message-ID: <1639687723.14.0.305440735887.issue46105@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +28375 pull_request: https://github.com/python/cpython/pull/30156 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 15:48:51 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 16 Dec 2021 20:48:51 +0000 Subject: [issue46105] Requirement syntax broken when extras indicated on url_req In-Reply-To: <1639682058.29.0.323171575702.issue46105@roundup.psfhosted.org> Message-ID: <1639687731.73.0.836398849899.issue46105@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 109d96602199a91e94eb14b8cb3720841f22ded7 by Jason R. Coombs in branch 'main': bpo-46105: Honor spec when generating requirement specs with urls and extras. (GH-30151) https://github.com/python/cpython/commit/109d96602199a91e94eb14b8cb3720841f22ded7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 15:49:45 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 16 Dec 2021 20:49:45 +0000 Subject: [issue44893] importlib.metadata Entrypoint has a broken _asdict In-Reply-To: <1628717583.56.0.19105113048.issue44893@roundup.psfhosted.org> Message-ID: <1639687785.55.0.875794077613.issue44893@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 04deaee4c8d313717f3ea8f6a4fd70286d510d6e by Jason R. Coombs in branch 'main': bpo-44893: Implement EntryPoint as simple class with attributes. (GH-30150) https://github.com/python/cpython/commit/04deaee4c8d313717f3ea8f6a4fd70286d510d6e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 16:19:22 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 16 Dec 2021 21:19:22 +0000 Subject: [issue46105] Requirement syntax broken when extras indicated on url_req In-Reply-To: <1639682058.29.0.323171575702.issue46105@roundup.psfhosted.org> Message-ID: <1639689562.93.0.941719492853.issue46105@roundup.psfhosted.org> miss-islington added the comment: New changeset 09d7319bfe0006d9aa3fc14833b69c24ccafdca6 by Miss Islington (bot) in branch '3.10': bpo-46105: Honor spec when generating requirement specs with urls and extras. (GH-30151) https://github.com/python/cpython/commit/09d7319bfe0006d9aa3fc14833b69c24ccafdca6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 16:31:13 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 16 Dec 2021 21:31:13 +0000 Subject: [issue46105] Requirement syntax broken when extras indicated on url_req In-Reply-To: <1639682058.29.0.323171575702.issue46105@roundup.psfhosted.org> Message-ID: <1639690273.49.0.962336582955.issue46105@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +28376 pull_request: https://github.com/python/cpython/pull/30157 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 17:15:59 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 22:15:59 +0000 Subject: [issue45292] Implement PEP 654: Exception Groups In-Reply-To: <1632667049.99.0.614000687095.issue45292@roundup.psfhosted.org> Message-ID: <1639692959.29.0.605808399308.issue45292@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +28377 pull_request: https://github.com/python/cpython/pull/30158 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 17:36:49 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 22:36:49 +0000 Subject: [issue46107] ExceptionGroup.split()/subgroup() don't copy __note__ to parts Message-ID: <1639694209.93.0.209402666532.issue46107@roundup.psfhosted.org> New submission from Irit Katriel : >>> e = ExceptionGroup("eg", [ValueError(1), TypeError(2)]) >>> e.__note__ = "a note" >>> e.split(ValueError) (ExceptionGroup('eg', [ValueError(1)]), ExceptionGroup('eg', [TypeError(2)])) >>> e.split(ValueError)[0].__note__ >>> e.subgroup(ValueError).__note__ ---------- components: Interpreter Core messages: 408740 nosy: iritkatriel priority: normal severity: normal status: open title: ExceptionGroup.split()/subgroup() don't copy __note__ to parts versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 17:38:18 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 22:38:18 +0000 Subject: [issue46107] ExceptionGroup.split()/subgroup() don't copy __note__ to parts In-Reply-To: <1639694209.93.0.209402666532.issue46107@roundup.psfhosted.org> Message-ID: <1639694298.63.0.606657660892.issue46107@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: -> iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 18:00:22 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 23:00:22 +0000 Subject: [issue45635] Tidy up error handling in traceback.c / python run.c In-Reply-To: <1635370026.46.0.0220648873339.issue45635@roundup.psfhosted.org> Message-ID: <1639695622.19.0.359240554976.issue45635@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 8d6155ee9d1b05946f951d0ba602b9f63810fe0f by Irit Katriel in branch 'main': bpo-45635: Do not suppress errors in functions called from _PyErr_Display (GH-30073) https://github.com/python/cpython/commit/8d6155ee9d1b05946f951d0ba602b9f63810fe0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 18:00:44 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 23:00:44 +0000 Subject: [issue45635] Tidy up error handling in traceback.c / python run.c In-Reply-To: <1635370026.46.0.0220648873339.issue45635@roundup.psfhosted.org> Message-ID: <1639695644.99.0.248636057784.issue45635@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 18:07:00 2021 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 16 Dec 2021 23:07:00 +0000 Subject: [issue1062277] Pickle breakage with reduction of recursive structures Message-ID: <1639696020.35.0.137456749981.issue1062277@roundup.psfhosted.org> Change by Daniel Diniz : ---------- versions: +Python 3.11 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 18:18:21 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 23:18:21 +0000 Subject: [issue46107] ExceptionGroup.split()/subgroup() don't copy __note__ to parts In-Reply-To: <1639694209.93.0.209402666532.issue46107@roundup.psfhosted.org> Message-ID: <1639696701.07.0.912043218917.issue46107@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch pull_requests: +28378 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30159 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 18:32:49 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 23:32:49 +0000 Subject: [issue46107] ExceptionGroup.split()/subgroup() don't copy __note__ to parts In-Reply-To: <1639694209.93.0.209402666532.issue46107@roundup.psfhosted.org> Message-ID: <1639697569.7.0.526447928683.issue46107@roundup.psfhosted.org> Irit Katriel added the comment: With the patch: >>> e = ExceptionGroup("eg", [ValueError(1), TypeError(2)]) >>> e.__note__ = "a note" >>> e.split(ValueError) (ExceptionGroup('eg', [ValueError(1)]), ExceptionGroup('eg', [TypeError(2)])) >>> e.split(ValueError)[0].__note__ 'a note' >>> e.split(ValueError)[1].__note__ 'a note' >>> e.subgroup(ValueError).__note__ 'a note' >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 18:35:10 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 16 Dec 2021 23:35:10 +0000 Subject: [issue46107] ExceptionGroup.split()/subgroup() don't copy __note__ to parts In-Reply-To: <1639694209.93.0.209402666532.issue46107@roundup.psfhosted.org> Message-ID: <1639697710.61.0.142539573201.issue46107@roundup.psfhosted.org> Change by Irit Katriel : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 18:53:44 2021 From: report at bugs.python.org (Chris Roberts) Date: Thu, 16 Dec 2021 23:53:44 +0000 Subject: [issue36225] [subinterpreters] Lingering subinterpreters should be implicitly cleared on shutdown In-Reply-To: <1551964663.69.0.686712846789.issue36225@roundup.psfhosted.org> Message-ID: <1639698824.38.0.275050450768.issue36225@roundup.psfhosted.org> Change by Chris Roberts : ---------- nosy: +nasageek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 19:35:29 2021 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 17 Dec 2021 00:35:29 +0000 Subject: [issue9917] resource max value represented as signed when should be unsigned In-Reply-To: <1285119777.0.0.437398080007.issue9917@psf.upfronthosting.co.za> Message-ID: <1639701329.32.0.396926938182.issue9917@roundup.psfhosted.org> Change by Daniel Diniz : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 19:35:56 2021 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 17 Dec 2021 00:35:56 +0000 Subject: [issue678264] test_resource fails when file size is limited Message-ID: <1639701356.78.0.856152514533.issue678264@roundup.psfhosted.org> Change by Daniel Diniz : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 16 19:38:57 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Fri, 17 Dec 2021 00:38:57 +0000 Subject: [issue37578] Change Glob: Allow Recursion for Hidden Files In-Reply-To: <1562984633.23.0.0355519865943.issue37578@roundup.psfhosted.org> Message-ID: <1639701537.33.0.247312263407.issue37578@roundup.psfhosted.org> Andrei Kulakov added the comment: Zsh allows use of *, ? and ** to match hidden files and directories. Bash allows the same for * and ? with `dotglob` option. There is also a `globstar` but my version of bash (on macos) is too old to have it. By the way setting options in bash is done with `shopt -s