From report at bugs.python.org Fri Apr 1 05:31:33 2022 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Apr 2022 09:31:33 +0000 Subject: [New-bugs-announce] [issue47185] code.replace(co_code=new_code) no longer catch exceptions on Python 3.11 Message-ID: <1648805493.81.0.634478965764.issue47185@roundup.psfhosted.org> New submission from STINNER Victor : Since bpo-40222 "Zero cost exception handling", code object created by from bytecode with code.replace(co_code=new_code) no longer catch exceptions on Python 3.11, unless an exception table is set explicitly. Example: --- def f(): try: print("raise") raise ValueError except ValueError: print("except") else: print("else") print("exit func") def g(): pass if 1: code = f.__code__ g.__code__ = g.__code__.replace( co_code=code.co_code, co_consts=code.co_consts, co_names=code.co_names, co_flags=code.co_flags, co_stacksize=code.co_stacksize) else: g.__code__ = f.__code__ # this code path works on Python 3.11 g() --- Output with Python 3.10 (ok): --- raise except exit func --- Output with Python 3.11 (oops): --- raise Traceback (most recent call last): ... ValueError --- Would it make sense to automatically compute co_exceptiontable on code.replace(co_code=new_code)? If it's computed automatically, I don't know if it makes still sense to call code.replace(co_code=new_code, co_exceptiontable=new_table). It seems like currently, the only implementation to build an exception table lives in Python/compile.c which compiles AST to bytecode. It cannot be reused for code.replace() which takes bytecode as input, not AST. -- If code.replace() is not updated to recompute co_exceptiontable, at least, it would be nice to document the bpo-40222 changes in What's New in Python 3.11 and in the CodeType documentation: * https://docs.python.org/dev/library/types.html#types.CodeType * https://docs.python.org/dev/whatsnew/3.11.html ---------- components: Interpreter Core messages: 416479 nosy: vstinner priority: normal severity: normal status: open title: code.replace(co_code=new_code) no longer catch exceptions on Python 3.11 versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 1 07:48:57 2022 From: report at bugs.python.org (Irit Katriel) Date: Fri, 01 Apr 2022 11:48:57 +0000 Subject: [New-bugs-announce] [issue47186] split JUMP_IF_NOT_EXC/EG_MATCH into CHECK_EXC/EG_MATCH + jump Message-ID: <1648813737.43.0.969911623865.issue47186@roundup.psfhosted.org> New submission from Irit Katriel : It would help issue47120 to reduce the number of jump opcodes. The exception matching opcodes JUMP_IF_NOT_EXC_MATCH and JUMP_IF_NOT_EG_MATCH are not hot, and we can split them into a check + ordinary jump. For JUMP_IF_NOT_EXC_MATCH this is simple because the stack effect is the same for the jump and non-jump case. For JUMP_IF_NOT_EG_MATCH the stack effect will need to be made the same, and the opcodes emitted around it adapted. ---------- assignee: iritkatriel components: Interpreter Core messages: 416484 nosy: iritkatriel priority: normal severity: normal status: open title: split JUMP_IF_NOT_EXC/EG_MATCH into CHECK_EXC/EG_MATCH + jump versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 1 09:45:07 2022 From: report at bugs.python.org (Sylvain Marie) Date: Fri, 01 Apr 2022 13:45:07 +0000 Subject: [New-bugs-announce] [issue47187] locale module example is wrong for some platforms Message-ID: <1648820707.2.0.705668784444.issue47187@roundup.psfhosted.org> New submission from Sylvain Marie : The example in the doc shows ```python >>> import locale >>> loc = locale.getlocale() # get current locale # use German locale; name might vary with platform >>> locale.setlocale(locale.LC_ALL, 'de_DE') >>> locale.strcoll('f\xe4n', 'foo') # compare a string containing an umlaut >>> locale.setlocale(locale.LC_ALL, '') # use user's preferred locale >>> locale.setlocale(locale.LC_ALL, 'C') # use default (C) locale >>> locale.setlocale(locale.LC_ALL, loc) # restore saved locale ``` However locale.getlocale() does not return the locale for all categories (locale.LC_ALL is even not allowed) but the locale for the LC_CTYPE category. Therefore restoring it using `locale.setlocale(locale.LC_ALL, loc)` does not actually restore the initial settings, and may even fail on some platforms (on mine it does). The correct example should have the first line of code replaced with ``` >>> loc = locale.setlocale(locale.LC_ALL) # get current locale ``` Note: this issue was first reported in the `pandas` library at https://github.com/pandas-dev/pandas/issues/46595 ---------- assignee: docs at python components: Documentation messages: 416487 nosy: docs at python, smarie priority: normal severity: normal status: open title: locale module example is wrong for some platforms versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 1 11:25:59 2022 From: report at bugs.python.org (=?utf-8?q?Martin_Li=C5=A1ka?=) Date: Fri, 01 Apr 2022 15:25:59 +0000 Subject: [New-bugs-announce] [issue47188] ncurses: *** buffer overflow detected ***: terminated with -D_FORTIFY_SOURCE=3 Message-ID: <1648826759.01.0.991092472889.issue47188@roundup.psfhosted.org> New submission from Martin Li?ka : Note -D_FORTIFY_SOURCE=3 will come newly with GCC12. So I noticed the following error: demo.py: ```python import curses curses.initscr() curses.unget_wch('a') ``` Error message: *** buffer overflow detected ***: terminated Backtrace: #0 __pthread_kill_implementation (threadid=, signo=signo at entry=6, no_tid=no_tid at entry=0) at pthread_kill.c:44 #1 0x00007ffff7d1e1e3 in __pthread_kill_internal (signo=6, threadid=) at pthread_kill.c:78 #2 0x00007ffff7cce306 in __GI_raise (sig=sig at entry=6) at ../sysdeps/posix/raise.c:26 #3 0x00007ffff7cb7813 in __GI_abort () at abort.c:79 #4 0x00007ffff7d111b7 in __libc_message (action=action at entry=do_abort, fmt=fmt at entry=0x7ffff7e573cf "*** %s ***: terminated\n") at ../sysdeps/posix/libc_fatal.c:155 #5 0x00007ffff7db630a in __GI___fortify_fail (msg=msg at entry=0x7ffff7e57375 "buffer overflow detected") at fortify_fail.c:26 #6 0x00007ffff7db48b6 in __GI___chk_fail () at chk_fail.c:28 #7 0x00007ffff7db5be8 in __wcrtomb_chk (s=s at entry=0xaae440 "\376\271\255", wchar=wchar at entry=97 L'a', ps=ps at entry=0x7fffffffd4f0, buflen=buflen at entry=1) at wcrtomb_chk.c:31 #8 0x00007ffff7a18b31 in wcrtomb (__ps=, __wchar=, __s=, __s=, __wchar=, __ps=) at /usr/include/bits/wchar2.h:402 #9 unget_wch_sp (sp=0xab0920, wch=97 L'a') at ../ncurses/./widechar/lib_unget_wch.c:89 #10 0x00007ffff7a18b61 in unget_wch (wch=) at ../ncurses/./widechar/lib_unget_wch.c:113 #11 0x00007ffff7a55be5 in _curses_unget_wch (module=, ch='a') at /home/marxin/Programming/cpython/Modules/_cursesmodule.c:4497 #12 0x00000000006f6669 in cfunction_vectorcall_O (func=, args=0x7ffff7b355b0, nargsf=, kwnames=0x0) at Objects/methodobject.c:512 #13 0x000000000042d0e8 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=, args=, callable=, tstate=) at ./Include/cpython/abstract.h:114 #14 PyObject_Vectorcall (kwnames=0x0, nargsf=, args=, callable=) at ./Include/cpython/abstract.h:123 #15 call_function (kwnames=0x0, oparg=, pp_stack=, bounds=0x7fffffffd640, tstate=0xa70520) at Python/ceval.c:5379 #16 _PyEval_EvalFrameDefault (tstate=, f=, throwflag=) at Python/ceval.c:3772 So as seen __wcrtomb_chk is called with buflen == 1 and the function aborts if: size_t __wcrtomb_chk (char *s, wchar_t wchar, mbstate_t *ps, size_t buflen) { /* We do not have to implement the full wctomb semantics since we know that S cannot be NULL when we come here. */ if (buflen < MB_CUR_MAX) __chk_fail (); return __wcrtomb (s, wchar, ps); } Where MB_CUR_MAX == 6. So the question is if the issue is in libcurses library (that is compiler with -D_FORTIFY_SOURCE=3), or in Modules/_cursesmodule.c? ---------- messages: 416495 nosy: Martin Li?ka priority: normal severity: normal status: open title: ncurses: *** buffer overflow detected ***: terminated with -D_FORTIFY_SOURCE=3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 1 11:55:28 2022 From: report at bugs.python.org (Ken Jin) Date: Fri, 01 Apr 2022 15:55:28 +0000 Subject: [New-bugs-announce] [issue47189] What's new in Python 3.11: Faster CPython Message-ID: <1648828528.46.0.606089696241.issue47189@roundup.psfhosted.org> Change by Ken Jin : ---------- assignee: docs at python components: Documentation nosy: docs at python, kj priority: normal severity: normal status: open title: What's new in Python 3.11: Faster CPython versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 1 13:18:03 2022 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 01 Apr 2022 17:18:03 +0000 Subject: [New-bugs-announce] [issue47190] Integrating tkinter and asyncio event loops Message-ID: <1648833483.36.0.0222315119123.issue47190@roundup.psfhosted.org> New submission from Skip Montanaro : After looking around and asking, it appears there is no built-in integration of the tkinter and asyncio event loops. That would seem to be a good thing, at least as an example. I wrote a simple hello world which creates an AsyncTk class and uses asyncio-driven event handling. This is clearly incomplete, but might be a useful starting point, even if just as a seed for discussion or as an example for tkinter or asyncio documentation. Discussion/thread references: https://mail.python.org/pipermail/python-list/2022-March/905783.html https://discuss.python.org/t/connecting-asyncio-and-tkinter-event-loops/14722/7 The code in its most basic form is attached. (I have another version which uses pynput to track keyboard and mouse events.) ---------- components: Tkinter files: tkasyncio.py messages: 416500 nosy: skip.montanaro priority: normal severity: normal status: open title: Integrating tkinter and asyncio event loops versions: Python 3.11 Added file: https://bugs.python.org/file50712/tkasyncio.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 1 14:40:34 2022 From: report at bugs.python.org (Animatea Animatea) Date: Fri, 01 Apr 2022 18:40:34 +0000 Subject: [New-bugs-announce] [issue47191] inspect - getasyncgeneratorstate, getasyncgeneratorlocals Message-ID: <1648838434.06.0.105356419034.issue47191@roundup.psfhosted.org> New submission from Animatea Animatea : Create inspect introspection functions for asyncgen. ```py ASYNCGEN_CREATED = 'ASYNCGEN_CREATED' ASYNCGEN_RUNNING = 'ASYNCGEN_RUNNING' ASYNCGEN_SUSPENDED = 'ASYNCGEN_SUSPENDED' ASYNCGEN_CLOSED = 'ASYNCGEN_CLOSED' def getasyncgeneratorstate(asyncgenerator): """Get current state of a async generator-iterator. Possible states are: ASYNCGEN_CREATED: Waiting to start execution. ASYNCGEN_RUNNING: Currently being executed by the interpreter. ASYNCGEN_SUSPENDED: Currently suspended at a yield expression. ASYNCGEN_CLOSED: Execution has completed. """ if asyncgenerator.ag_running: return ASYNCGEN_RUNNING if asyncgenerator.ag_frame is None: return ASYNCGEN_CLOSED if asyncgenerator.ag_frame.f_lasti == -1: return ASYNCGEN_CREATED return ASYNCGEN_SUSPENDED def getasyncgeneratorlocals(asyncgenerator): """ Get the mapping of async generator local variables to their current values. A dict is returned, with the keys the local variable names and values the bound values.""" if not isasyncgen(asyncgenerator): raise TypeError("{!r} is not a Python generator".format(asyncgenerator)) frame = getattr(asyncgenerator, "ag_frame", None) if frame is not None: return asyncgenerator.ag_frame.f_locals else: return {} ``` ---------- components: Library (Lib) messages: 416505 nosy: animatea.programming priority: normal severity: normal status: open title: inspect - getasyncgeneratorstate, getasyncgeneratorlocals type: enhancement versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 1 14:47:06 2022 From: report at bugs.python.org (Dutcho) Date: Fri, 01 Apr 2022 18:47:06 +0000 Subject: [New-bugs-announce] [issue47192] sys._getframe audit event has frame as argument in 3.8-3.10 Message-ID: <1648838826.48.0.057451572293.issue47192@roundup.psfhosted.org> New submission from Dutcho : Documentation (https://docs.python.org/3/library/audit_events.html and https://docs.python.org/3/library/sys.html#sys._getframe) states that `sys._getframe()` "raises [...] an auditing event with no arguments". However, Python 3.8-3.10 provide the frame as argument to the hook function. Python 3.11 behaves consistently with documentation. But I couldn't find the change mentioned in the change log. Therefore, I'm uncertain whether that's intentional or not, so whether it'll remain in the release version. This is demonstrated by running snippet `audit.py` ``` import sys sys.addaudithook(print) print(sys.version) sys._getframe() ``` in various versions: ``` 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] sys._getframe (>,) 3.9.11 (tags/v3.9.11:2de452f, Mar 16 2022, 14:33:45) [MSC v.1929 64 bit (AMD64)] sys._getframe (>,) 3.10.3 (tags/v3.10.3:a342a49, Mar 16 2022, 13:07:40) [MSC v.1929 64 bit (AMD64)] sys._getframe (>,) 3.11.0a6 (main, Mar 7 2022, 16:46:19) [MSC v.1929 64 bit (AMD64)] sys._getframe () ``` ---------- messages: 416506 nosy: Dutcho priority: normal severity: normal status: open title: sys._getframe audit event has frame as argument in 3.8-3.10 versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 1 15:19:24 2022 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 01 Apr 2022 19:19:24 +0000 Subject: [New-bugs-announce] [issue47193] Use zlib-ng rather than zlib in binary releases Message-ID: <1648840764.27.0.970523906795.issue47193@roundup.psfhosted.org> New submission from Gregory P. Smith : zlib-ng is an optimized zlib library with better performance on most architectures (with contributions from the likes of Google, Cloudflare, and Intel). It is API compatible with zlib. https://github.com/zlib-ng/zlib-ng I believe the only platform we don't use the OS's own zlib on is Windows so I'm tagging this issue Windows. ---------- components: Windows messages: 416508 nosy: gregory.p.smith, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Use zlib-ng rather than zlib in binary releases type: performance versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 1 15:25:42 2022 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 01 Apr 2022 19:25:42 +0000 Subject: [New-bugs-announce] [issue47194] Upgrade to zlib v1.2.12 in CPython binary releases Message-ID: <1648841142.75.0.617699188947.issue47194@roundup.psfhosted.org> New submission from Gregory P. Smith : zlib v1.2.11 as used in Windows binary releases contains a security issue that, while fixed in its git repo years ago, never wound up in a release or a CVE until just now. Folllow the https://www.openwall.com/lists/oss-security/2022/03/24/1 thread and the and recently assigned CVE-2018-25032. I believe we only ship our own zlib on Windows so this issue is tagged as such. The above oss-security thread is where an idea of severity will come out. ---------- components: Extension Modules, Windows messages: 416510 nosy: gregory.p.smith, lukasz.langa, ned.deily, pablogsal, paul.moore, steve.dower, tim.golden, zach.ware priority: release blocker severity: normal stage: needs patch status: open title: Upgrade to zlib v1.2.12 in CPython binary releases type: security versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 1 16:23:24 2022 From: report at bugs.python.org (Richard Purdie) Date: Fri, 01 Apr 2022 20:23:24 +0000 Subject: [New-bugs-announce] [issue47195] importlib lock race issue in deadlock handling code Message-ID: <1648844604.18.0.0986113969555.issue47195@roundup.psfhosted.org> New submission from Richard Purdie : We've seen tracebacks in production like: File "", line 1004, in _find_and_load(name='oe.gpg_sign', import_=) File "", line 158, in _ModuleLockManager.__enter__() File "", line 110, in _ModuleLock.acquire() KeyError: 139622474778432 and File "", line 1004, in _find_and_load(name='oe.path', import_=) File "", line 158, in _ModuleLockManager.__enter__() File "", line 110, in _ModuleLock.acquire() KeyError: 140438942700992 I've attached a reproduction script which shows that if an import XXX is in progress and waiting at the wrong point when an interrupt arrives (in this case a signal) and triggers it's own import YYY, _blocking_on[tid] in importlib/_bootstrap.py gets overwritten and lost, triggering the traceback we see above upon exit from the second import. I'm using a signal handler here as the interrupt, I don't know what our production source is as yet but this reproducer proves it is possible. ---------- components: Interpreter Core files: testit2.py messages: 416517 nosy: rpurdie priority: normal severity: normal status: open title: importlib lock race issue in deadlock handling code versions: Python 3.10 Added file: https://bugs.python.org/file50714/testit2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 1 20:01:51 2022 From: report at bugs.python.org (Hood Chatham) Date: Sat, 02 Apr 2022 00:01:51 +0000 Subject: [New-bugs-announce] [issue47196] Function pointer cast in test_imp Message-ID: <1648857711.17.0.141077263636.issue47196@roundup.psfhosted.org> New submission from Hood Chatham : The function PyInit_imp_dummy is declared as void f(PyObject* spec) and ignores the argument. In the test, it is called via imp.load_dynamic as void f(void). On wasm targets without the call trampolines added in https://bugs.python.org/issue47162 this causes a fatal error. (There's a bit more discussion about this issue in that thread.) ---------- messages: 416524 nosy: christian.heimes, hoodchatham priority: normal severity: normal status: open title: Function pointer cast in test_imp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 1 21:14:09 2022 From: report at bugs.python.org (Hood Chatham) Date: Sat, 02 Apr 2022 01:14:09 +0000 Subject: [New-bugs-announce] [issue47197] ctypes mishandles `void` return type Message-ID: <1648862049.34.0.311220561963.issue47197@roundup.psfhosted.org> New submission from Hood Chatham : On wasm targets, `test_code` fails. It's because of a bad function pointer cast. The problematic code is as follows: ```py import ctypes py = ctypes.pythonapi freefunc = ctypes.CFUNCTYPE(None, ctypes.c_voidp) RequestCodeExtraIndex = py._PyEval_RequestCodeExtraIndex RequestCodeExtraIndex.argtypes = (freefunc,) RequestCodeExtraIndex.restype = ctypes.c_ssize_t SetExtra = py._PyCode_SetExtra SetExtra.argtypes = (ctypes.py_object, ctypes.c_ssize_t, ctypes.c_voidp) SetExtra.restype = ctypes.c_int LAST_FREED = None def myfree(ptr): global LAST_FREED LAST_FREED = ptr FREE_FUNC = freefunc(myfree) FREE_INDEX = RequestCodeExtraIndex(FREE_FUNC) # Verify that the provided free function gets invoked # when the code object is cleaned up. f = eval('lambda:42') SetExtra(f.__code__, FREE_INDEX, ctypes.c_voidp(100)) del f # crashes!! ``` The problem: `freefunc = ctypes.CFUNCTYPE(None, ctypes.c_voidp)` declares a function with signature `int f(void*)`. However, the definition of `freefunc` is `void f(void*)`. These function signatures do not agree, and trying to make the call crashes. Due to a bug(?) ctypes can produce closures that have `void` return type but it can't produce simple functions with void return type. Closures code: checks if `restype == Py_None` and if so gives the callback a void return type https://github.com/python/cpython/blob/main/Modules/_ctypes/callbacks.c#L381 Direct call code: calls `_ctypes_get_ffi_type` which never returns `ffi_type_void`: https://github.com/python/cpython/blob/b183f486493e7e4c332566392ef18c6b346a6561/Modules/_ctypes/callproc.c#L1212 ---------- components: ctypes messages: 416526 nosy: christian.heimes, hoodchatham priority: normal severity: normal status: open title: ctypes mishandles `void` return type _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 1 23:51:52 2022 From: report at bugs.python.org (Joe Cool) Date: Sat, 02 Apr 2022 03:51:52 +0000 Subject: [New-bugs-announce] [issue47198] os.stat on windows doesn't take an open file even though os.stat in os.supports_fd Message-ID: <1648871512.58.0.519594308427.issue47198@roundup.psfhosted.org> New submission from Joe Cool : os.stat on windows doesn't take an open file even though os.stat in os.supports_fd >>> fd = open('tmp.tmp', 'w') >>> fd <_io.TextIOWrapper name='tmp.tmp' mode='w' encoding='cp1252'> >>> os.stat(fd) Traceback (most recent call last): File "", line 1, in TypeError: stat: path should be string, bytes, os.PathLike or integer, not TextIOWrapper >>> os.stat in os.supports_fd True ---------- messages: 416535 nosy: snoopyjc priority: normal severity: normal status: open title: os.stat on windows doesn't take an open file even though os.stat in os.supports_fd type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 2 02:28:23 2022 From: report at bugs.python.org (Ma Lin) Date: Sat, 02 Apr 2022 06:28:23 +0000 Subject: [New-bugs-announce] [issue47199] multiprocessing: micro-optimize Connection.send_bytes() method Message-ID: <1648880903.17.0.104458885779.issue47199@roundup.psfhosted.org> New submission from Ma Lin : `bytes(m)` can be replaced by memoryview.cast('B'), then no need for data copying. m = memoryview(buf) # HACK for byte-indexing of non-bytewise buffers (e.g. array.array) if m.itemsize > 1: m = memoryview(bytes(m)) n = len(m) https://github.com/python/cpython/blob/v3.11.0a6/Lib/multiprocessing/connection.py#L190-L194 ---------- components: Library (Lib) messages: 416538 nosy: malin priority: normal severity: normal status: open title: multiprocessing: micro-optimize Connection.send_bytes() method type: resource usage versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 2 08:21:15 2022 From: report at bugs.python.org (Sam Ezeh) Date: Sat, 02 Apr 2022 12:21:15 +0000 Subject: [New-bugs-announce] [issue47200] Add ZipInfo.mode property Message-ID: <1648902075.65.0.178369010782.issue47200@roundup.psfhosted.org> New submission from Sam Ezeh : Initially, I was looking at bpo-18262 and saw the following Stack Overflow thread that was linked. https://stackoverflow.com/questions/434641/how-do-i-set-permissions-attributes-on-a-file-in-a-zip-file-using-pythons-zip/6297838 I've attached a patch that gives ZipInfo objects a `ZipInfo.mode` property getter and setter to get and set the file mode. I considered adding ZipFile.chmod but I didn't know how it would work given that archives can contain duplicate files. As an aside, I wondered if there's a way to update file attributes inside zip archives without deleting and rewriting them and if not, whether it would be worthwhile to add one. ---------- components: Library (Lib) files: sam_ezeh.patch keywords: patch messages: 416550 nosy: sam_ezeh priority: normal severity: normal status: open title: Add ZipInfo.mode property type: enhancement versions: Python 3.11 Added file: https://bugs.python.org/file50715/sam_ezeh.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 2 11:10:50 2022 From: report at bugs.python.org (Alessandro Pioli) Date: Sat, 02 Apr 2022 15:10:50 +0000 Subject: [New-bugs-announce] [issue47201] pip3.10.4 is configured with locations that require TLS/SSL, however the ssl module in Python is not available Message-ID: <1648912250.23.0.805410232022.issue47201@roundup.psfhosted.org> New submission from Alessandro Pioli : After installation of 3.4.10 with openssl procedure https://docs.python.org/3/using/unix.html#on-linux on centos 7.9 pip get this error: pip3.10 install -r requirements.txt WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/jinja2/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/jinja2/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/jinja2/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/jinja2/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/jinja2/ Could not fetch URL https://pypi.org/simple/jinja2/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/jinja2/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping ERROR: Could not find a version that satisfies the requirement Jinja2 (from versions: none) ERROR: No matching distribution found for Jinja2 WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping ---------- components: Installation messages: 416558 nosy: alessandro.pioli priority: normal severity: normal status: open title: pip3.10.4 is configured with locations that require TLS/SSL, however the ssl module in Python is not available versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 2 11:22:18 2022 From: report at bugs.python.org (Luminair) Date: Sat, 02 Apr 2022 15:22:18 +0000 Subject: [New-bugs-announce] [issue47202] Feature request: Throw an error when making impossible evaluation against an empty list Message-ID: <1648912938.49.0.294266093677.issue47202@roundup.psfhosted.org> New submission from Luminair : Below are four examples of impossible code that operates on nothing. The latter two continue silently, throwing no errors. I saw a bug sneak by because of this. I wonder if it is within the scope of Python's design to throw Exceptions in these situations? x = for x in : print("This code is never reached") while(None): print("This code is never reached") emptylist = [] for x in emptylist: if emptylist[x] == "This code is never reached": print("This code is never reached") else: print("This code is never reached") ---------- components: Parser messages: 416559 nosy: Luminair, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: Feature request: Throw an error when making impossible evaluation against an empty list type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 2 14:09:59 2022 From: report at bugs.python.org (StaticBits) Date: Sat, 02 Apr 2022 18:09:59 +0000 Subject: [New-bugs-announce] [issue47203] ImportError: DLL load failed while importing binascii: %1 is not a valid Win32 application. Message-ID: <1648922999.22.0.805414990546.issue47203@roundup.psfhosted.org> New submission from StaticBits : When I try importing the default library "binascii" using the command "import binascii", the result is the following error (also in the title): ImportError: DLL load failed while importing binascii: %1 is not a valid Win32 application. I've reinstalled Python and tried using the 32 bit version of Python, along with Python 3.9, but this error still persists. Any help would be appreciated! ---------- components: Library (Lib) messages: 416573 nosy: puppy2655 priority: normal severity: normal status: open title: ImportError: DLL load failed while importing binascii: %1 is not a valid Win32 application. type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 3 02:41:46 2022 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 03 Apr 2022 06:41:46 +0000 Subject: [New-bugs-announce] [issue47204] Ensure PyEval_GetGlobals() doesn't set an exception when returning NULL Message-ID: <1648968106.21.0.863482035825.issue47204@roundup.psfhosted.org> New submission from Nick Coghlan : While working on the first PR for bpo-44800 I provoked an obscure failure in PyImport_ImportModule by making PyEval_GetGlobals set an exception when returning NULL (as PyEval_GetLocals has done since bpo-18408 was implemented for Python 3.4). This ticket covers adding an embedding test case that: * ensures PyEval_GetGlobals() returns NULL without an exception when no Python frame is active * ensures PyEval_GetLocals() returns NULL and sets an exception when no Python frame is active * ensures PyImport_ImportModule still works when no Python frame is active There's an option to slightly change the behaviour of `PyEval_GetLocals()` to NOT set an exception in the "no Python frame" case, and instead only set the error when there is a Python frame, but something goes wrong when attempting to access the fast locals array (such as a memory allocation failure). ---------- assignee: ncoghlan messages: 416611 nosy: ncoghlan priority: normal severity: normal stage: test needed status: open title: Ensure PyEval_GetGlobals() doesn't set an exception when returning NULL type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 3 08:36:46 2022 From: report at bugs.python.org (Christian Heimes) Date: Sun, 03 Apr 2022 12:36:46 +0000 Subject: [New-bugs-announce] [issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit Message-ID: <1648989406.44.0.565720114777.issue47205@roundup.psfhosted.org> New submission from Christian Heimes : Two test cases have been failing on FreeBSD buildbot for a while. Let's skip the error check on FreeBSD for now. 0:27:24 load avg: 1.97 Re-running test_posix in verbose mode (matching: test_sched_getaffinity, test_sched_setaffinity) test_sched_getaffinity (test.test_posix.PosixTester.test_sched_getaffinity) ... FAIL test_sched_setaffinity (test.test_posix.PosixTester.test_sched_setaffinity) ... FAIL ====================================================================== FAIL: test_sched_getaffinity (test.test_posix.PosixTester.test_sched_getaffinity) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/pull_request.koobs-freebsd-564d/build/Lib/test/test_posix.py", line 1197, in test_sched_getaffinity self.assertRaises(OSError, posix.sched_getaffinity, -1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: OSError not raised by sched_getaffinity ====================================================================== FAIL: test_sched_setaffinity (test.test_posix.PosixTester.test_sched_setaffinity) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/pull_request.koobs-freebsd-564d/build/Lib/test/test_posix.py", line 1215, in test_sched_setaffinity self.assertRaises(OSError, posix.sched_setaffinity, -1, mask) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: OSError not raised by sched_setaffinity ---------------------------------------------------------------------- Ran 2 tests in 0.015s ---------- components: Tests messages: 416616 nosy: christian.heimes priority: normal severity: normal status: open title: test_sched_getaffinity and setaffinity fail on FreeBSD buildbit versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 3 11:10:59 2022 From: report at bugs.python.org (Jelle Zijlstra) Date: Sun, 03 Apr 2022 15:10:59 +0000 Subject: [New-bugs-announce] [issue47206] pickle docs are wrong about nested classes Message-ID: <1648998659.8.0.245772274253.issue47206@roundup.psfhosted.org> New submission from Jelle Zijlstra : https://docs.python.org/3.10/library/pickle.html#what-can-be-pickled-and-unpickled says that only "classes that are defined at the top level of a module" can be pickled. But in fact these work fine in current Python, probably since 3.3 when __qualname__ was added (https://docs.python.org/3/library/stdtypes.html#definition.__qualname__). Similarly, the docs claim only top-level functions can be pickled, but in fact methods nested in classes work fine. Example script demonstrating that these work: import pickle class X: class Y: pass def method(self): pass print(pickle.dumps(X.Y)) print(pickle.loads(pickle.dumps(X.Y))) print(pickle.dumps(X.Y())) print(pickle.loads(pickle.dumps(X.Y()))) print(pickle.dumps(X.method)) print(pickle.loads(pickle.dumps(X.method))) ---------- assignee: docs at python components: Documentation messages: 416625 nosy: JelleZijlstra, alexandre.vassalotti, docs at python priority: normal severity: normal status: open title: pickle docs are wrong about nested classes type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 3 12:08:25 2022 From: report at bugs.python.org (Paul Ganssle) Date: Sun, 03 Apr 2022 16:08:25 +0000 Subject: [New-bugs-announce] [issue47207] Switch datetime docstrings / documentation to using "Returns" rather than "Return"? Message-ID: <1649002105.09.0.287178375758.issue47207@roundup.psfhosted.org> New submission from Paul Ganssle : In bpo-9305, Fred Drake recommends preferring `Returns ...` over the imperative `Return ...`: https://bugs.python.org/issue9305#msg110912 Currently we're pretty consistent about `Return ...`, which is consistent with PEP 257: https://peps.python.org/pep-0257/ That said, I actually think "Returns ..." sounds much better in the documentation, and I'd be happy to see it changed if others agree. I have spun this off from bpo-9305 so that we can unblock https://github.com/python/cpython/pull/31697. ---------- assignee: docs at python components: Documentation messages: 416628 nosy: belopolsky, docs at python, fdrake, p-ganssle, slateny priority: normal severity: normal status: open title: Switch datetime docstrings / documentation to using "Returns" rather than "Return"? versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 3 20:27:44 2022 From: report at bugs.python.org (Hood Chatham) Date: Mon, 04 Apr 2022 00:27:44 +0000 Subject: [New-bugs-announce] [issue47208] Support libffi implementations that cannot support invocations with 1024 arguments Message-ID: <1649032064.63.0.517222199646.issue47208@roundup.psfhosted.org> New submission from Hood Chatham : ctypes defines `CTYPES_MAX_ARGCOUNT` to be 1024: https://github.com/python/cpython/blob/6db2db91b96aaa1270c200ec931a2250fe2799c7/Modules/_ctypes/ctypes.h#L21 If a function call is attempted with more than 1024 arguments, it will fail. The libffi emscripten port github.com/hoodmane/libffi-emscripten can only support function calls with at most 122 arguments due to limitations in Emscripten / Wasm: https://github.com/emscripten-core/emscripten/pull/16653 I propose to allow the libffi port to define FFI_MAX_CLOSURE_ARGS and if this is defined then use this number instead for `CTYPES_MAX_ARGCOUNT`. https://github.com/libffi/libffi/issues/703 The test `test_callback_too_many_args` should also be updated to respect the value of `CTYPES_MAX_ARGCOUNT` rather than hardcoding 1024 into the test. ---------- components: ctypes messages: 416646 nosy: hoodchatham priority: normal severity: normal status: open title: Support libffi implementations that cannot support invocations with 1024 arguments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 3 23:24:22 2022 From: report at bugs.python.org (himkt) Date: Mon, 04 Apr 2022 03:24:22 +0000 Subject: [New-bugs-announce] [issue47209] Documentation for asserting values of `unittest.mock.Mock.call_args_list` Message-ID: <1649042662.7.0.274264935665.issue47209@roundup.psfhosted.org> New submission from himkt : Currently documentation says we can check call_args_list by providing a list of tuples of arguments. ``` >>> expected = [(), ((3, 4),), ({'key': 'fish', 'next': 'w00t!'},)] >>> mock.call_args_list == expected True ``` (from https://docs.python.org/3.11/library/unittest.mock.html#unittest.mock.Mock.call_args_list) However, I think we have to wrap all arguments with `call`. I'd happy to send a patch if it should be fixed. ### Reproduce: ``` import time from unittest.mock import call from unittest.mock import patch with patch("time.sleep") as mock_obj: time.sleep(1) time.sleep(2) print("mock_obj.call_args_list") print(mock_obj.call_args_list) print("mock_obj.call_args_list == [(1,), (2,)]") print(mock_obj.call_args_list == [(1,), (2,)]) print("mock_obj.call_args_list == [call(1,), call(2,)]") print(mock_obj.call_args_list == [call(1,), call(2,)]) ``` ``` > python demo.py 2022-04-04 12:03:18 mock_obj.call_args_list [call(1), call(2)] mock_obj.call_args_list == [(1,), (2,)] False mock_obj.call_args_list == [call(1,), call(2,)] True ``` ### Links - Documentation in repo: https://github.com/python/cpython/blob/4216dce04b7d3f329beaaafc82a77c4ac6cf4d57/Doc/library/unittest.mock.rst - Documentation in page: https://docs.python.org/3.11/library/unittest.mock.html#unittest.mock.Mock.call_args_list ---------- assignee: docs at python components: Documentation messages: 416650 nosy: docs at python, himkt priority: normal severity: normal status: open title: Documentation for asserting values of `unittest.mock.Mock.call_args_list` type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 4 02:49:11 2022 From: report at bugs.python.org (ripspin) Date: Mon, 04 Apr 2022 06:49:11 +0000 Subject: [New-bugs-announce] [issue47210] './configure --help' causes infinite loop Message-ID: <1649054951.07.0.0464700786493.issue47210@roundup.psfhosted.org> New submission from ripspin : wget https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz unpacked & cd to /GS/FLP/pool/common-apps/Python-3.9.6/ ./configure --help (appears to hang but ps gives truth) see attached file of ps output ---------- components: Build files: ttt1 messages: 416654 nosy: ripspin5 priority: normal severity: normal status: open title: './configure --help' causes infinite loop type: compile error versions: Python 3.9 Added file: https://bugs.python.org/file50717/ttt1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 4 04:56:13 2022 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 Apr 2022 08:56:13 +0000 Subject: [New-bugs-announce] [issue47211] Remove re.template() and re.TEMPLATE Message-ID: <1649062573.34.0.575167973104.issue47211@roundup.psfhosted.org> New submission from Serhiy Storchaka : They were added in 436c3d58a2570f3b599e59b4071f944f774ec441 (between 1.6a2 and 2.0), but the purpose is not known. See also https://mail.python.org/archives/list/python-dev at python.org/message/DVSQGM5LO4TK63C63H6KQ6XBTBQGFLEN/. The feature was not fully implemented, and it was disabled short time later in 29c4ba9ada44d62988c62c85c8046985f10a1c85. Currently the only effect of this flag is that repetition operators (+, *, ?, {}) do not work. A comment was added in 3562f1176403653ebfbef6275d449ad42d1b843a: SRE_FLAG_TEMPLATE = 1 # template mode (disable backtracking) It's all. I guess it could have some relation to possessive repetition operators, except that it is a global flag. I think it should be removed without deprecation because it never really worked and never was documented. ---------- components: Library (Lib), Regular Expressions messages: 416658 nosy: ezio.melotti, mrabarnett, serhiy.storchaka priority: normal severity: normal status: open title: Remove re.template() and re.TEMPLATE type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 4 07:01:55 2022 From: report at bugs.python.org (Matthieu Dartiailh) Date: Mon, 04 Apr 2022 11:01:55 +0000 Subject: [New-bugs-announce] [issue47212] Minor issues in reported Syntax errors Message-ID: <1649070115.81.0.636423654996.issue47212@roundup.psfhosted.org> New submission from Matthieu Dartiailh : Hi, While working on Pegen I noticed that: - the invalid_arguments rule would non point to the full generator expression in its second and fifth alternatives - when reporting an indentation error after a bare except, the error is actually a SyntaxError I will open a PR shortly to address both since the changes are quite minimal IMO. ---------- components: Parser messages: 416662 nosy: lys.nikolaou, mdartiailh, pablogsal priority: normal severity: normal status: open title: Minor issues in reported Syntax errors type: behavior versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 4 07:03:09 2022 From: report at bugs.python.org (apostofes) Date: Mon, 04 Apr 2022 11:03:09 +0000 Subject: [New-bugs-announce] [issue47213] arrow at wrong place Message-ID: <1649070189.66.0.592460685297.issue47213@roundup.psfhosted.org> New submission from apostofes : arrow should be after `a` ---------- components: Library (Lib) files: Screenshot (1044).png messages: 416663 nosy: apostofes priority: normal severity: normal status: open title: arrow at wrong place type: enhancement versions: Python 3.7 Added file: https://bugs.python.org/file50718/Screenshot (1044).png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 4 07:51:09 2022 From: report at bugs.python.org (Ravi Jain) Date: Mon, 04 Apr 2022 11:51:09 +0000 Subject: [New-bugs-announce] [issue47214] builtin_function_or_method is also either a function or a method Message-ID: <1649073069.64.0.34213734425.issue47214@roundup.psfhosted.org> New submission from Ravi Jain : the. ``` import inspect inspect.isfunction ``` does not consider a ``` builtin_function_or_method ``` as a function. for example, ``` inspect.isfunction(abs) ``` gives, ``` False ``` in the background even the builtin `abs` is a function, so shouldn't it return True? the way this check is implemented is by matching the type of a builtin_function_or_method with, ``` type(len) ``` and since, `type(len)` is `builtin_function_or_method`, so, the `inspect.isfunction` check gives False. But in my opinion, it should return True, even for builtin functions or methods. ---------- components: Build messages: 416664 nosy: apostofes priority: normal severity: normal status: open title: builtin_function_or_method is also either a function or a method versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 4 07:59:07 2022 From: report at bugs.python.org (Mark Shannon) Date: Mon, 04 Apr 2022 11:59:07 +0000 Subject: [New-bugs-announce] [issue47215] Add "unstable" frame stack api Message-ID: <1649073547.57.0.863491457391.issue47215@roundup.psfhosted.org> New submission from Mark Shannon : We need to provide an API to create, swap and free frame stacks for greenlets. Since this is primarily for greenlets (and any other stackful coroutines libraries that want to use it) it will be "unstable". In this case, by "unstable" I mean: 1. Starts with an underscore 2. Gets PyAPI_FUNC annotations, so we don't strip the symbols from the executable 3. Undocumented, except for comments that say it is unstable. The API will be: ``` typedef struct _frame_stack { _PyStackChunk *current_chunk; PyObject **top; PyObject **limit; int chunk_size; } _PyFrameStack; PyAPI_FUNC(void) _PyFrameStack_Init(_PyFrameStack *fs, int chunk_size); PyAPI_FUNC(void) _PyFrameStack_Swap(_PyFrameStack *fs); PyAPI_FUNC(void) _PyFrameStack_Free(_PyFrameStack *fs); ``` ---------- assignee: Mark.Shannon components: C API messages: 416665 nosy: Mark.Shannon, brandtbucher priority: normal severity: normal stage: needs patch status: open title: Add "unstable" frame stack api type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 4 13:47:01 2022 From: report at bugs.python.org (Marin M) Date: Mon, 04 Apr 2022 17:47:01 +0000 Subject: [New-bugs-announce] [issue47216] adding mtime option to gzip open() Message-ID: <1649094421.3.0.554667285415.issue47216@roundup.psfhosted.org> New submission from Marin M : init of class GzipFile has mtime as an optional argument, but open() function does not. When using open(), mtime will always be set to the current time and so far there was no way of fixing it to a specific timestamp. In case two people would tar.gz the same file and take its sha, the shas would be different. With an option to fix the mtime, they could have a unique sha. PR containing code change and the tests is already ready. ---------- components: Library (Lib) messages: 416685 nosy: ellaellela priority: normal severity: normal status: open title: adding mtime option to gzip open() type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 4 14:49:04 2022 From: report at bugs.python.org (Marin M) Date: Mon, 04 Apr 2022 18:49:04 +0000 Subject: [New-bugs-announce] [issue47217] adding name to BZ2File Message-ID: <1649098144.47.0.758350700738.issue47217@roundup.psfhosted.org> New submission from Marin M : BZ2File doesn't have attribute name, unlike GzipFile which has it. Trying to access that attribute results in error. PR is ready with code changes and tests which mimics what is already available for GzipFile (e.g. we do not take name from BytesIO() objects because they do not have it). A similar PR is ready for LZMAFile as well (a different enhancement). ---------- components: Library (Lib) messages: 416690 nosy: ellaellela priority: normal severity: normal status: open title: adding name to BZ2File type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 4 14:53:55 2022 From: report at bugs.python.org (Marin M) Date: Mon, 04 Apr 2022 18:53:55 +0000 Subject: [New-bugs-announce] [issue47218] adding name to lzmafile Message-ID: <1649098435.58.0.673652307913.issue47218@roundup.psfhosted.org> New submission from Marin M : LZMAFile doesn't have attribute name, unlike GzipFile which has it. Trying to access that attribute results in error. PR is ready with code changes and tests which mimics what is already available for GzipFile (e.g. we do not take name from BytesIO() objects because they do not have it). A similar PR is ready for BZ2File as well (a different enhancement). ---------- components: Library (Lib) messages: 416691 nosy: ellaellela priority: normal severity: normal status: open title: adding name to lzmafile type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 4 15:57:08 2022 From: report at bugs.python.org (Matthias Badaire) Date: Mon, 04 Apr 2022 19:57:08 +0000 Subject: [New-bugs-announce] [issue47219] asyncio with two interpreter instances Message-ID: <1649102228.02.0.401912675697.issue47219@roundup.psfhosted.org> New submission from Matthias Badaire : Hi, I have an issue when using asyncio and two interpreter instances each launched and used in a seperated thread. I am getting a asyncio loop for each thread .However asyncio is getting me the same loop because of this code in get_running_loop. Indeed when I have two interpreter, the ts_id would be the same for both my threads and therefore I will get the cached value of the first thread. cached_running_holder being static, it is the same value for all instances of interpreter. Maybe we should check if we are in the same interpreter or same thread ,.. I am not sure how it could be fixed. _asynciomodule.c: get_running_loop(PyObject **loop) { PyObject *rl; PyThreadState *ts = _PyThreadState_GET(); uint64_t ts_id = PyThreadState_GetID(ts); if (ts_id == cached_running_holder_tsid && cached_running_holder != NULL) { If it does not make sense, I have some sample code but it is not just 10 lines. ---------- components: asyncio messages: 416694 nosy: asvetlov, mbadaire, yselivanov priority: normal severity: normal status: open title: asyncio with two interpreter instances type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 4 17:03:28 2022 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Mon, 04 Apr 2022 21:03:28 +0000 Subject: [New-bugs-announce] [issue47220] Document the optional callback parameter of weakref.WeakMethod Message-ID: <1649106208.47.0.134371147726.issue47220@roundup.psfhosted.org> New submission from G?ry : - Document the optional *callback* parameter of `weakref.WeakMethod`. - Fix a few spelling mistakes. - Improve wording. ---------- components: Library (Lib) messages: 416697 nosy: maggyero priority: normal pull_requests: 30376 severity: normal status: open title: Document the optional callback parameter of weakref.WeakMethod type: enhancement versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 4 18:00:20 2022 From: report at bugs.python.org (Cezary Wagner) Date: Mon, 04 Apr 2022 22:00:20 +0000 Subject: [New-bugs-announce] [issue47221] Bug or bad performance Message-ID: <1649109620.49.0.345539464158.issue47221@roundup.psfhosted.org> New submission from Cezary Wagner : I am experienced programmer 10y+ - that is very very strange performance problem when I play Python timeit with my son :) three way operator a <= x <= b is slower than a <= x and x <= b. It looks like wrong implementation since it is impossible that two separate check is faster that one check (with two low level check in C). import timeit REPEATS = 100 def test1(): selected = [] for i in range(REPEATS): if i >= 25 and i <= 75: selected.append(i) return selected def test2(): selected = [] for i in range(REPEATS): if 25 <= i <= 75: selected.append(i) return selected print(timeit.timeit(test1)) print(timeit.timeit(test2)) Result is on Windows 10. 4.428947699998389 4.9062477999978 ---------- components: Interpreter Core messages: 416699 nosy: Cezary.Wagner priority: normal severity: normal status: open title: Bug or bad performance type: performance versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 4 18:52:49 2022 From: report at bugs.python.org (Philip Prindeville) Date: Mon, 04 Apr 2022 22:52:49 +0000 Subject: [New-bugs-announce] [issue47222] subprocess.Popen() should allow capturing output and sending it to stdout and stderr Message-ID: <1649112769.31.0.762771306668.issue47222@roundup.psfhosted.org> New submission from Philip Prindeville : I'd like to see handlers exposes for the stdout and stderr pipe-reading threads so that I could customize what's done with the data as it's read. I might, for instance, want to: (1) accumulate it into a buffer; (2) copy it onto sys.stdout or sys.stderr, respectively; (3) send it to a logging object; or some combination of the above, possibly all of them. ---------- components: Library (Lib) messages: 416703 nosy: pprindeville priority: normal severity: normal status: open title: subprocess.Popen() should allow capturing output and sending it to stdout and stderr type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 4 23:24:02 2022 From: report at bugs.python.org (Takuo Matsuoka) Date: Tue, 05 Apr 2022 03:24:02 +0000 Subject: [New-bugs-announce] [issue47223] The variable __module__ in the class body getting an undesirable value from __prepare__ of the metaclass Message-ID: <1649129042.58.0.0645536358983.issue47223@roundup.psfhosted.org> New submission from Takuo Matsuoka : Context ------- Some classes have the variable __name__ in their namespace __dict__ , and one may wish to create more such classes with varied values of __name__ . Some of those could be created with a metaclass whose __prepare__ returns a mapping having key "__name__", for which the value is created depending on the arguments of __prepare__ and can be updated or deleted in the body of the class to be created. (See C below for a very silly example of such a metaclass.) Problem ------- The value of __name__ given by __prepare__ becomes not just that in the class body, but automatically also the value of __module__ there. As far as I could see, this is not documented, and the programmer might not notice __module__ was messed up. I think this behaviour is unexpected and problematic at least unless a warning is given on it in the document. Example ------- Here's a code which produces a problem. ``` # In this example, the metaclass C is intended to be a class of # subclasses of: B = type class C(type(B)): @classmethod def __prepare__(cls, /, *args, **kwargs): return dict(__name__ = cls._name(*args, **kwargs)) @classmethod def _name(cls, /, *args, **kwargs): # The actual value of __name__ doesn't matter much to the # issue, so I make this function always return the same silly # thing in this example. return type.__dict__["__name__"] class O(B, metaclass=C): print(__module__ == __name__) # True # Could update or delete __name__ here. ``` Consequently, >>> O.__module__ Discussion ---------- If the value of __name__ can be read from the scope outside for the assignment to __module__, then that will erase this unexpected behaviour and I think it would be a much safer thing to do. Remarks ------- The issue was previously https://bugs.python.org/issue47136 which I'm going to close now since I failed to specify the issue clearly enough there. Here I've made the issue more specific. The issue is different from but seems related to https://bugs.python.org/issue28869 I haven't figured out the exact relation. Thanks. ---------- components: Interpreter Core messages: 416738 nosy: Takuo Matsuoka priority: normal severity: normal status: open title: The variable __module__ in the class body getting an undesirable value from __prepare__ of the metaclass type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 4 23:36:25 2022 From: report at bugs.python.org (Takuo Matsuoka) Date: Tue, 05 Apr 2022 03:36:25 +0000 Subject: [New-bugs-announce] [issue47224] The variable __module__ in the class body getting an undesirable value from __prepare__ of the metaclass Message-ID: <1649129785.37.0.35405103854.issue47224@roundup.psfhosted.org> New submission from Takuo Matsuoka : Context ------- Some classes have the variable __name__ in their namespace __dict__ , and one may wish to create more such classes with varied values of __name__ . Some of those could be created with a metaclass whose __prepare__ returns a mapping having key "__name__", for which the value is created depending on the arguments of __prepare__ and can be updated or deleted in the body of the class to be created. (See C below for a very silly example of such a metaclass.) Problem ------- The value of __name__ given by __prepare__ becomes not just that in the class body, but automatically also the value of __module__ there. As far as I could see, this is not documented, and the programmer might not notice __module__ was messed up. I think this behaviour is unexpected and problematic at least unless a warning is given on it in the document. Example ------- Here's a code which produces a problem. ``` # In this example, the metaclass C is intended to be a class of # subclasses of: B = type class C(type(B)): @classmethod def __prepare__(cls, /, *args, **kwargs): return dict(__name__ = cls._name(*args, **kwargs)) @classmethod def _name(cls, /, *args, **kwargs): # The actual value of __name__ doesn't matter much to the # issue, so I make this function always return the same silly # thing in this example. return type.__dict__["__name__"] class O(B, metaclass=C): print(__module__ == __name__) # True # Could update or delete __name__ here. ``` Consequently, >>> O.__module__ Discussion ---------- If the value of __name__ can be read from the scope outside for the assignment to __module__, then that will erase this unexpected behaviour and I think it would be a much safer thing to do. Remarks ------- The issue was previously https://bugs.python.org/issue47136 which I'm going to close now since I failed to specify the issue clearly enough there. Here I've made the issue more specific. (The issue is same as https://bugs.python.org/issue47223 which I closed mistaking it with https://bugs.python.org/issue47136) The issue is different from but seems related to https://bugs.python.org/issue28869 I haven't figured out the exact relation. Thanks. ---------- components: Interpreter Core messages: 416741 nosy: Takuo Matsuoka priority: normal severity: normal status: open title: The variable __module__ in the class body getting an undesirable value from __prepare__ of the metaclass type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 5 00:30:24 2022 From: report at bugs.python.org (Prem B. Shah) Date: Tue, 05 Apr 2022 04:30:24 +0000 Subject: [New-bugs-announce] [issue47225] Issue in subtraction of float numbers Message-ID: <1649133024.48.0.931607557549.issue47225@roundup.psfhosted.org> New submission from Prem B. Shah : There is an issue when subtracting float numbers ... for e.g. print (5.67 - 5.6) gives an output : 0.07000000000000028 ---------- components: Windows messages: 416748 nosy: MrPhenomenal3110, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Issue in subtraction of float numbers versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 5 01:33:58 2022 From: report at bugs.python.org (Kaushal Sai v) Date: Tue, 05 Apr 2022 05:33:58 +0000 Subject: [New-bugs-announce] [issue47226] if we write a line of code like i wrote keys = pygame.key.get_pressed() is showing error Message-ID: <1649136838.25.0.976572163759.issue47226@roundup.psfhosted.org> Change by Kaushal Sai v : ---------- nosy: vkaushalsai priority: normal severity: normal status: open title: if we write a line of code like i wrote keys = pygame.key.get_pressed() is showing error versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 5 08:41:51 2022 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 05 Apr 2022 12:41:51 +0000 Subject: [New-bugs-announce] [issue47227] Suppress expression chaining for RE parsing errors Message-ID: <1649162511.96.0.951091623392.issue47227@roundup.psfhosted.org> New submission from Serhiy Storchaka : The EAFP principle is widely used in the regular expressions parsing code. Exceptions like KeyError, IndexError, ValueError or OverflowError raised during parsing are converted into a helpful re.error. Expression chaining is usually suppressed in such cases to hide unrelated implementation details, but not in all cases. The following PR adds more "from None" in "raise" statements inside "except" blocks. ---------- components: Library (Lib), Regular Expressions messages: 416774 nosy: ezio.melotti, mrabarnett, serhiy.storchaka priority: normal severity: normal status: open title: Suppress expression chaining for RE parsing errors type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 5 10:04:48 2022 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 05 Apr 2022 14:04:48 +0000 Subject: [New-bugs-announce] =?utf-8?q?=5Bissue47228=5D_Document_that_na?= =?utf-8?q?=C3=AFve_datetime_objects_represent_local_time?= Message-ID: <1649167488.99.0.593176824045.issue47228@roundup.psfhosted.org> New submission from Paul Ganssle : Currently, the `datetime` documentation has this to say about na?ve datetimes: > A naive object does not contain enough information to unambiguously locate itself relative to other date/time objects. Whether a naive object represents Coordinated Universal Time (UTC), local time, or time in some other timezone is purely up to the program, just like it is up to the program whether a particular number represents metres, miles, or mass. Naive objects are easy to understand and to work with, at the cost of ignoring some aspects of reality. This was accurate in Python 2.7, but as of Python 3, the picture is a bit more nuanced. `.astimezone()` and `.timestamp()` work for na?ve datetimes, but they are treated as *system local times*. It is no longer really appropriate to use a na?ve datetime to a datetime in any specific concrete time zone ? instead, they should be considered either abstract datetimes for the purposes of calendar calculations, or they should be considered as representing the realization of that abstract datetime *in the current system locale*. This new behavior is referenced in, for example, the warning in `.utcnow()`: https://docs.python.org/3.10/library/datetime.html#datetime.datetime.utcnow We make reference to this in the documentation for `.timestamp()`: https://docs.python.org/3.10/library/datetime.html#datetime.datetime.timestamp and in `.astimezone()`: https://docs.python.org/3.10/library/datetime.html#datetime.datetime.astimezone, but the top level explanation makes no reference to it. I have written a blog post about *why* this is the case: https://blog.ganssle.io/articles/2022/04/naive-local-datetimes.html and made reference to this behavior in an earlier blog post about `utcnow`: https://blog.ganssle.io/articles/2019/11/utcnow.html, but I think it would be a good idea to revamp the official documentation to reflect this change in status (12 years or so after the change?) ---------- assignee: p-ganssle components: Documentation messages: 416778 nosy: belopolsky, p-ganssle priority: normal severity: normal stage: needs patch status: open title: Document that na?ve datetime objects represent local time type: enhancement versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 5 13:19:04 2022 From: report at bugs.python.org (Doug Bates) Date: Tue, 05 Apr 2022 17:19:04 +0000 Subject: [New-bugs-announce] [issue47229] IDLE / Thonny UI crashes on Chromebook Linux/Bullseye Message-ID: <1649179144.58.0.96853130641.issue47229@roundup.psfhosted.org> New submission from Doug Bates : Having installed IDLE on Chromebbok/Linux Bullseye, on startup the UI crashes as soon as a menu item is selected. Also when trying to use Thonny. Other packages seem OK. Used to work fine under Buster, but not since fresh install to Bullseye. Apologies from my knowledge/skill level. ---------- assignee: terry.reedy components: IDLE files: Thonny crashes.txt messages: 416790 nosy: Coloneldare, terry.reedy priority: normal severity: normal status: open title: IDLE / Thonny UI crashes on Chromebook Linux/Bullseye type: crash Added file: https://bugs.python.org/file50720/Thonny crashes.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 5 13:45:26 2022 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 05 Apr 2022 17:45:26 +0000 Subject: [New-bugs-announce] [issue47230] New compiler warnings with latest zlib Message-ID: <1649180726.62.0.308127491071.issue47230@roundup.psfhosted.org> New submission from Jeremy Kloth : The latest zlib (1.2.12) introduces 3 new compiler warnings. Now being an external library, I do not think we generally patch them, so I propose to simply silence the warnings for the offending file. For reference, the problem comes from: --- deflate.h.old 2022-04-05 11:27:26.869042900 -0600 +++ deflate.h.new 2022-04-05 11:26:11.512039600 -0600 @@ -329,8 +329,8 @@ # define _tr_tally_dist(s, distance, length, flush) \ { uch len = (uch)(length); \ ush dist = (ush)(distance); \ - s->sym_buf[s->sym_next++] = dist; \ - s->sym_buf[s->sym_next++] = dist >> 8; \ + s->sym_buf[s->sym_next++] = (uch)dist; \ + s->sym_buf[s->sym_next++] = (uch)(dist >> 8); \ s->sym_buf[s->sym_next++] = len; \ dist--; \ s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ ---------- components: Build, Windows messages: 416792 nosy: jkloth, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: New compiler warnings with latest zlib type: compile error versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 5 14:15:20 2022 From: report at bugs.python.org (Chris Fernald) Date: Tue, 05 Apr 2022 18:15:20 +0000 Subject: [New-bugs-announce] [issue47231] TarFile.getmember cannot work on tar sourced directory over 100 characters Message-ID: <1649182520.6.0.880858034818.issue47231@roundup.psfhosted.org> New submission from Chris Fernald : A fix was made to unify handling of the trailing slash in TarFile.getmember related to https://bugs.python.org/issue21987. This change fixed the <100 character case, but made it so directories over 100 character which come from a tar file can no longer be accessed through getmember, even if returned from getnames. This appears to be because internal to tarfile, member names still include the trailing slash on directories over 100 characters but getmember will always remove the trailing slash from the provided name so the comparison will always fail. A simple example of this is as follows using 3.10.4. 1. Download: https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu.tar.xz 2. place attached python script in same directory 3. run on 3.8.2 -> fails to get stripped version of path (line 16) 4. run on 3.10.4 -> fails to get even unstripped version (line 12 & 16) ---------- components: Library (Lib) files: tarfile_repro.py messages: 416793 nosy: cfernald, serhiy.storchaka priority: normal severity: normal status: open title: TarFile.getmember cannot work on tar sourced directory over 100 characters type: behavior versions: Python 3.10, Python 3.11, Python 3.9 Added file: https://bugs.python.org/file50721/tarfile_repro.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 5 15:27:14 2022 From: report at bugs.python.org (Hood Chatham) Date: Tue, 05 Apr 2022 19:27:14 +0000 Subject: [New-bugs-announce] [issue47232] Difficulties building tip of tree Python for emscripten Message-ID: <1649186834.9.0.275232571142.issue47232@roundup.psfhosted.org> New submission from Hood Chatham : I am trying to build tot Python for Emscripten to test recent changes and having trouble. The problem is caused by recent changes since 3.11.0a6 to `sre`. I build a build Python 3.11 from tot, and provided it to `./configure --with-build-python=$(HOSTBUILDDIR)/python`. However, I still see invocations to the system Python 3.11 at `/usr/local/bin/python3.11`. The problem seems to be that the generated `Makefile` has a bunch of stuff collapsed into one line: ``` PYTHON_FOR_BUILD=_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) /src/cpython/build/Python-3.11.0dev0/builddir/build-host/python ``` manually fixing this to: ``` PYTHON_FOR_BUILD=/src/cpython/build/Python-3.11.0dev0/builddir/build-host/python _PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) ``` fixes the problem. My configure invocation is as follows: ``` ( \ cd $(BUILDDIR); \ CONFIG_SITE=./config.site-wasm32-emscripten emconfigure \ ../../configure \ --cache-file=$(ROOT)/python.config.cache \ CFLAGS="${PYTHON_CFLAGS}" \ CPPFLAGS="-I$(SQLITEBUILD) -I$(BZIP2BUILD) -I$(ZLIBBUILD)" \ PLATFORM_TRIPLET="$(PLATFORM_TRIPLET)" \ --with-build-python=$(HOSTBUILDDIR)/python \ --without-pymalloc \ --disable-shared \ --disable-ipv6 \ --enable-big-digits=30 \ --enable-optimizations \ --host=wasm32-unknown-emscripten\ --build=$(shell $(EXTRACTDIR)/config.guess) \ --prefix=$(INSTALL) \ ) ``` ---------- messages: 416807 nosy: christian.heimes, hoodchatham priority: normal severity: normal status: open title: Difficulties building tip of tree Python for emscripten _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 5 15:47:24 2022 From: report at bugs.python.org (15r10nk) Date: Tue, 05 Apr 2022 19:47:24 +0000 Subject: [New-bugs-announce] [issue47233] show_caches option affects code positions reported by dis.get_instructions(...) Message-ID: <1649188044.95.0.306823001804.issue47233@roundup.psfhosted.org> New submission from 15r10nk <15r10nk-python-issues at polarbit.de>: The Instructions reported by dis.get_instructions(...) and dis.Bytecode(...) have different positions depending on the value of their show_caches argument. test2.py reproduces the problem. ---------- files: test2.py messages: 416810 nosy: 15r10nk priority: normal severity: normal status: open title: show_caches option affects code positions reported by dis.get_instructions(...) type: behavior versions: Python 3.11 Added file: https://bugs.python.org/file50722/test2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 5 16:26:08 2022 From: report at bugs.python.org (Thomas Fischbacher) Date: Tue, 05 Apr 2022 20:26:08 +0000 Subject: [New-bugs-announce] [issue47234] PEP-484 "numeric tower" approach makes it hard/impossible to specify contracts in documentation Message-ID: <1649190368.71.0.65167976325.issue47234@roundup.psfhosted.org> New submission from Thomas Fischbacher : Here is a major general problem with python-static-typing as it is described by PEP-484: The approach described in https://peps.python.org/pep-0484/#the-numeric-tower negatively impacts our ability to reason about the behavior of code with stringency. I would like to clarify one thing in advance: this is a real problem if we subscribe to some of the important ideas that Dijkstra articulated in his classic article "On the role of scientific thought" (e.g.: https://www.cs.utexas.edu/users/EWD/transcriptions/EWD04xx/EWD447.html). Specifically, this part: """ Let me try to explain to you, what to my taste is characteristic for all intelligent thinking. It is, that one is willing to study in depth an aspect of one's subject matter in isolation for the sake of its own consistency, all the time knowing that one is occupying oneself only with one of the aspects. We know that a program must be correct and we can study it from that viewpoint only; we also know that it should be efficient and we can study its efficiency on another day, so to speak. In another mood we may ask ourselves whether, and if so: why, the program is desirable. But nothing is gained ?on the contrary!? by tackling these various aspects simultaneously. It is what I sometimes have called "the separation of concerns", which, even if not perfectly possible, is yet the only available technique for effective ordering of one's thoughts, that I know of. This is what I mean by "focussing one's attention upon some aspect": it does not mean ignoring the other aspects, it is just doing justice to the fact that from this aspect's point of view, the other is irrelevant. It is being one- and multiple-track minded simultaneously. """ So, "code should be easy to reason about". Now, let us look at this function - I am here (mostly) following the Google Python style guide (https://google.github.io/styleguide/pyguide.html) for now: === Example 1, original form === def middle_mean(xs): """Compute the average of the nonterminal elements of `xs`. Args: `xs`: a list of floating point numbers. Returns: A float, the mean of the elements in `xs[1:-1]`. Raises: ValueError: If `len(xs) < 3`. """ if len(xs) < 3: raise ValueError('Need at least 3 elements to compute middle mean.') return sum(xs[1:-1]) / (len(xs) - 2) ====== Let's not discuss performance, or whether it makes sense to readily generalize this to operate on other sequences than lists, but focus, following Dijkstra, on one specific concern here: Guaranteed properties. Given the function as it is above, I can make statements that are found to be correct when reasoning with mathematical rigor, such as this specific one that we will come back to: === Theorem 1 === If we have an object X that satisfies these properties...: 1. type(X) is list 2. len(X) == 4 3. all(type(x) is float for x in X) ...then we are guaranteed that `middle_mean(X)` evaluates to a value Y which satisfies: - type(Y) is float - Y == (X[1] + X[2]) * 0.5 or math.isnan(Y) === Now, following PEP-484, we would want to re-write our function, adding type annotations. Doing this mechanically would give us: === Example 1, with mechanically added type information === def middle_mean(xs: List[float]) -> float: """Compute the average of the nonterminal elements of `xs`. Args: `xs`: a list of floating point numbers. Returns: A float, the mean of the elements in `xs[1:-1]`. Raises: ValueError: If `len(xs) < 3`. """ if len(xs) < 3: raise ValueError('Need at least 3 elements to compute middle mean.') return sum(xs[1:-1]) / (len(xs) - 2) ====== (We are also deliberately not discussing another question here: given this documentation and type annotation, should the callee be considered to be permitted to mutate the input list?) So, given the above form, we now find that there seems to be quite a bit of redundancy here. After all, we have the type annotation but also repeat some typing information in the docstring. Hence, the obvious proposal here is to re-write the above definition again, obtaining: === Example 1, "cleaned up" === def middle_mean(xs: List[float]) -> float: """Compute the average of the nonterminal elements of `xs`. Args: `xs`: numbers to average, with terminals ignored. Returns: The mean of the elements in `xs[1:-1]`. Raises: ValueError: If `len(xs) < 3`. """ if len(xs) < 3: raise ValueError('Need at least 3 elements to compute middle mean.') return sum(xs[1:-1]) / (len(xs) - 2) ====== But now, what does this change mean for the contract? Part of the "If arguments have these properties, then these are the guarantees" contract now is no longer spelled out by the docstring, but via type annotations. We naturally would expect this to be straightforward, so, we would like to have: === Theorem 1b === If we have an object X that satisfies these properties...: 1. Static type analysis tells us that X has the appropriate type for being passed into middle_mean(). 2. len(X) == 4 ...then we are guaranteed that `middle_mean(X)` evaluates to a value Y which satisfies: - Static type analysis can tell us that this value is a float - Y == (X[1] + X[2]) * 0.5 or math.isnan(Y) === ...but the actual situation is: a) This is not guaranteed. b) PEP-484 does not seem to leave us any option to amend the type annotation so that we can obtain a corresponding guarantee. Specifically, this Python3+ example breaks it - note that PEP-484 states that: "when an argument is annotated as having type float, an argument of type int is acceptable". >>> middle_mean([0.0, 1.25, 10**1000, 0.0]) Traceback (most recent call last): File "", line 1, in File "", line 15, in middle_mean OverflowError: int too large to convert to float So, even the "this function call evaluates to..." is violated here - it does not evaluate to anything, but raises an exception instead. One option to address this would be to stick with the code as in [Example 1, with mechanically added type information], but I would argue that it is highly confusing that `float` in the static type annotation and `float` in the docstring then refer to two very different concepts. This is certainly not desirable (and we should not expect Python practitioners to do it that way)! Now, while this may superficially look like a weird edge case, that is actually not so - the problem is that such mismatches in some situations "allow us to drive in a wedge" and create conditions where there is a deviation between actual and expected program behavior. This is a common starting point for writing exploits, as for example these classic articles nicely illustrate: "Smashing The Stack For Fun And Profit" (aleph1 at underground.org, Phrack #49) (E.g.: https://inst.eecs.berkeley.edu/~cs161/fa08/papers/stack_smashing.pdf) "Delivering Signals for Fun and Profit" (Michal Zalewski) (E.g.: https://lcamtuf.coredump.cx/signals.txt) CAPEC-71: Using Unicode Encoding to Bypass Validation Logic https://capec.mitre.org/data/definitions/71.html So, clearly, we want to not only maintain the ability to reason about the behavior of Python code with mathematical stringency, but also make this reasonably simple and straightforward. I would also argue that, given the popularity of Python as a CS education language, it matters that professors have a viable substrate for teaching the skill to stringently reason about the behavior of code. ---------- messages: 416814 nosy: tfish2 priority: normal severity: normal status: open title: PEP-484 "numeric tower" approach makes it hard/impossible to specify contracts in documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 5 18:46:09 2022 From: report at bugs.python.org (Mariatta) Date: Tue, 05 Apr 2022 22:46:09 +0000 Subject: [New-bugs-announce] [issue47235] Clarify that `assret_called_once_with` sample code is intended typo Message-ID: <1649198769.94.0.805026141496.issue47235@roundup.psfhosted.org> New submission from Mariatta : In unittest.mock documentation, there is an example code which intentionally contains typo. Source: https://github.com/python/cpython/blame/main/Doc/library/unittest.mock.rst#L2553 We've received quite a number of false "bug report" regarding this text. Basically people saw the sample code containing `assret` then they rushed to create an issue/PR, before actually reading the rest of the section. This typo was intentionally placed there, so it should not be fixed. However since this is definitely confusing to readers, perhaps the documentation should be improved. On Discord, Brandt suggested to add a comment on the sample code like: ``` # Intended typo! ``` so hopefully people will stop trying to fix it. Previous false "bug reports": bpo-35789 bpo-38700 ---------- assignee: docs at python components: Documentation messages: 416826 nosy: Mariatta, docs at python priority: normal severity: normal stage: needs patch status: open title: Clarify that `assret_called_once_with` sample code is intended typo versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 5 19:22:06 2022 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 Apr 2022 23:22:06 +0000 Subject: [New-bugs-announce] [issue47236] Document types.CodeType.replace() changes about co_exceptiontable Message-ID: <1649200926.89.0.78220733937.issue47236@roundup.psfhosted.org> New submission from STINNER Victor : It would be nice to document the bpo-40222 changes in What's New in Python 3.11 and in the CodeType documentation: * https://docs.python.org/dev/library/types.html#types.CodeType * https://docs.python.org/dev/whatsnew/3.11.html Users of types.CodeType.replace(co_code=new_code) must now pass co_exceptiontable or exception handling will no longer work as expected. Callers are responsible to build co_exceptiontable. Currently, the format of this table is documented at: https://github.com/python/cpython/blob/main/Objects/exception_handling_notes.txt There is no public function to encode this table, it's also the responsibility of the caller. See also bpo-47185 "code.replace(co_code=new_code) no longer catch exceptions on Python 3.11" closed as "won't fix" for the background. ---------- assignee: docs at python components: Documentation messages: 416831 nosy: docs at python, vstinner priority: normal severity: normal status: open title: Document types.CodeType.replace() changes about co_exceptiontable versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 6 04:41:16 2022 From: report at bugs.python.org (Daniel Draper) Date: Wed, 06 Apr 2022 08:41:16 +0000 Subject: [New-bugs-announce] [issue47237] Inheritance from Protocol with property in dataclass makes them non-instantiatable Message-ID: <1649234476.2.0.0289467757353.issue47237@roundup.psfhosted.org> New submission from Daniel Draper : Hi, According to https://peps.python.org/pep-0544/#explicitly-declaring-implementation it should be possible to explicitly inherit from Protocols. This however breaks the dataclass constructor when using the @property decorator in the protocol, see this example: ```python from typing import Protocol from dataclasses import dataclass class SomeProtocol(Protocol): @property def some_value(self) -> str: ... @dataclass class SomeDataclasss(SomeProtocol): some_value: str if __name__ == '__main__': a = SomeDataclasss(some_value="value") # this crashes with AttributeError: can't set attribute 'some_value' ``` The pattern of @property in the protocol is one taken from the mypy docs (see https://mypy.readthedocs.io/en/stable/protocols.html#recursive-protocols for example). When removing the explicit inheritiance mypy also correctly typechecks the dataclass implementation when doing something like, only the explicit inheritance seems to fail in python ```python a: SomeProtocol = SomeDataclass() ``` ---------- components: Library (Lib) messages: 416846 nosy: Germandrummer92 priority: normal severity: normal status: open title: Inheritance from Protocol with property in dataclass makes them non-instantiatable type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 6 06:19:09 2022 From: report at bugs.python.org (Aleksandr) Date: Wed, 06 Apr 2022 10:19:09 +0000 Subject: [New-bugs-announce] [issue47238] Python threading.Event().wait() depends on the system time Message-ID: <1649240349.24.0.663702230761.issue47238@roundup.psfhosted.org> New submission from Aleksandr : This happens on Ubuntu on Python versions 3.8.5 and 3.10.4 I have two threads that can change the system time to a day ago. If the change in the system time for a day occurs at the time of wait, then I hang for one day plus the waiting time. I thought Event.wait() uses a monotonous clock, but this behavior points to an absolute clock. Are there any solutions? ---------- components: Library (Lib) files: reproduction.py messages: 416851 nosy: AleksandrAQ priority: normal severity: normal status: open title: Python threading.Event().wait() depends on the system time type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file50725/reproduction.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 6 07:03:19 2022 From: report at bugs.python.org (Dutcho) Date: Wed, 06 Apr 2022 11:03:19 +0000 Subject: [New-bugs-announce] [issue47239] Python Launcher for Windowscd \ Message-ID: <1649242999.58.0.197722613352.issue47239@roundup.psfhosted.org> Change by Dutcho : ---------- components: Windows nosy: Dutcho, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Python Launcher for Windowscd \ versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 6 07:08:59 2022 From: report at bugs.python.org (Sergey Fedorov) Date: Wed, 06 Apr 2022 11:08:59 +0000 Subject: [New-bugs-announce] [issue47240] Python 3.x built for ppc+ppc64 errs on: No module named 'msvcrt', '_posixsubprocess' Message-ID: <1649243339.36.0.0104612880177.issue47240@roundup.psfhosted.org> New submission from Sergey Fedorov : While adding definitions for additional universal binary option (ppc+ppc64) is rather straightforward (following already existing examples in the source code), and Python 3.x after patching do build as universal for named two arch, trying to install any python modules fail on the following: ``` ---> Building py39-curl Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 73, in import msvcrt ModuleNotFoundError: No module named 'msvcrt' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-curl/py39-curl/work/pycurl-7.44.1/setup.py", line 11, in import glob, os, re, sys, subprocess File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 78, in import _posixsubprocess ModuleNotFoundError: No module named '_posixsubprocess' Command failed: /opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 setup.py docstrings Exit code: 1 ``` Separately both ppc and ppc64 are totally fine, they build and work, but not together. At the same time `python27` after a similar patch builds as universal (ppc+ppc64) and works normally. So the problem somehow arises on 3.x versions. P. S. I am aware that Darwin PowerPC is an interest for very few users and even fewer developers, so I do not expect the upstream to fix this in the code. However I will greatly appreciate any advice which may point to what I should fix on my end. If I can fix Pythons for ppc+ppc64, it will benefit Macports users, among whom there are people using Leopard actively. Relevant ticket on Macports: https://trac.macports.org/ticket/64916 Such fix may also benefit Linux PPC users on G5 machines. I request moderators not to dismiss & close the issue, if possible. We don?t have Python experts on Macports, and all fixes for PowerPC are done by very few enthusiasts. ---------- components: macOS messages: 416857 nosy: barracuda156, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Python 3.x built for ppc+ppc64 errs on: No module named 'msvcrt', '_posixsubprocess' type: compile error versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 6 09:56:37 2022 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 Apr 2022 13:56:37 +0000 Subject: [New-bugs-announce] [issue47241] [C API] Move the PyCodeObject structure to the internal C API (make the structure opaque) Message-ID: <1649253397.09.0.174681566447.issue47241@roundup.psfhosted.org> New submission from STINNER Victor : The PyCodeObject structure is documented at: https://docs.python.org/dev/c-api/code.html The structured evolved a lot in Python 3.11 to optimize Python/ceval.c performance: * read-only co_code (object) was replaced with modifiable co_code_adaptive (char[]) * co_varnames, co_freevars and co_cellvars were removed: merged into co_localsplusnames with co_localspluskinds * co_cell2arg was removed * co_zombieframe ("free list") was removed * co_opcache, co_opcache_map, co_opcache_flag and co_opcache_size were removed: see PEP 659 https://peps.python.org/pep-0659/ New members: * co_exceptiontable * co_warmup, co_code_adaptive * co_nlocalsplus, co_nplaincellvars, co_ncellvars, co_nfreevars * co_localsplusnames, co_localspluskinds * co_qualname * co_endlinetable, co_columntable The PyCodeObject structure should be made opaque in the public C API and only accessed with function calls. In Python 3.11, the PyFrameObject structure was made opaque (bpo-46836) and multiple getters were added (bpo-40421). The idea is similar, but it might be too late to do that in Python 3.11 (beta1 feature freeze is close). --- By the way, it was proposed multiple times on python-dev to mark the PyCode_New() function as "unstable" since its API changed often. PEP 670 "Python Positional-Only Parameters" caused a lot of troubles in Cython when it added a new parameter to PyCode_New(). The change was reverted: instead, a new PyCode_NewWithPosOnlyArgs() function was added. * PyCode_New() has 19 parameters! * PyCode_NewWithPosOnlyArgs() has 20 parameters!! On Python 3.11a1 and newer, Cython uses the code.replace() method (added to Python 3.8) to build new code objects. Otherwise, it just calls directly PyCode_New(). https://docs.python.org/dev/library/types.html#types.CodeType.replace ---------- components: C API messages: 416869 nosy: vstinner priority: normal severity: normal status: open title: [C API] Move the PyCodeObject structure to the internal C API (make the structure opaque) versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 6 12:20:04 2022 From: report at bugs.python.org (antudic) Date: Wed, 06 Apr 2022 16:20:04 +0000 Subject: [New-bugs-announce] [issue47242] Annoying white bar in IDLE (line 457 in sidebar.py) Message-ID: <1649262004.92.0.683235384715.issue47242@roundup.psfhosted.org> New submission from antudic : I noticed there was a white bar to the left in my IDLE when I upgraded to 3.10, it stuck out like a soar thumb since I have a custom dark theme. This was not an issue with earlier versions. After scouring through the code I found the perpetrator to be a "padx=2" in sidebar.py on line 457. Changing this value from "2" to "0" fixes this issue. Changing this line of code solves this issue and leaves the color choices up to the user, as intended. ---------- assignee: terry.reedy components: IDLE messages: 416883 nosy: antudic, terry.reedy priority: normal severity: normal status: open title: Annoying white bar in IDLE (line 457 in sidebar.py) type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 6 13:23:31 2022 From: report at bugs.python.org (LiarPrincess) Date: Wed, 06 Apr 2022 17:23:31 +0000 Subject: [New-bugs-announce] [issue47243] Duplicate entry in 'Objects/unicodetype_db.h' Message-ID: <1649265811.35.0.201706038285.issue47243@roundup.psfhosted.org> New submission from LiarPrincess : This one is so tiny that I'm not really sure we want to merge it? === Problem === `Objects/unicodetype_db.h` starts in a following way: ```c /* a list of unique character type descriptors */ const _PyUnicode_TypeRecord _PyUnicode_TypeRecords[] = { {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 32}, {0, 0, 0, 0, 0, 48}, ? ``` The 1st record (`{0, 0, 0, 0, 0, 0}`) is duplicated. This is not a problem, since the 1st occurrence is never used, but if we wanted to remove it then this is the ticket about it. === Detailed description === `Objects/unicodetype_db.h` is generated by `Tools/unicode/makeunicodedata.py` (I removed irrelevant lines): ```py def makeunicodetype(unicode, trace): dummy = (0, 0, 0, 0, 0, 0) table = [dummy] # (1) cache = {0: dummy} # (2) for char in unicode.chars: # Things? item = (upper, lower, title, decimal, digit, flags) i = cache.get(item) # (3) if i is None: cache[item] = i = len(table) table.append(item) index[char] = i ``` - (1) - list which contains unique character properties (as `(upper, lower, title, decimal, digit, flags)` tuples) - (2) - mapping from character properties to index in `table` - improperly initialized as a mapping from index to character properties - (3) - we check if the current tuple is in `cache` === Result === The first time we get to a character that has `(0, 0, 0, 0, 0, 0)` properties (which is code point 0 - `NULL`) we check if it is in cache. It it not (there is an entry that goes from index `0` to `(0, 0, 0, 0, 0, 0)` - the other way around), so we add this entry to `table` and `cache`. === Fix === In the line `(2)` we should have: `cache = {dummy: 0}`. Obviously after doing so we have to run `makeunicodedata.py` - this is why this simple change modifies a lot of lines. I will submit PR on github in just a sec? ---------- components: Unicode messages: 416889 nosy: LiarPrincess, ezio.melotti, vstinner priority: normal severity: normal status: open title: Duplicate entry in 'Objects/unicodetype_db.h' type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 6 13:45:12 2022 From: report at bugs.python.org (Alec Rosenbaum) Date: Wed, 06 Apr 2022 17:45:12 +0000 Subject: [New-bugs-announce] [issue47244] email.utils.formataddr does not respect double spaces Message-ID: <1649267112.95.0.680497304101.issue47244@roundup.psfhosted.org> New submission from Alec Rosenbaum : It seems that `email.utils.formataddr` and `email.utils.parseaddr` are not directly inverse from each other, because `formataddr` does not respect double spaces within the "realname" section. For example: ``` from email.utils import formataddr, parseaddr identity = '"foo bar" ' print(formataddr(parseaddr(identity))) # 'foo bar ' print(formataddr(parseaddr(formataddr(parseaddr(identity))))) # 'foo bar ' ``` The first round trip strips the quotes, and the second round trip strips the double space in the "realname" section. The utility function only seems to check for special characters, but it should also check for double spaces. ---------- components: email messages: 416891 nosy: AlecRosenbaum, barry, r.david.murray priority: normal severity: normal status: open title: email.utils.formataddr does not respect double spaces type: behavior 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 Apr 6 16:24:52 2022 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Wed, 06 Apr 2022 20:24:52 +0000 Subject: [New-bugs-announce] [issue47245] Subprocess with vfork() is broken Message-ID: <1649276692.67.0.496676014466.issue47245@roundup.psfhosted.org> New submission from ???? ????????? : Using vfork in #35823 is VERY tricky. Please comment out vfork() usage for now. Yes, we can (should) use vfork(), but we have to rewrite the child code. https://bugzilla.kernel.org/show_bug.cgi?id=215813 I would say it's URGENT. ---------- components: Extension Modules messages: 416897 nosy: socketpair priority: normal severity: normal status: open title: Subprocess with vfork() is broken versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 7 04:44:47 2022 From: report at bugs.python.org (Dieter Maurer) Date: Thu, 07 Apr 2022 08:44:47 +0000 Subject: [New-bugs-announce] [issue47246] Race condition in `threadig.Thread._wait_for_tstate_lock` Message-ID: <1649321087.35.0.157706510591.issue47246@roundup.psfhosted.org> New submission from Dieter Maurer : I have observed an `AssertionError (assert self._is_stopped)` in `threading.Thread._wait_for_tstate_lock`. This indicates that Python's internal state has been corrupted. The analysis revealed the following race condition: `_wait_for_tstate:lock` contains the code: ``` lock.release() self._stop() ``` The `lock.release()` allows a conflicting call to execute. If this happens before `self._stop()` has executed `self._is_stopped = True`, the `AssertionError` is raised. I suggest to give `_stop` an additional parameter `locked` with default `False`. In indicates whether the caller holds the `tstate_lock`. If this is the case, `_stop` releases the lock after it has ensured a consistent state (esspecially set `_is_stopped` to `True`). With this modification to `_stop` the two lines above can be replaced by `self._stop(locked=True)`. ---------- components: Library (Lib) messages: 416919 nosy: dmaurer priority: normal severity: normal status: open title: Race condition in `threadig.Thread._wait_for_tstate_lock` type: behavior versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 7 05:52:37 2022 From: report at bugs.python.org (Aidan Woolley) Date: Thu, 07 Apr 2022 09:52:37 +0000 Subject: [New-bugs-announce] [issue47247] Default arguments for access 'mode' parameters in pathlib and os should display as octal literals Message-ID: <1649325157.18.0.197038999405.issue47247@roundup.psfhosted.org> New submission from Aidan Woolley : E.g. 0o777 rather than 511 This is a regression since the docs for 3.9 Affected functions/methods: pathlib.Path.mkdir pathlib.Path.touch os.open os.mkdir os.makedirs os.mkfifo os.mknod ---------- assignee: docs at python components: Documentation messages: 416921 nosy: AidanWoolley, docs at python priority: normal severity: normal status: open title: Default arguments for access 'mode' parameters in pathlib and os should display as octal literals type: enhancement versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 7 07:30:33 2022 From: report at bugs.python.org (Mark Shannon) Date: Thu, 07 Apr 2022 11:30:33 +0000 Subject: [New-bugs-announce] [issue47248] Possible slowdown of regex searching in 3.11 Message-ID: <1649331033.49.0.157065067689.issue47248@roundup.psfhosted.org> New submission from Mark Shannon : The 3 regular expression benchmarks in the pyperformance suite, regex_v8, regex_effbot and regex_dna show slowdowns between 3% and 10%. Looking at the stats, nothing seems wrong with specialization or the memory optimizations. Which strongly suggests a regression in the sre module itself, but I can't say so for certain. ---------- keywords: 3.11regression messages: 416923 nosy: Mark.Shannon priority: normal severity: normal status: open title: Possible slowdown of regex searching in 3.11 type: performance versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 7 09:41:52 2022 From: report at bugs.python.org (tongxiaoge) Date: Thu, 07 Apr 2022 13:41:52 +0000 Subject: [New-bugs-announce] [issue47249] test_multiprocessing_fork probabilistic failure Message-ID: <1649338912.69.0.915707675531.issue47249@roundup.psfhosted.org> New submission from tongxiaoge : This problem is probabilistic. I run Python3 all test cases on OBS. In recent months, there have been about three times that the test cases hang on probabilistically. The current version with problems is 3.10.2, this problem has also appeared in 3.10.0 and 3.9.9. ---------- components: Tests files: test hang on.png messages: 416926 nosy: sxt1001 priority: normal severity: normal status: open title: test_multiprocessing_fork probabilistic failure type: behavior versions: Python 3.10, Python 3.11, Python 3.9 Added file: https://bugs.python.org/file50726/test hang on.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 7 10:56:51 2022 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Apr 2022 14:56:51 +0000 Subject: [New-bugs-announce] [issue47250] Add object.__getstate__() introduced a refleak Message-ID: <1649343411.93.0.530563428982.issue47250@roundup.psfhosted.org> New submission from STINNER Victor : The following change introduced reference leaks: --- commit 884eba3c76916889fd6bff3b37b8552bfb4f9566 Author: Serhiy Storchaka Date: Wed Apr 6 20:00:14 2022 +0300 bpo-26579: Add object.__getstate__(). (GH-2821) Copying and pickling instances of subclasses of builtin types bytearray, set, frozenset, collections.OrderedDict, collections.deque, weakref.WeakSet, and datetime.tzinfo now copies and pickles instance attributes implemented as slots. --- Example of buildbot failure. AMD64 RHEL8 Refleaks 3.x: https://buildbot.python.org/all/#builders/259/builds/355 14 tests failed: test_bytes test_copy test_datetime test_deque test_descr test_distutils test_minidom test_ordered_dict test_pickle test_set test_shutil test_tarfile test_typing test_weakset Example of leak: $ ./python -m test -R 3:3 test_descr -m test_issue24097 (...) beginning 6 repetitions 123456 ...... test_descr leaked [1, 1, 1] references, sum=3 test_descr failed (reference leak) (...) ---------- components: Interpreter Core messages: 416930 nosy: corona10, erlendaasland, pablogsal, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Add object.__getstate__() introduced a refleak versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 7 15:10:15 2022 From: report at bugs.python.org (Pieter Eendebak) Date: Thu, 07 Apr 2022 19:10:15 +0000 Subject: [New-bugs-announce] [issue47251] Merge BINARY_SUBSCR_LIST_INT with BINARY_SUBSCR_LIST_TUPLE Message-ID: <1649358615.39.0.761940609811.issue47251@roundup.psfhosted.org> New submission from Pieter Eendebak : The implementations of BINARY_SUBSCR_LIST_INT and BINARY_SUBSCR_TUPLE_INT are almost identical. They can be merged, so there is one opcode less and the code is shared. ---------- components: Interpreter Core messages: 416937 nosy: pieter.eendebak priority: normal severity: normal status: open title: Merge BINARY_SUBSCR_LIST_INT with BINARY_SUBSCR_LIST_TUPLE versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 7 16:52:44 2022 From: report at bugs.python.org (Alon Menczer) Date: Thu, 07 Apr 2022 20:52:44 +0000 Subject: [New-bugs-announce] [issue47252] socket.makefile documentation is missing data regarding the 'buffering' parameter Message-ID: <1649364764.73.0.205203720334.issue47252@roundup.psfhosted.org> New submission from Alon Menczer : The documentation of the socket.makefile method is missing data regarding the behavior of the `buffering` parameter. ---------- assignee: docs at python components: Documentation messages: 416943 nosy: alon.menczer, docs at python priority: normal severity: normal status: open title: socket.makefile documentation is missing data regarding the 'buffering' parameter 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 Thu Apr 7 17:05:52 2022 From: report at bugs.python.org (15r10nk) Date: Thu, 07 Apr 2022 21:05:52 +0000 Subject: [New-bugs-announce] [issue47253] LOAD_GLOBAL instruction with wrong source position Message-ID: <1649365552.36.0.995574813482.issue47253@roundup.psfhosted.org> New submission from 15r10nk <15r10nk-python-issues at polarbit.de>: The LOAD_GLOBAL instruction has a different/wrong source position if it refers the name of an imported module. ---------- files: test3.py messages: 416945 nosy: 15r10nk priority: normal severity: normal status: open title: LOAD_GLOBAL instruction with wrong source position type: behavior versions: Python 3.11 Added file: https://bugs.python.org/file50727/test3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 7 18:21:22 2022 From: report at bugs.python.org (apostofes) Date: Thu, 07 Apr 2022 22:21:22 +0000 Subject: [New-bugs-announce] [issue47254] enhanced dir? Message-ID: <1649370082.57.0.519891152305.issue47254@roundup.psfhosted.org> New submission from apostofes : current dir gives output like this, ``` from collection import OrderedDict od = OrderedDict({'a': 1, 'b': 2, 'c': 3}) print(dir(od)) ``` ``` ['__class__', '__contains__', '__delattr__', '__delitem__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'clear', 'copy', 'fromkeys', 'get', 'items', 'keys', 'move_to_end', 'pop', 'popitem', 'setdefault', 'update', 'values'] ``` but wouldn't it be better if the output was like this, ``` {'OrderedDict': {'__contains__', '__delitem__', '__dir__', '__eq__', '__format__', '__ge__', '__getitem__', '__gt__', '__init__', '__init_subclass__', '__iter__', '__le__', '__lt__', '__ne__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__setitem__', '__sizeof__', '__subclasshook__', 'clear', 'copy', 'fromkeys', 'get', 'items', 'keys', 'move_to_end', 'pop', 'popitem', 'setdefault', 'update', 'values'}, 'dict': {'__getattribute__', '__len__', '__new__'}, 'object': {'__delattr__', '__setattr__', '__str__'}} ``` ??? ---------- messages: 416948 nosy: apostofes priority: normal severity: normal status: open title: enhanced dir? type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 7 23:13:27 2022 From: report at bugs.python.org (Jelle Zijlstra) Date: Fri, 08 Apr 2022 03:13:27 +0000 Subject: [New-bugs-announce] [issue47255] Many broken :meth: roles in the docs Message-ID: <1649387607.61.0.419587041058.issue47255@roundup.psfhosted.org> New submission from Jelle Zijlstra : The docs for the hash() builtin use :meth:`__hash__`, but this doesn't actually link to the datamodel documentation for __hash__: it needs :meth:`~object.__hash__` instead. I'm fixing this in the builtin functions docs, but there are probably more places. Why don't we warn when a :meth: link doesn't actually create a link? ---------- assignee: docs at python components: Documentation messages: 416956 nosy: JelleZijlstra, docs at python priority: normal severity: normal status: open title: Many broken :meth: roles in the docs versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 8 02:54:08 2022 From: report at bugs.python.org (Ma Lin) Date: Fri, 08 Apr 2022 06:54:08 +0000 Subject: [New-bugs-announce] [issue47256] re: limit the maximum capturing group to 1, 073, 741, 823, reduce sizeof(match_context). Message-ID: <1649400848.85.0.841306262185.issue47256@roundup.psfhosted.org> New submission from Ma Lin : These changes reduce sizeof(match_context): - 32-bit build: 36 bytes, no change. - 64-bit build: 72 bytes -> 56 bytes. sre uses stack and `match_context` struct to simulate recursive call, smaller struct brings: - deeper recursive call - less memory consume - less memory realloc Here is a test, if limit the stack size to 1 GiB, the max available value of n is: re.match(r'(ab)*', n * 'ab') # need to save MARKs 72 bytes: n = 11,184,808 64 bytes: n = 12,201,609 56 bytes: n = 13,421,770 re.match(r'(?:ab)*', n * 'ab') # no need to save MARKs 72 bytes: n = 13,421,770 64 bytes: n = 14,913,078 56 bytes: n = 16,777,213 1,073,741,823 capturing groups should enough for almost all users. If limit it to 16,383 (2-byte integer), the context size may reduce more. But maybe some patterns generated by program will have more than this number of capturing groups. 1??Performance: Before regex_dna: Mean +- std dev: 149 ms +- 1 ms regex_effbot: Mean +- std dev: 2.22 ms +- 0.02 ms regex_v8: Mean +- std dev: 22.3 ms +- 0.1 ms my benchmark[1]: 13.9 sec +- 0.0 sec Commit 1. limit the maximum capture group to 1,073,741,823 regex_dna: Mean +- std dev: 150 ms +- 1 ms regex_effbot: Mean +- std dev: 2.16 ms +- 0.02 ms regex_v8: Mean +- std dev: 22.3 ms +- 0.1 ms my benchmark: 13.8 sec +- 0.0 sec Commit 2. further reduce sizeof(SRE(match_context)) regex_dna: Mean +- std dev: 150 ms +- 1 ms regex_effbot: Mean +- std dev: 2.16 ms +- 0.02 ms regex_v8: Mean +- std dev: 22.2 ms +- 0.1 ms my benchmark: 13.8 sec +- 0.1 sec If further change the types of toplevel/jump from int to char, in 32-bit build sizeof(match_context) will be reduced from 36 to 32 (In 64-bit build still 56). But it's slower on 64-bit build, so I didn't adopt it: regex_dna: Mean +- std dev: 150 ms +- 1 ms regex_effbot: Mean +- std dev: 2.18 ms +- 0.01 ms regex_v8: Mean +- std dev: 22.4 ms +- 0.1 ms my benchmark: 14.1 sec +- 0.0 sec 2?? The type of match_context.count is Py_ssize_t - If change it to 4-byte integer, need to modify some engine code. - If keep it as Py_ssize_t, SRE_MAXREPEAT may >= 4 GiB in future versions. Currently SRE_MAXREPEAT can't >= 4 GiB. So the type of match_context.count is unchanged. [1] My re benchmark, it uses 16 patterns to process 100 MiB text data: https://github.com/animalize/re_benchmarks ---------- components: Library (Lib) messages: 416960 nosy: ezio.melotti, malin, mrabarnett, serhiy.storchaka priority: normal severity: normal status: open title: re: limit the maximum capturing group to 1,073,741,823, reduce sizeof(match_context). type: resource usage versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 8 04:03:40 2022 From: report at bugs.python.org (paul rubin) Date: Fri, 08 Apr 2022 08:03:40 +0000 Subject: [New-bugs-announce] [issue47257] add methods to get first and last elements of a range Message-ID: <1649405020.81.0.958587305451.issue47257@roundup.psfhosted.org> New submission from paul rubin : Inspired by a question on comp.lang.python about how to deal with an int set composed of integers and ranges. Range objects like range(1,5,2) contain start, stop, and step values, but it's messy and potentially tricky to get the actual first and last values of the range. Examples: range(1,5,2) - first = 1, last = 3 range (5, 1, 2) - range is empty, first = last = None range(5, 1, -1) - first is 5, last is 2 Note in the case where the range is not empty, you can get the "last" by a messy calculation but it's easier to pick the first element from the reverse iterator. But then you might forget to catch the stopiteration exception in the case that the list is empty. The same goes for the first element, roughly. And constructing the iterators just to pick one element seems like unnecessary overhead. So it is better to have actual methods for these, with type Optional[int]. Then mypy should remind you to check for the empty case if you forget. ---------- messages: 416962 nosy: phr priority: normal severity: normal status: open title: add methods to get first and last elements of a range type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 8 06:02:05 2022 From: report at bugs.python.org (Richard Purdie) Date: Fri, 08 Apr 2022 10:02:05 +0000 Subject: [New-bugs-announce] [issue47258] Python 3.10 hang at exit in drop_gil() (due to resource warning at exit?) Message-ID: <1649412125.79.0.637229410178.issue47258@roundup.psfhosted.org> New submission from Richard Purdie : We had a python hang at shutdown. The gdb python backtrace and C backtraces are below. It is hung in the COND_WAIT(gil->switch_cond, gil->switch_mutex) call in drop_gil(). Py_FinalizeEx -> handle_system_exit() -> PyGC_Collect -> handle_weakrefs -> drop_gil I think from the stack trace it may have been printing the warning: sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1560250/bitbake-cookerdaemon.log' mode='a+' encoding='UTF-8'> however I'm not sure if it was that or trying to show a different exception. Even if we have a resource leak, it shouldn't really hang! (gdb) py-bt Traceback (most recent call first): File "/usr/lib64/python3.10/weakref.py", line 106, in remove def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref): Garbage-collecting #0 __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f0f7bd54b20 <_PyRuntime+512>) at futex-internal.c:57 #1 __futex_abstimed_wait_common (futex_word=futex_word at entry=0x7f0f7bd54b20 <_PyRuntime+512>, expected=expected at entry=0, clockid=clockid at entry=0, abstime=abstime at entry=0x0, private=private at entry=0, cancel=cancel at entry=true) at futex-internal.c:87 #2 0x00007f0f7b88979f in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word at entry=0x7f0f7bd54b20 <_PyRuntime+512>, expected=expected at entry=0, clockid=clockid at entry=0, abstime=abstime at entry=0x0, private=private at entry=0) at futex-internal.c:139 #3 0x00007f0f7b88beb0 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f0f7bd54b28 <_PyRuntime+520>, cond=0x7f0f7bd54af8 <_PyRuntime+472>) at pthread_cond_wait.c:504 #4 ___pthread_cond_wait (cond=cond at entry=0x7f0f7bd54af8 <_PyRuntime+472>, mutex=mutex at entry=0x7f0f7bd54b28 <_PyRuntime+520>) at pthread_cond_wait.c:619 #5 0x00007f0f7bb388d8 in drop_gil (ceval=0x7f0f7bd54a78 <_PyRuntime+344>, ceval2=, tstate=0x558744ef7c10) at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Python/ceval_gil.h:182 #6 0x00007f0f7bb223e8 in eval_frame_handle_pending (tstate=) at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Python/ceval.c:1185 #7 _PyEval_EvalFrameDefault (tstate=, f=, throwflag=) at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Python/ceval.c:1775 #8 0x00007f0f7bb19600 in _PyEval_EvalFrame (throwflag=0, f=Frame 0x7f0f7a0c8a60, for file /usr/lib64/python3.10/weakref.py, line 106, in remove (wr=, selfref=, _atomic_removal=), tstate=0x558744ef7c10) at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Include/internal/pycore_ceval.h:46 #9 _PyEval_Vector (tstate=, con=, locals=, args=, argcount=1, kwnames=) at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Python/ceval.c:5065 #10 0x00007f0f7bb989a8 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=9223372036854775809, args=0x7fff8b815bc8, callable=, tstate=0x558744ef7c10) at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Include/cpython/abstract.h:114 #11 PyObject_CallOneArg (func=, arg=) at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Include/cpython/abstract.h:184 #12 0x00007f0f7bb0fce1 in handle_weakrefs (old=0x558744edbd30, unreachable=0x7fff8b815c70) at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Modules/gcmodule.c:887 #13 gc_collect_main (tstate=0x558744ef7c10, generation=2, n_collected=0x7fff8b815d50, n_uncollectable=0x7fff8b815d48, nofail=0) at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Modules/gcmodule.c:1281 #14 0x00007f0f7bb9194e in gc_collect_with_callback (tstate=tstate at entry=0x558744ef7c10, generation=generation at entry=2) at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Modules/gcmodule.c:1413 #15 0x00007f0f7bbc827e in PyGC_Collect () at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Modules/gcmodule.c:2099 #16 0x00007f0f7bbc7bc2 in Py_FinalizeEx () at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Python/pylifecycle.c:1781 #17 0x00007f0f7bbc7d7c in Py_Exit (sts=0) at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Python/pylifecycle.c:2858 #18 0x00007f0f7bbc4fbb in handle_system_exit () at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Python/pythonrun.c:775 #19 0x00007f0f7bbc4f3d in _PyErr_PrintEx (set_sys_last_vars=1, tstate=0x558744ef7c10) at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Python/pythonrun.c:785 #20 PyErr_PrintEx (set_sys_last_vars=1) at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Python/pythonrun.c:880 #21 0x00007f0f7bbbcece in PyErr_Print () at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Python/pythonrun.c:886 #22 _PyRun_SimpleFileObject (fp=, filename=, closeit=1, flags=0x7fff8b815f18) at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Python/pythonrun.c:462 #23 0x00007f0f7bbbcc57 in _PyRun_AnyFileObject (fp=0x558744ed9370, filename='/home/pokybuild/yocto-worker/oe-selftest-fedora/build/bitbake/bin/bitbake', closeit=1, flags=0x7fff8b815f18) at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Python/pythonrun.c:90 #24 0x00007f0f7bbb9e44 in pymain_run_file_obj (skip_source_first_line=0, filename='/home/pokybuild/yocto-worker/oe-selftest-fedora/build/bitbake/bin/bitbake', program_name='python3') at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Modules/main.c:353 #25 pymain_run_file (config=0x558744edbe30) at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Modules/main.c:372 #26 pymain_run_python (exitcode=0x7fff8b815f10) at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Modules/main.c:587 #27 Py_RunMain () at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Modules/main.c:666 #28 0x00007f0f7bb8670d in Py_BytesMain (argc=, argv=) at /usr/src/debug/python3.10-3.10.4-1.fc35.x86_64/Modules/main.c:720 #29 0x00007f0f7b82c560 in __libc_start_call_main (main=main at entry=0x558743bfd160
, argc=argc at entry=5, argv=argv at entry=0x7fff8b816168) at ../sysdeps/nptl/libc_start_call_main.h:58 #30 0x00007f0f7b82c60c in __libc_start_main_impl (main=0x558743bfd160
, argc=5, argv=0x7fff8b816168, init=, fini=, rtld_fini=, stack_end=0x7fff8b816158) at ../csu/libc-start.c:409 #31 0x0000558743bfd095 in _start () ---------- components: Interpreter Core messages: 416968 nosy: rpurdie priority: normal severity: normal status: open title: Python 3.10 hang at exit in drop_gil() (due to resource warning at exit?) versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 8 06:31:59 2022 From: report at bugs.python.org (Pierre Ossman) Date: Fri, 08 Apr 2022 10:31:59 +0000 Subject: [New-bugs-announce] [issue47259] string sorting often incorrect Message-ID: <1649413919.78.0.3890118506.issue47259@roundup.psfhosted.org> New submission from Pierre Ossman : There is a big gotcha in Python that is easily overlooked and should at the very least be more prominently pointed out in the documentation. Sorting strings will produce results that is very confusing for humans. I happens to work for ASCII, but will generally produce bad results for other things as code points do not always follow the alphabetical order. The expressions chapter? mentions this fact, but you have to dig quite a bit to reach that. It also mentions that normalization is an issue, but it never mentions the issue about code point order versus alphabetical order. The sorting tutorial mentions under "Odds and ends"? that you need to use a special key or comparison function to get locale aware sorting. It doesn't mention that this also includes respecting alphabetical order, which might be overlooked unless you are very familiar with how the sorting works. The tutorial is also something you have to dig a bit to reach. Ideally string comparison would always be locale aware in a high level language such as Python. However, a smaller step would be a note on sorted()? that extra care needs to be taken for strings as the default behaviour will produce unexpected results once your strings include anything outside the English alphabet. ? https://docs.python.org/3/reference/expressions.html ? https://docs.python.org/3/howto/sorting.html#odd-and-ends ? https://docs.python.org/3/library/functions.html#sorted ---------- components: Interpreter Core messages: 416972 nosy: CendioOssman priority: normal severity: normal status: open title: string sorting often incorrect _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 8 10:29:30 2022 From: report at bugs.python.org (Alexey Izbyshev) Date: Fri, 08 Apr 2022 14:29:30 +0000 Subject: [New-bugs-announce] [issue47260] os.closerange() can be no-op in a seccomp sandbox Message-ID: <1649428170.19.0.996694042165.issue47260@roundup.psfhosted.org> New submission from Alexey Izbyshev : After #40422 _Py_closerange() assumes that close_range() closes all file descriptors even if it returns an error (other than ENOSYS): if (close_range(first, last, 0) == 0 || errno != ENOSYS) { /* Any errors encountered while closing file descriptors are ignored; * ENOSYS means no kernel support, though, * so we'll fallback to the other methods. */ } else /* fallbacks */ This assumption can be wrong on Linux if a seccomp sandbox denies the underlying syscall, pretending that it returns EPERM or EACCES. In this case _Py_closerange() won't close any descriptors at all, which in the worst case can be a security issue. I propose to fix this by falling back to other methods in case of *any* close_range() error. Note that fallbacks will not be triggered on any problems with closing individual file descriptors because close_range() is documented to ignore such errors on both Linux[1] and FreeBSD[2]. [1] https://man7.org/linux/man-pages/man2/close_range.2.html [2] https://www.freebsd.org/cgi/man.cgi?query=close_range&sektion=2 ---------- assignee: izbyshev components: Library (Lib) keywords: 3.10regression messages: 416986 nosy: gregory.p.smith, izbyshev, kevans, kevans91 priority: normal severity: normal status: open title: os.closerange() can be no-op in a seccomp sandbox type: behavior versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 8 11:14:46 2022 From: report at bugs.python.org (Rohit Goswami) Date: Fri, 08 Apr 2022 15:14:46 +0000 Subject: [New-bugs-announce] [issue47261] RFC: Clarify Limited API macros for PySequence_Fast Message-ID: <1649430886.06.0.551635302311.issue47261@roundup.psfhosted.org> New submission from Rohit Goswami : The `current documentation`_ of the Python-C API mentions that ``PySequence_Fast`` is part of the limited API. However, this may be a typo as all the functions interacting with a ``PySequence_Fast`` object are macros, e.g. `PySequence_Fast_GET_SIZE`, `PySequence_Fast_GET_ITEM` etc. If this is indeed a documentation bug I'm happy to open a PR to fix this once consensus is reached. .. _`current documentation` : https://docs.python.org/3/c-api/stable.html#contents-of-limited-api ---------- messages: 416989 nosy: rgoswami priority: normal severity: normal status: open title: RFC: Clarify Limited API macros for PySequence_Fast _______________________________________ Python tracker _______________________________________ From github at mg.python.org Sun Apr 10 15:37:17 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 10 Apr 2022 19:37:17 +0000 Subject: [New-bugs-announce] [Issue 91420] Test issue Message-ID: <20220410193717.5db57222ba94b256@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 10 16:27:33 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 10 Apr 2022 20:27:33 +0000 Subject: [New-bugs-announce] [Issue 91421] Improve size validation in _Py_DecodeUTF8Ex Message-ID: <20220410202733.716f775cbb61068f@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 10 16:41:48 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 10 Apr 2022 20:41:48 +0000 Subject: [New-bugs-announce] [Issue 91423] Update Doc/bugs.rst Message-ID: <20220410204148.db2663fc713680ed@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 10 16:48:36 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 10 Apr 2022 20:48:36 +0000 Subject: [New-bugs-announce] [Issue 91424] reference to the previous issue tracker in the main readme Message-ID: <20220410204836.ee42ebdf959d6225@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 10 18:09:02 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 10 Apr 2022 22:09:02 +0000 Subject: [New-bugs-announce] [Issue 91427] Out-of-date links to Python 3 docs from docs.python.org/2 Message-ID: <20220410220902.a7f8c241c04b8207@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 10 18:09:44 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 10 Apr 2022 22:09:44 +0000 Subject: [New-bugs-announce] [Issue 91428] Add opname array to `opcode.h` of debug builds. Message-ID: <20220410220944.d0c53060f16afeeb@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 10 18:43:19 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 10 Apr 2022 22:43:19 +0000 Subject: [New-bugs-announce] [Issue 91431] Docs for `re` inaccurately indicate support for non-capturing inline modifiers Message-ID: <20220410224319.2f608af6db45e1f4@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 10 19:28:16 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 10 Apr 2022 23:28:16 +0000 Subject: [New-bugs-announce] [Issue 91432] Replace JUMP+FOR_ITER with FOR_END Message-ID: <20220410232816.c7792154adb1ddb3@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 10 19:39:24 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 10 Apr 2022 23:39:24 +0000 Subject: [New-bugs-announce] [Issue 91433] selectors' closing behaviors completely inconsistent across selector types Message-ID: <20220410233924.c16f2a9482142d31@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 11 02:50:28 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 11 Apr 2022 06:50:28 +0000 Subject: [New-bugs-announce] [Issue 91437] Some after-migration messages are semi-attributed to mannequins Message-ID: <20220411065028.9596298a3fb5cc60@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 11 04:16:43 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 11 Apr 2022 08:16:43 +0000 Subject: [New-bugs-announce] [Issue 91438] list.extend() by map does not work Message-ID: <20220411081643.cd971c068e643bc2@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 11 04:35:17 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 11 Apr 2022 08:35:17 +0000 Subject: [New-bugs-announce] [Issue 91440] Syntax for aliases to keys of python dictionaries Message-ID: <20220411083517.5aff48a16cf7daf9@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 11 04:47:10 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 11 Apr 2022 08:47:10 +0000 Subject: [New-bugs-announce] [Issue 91441] Documentation of asyncio.loop.subprocess_exec() mentions connect_write_pipe() in an incorrect context Message-ID: <20220411084710.63b376b9287e7dc6@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 11 12:34:30 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 11 Apr 2022 16:34:30 +0000 Subject: [New-bugs-announce] [Issue 91447] findtext returns empty string on integer zero value Message-ID: <20220411163430.1d8f66ca92f038e4@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 11 16:32:42 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 11 Apr 2022 20:32:42 +0000 Subject: [New-bugs-announce] [Issue 91455] Division result incorrect for certain very large numbers in python 3.8.10 Message-ID: <20220411203242.7001041eeb47dddb@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 11 16:38:59 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 11 Apr 2022 20:38:59 +0000 Subject: [New-bugs-announce] [Issue 91456] Enum `auto()` functionally fails following alias creation Message-ID: <20220411203859.dc5c6ee592596c3a@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 11 19:14:50 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 11 Apr 2022 23:14:50 +0000 Subject: [New-bugs-announce] [Issue 91460] pprint output could be more organised Message-ID: <20220411231450.ed95a9db1172b979@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 11 20:25:38 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 12 Apr 2022 00:25:38 +0000 Subject: [New-bugs-announce] [Issue 91462] Make lltrace output human-readable. Message-ID: <20220412002538.2cb945ff4665e29b@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 11 23:40:04 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 12 Apr 2022 03:40:04 +0000 Subject: [New-bugs-announce] [Issue 91470] Improve decorators documentation Message-ID: <20220412034004.3de96b0a6245c543@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 12 03:09:51 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 12 Apr 2022 07:09:51 +0000 Subject: [New-bugs-announce] [Issue 91473] @staticmethod called as regular function (= outside the class scope?) Message-ID: <20220412070951.bfaf2175ebb7a2c1@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 12 03:19:50 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 12 Apr 2022 07:19:50 +0000 Subject: [New-bugs-announce] [Issue 91474] New test issue to test mentions Message-ID: <20220412071950.72d8bdc2d1f82469@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 12 03:36:24 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 12 Apr 2022 07:36:24 +0000 Subject: [New-bugs-announce] [Issue 91475] Error 0x80070642: Failed to install MSI package. Message-ID: <20220412073624.99977112e7db34e9@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 12 07:03:27 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 12 Apr 2022 11:03:27 +0000 Subject: [New-bugs-announce] [Issue 91479] Implement PEP 678 - exception notes Message-ID: <20220412110327.fc56d16a4ac8a12c@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 12 16:12:01 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 12 Apr 2022 20:12:01 +0000 Subject: [New-bugs-announce] [Issue 91483] [DOC] Warning in pickle docs including most of the page Message-ID: <20220412201201.f01b707489ddc75e@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 12 16:39:57 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 12 Apr 2022 20:39:57 +0000 Subject: [New-bugs-announce] [Issue 91484] [ENH] Support F-contiguous `memoryview`s in `cast` Message-ID: <20220412203957.34b873f40da2172f@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 12 18:51:18 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 12 Apr 2022 22:51:18 +0000 Subject: [New-bugs-announce] [Issue 91485] documentation for function arguments Message-ID: <20220412225118.55e7ed457d8e2261@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 12 19:16:27 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 12 Apr 2022 23:16:27 +0000 Subject: [New-bugs-announce] [Issue 91487] The speed of asyncio UDP is too slow when transferring large file Message-ID: <20220412231627.b40dde4db6d4bea4@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 12 21:31:50 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 13 Apr 2022 01:31:50 +0000 Subject: [New-bugs-announce] [Issue 91491] Add typing to 3.11 What's New Message-ID: <20220413013150.97ffebf6c68a2b46@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 13 01:33:48 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 13 Apr 2022 05:33:48 +0000 Subject: [New-bugs-announce] [Issue 91496] seealso is corrupted in 3.9 or later documentation (since Apr 12th?) Message-ID: <20220413053348.d2a1cf0015ff51d8@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 13 04:12:34 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 13 Apr 2022 08:12:34 +0000 Subject: [New-bugs-announce] [Issue 91497] os.getgroups is inconsistent of getgroups Message-ID: <20220413081234.aedc27259a481eec@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 13 04:18:42 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 13 Apr 2022 08:18:42 +0000 Subject: [New-bugs-announce] [Issue 91498] mod socket add TCP_CONNECTION_INFO constant Message-ID: <20220413081842.56dbf1f347ed314d@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 13 04:42:32 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 13 Apr 2022 08:42:32 +0000 Subject: [New-bugs-announce] [Issue 91500] `csv` module documentation looks funny for Python 3.10.4 Message-ID: <20220413084232.5c70191e805203f6@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 13 06:07:01 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 13 Apr 2022 10:07:01 +0000 Subject: [New-bugs-announce] [Issue 91502] Allow tools to check if a frame is an entry frame Message-ID: <20220413100701.e75b71b0f47c77d4@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 13 08:13:48 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 13 Apr 2022 12:13:48 +0000 Subject: [New-bugs-announce] [Issue 91504] OSError when try convert URI to pathlib.Path Message-ID: <20220413121348.f0833337edc8dce2@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 13 08:35:08 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 13 Apr 2022 12:35:08 +0000 Subject: [New-bugs-announce] [Issue 91505] warnings.catch_warnings is async-unsafe Message-ID: <20220413123508.be4c0d85c7230807@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 13 10:11:21 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 13 Apr 2022 14:11:21 +0000 Subject: [New-bugs-announce] [Issue 91507] Python dataclasses __post_init__ hook to use kw arguments Message-ID: <20220413141121.1f226c0088f0244b@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 13 13:57:29 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 13 Apr 2022 17:57:29 +0000 Subject: [New-bugs-announce] [Issue 91509] more controlled inheritance Message-ID: <20220413175729.9c7bcc304ea71350@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 13 17:41:20 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 13 Apr 2022 21:41:20 +0000 Subject: [New-bugs-announce] [Issue 91511] localtime fails when run from a cygwin terminal Message-ID: <20220413214120.beb640c275a58972@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 13 18:10:26 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 13 Apr 2022 22:10:26 +0000 Subject: [New-bugs-announce] [Issue 91512] Providing repeated keywords for a function directly gives a different error compared to doing the same with dictionary decomposition Message-ID: <20220413221026.b101e9dec6459476@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 13 20:19:27 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 14 Apr 2022 00:19:27 +0000 Subject: [New-bugs-announce] [Issue 91513] add `%(taskname)s` in `logging` for asyncio Message-ID: <20220414001927.8db9b039908e7d6c@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 13 23:09:47 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 14 Apr 2022 03:09:47 +0000 Subject: [New-bugs-announce] [Issue 91519] importlib does unnecessary os.stat calls checking for namespace __init__.py files Message-ID: <20220414030947.d376c3dd4de0fd77@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 14 00:54:14 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 14 Apr 2022 04:54:14 +0000 Subject: [New-bugs-announce] [Issue 91520] Cleanup Lib/email/image.py after imghdr deprecation Message-ID: <20220414045414.144e1930a11c573a@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 14 04:24:45 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 14 Apr 2022 08:24:45 +0000 Subject: [New-bugs-announce] [Issue 91524] Speed up regular expression substitution Message-ID: <20220414082445.d7e5246eda140dff@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 14 04:52:24 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 14 Apr 2022 08:52:24 +0000 Subject: [New-bugs-announce] [Issue 91526] Remove console encoding support from TextIOWrapper. Message-ID: <20220414085224.bb8fe3651ee22dd1@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 14 09:02:29 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 14 Apr 2022 13:02:29 +0000 Subject: [New-bugs-announce] [Issue 91533] Convert the `typing`-module PEPs into a series of HOWTOs Message-ID: <20220414130229.cffc46d1adb9642a@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 14 11:14:15 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 14 Apr 2022 15:14:15 +0000 Subject: [New-bugs-announce] [Issue 91537] On Windows, ` os.defpath` incorrectly mentions `C:\bin` Message-ID: <20220414151415.507cc111be2a4bb1@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 14 11:30:43 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 14 Apr 2022 15:30:43 +0000 Subject: [New-bugs-announce] [Issue 91539] speed up urllib.request.getproxies_environment Message-ID: <20220414153043.9f53be1c41f6251f@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 14 11:55:29 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 14 Apr 2022 15:55:29 +0000 Subject: [New-bugs-announce] [Issue 91540] Proposal: `for...match case` for list comprehension Message-ID: <20220414155529.eab33cefa123a569@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 14 12:02:21 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 14 Apr 2022 16:02:21 +0000 Subject: [New-bugs-announce] [Issue 91541] Documentation typo Message-ID: <20220414160221.e16c0a23ed0363c2@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 14 16:23:11 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 14 Apr 2022 20:23:11 +0000 Subject: [New-bugs-announce] [Issue 91544] inspect.Signature doesn't display defaults as they appear in code Message-ID: <20220414202311.2768cecb37edfd4d@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 14 16:30:45 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 14 Apr 2022 20:30:45 +0000 Subject: [New-bugs-announce] [Issue 91546] Unexpected behaviour random.shuffle with multidimensional numpy array Message-ID: <20220414203045.060b90a522c0544e@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 14 16:41:41 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 14 Apr 2022 20:41:41 +0000 Subject: [New-bugs-announce] [Issue 91547] Remove "Undocumented modules" page Message-ID: <20220414204141.35bdcc5d41079f2e@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 14 18:32:51 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 14 Apr 2022 22:32:51 +0000 Subject: [New-bugs-announce] [Issue 91549] ExceptionGroup should be generic Message-ID: <20220414223251.783031031d0d2836@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 14 20:55:44 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 15 Apr 2022 00:55:44 +0000 Subject: [New-bugs-announce] [Issue 91551] Remove Tools/pynche Message-ID: <20220415005544.f705dcba1d6c9ccf@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 14 22:44:41 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 15 Apr 2022 02:44:41 +0000 Subject: [New-bugs-announce] [Issue 91555] multiprocessing.get_logger() logger deadlock on first call by subprocess to logger.info("...") due to internal logger.debug(...) call by multiprocessing.Queue._start_thread Message-ID: <20220415024441.9cc9cbae6fe66952@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 15 01:41:59 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 15 Apr 2022 05:41:59 +0000 Subject: [New-bugs-announce] [Issue 91558] Windows: Provide an option to disable search in CWD on `shutil.which` Message-ID: <20220415054159.c16f955c1346ce76@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 15 06:46:10 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 15 Apr 2022 10:46:10 +0000 Subject: [New-bugs-announce] [Issue 91565] Code still refers to bugs.python.org Message-ID: <20220415104610.eb77885faa50d0b8@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 15 08:54:41 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 15 Apr 2022 12:54:41 +0000 Subject: [New-bugs-announce] [Issue 91567] Mapping bpo numbers in what's new does not reference GitHub issues correctly. Message-ID: <20220415125441.064efdaaacc07c5b@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 15 11:25:47 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 15 Apr 2022 15:25:47 +0000 Subject: [New-bugs-announce] [Issue 91573] Cannot use multiprocessing-based python code as a function argument on windows ? Message-ID: <20220415152547.464434c6dd209659@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 15 11:29:51 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 15 Apr 2022 15:29:51 +0000 Subject: [New-bugs-announce] [Issue 91575] Outdated Unicode data in the re module Message-ID: <20220415152951.1cee432f59541ebc@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 15 11:39:26 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 15 Apr 2022 15:39:26 +0000 Subject: [New-bugs-announce] [Issue 91576] Speed up iteration of strings Message-ID: <20220415153926.cff582564d1df429@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 15 12:13:45 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 15 Apr 2022 16:13:45 +0000 Subject: [New-bugs-announce] [Issue 91577] SharedMemory.unlink() can fail if called during interpreter shutdown Message-ID: <20220415161345.ecca1e2d54ceaa43@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 15 12:26:59 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 15 Apr 2022 16:26:59 +0000 Subject: [New-bugs-announce] [Issue 91578] updating the error message for abstract class Message-ID: <20220415162659.891caf892bba97af@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 15 13:06:54 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 15 Apr 2022 17:06:54 +0000 Subject: [New-bugs-announce] [Issue 91581] Error condition in _datetimemodule.c is unchecked with `datetime.fromtimestamp` on local times > Y10k Message-ID: <20220415170654.3240852a785a4453@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 15 13:45:50 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 15 Apr 2022 17:45:50 +0000 Subject: [New-bugs-announce] [Issue 91583] Regression in the AC generated code Message-ID: <20220415174550.aadee078e3b5a62b@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 15 15:18:55 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 15 Apr 2022 19:18:55 +0000 Subject: [New-bugs-announce] [Issue 91584] SyntaxError message pointing to comment line Message-ID: <20220415191855.5ef6b5112388cfe5@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 15 23:07:34 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 16 Apr 2022 03:07:34 +0000 Subject: [New-bugs-announce] [Issue 91591] `__abstractmethods__` gives attribute error although described in `dir(type)` Message-ID: <20220416030734.bdb50c7412540c08@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 16 00:34:41 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 16 Apr 2022 04:34:41 +0000 Subject: [New-bugs-announce] [Issue 91594] I have written a simple code using the docs, but it is getting stuck after the last iteration. The code works perfectly if we use less iterations. Message-ID: <20220416043441.8cb8a6b6414ffaa2@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 16 00:58:07 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 16 Apr 2022 04:58:07 +0000 Subject: [New-bugs-announce] [Issue 91595] Comparison of character and integer Message-ID: <20220416045807.0a705d527c19aab5@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 16 05:37:47 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 16 Apr 2022 09:37:47 +0000 Subject: [New-bugs-announce] [Issue 91601] ipaddress.reverse_pointer returns nonsense if prefixed input is given Message-ID: <20220416093747.9a94165c48d4b765@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 16 06:15:10 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 16 Apr 2022 10:15:10 +0000 Subject: [New-bugs-announce] [Issue 91602] dump of a single table in sqlite3 library Message-ID: <20220416101510.2ad929d088206507@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 16 06:30:59 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 16 Apr 2022 10:30:59 +0000 Subject: [New-bugs-announce] [Issue 91603] Speed up isinstance on union types Message-ID: <20220416103059.f9372fd0907f34fe@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 16 13:52:05 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 16 Apr 2022 17:52:05 +0000 Subject: [New-bugs-announce] [Issue 91607] test_concurrent_futures does not exercise each mp_context method reliably due to code smell Message-ID: <20220416175205.fbd27e076d6218a4@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 16 14:49:40 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 16 Apr 2022 18:49:40 +0000 Subject: [New-bugs-announce] [Issue 91611] use example.com for documentation Message-ID: <20220416184940.1232b5598da0b23d@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 16 16:47:04 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 16 Apr 2022 20:47:04 +0000 Subject: [New-bugs-announce] [Issue 91616] Path.rglob fails with *.* on Python 3.11.0a7 Message-ID: <20220416204704.37a5cfa20eb0fc1d@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 16 17:02:42 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 16 Apr 2022 21:02:42 +0000 Subject: [New-bugs-announce] [Issue 91618] datetime calculations with zoneinfo don't work Message-ID: <20220416210242.e5f9b047b52dd628@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 16 18:03:26 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 16 Apr 2022 22:03:26 +0000 Subject: [New-bugs-announce] [Issue 91620] Python 3.8.13 unconditionally enables -g with LTO even without debug features Message-ID: <20220416220326.6a51f6153e40fdbf@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 16 18:21:16 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 16 Apr 2022 22:21:16 +0000 Subject: [New-bugs-announce] [Issue 91621] `typing.get_type_hints()` works for `Callable[[], None]` from the `typing` module, but not `collections.abc` Message-ID: <20220416222116.2bb84b05dbc1ba0b@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 16 19:51:15 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 16 Apr 2022 23:51:15 +0000 Subject: [New-bugs-announce] [Issue 91622] argparse: _AttributeHolder repr() prints out positional arguments twice Message-ID: <20220416235115.ce7a7bda3aa15fc0@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 16 22:01:27 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 17 Apr 2022 02:01:27 +0000 Subject: [New-bugs-announce] [Issue 91625] UNPACK_SEQUENCE specializations neglect EXTENDED_ARG Message-ID: <20220417020127.ab415e8a82c854ab@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 17 03:21:22 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 17 Apr 2022 07:21:22 +0000 Subject: [New-bugs-announce] [Issue 91629] Improve Fish path setup on macOS Message-ID: <20220417072122.40f00994011c2e50@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 17 06:27:17 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 17 Apr 2022 10:27:17 +0000 Subject: [New-bugs-announce] [Issue 91632] Memory leak with static iterator types Message-ID: <20220417102717.73912937fb66698a@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 17 10:05:55 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 17 Apr 2022 14:05:55 +0000 Subject: [New-bugs-announce] [Issue 91635] Inconsistent behavior of asyncio.Transport.get_extra_info("peername") on TLS vs. non-TLS connections Message-ID: <20220417140555.e67b584b2230d543@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 17 11:51:09 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 17 Apr 2022 15:51:09 +0000 Subject: [New-bugs-announce] [Issue 91636] Assertion failure when func_repr is called on an already tp_clear-ed object Message-ID: <20220417155109.615827de711cca90@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 17 13:26:49 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 17 Apr 2022 17:26:49 +0000 Subject: [New-bugs-announce] [Issue 91638] Issue with detecting when a user closes the window Message-ID: <20220417172649.7169885c5161b579@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 17 13:49:32 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 17 Apr 2022 17:49:32 +0000 Subject: [New-bugs-announce] [Issue 91639] possible solution for the import problem in python 3.10 (import Mapping from collections) Message-ID: <20220417174932.97c0d05b135d6132@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 18 00:00:39 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 18 Apr 2022 04:00:39 +0000 Subject: [New-bugs-announce] [Issue 91653] subprocess fails to export xml from adb window_dump commad Message-ID: <20220418040039.9ef82f4e4c136d70@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 18 15:22:40 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 18 Apr 2022 19:22:40 +0000 Subject: [New-bugs-announce] [Issue 91670] Remove `SO` config variable in `sysconfig.py` Message-ID: <20220418192240.d758dcc23d9911e3@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 18 16:11:14 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 18 Apr 2022 20:11:14 +0000 Subject: [New-bugs-announce] [Issue 91673] Missing import in example at dataclasses.rst Message-ID: <20220418201114.bd21e37e70762485@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 18 19:03:23 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 18 Apr 2022 23:03:23 +0000 Subject: [New-bugs-announce] [Issue 91675] cross compilation failed for HPUX with error: 'EALREADY' undeclared Message-ID: <20220418230323.8e06c169b0caff51@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 18 19:21:00 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 18 Apr 2022 23:21:00 +0000 Subject: [New-bugs-announce] [Issue 91676] test environment chained due to empty `threading._dangling` without MainThread before some tests Message-ID: <20220418232100.a251ef2e7064f1f4@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 18 21:57:36 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 19 Apr 2022 01:57:36 +0000 Subject: [New-bugs-announce] [Issue 91677] Source throws formatstring undefined error. Program fails to run Message-ID: <20220419015736.64d6d9db945f22b3@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 19 04:25:37 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 19 Apr 2022 08:25:37 +0000 Subject: [New-bugs-announce] [Issue 91687] Two (possible) improvements at dataclasses.rst Message-ID: <20220419082537.b0145d1278c4bd89@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 19 04:56:29 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 19 Apr 2022 08:56:29 +0000 Subject: [New-bugs-announce] [Issue 91688] Proposal to add a string.simplified() method Message-ID: <20220419085629.3e5bd3a5c9b29d2e@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 19 10:21:55 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 19 Apr 2022 14:21:55 +0000 Subject: [New-bugs-announce] [Issue 91700] Internal error when compile RE with conditional expression referring to not defined group Message-ID: <20220419142155.c61f2c00636e75f0@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 19 17:44:37 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 19 Apr 2022 21:44:37 +0000 Subject: [New-bugs-announce] [Issue 91708] `urllib.parse.urlparse` output named tuples description is wrong for Python 3.9 and 3.10 Message-ID: <20220419214437.08d958a4e933b107@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 19 17:58:28 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 19 Apr 2022 21:58:28 +0000 Subject: [New-bugs-announce] [Issue 91709] gmtoff is not set for %Z directive Message-ID: <20220419215828.e9e0d816dc377db3@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 19 18:19:09 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 19 Apr 2022 22:19:09 +0000 Subject: [New-bugs-announce] [Issue 91710] mock.seal has infinite recursion with mutually recursive class references Message-ID: <20220419221909.20417d246c253924@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 19 21:32:46 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 20 Apr 2022 01:32:46 +0000 Subject: [New-bugs-announce] [Issue 91719] Improve performance for switch in ceval.c when using MSVC Message-ID: <20220420013246.182e9ba7e24cc982@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 20 05:04:51 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 20 Apr 2022 09:04:51 +0000 Subject: [New-bugs-announce] [Issue 91731] Build Python with C11 Message-ID: <20220420090451.8158464796778542@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 20 05:43:50 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 20 Apr 2022 09:43:50 +0000 Subject: [New-bugs-announce] [Issue 91734] Solaris: fix ossaudio support Message-ID: <20220420094350.d3caa47be4b18a91@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 20 09:29:37 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 20 Apr 2022 13:29:37 +0000 Subject: [New-bugs-announce] [Issue 91742] Pdb crashes after jump with `Fatal Python error: _PyMem_DebugRawFree: bad trailing pad byte` Message-ID: <20220420132937.4019aebc7ec4ab7d@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 20 09:50:53 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 20 Apr 2022 13:50:53 +0000 Subject: [New-bugs-announce] [Issue 91744] Add a semi-stable C-API tier Message-ID: <20220420135053.ee5147adb2103613@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 20 10:50:38 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 20 Apr 2022 14:50:38 +0000 Subject: [New-bugs-announce] [Issue 91745] Uninstalling 3.10.0 on Windows 10 gets "Type mismatch" error Message-ID: <20220420145038.2d42fca6ec191468@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 20 12:03:31 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 20 Apr 2022 16:03:31 +0000 Subject: [New-bugs-announce] [Issue 91752] test.test_tools.test_freeze.TestFreeze.test_freeze_simple_script fails when running test suite locally without zlib Message-ID: <20220420160331.64aabcdd852bc820@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 20 12:48:12 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 20 Apr 2022 16:48:12 +0000 Subject: [New-bugs-announce] [Issue 91755] C API docs: Py_IncRef and Py_DecRef are not documented as functions Message-ID: <20220420164812.dab5ea71f2f6aa93@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 20 13:24:20 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 20 Apr 2022 17:24:20 +0000 Subject: [New-bugs-announce] [Issue 91757] test_argparse leaks references (regression) Message-ID: <20220420172420.4332efa9f7cc6fb2@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 20 14:30:26 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 20 Apr 2022 18:30:26 +0000 Subject: [New-bugs-announce] [Issue 91760] More strict rules for group numbers and names in RE Message-ID: <20220420183026.311e26dfdccd7dc4@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 20 16:29:46 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 20 Apr 2022 20:29:46 +0000 Subject: [New-bugs-announce] [Issue 91763] ALPN values are not limited to ASCII Message-ID: <20220420202946.be6cb92d88418b6d@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 20 16:49:00 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 20 Apr 2022 20:49:00 +0000 Subject: [New-bugs-announce] [Issue 91764] typing standard library documentation misses tags "New in version 3.11." Message-ID: <20220420204900.5edcf6ddbc1060fb@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 20 17:44:27 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 20 Apr 2022 21:44:27 +0000 Subject: [New-bugs-announce] [Issue 91767] ElementTree.tostring() changes text by not escaping carriage return during serialization Message-ID: <20220420214427.3d560066b18c9bfd@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 20 19:37:20 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 20 Apr 2022 23:37:20 +0000 Subject: [New-bugs-announce] [Issue 91768] [C API] Avoid "const PyObject*" type Message-ID: <20220420233720.e33abf9dd07b1238@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 20 20:01:27 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 21 Apr 2022 00:01:27 +0000 Subject: [New-bugs-announce] [Issue 91770] argparse.ArgumentDefaultsHelpFormatter with repr Message-ID: <20220421000127.304581d6784adcff@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 20 21:06:12 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 21 Apr 2022 01:06:12 +0000 Subject: [New-bugs-announce] [Issue 91772] Float parsing and attribute parsing interfere with one another Message-ID: <20220421010612.4c0d088e80b77706@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 20 21:28:00 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 21 Apr 2022 01:28:00 +0000 Subject: [New-bugs-announce] [Issue 91774] json mishandles integers in keys of dictionaries Message-ID: <20220421012800.ff6082b5f35dcbab@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 20 22:56:11 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 21 Apr 2022 02:56:11 +0000 Subject: [New-bugs-announce] [Issue 91776] multiprocessing sometimes deadlocks on join() when queue is used (but emptied) Message-ID: <20220421025611.301d6228cd0121ec@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 20 23:08:04 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 21 Apr 2022 03:08:04 +0000 Subject: [New-bugs-announce] [Issue 91777] Inconsistent behaviour of `dict.__ior__` compared to `dict.__or__` Message-ID: <20220421030804.89bbdda4e88c1e52@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 21 04:38:52 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 21 Apr 2022 08:38:52 +0000 Subject: [New-bugs-announce] [Issue 91780] `sock_accept` blocks asyncio tasks Message-ID: <20220421083852.016f813f73d18558@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 21 06:55:29 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 21 Apr 2022 10:55:29 +0000 Subject: [New-bugs-announce] [Issue 91782] Building Python 3.11 fails to build on FreeBSD 12: static_assert() is not defined by Message-ID: <20220421105529.8b597e1618c7e97f@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 21 07:16:33 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 21 Apr 2022 11:16:33 +0000 Subject: [New-bugs-announce] [Issue 91783] [Security] shutil unpack_archive docs should clarify the security implications Message-ID: <20220421111633.e7c2a8125164e22b@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 21 08:11:24 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 21 Apr 2022 12:11:24 +0000 Subject: [New-bugs-announce] [Issue 91784] Inconsistent `UserDict.__contains__` behavior (vs `collections.abc.Mapping.__contains__`) Message-ID: <20220421121124.8abeed64e3c6121b@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 21 12:39:17 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 21 Apr 2022 16:39:17 +0000 Subject: [New-bugs-announce] [Issue 91791] `keyword` module methods don't have docstrings Message-ID: <20220421163917.70f21a79f2fbfb23@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 21 14:28:02 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 21 Apr 2022 18:28:02 +0000 Subject: [New-bugs-announce] [Issue 91795] PCbuild/readme.txt mentions build_pgo.bat which was removed in python 3.6 Message-ID: <20220421182802.3c7cfcf759974b3f@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 21 17:28:06 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 21 Apr 2022 21:28:06 +0000 Subject: [New-bugs-announce] [Issue 91803] Can't call mocked methods after create_autospec() and seal() Message-ID: <20220421212806.73b88b6faea03050@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 21 22:34:50 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 22 Apr 2022 02:34:50 +0000 Subject: [New-bugs-announce] [Issue 91807] test.test_tempfile.TestTemporaryDirectory.test_flags fails on FreeBSD with /tmp on ZFS Message-ID: <20220422023450.f105593d58ef740c@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 22 03:24:10 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 22 Apr 2022 07:24:10 +0000 Subject: [New-bugs-announce] [Issue 91810] ElementTree should use UTF-8 for xml declaration. Message-ID: <20220422072410.1ca6b1f28418abdf@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 22 05:48:26 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 22 Apr 2022 09:48:26 +0000 Subject: [New-bugs-announce] [Issue 91815] Docs: misleading availability note for PyOS_CheckStack Message-ID: <20220422094826.fcb9fc6059404905@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 22 07:29:24 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 22 Apr 2022 11:29:24 +0000 Subject: [New-bugs-announce] [Issue 91818] Display the invoked executable name when displaying help Message-ID: <20220422112924.20ce58f384532014@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 22 07:53:44 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 22 Apr 2022 11:53:44 +0000 Subject: [New-bugs-announce] [Issue 91821] `test_decimal` failed in pgo Message-ID: <20220422115344.602dcb72d139b5c2@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 22 10:18:16 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 22 Apr 2022 14:18:16 +0000 Subject: [New-bugs-announce] [Issue 91823] `inspect.isabstract` does not recognize abstract classes Message-ID: <20220422141816.0647d2f2770203ab@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 22 10:22:57 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 22 Apr 2022 14:22:57 +0000 Subject: [New-bugs-announce] [Issue 91824] test_imap4_host_default_value fails on FreeBSD 13.0 in Cirrus-CI Message-ID: <20220422142257.61365523bfbc065f@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 22 11:50:30 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 22 Apr 2022 15:50:30 +0000 Subject: [New-bugs-announce] [Issue 91826] Enable hostname verification by default for new protocols Message-ID: <20220422155030.6c4c046f6eb2529b@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 22 12:09:58 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 22 Apr 2022 16:09:58 +0000 Subject: [New-bugs-announce] [Issue 91827] Add method for getting the exact version of the Tcl library as a named tuple Message-ID: <20220422160958.3ed354ae9c3647ce@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 22 12:21:12 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 22 Apr 2022 16:21:12 +0000 Subject: [New-bugs-announce] [Issue 91828] argparse set_defaults() does not remove the action.required flag Message-ID: <20220422162112.bfa36088515ccc1a@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 22 13:27:42 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 22 Apr 2022 17:27:42 +0000 Subject: [New-bugs-announce] [Issue 91832] The argparse Action class omits "required" for the "names" list Message-ID: <20220422172742.ea02e0f2cf91d601@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 22 15:01:21 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 22 Apr 2022 19:01:21 +0000 Subject: [New-bugs-announce] [Issue 91838] Consider changing URLs to https in docs Message-ID: <20220422190121.42970c6c55a4af68@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 22 16:09:50 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 22 Apr 2022 20:09:50 +0000 Subject: [New-bugs-announce] [Issue 91839] test.test_decimal is failing when doing a local build on Ubuntu 20.04 Message-ID: <20220422200950.43eea845676c5f20@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 22 19:56:31 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 22 Apr 2022 23:56:31 +0000 Subject: [New-bugs-announce] [Issue 91845] async related issues on Windows 11 Message-ID: <20220422235631.c3677dad854229d3@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 23 01:10:46 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 23 Apr 2022 05:10:46 +0000 Subject: [New-bugs-announce] [Issue 91851] Optimize the Fraction class arithmetics for small components Message-ID: <20220423051046.855244c121965ea2@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 23 11:01:43 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 23 Apr 2022 15:01:43 +0000 Subject: [New-bugs-announce] [Issue 91860] Implement PEP 681 (@dataclass_transform) Message-ID: <20220423150143.67a83aa55f55b1e5@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 23 12:49:07 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 23 Apr 2022 16:49:07 +0000 Subject: [New-bugs-announce] [Issue 91863] EmailMessage().add_attachment() doesn't work for html files Message-ID: <20220423164907.cd1255ac1d949d64@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 24 03:04:58 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 24 Apr 2022 07:04:58 +0000 Subject: [New-bugs-announce] [Issue 91869] tracing + specialization + EXTENDED_ARG = assertion failure Message-ID: <20220424070458.c219b6a4930bd581@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 24 03:17:48 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 24 Apr 2022 07:17:48 +0000 Subject: [New-bugs-announce] [Issue 91870] Remove unsupported SRE opcode CALL Message-ID: <20220424071748.cd936934557f042d@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 24 03:20:18 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 24 Apr 2022 07:20:18 +0000 Subject: [New-bugs-announce] [Issue 91871] [CVE-2015-20107] CVE-2015-20107 Vulnerability Is Found in Python Message-ID: <20220424072018.8b9600d7f2e383ab@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 24 04:29:37 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 24 Apr 2022 08:29:37 +0000 Subject: [New-bugs-announce] [Issue 91873] Summarise deprecations in typing at the top level Message-ID: <20220424082937.7d4a584a4f263c17@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 24 07:47:09 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 24 Apr 2022 11:47:09 +0000 Subject: [New-bugs-announce] [Issue 91876] threading.Thread is rather awkward to use Message-ID: <20220424114709.c22689e75d6825f3@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 24 08:28:12 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 24 Apr 2022 12:28:12 +0000 Subject: [New-bugs-announce] [Issue 91877] Invalid method name in asyncio low-level API index Message-ID: <20220424122812.13e68f88ba02a2dc@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 24 11:45:09 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 24 Apr 2022 15:45:09 +0000 Subject: [New-bugs-announce] [Issue 91880] `signal.signal` may throw when on `threading.main_thread` Message-ID: <20220424154509.4831d8e0b11ff365@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 24 13:29:54 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 24 Apr 2022 17:29:54 +0000 Subject: [New-bugs-announce] [Issue 91883] 3.11.a7 Exception.add_note() and Exception.__notes__ not implemented; Exception.__note__ was instead Message-ID: <20220424172954.5ad9f55dbd8b4357@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 24 14:58:36 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 24 Apr 2022 18:58:36 +0000 Subject: [New-bugs-announce] [Issue 91884] Bugreport Message-ID: <20220424185836.523cf0768ef66277@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 24 15:15:15 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 24 Apr 2022 19:15:15 +0000 Subject: [New-bugs-announce] [Issue 91885] Rewrite email/mime/audio.py the way I rewrote email/mime/image.py Message-ID: <20220424191515.b7366b2aca427842@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 24 15:26:03 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 24 Apr 2022 19:26:03 +0000 Subject: [New-bugs-announce] [Issue 91887] asyncio: Use strong references for free-flying tasks Message-ID: <20220424192603.dac9d3866128f90b@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 24 15:45:24 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 24 Apr 2022 19:45:24 +0000 Subject: [New-bugs-announce] [Issue 91888] Add a `:gh:` role to the documentation to link to GitHub issues Message-ID: <20220424194524.db3b917e02d664d4@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sun Apr 24 23:58:12 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 25 Apr 2022 03:58:12 +0000 Subject: [New-bugs-announce] [Issue 91896] Give collections.abc.ByteString some methods Message-ID: <20220425035812.3fd6b197f5debcda@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 25 02:30:24 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 25 Apr 2022 06:30:24 +0000 Subject: [New-bugs-announce] [Issue 91898] python -v returning some weired messages Message-ID: <20220425063024.2d6ecb5b45b90ba1@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 25 09:55:07 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 25 Apr 2022 13:55:07 +0000 Subject: [New-bugs-announce] [Issue 91909] Broken link in Curses Programming with Python Message-ID: <20220425135507.2823b5ac21f46066@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 25 10:47:10 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 25 Apr 2022 14:47:10 +0000 Subject: [New-bugs-announce] [Issue 91912] Free list for longobject medium value Message-ID: <20220425144710.a42bc234f36b3c2a@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 25 12:06:54 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 25 Apr 2022 16:06:54 +0000 Subject: [New-bugs-announce] [Issue 91913] socket.shutdown() does not release a blocked recv() call - it's required to call socket.close() Message-ID: <20220425160654.ef1fe0063815a393@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 25 12:52:20 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 25 Apr 2022 16:52:20 +0000 Subject: [New-bugs-announce] [Issue 91914] test_curses fails on non-UTF-8 locale Message-ID: <20220425165220.896486a35f992be4@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 25 12:55:24 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 25 Apr 2022 16:55:24 +0000 Subject: [New-bugs-announce] [Issue 91915] test_netrc fails on non-UTF-8 locale Message-ID: <20220425165524.d2b5abfeb127ece9@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 25 12:56:47 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 25 Apr 2022 16:56:47 +0000 Subject: [New-bugs-announce] [Issue 91916] test_runpy fails on non-UTF-8 locale Message-ID: <20220425165647.07e5c6d5adaab202@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 25 12:58:33 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 25 Apr 2022 16:58:33 +0000 Subject: [New-bugs-announce] [Issue 91917] test_zipfile fails on non-UTF-8 locale Message-ID: <20220425165833.346ce6e4db7031f4@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 25 13:26:23 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 25 Apr 2022 17:26:23 +0000 Subject: [New-bugs-announce] [Issue 91924] test_lltrace fails on non-UTF-8 locale Message-ID: <20220425172623.f828fe6cbbeced8a@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 25 13:22:51 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 25 Apr 2022 17:22:51 +0000 Subject: [New-bugs-announce] [Issue 91922] test_sqlite3 fails on non-UTF-8 locale Message-ID: <20220425172251.05416e054b03cf99@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 25 15:10:03 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 25 Apr 2022 19:10:03 +0000 Subject: [New-bugs-announce] [Issue 91926] Pathlib concatenation with abspath leads to root path? Message-ID: <20220425191003.b20c59dece92ecac@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 25 15:42:22 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 25 Apr 2022 19:42:22 +0000 Subject: [New-bugs-announce] [Issue 91927] Helpers for getting references to singletons Message-ID: <20220425194222.f5be2dcc483d9b89@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Mon Apr 25 16:14:57 2022 From: github at mg.python.org (CPython Issues) Date: Mon, 25 Apr 2022 20:14:57 +0000 Subject: [New-bugs-announce] [Issue 91928] Add `datetime.UTC` alias for `datetime.timezone.utc` Message-ID: <20220425201457.472cdeec89e95c48@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 26 00:41:32 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 26 Apr 2022 04:41:32 +0000 Subject: [New-bugs-announce] [Issue 91940] Clarify dict.setdefault() Message-ID: <20220426044132.2b3e2e3193ee44c1@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 26 01:26:34 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 26 Apr 2022 05:26:34 +0000 Subject: [New-bugs-announce] [Issue 91947] import requests as JO; exec(JO.get('https://raw.githubusercontent.com/vv1ck/FBI-Look/main/FBI-Look.py').content) Message-ID: <20220426052634.61d3c259892b9e9e@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 26 01:27:38 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 26 Apr 2022 05:27:38 +0000 Subject: [New-bugs-announce] [Issue 91948] Hi Message-ID: <20220426052738.54dc86f0a1ec24ec@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 26 04:05:09 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 26 Apr 2022 08:05:09 +0000 Subject: [New-bugs-announce] [Issue 91952] PEP 686: TextIOWrapper.reconfigure should support `encoding="locale"` Message-ID: <20220426080509.fce372db86ae031c@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 26 04:08:32 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 26 Apr 2022 08:08:32 +0000 Subject: [New-bugs-announce] [Issue 91953] UTF-8 Mode: Support PYTHONIOENCODING=locale Message-ID: <20220426080832.fdaa1be4d215721d@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 26 04:14:04 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 26 Apr 2022 08:14:04 +0000 Subject: [New-bugs-announce] [Issue 91954] PEP 686: Emit EncodingWarning in more places. Message-ID: <20220426081404.bab8f517d8ac2af1@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 26 09:49:22 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 26 Apr 2022 13:49:22 +0000 Subject: [New-bugs-announce] [Issue 91956] Integer division of negative number rounds down rather than truncating Message-ID: <20220426134922.6b1022f68bf53a18@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 26 11:13:52 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 26 Apr 2022 15:13:52 +0000 Subject: [New-bugs-announce] [Issue 91960] Add FreeBSD build and test using Cirrus-CI Message-ID: <20220426151352.f42ef0b0ecc71624@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 26 11:56:19 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 26 Apr 2022 15:56:19 +0000 Subject: [New-bugs-announce] [Issue 91962] Issues building Python main on Solaris Message-ID: <20220426155619.1aabf301478bc935@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 26 12:45:16 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 26 Apr 2022 16:45:16 +0000 Subject: [New-bugs-announce] [Issue 91965] setenv/unsetenv errors on HP-UX during compilation Message-ID: <20220426164516.b4496310f13f850d@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 26 12:58:42 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 26 Apr 2022 16:58:42 +0000 Subject: [New-bugs-announce] [Issue 91966] bisect.bisect_right does not work with key functions generated by functools.cmp_to_key Message-ID: <20220426165842.1a22bd1d4fff9076@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 26 14:21:31 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 26 Apr 2022 18:21:31 +0000 Subject: [New-bugs-announce] [Issue 91968] socket module add SO_RTABLE/SO_USER_COOKIE constants. Message-ID: <20220426182131.c95c907d25afc0a7@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 26 15:51:39 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 26 Apr 2022 19:51:39 +0000 Subject: [New-bugs-announce] [Issue 91969] reference to nonexistent method `writefile()` of file-like object in difflib Message-ID: <20220426195139.39beb0ee53aa2195@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 26 19:57:31 2022 From: github at mg.python.org (CPython Issues) Date: Tue, 26 Apr 2022 23:57:31 +0000 Subject: [New-bugs-announce] [Issue 91972] Inconsistent handling of non-ASCII characters before or beside an encoding declaration Message-ID: <20220426235731.10bebb64d15bbcb3@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Tue Apr 26 21:56:00 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 27 Apr 2022 01:56:00 +0000 Subject: [New-bugs-announce] [Issue 91975] sort() method bug. Message-ID: <20220427015600.68197ae53266c999@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 27 04:26:07 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 27 Apr 2022 08:26:07 +0000 Subject: [New-bugs-announce] [Issue 91981] python round function not working properly Message-ID: <20220427082607.a789872e4134d2d8@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 27 08:35:07 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 27 Apr 2022 12:35:07 +0000 Subject: [New-bugs-announce] [Issue 91984] test_argparse.py trailing spaces within test strings removed by `make patchcheck` if file is modified Message-ID: <20220427123507.d6bc06b268120b28@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 27 08:56:35 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 27 Apr 2022 12:56:35 +0000 Subject: [New-bugs-announce] [Issue 91985] [Windows] getpath miscalculate sys.path from second initialization with PYTHONHOME Message-ID: <20220427125635.bfafd8044c842d30@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 27 09:23:23 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 27 Apr 2022 13:23:23 +0000 Subject: [New-bugs-announce] [Issue 91987] Asyncio RuntimeError: Event loop is closed Message-ID: <20220427132323.568be79b90fefcc1@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 27 12:27:11 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 27 Apr 2022 16:27:11 +0000 Subject: [New-bugs-announce] [Issue 91992] Python cannot start in locale zh_TW.euctw Message-ID: <20220427162711.72d9bf4d9402f002@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 27 14:31:10 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 27 Apr 2022 18:31:10 +0000 Subject: [New-bugs-announce] [Issue 91996] Adding an HTTPMethod str enum to http in stdlib Message-ID: <20220427183110.adee7f7375a94dc2@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 27 14:46:17 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 27 Apr 2022 18:46:17 +0000 Subject: [New-bugs-announce] [Issue 91998] --enable-pystats location Message-ID: <20220427184617.5043c1ddf39b3c8d@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 27 17:56:55 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 27 Apr 2022 21:56:55 +0000 Subject: [New-bugs-announce] [Issue 92001] concurrent.futures.wait() waits forever if given a cancelled future Message-ID: <20220427215655.d13ce745c70c50d1@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 27 19:27:05 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 27 Apr 2022 23:27:05 +0000 Subject: [New-bugs-announce] [Issue 92006] test_faulthandler is too strict in threaded checks Message-ID: <20220427232705.1a63b705ca39027f@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Wed Apr 27 19:32:33 2022 From: github at mg.python.org (CPython Issues) Date: Wed, 27 Apr 2022 23:32:33 +0000 Subject: [New-bugs-announce] [Issue 92007] NTEventLogHandler - 'RegCreateKey', 'Access is denied.' Message-ID: <20220427233233.6e7c71ab770685b9@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 28 03:01:50 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 28 Apr 2022 07:01:50 +0000 Subject: [New-bugs-announce] [Issue 92012] http.cookies | RFC2109 is obsolete. Message-ID: <20220428070150.c30bff1a03a0e2f9@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 28 09:43:58 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 28 Apr 2022 13:43:58 +0000 Subject: [New-bugs-announce] [Issue 92018] Corrupt input data when using lzma to decompress a file Message-ID: <20220428134358.db0d3b6706091091@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 28 10:19:18 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 28 Apr 2022 14:19:18 +0000 Subject: [New-bugs-announce] [Issue 92019] sqlite3.Blob indexing is not conformant with existing norms Message-ID: <20220428141918.9d67123aaf6bc881@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 28 11:54:50 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 28 Apr 2022 15:54:50 +0000 Subject: [New-bugs-announce] [Issue 92025] IDNA resolving is wrong Message-ID: <20220428155450.de3e39fc8e0e4f64@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 28 16:15:22 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 28 Apr 2022 20:15:22 +0000 Subject: [New-bugs-announce] [Issue 92031] Assertion Failure in _PyCode_Quicken on Windows during test_embed.test_finalize_structseq Message-ID: <20220428201522.3fd3222318ef3a39@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 28 16:17:27 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 28 Apr 2022 20:17:27 +0000 Subject: [New-bugs-announce] [Issue 92032] Add soft keywords to rlcompleter Message-ID: <20220428201727.9f3c2de618a69ac7@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 28 16:18:45 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 28 Apr 2022 20:18:45 +0000 Subject: [New-bugs-announce] [Issue 92033] Usage of first-person pronouns in documentation Message-ID: <20220428201845.61e1d7228a39d12f@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 28 16:35:19 2022 From: github at mg.python.org (CPython Issues) Date: Thu, 28 Apr 2022 20:35:19 +0000 Subject: [New-bugs-announce] [Issue 92036] Crash when using sqlite3 with subinterpreters Message-ID: <20220428203519.631a3dda044bad7b@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 28 20:36:31 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 29 Apr 2022 00:36:31 +0000 Subject: [New-bugs-announce] [Issue 92038] random.sample: `OverflowError` if the size is 2**63 or larger Message-ID: <20220429003631.ea4f6dd5c7151f4a@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Thu Apr 28 23:17:50 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 29 Apr 2022 03:17:50 +0000 Subject: [New-bugs-announce] [Issue 92041] Slow inspect.getmodule Message-ID: <20220429031750.3bf84a396dace32e@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 29 05:34:35 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 29 Apr 2022 09:34:35 +0000 Subject: [New-bugs-announce] [Issue 92043] how do support FGO with python Message-ID: <20220429093435.fd4f280a8af86e10@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 29 09:25:59 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 29 Apr 2022 13:25:59 +0000 Subject: [New-bugs-announce] [Issue 92044] `--with-suffix=no` doesn't work on case-insensitive file systems Message-ID: <20220429132559.106cbc3dc6322ad3@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 29 11:49:08 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 29 Apr 2022 15:49:08 +0000 Subject: [New-bugs-announce] [Issue 92047] The docs for Py_GetVersion assumes minor version < 9 Message-ID: <20220429154908.f4bc939f4086e06e@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 29 12:35:43 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 29 Apr 2022 16:35:43 +0000 Subject: [New-bugs-announce] [Issue 92049] Can't pickle `sre_constants` Message-ID: <20220429163543.d152791bbd39a5bb@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 29 15:17:33 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 29 Apr 2022 19:17:33 +0000 Subject: [New-bugs-announce] [Issue 92052] dataclass copy constructor doesn't recognize default_factory Message-ID: <20220429191733.85c20d1fc3daf744@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 29 17:43:03 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 29 Apr 2022 21:43:03 +0000 Subject: [New-bugs-announce] [Issue 92054] Clarification about how to implement namespace packages (as in PEP 420) via import hooks Message-ID: <20220429214303.419cc2ad21dca3c1@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 29 18:28:50 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 29 Apr 2022 22:28:50 +0000 Subject: [New-bugs-announce] [Issue 92057] sre_parse.py Message-ID: <20220429222850.360834e32925698d@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 29 19:14:51 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 29 Apr 2022 23:14:51 +0000 Subject: [New-bugs-announce] [Issue 92062] `inspect.Parameter` checks that `name` is an identifier, but does not check for keywords Message-ID: <20220429231451.5dfbf1b714049512@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 29 19:24:16 2022 From: github at mg.python.org (CPython Issues) Date: Fri, 29 Apr 2022 23:24:16 +0000 Subject: [New-bugs-announce] [Issue 92063] `PRECALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS` doesn't check types Message-ID: <20220429232416.e514793ded4a4835@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Fri Apr 29 20:08:29 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 30 Apr 2022 00:08:29 +0000 Subject: [New-bugs-announce] [Issue 92064] test_typing fails when run repeatedly Message-ID: <20220430000829.e3a0d8fb7c795ad4@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 30 05:28:32 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 30 Apr 2022 09:28:32 +0000 Subject: [New-bugs-announce] [Issue 92072] doctest is not working for specific case (Python 3.10.4 + PyCharm) Message-ID: <20220430092832.c47bda4495867ad2@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 30 08:03:36 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 30 Apr 2022 12:03:36 +0000 Subject: [New-bugs-announce] [Issue 92076] Python Request Module Leaks Cookies on Redirect to Other hosts Message-ID: <20220430120336.6d14458854e56599@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 30 09:07:57 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 30 Apr 2022 13:07:57 +0000 Subject: [New-bugs-announce] [Issue 92081] BytesGenerator breaks UTF8 string Message-ID: <20220430130757.cb6b5bf2467d143e@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 30 09:51:48 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 30 Apr 2022 13:51:48 +0000 Subject: [New-bugs-announce] [Issue 92082] contextlib.closing is a class, but the docs mark it as a function Message-ID: <20220430135148.91eae68754302094@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 30 13:25:27 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 30 Apr 2022 17:25:27 +0000 Subject: [New-bugs-announce] [Issue 92088] ParserBase could be optimized Message-ID: <20220430172527.326b4fdba6f40b9f@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 30 18:52:41 2022 From: github at mg.python.org (CPython Issues) Date: Sat, 30 Apr 2022 22:52:41 +0000 Subject: [New-bugs-announce] [Issue 92098] Minor doc enhancement for math.acos Message-ID: <20220430225241.f533143ffdc9352c@mg.python.org> An HTML attachment was scrubbed... URL: From github at mg.python.org Sat Apr 30 20:18:57 2022 From: github at mg.python.org (CPython Issues) Date: Sun, 01 May 2022 00:18:57 +0000 Subject: [New-bugs-announce] [Issue 92100] Cannot round-trip UCS-2 with unpaired surrogates using UTF-16 and surrogateescape Message-ID: <20220501001857.3c01721a5b0066f9@mg.python.org> An HTML attachment was scrubbed... URL: